HTTP 400 Bad Request

220 views
Skip to first unread message

pedro...@g.xarevision.pt

unread,
Oct 13, 2017, 4:59:31 AM10/13/17
to actionml-user
Hello, I'm trying to train a model with the universal recommender project, with Elasticsearch and Hbase.

When I try to execute the command pio train -- --driver-memory 2g --executor-memory 2g I get the following error:

`Exception in thread "main" org.apache.predictionio.shaded.org.elasticsearch.client.ResponseException: PUT http://127.0.0.1:9200/predictionio_metadata/_mapping/apps: HTTP/1.1 400 Bad Request
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"mapper [id] cannot be changed from type [text] to [keyword]"}],"type":"illegal_argument_exception","reason":"mapper [id] cannot be changed from type [text] to [keyword]"},"status":400}`

My machine has 8gb of RAM. Even if I try to give it more memory like recommended in https://groups.google.com/forum/#!searchin/actionml-user/400%7Csort:relevance/actionml-user/68aGXvJh0Kk/He9-LoOVDQAJ I still get the exact same problem.

This is what Elasticsearch logs when this error happens:
[2017-10-13T09:57:13,442][DEBUG][o.e.a.a.i.m.p.TransportPutMappingAction] [incxz5z] failed to put mappings on indices [[[predictionio_metadata/dw6wjqtxRr-2sHtG3noDjA]]], type [apps]
java.lang.IllegalArgumentException: mapper [id] cannot be changed from type [text] to [keyword]

Any suggestion?

Thank you! :)

Pat Ferrel

unread,
Oct 13, 2017, 1:17:42 PM10/13/17
to pedro...@g.xarevision.pt, actionml-user
An 8g machine will not run PIO + HBASE + HDFS + Spark + UR + Elasticsearch.

My laptop has 16g and can only process small-ish data. setting memory for Spark to 2g will not even cover the overhead, let alone leave room for data. I think the integration test uses 3 or 4g per driver and executor and that uses a toy micro dataset.

--
You received this message because you are subscribed to the Google Groups "actionml-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to actionml-use...@googlegroups.com.
To post to this group, send email to action...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/actionml-user/c9698143-ea47-4258-876d-fafbcf96ba89%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

pedro...@g.xarevision.pt

unread,
Oct 16, 2017, 4:18:22 AM10/16/17
to actionml-user
Hey pat, thank you for your answer.

What bothers me is this type of exception, I imagine 8gb can't do much, but wouldn't another type of exception be thrown instead of `{"error":{"root_cause":[{"
type":"illegal_argument_exception","reason":"mapper [id] cannot be changed from type [text] to [keyword]"}],"type":"illegal_argument_exception","reason":"mapper [id] cannot be changed from type [text] to [keyword]"},"status":400}`?

It looks strange to me. I'll try to train the model on another machine :)

Pat Ferrel

unread,
Oct 16, 2017, 2:33:15 PM10/16/17
to pedro...@g.xarevision.pt, actionml-user
That sounds completely foreign to me, why is it in JSON? You need to describe more. When is this happening, answer the questions below, please.

You have to have more than 8g but this doesn’t sound like anything I have seen from any part of the system. None of the errors I have seen are in JSON for instance.

Make sure the integration-test script succeeds, this will test your setup.

BTW we have an AWS AMI you can just run, with no setup required: http://actionml.com/docs/awssetupguide


Reply all
Reply to author
Forward
0 new messages