It's quite easy - the es.resource format is incorrect. It should be index/type as in radio/artists If you want/need to specify an ID or other criteria, you should do so in the query (through es.query).
On 9/18/14 12:10 PM, Fabien Chung wrote:
Hi, I would be glad to help you unfortunatly I stop for 1 year using ES and I can't remember how I solved this issue. Sorry, Fabien 2014-09-18 11:05 GMT+02:00 Mohit Kumar Yadav <[email protected] <mailto:[email protected]>>: Hi Fabien, I also getting the same error message. can you please tell me what is the solution for it if you have get rid of this error.? thanks in advance regards Mohit Kumar Yadav On Wednesday, June 26, 2013 2:59:54 PM UTC+5:30, Fabien Chung wrote: Hi, thanks for your answer. Sorry I didn't copy the right command line. Any way I still have the same probleme to read write on ES from hive. in ES : * { o _index: radio o _type: artists o _id: 1 o _score: 1 o _source: { + id: 1 + name: tata } } * { o _index: radio o _type: artists o _id: 2 o _score: 1 o _source: { + id: 2 + name: test } i can't get any results, here what i tried : hive> CREATE EXTERNAL TABLE artists2 ( > > id BIGINT, > > name STRING) > > STORED BY 'org.elasticsearch.hadoop.__hive.ESStorageHandler' > > TBLPROPERTIES('es.resource' = 'radio/artists/2'); select * from artists2; Failed with exception java.io.IOException:java.lang.__IllegalStateException: [GET] on [radio/artists/2/_search___shards] failed; server[http://localhost:9200] returned [No handler found for uri [radio/artists/2/_search___shards] and method [GET]] Time taken: 0.223 seconds hive> CREATE EXTERNAL TABLE artists ( > > id BIGINT, > > name STRING) > > STORED BY 'org.elasticsearch.hadoop.__hive.ESStorageHandler' > > TBLPROPERTIES('es.resource' = 'radio/artists/_search?q=me*')__; hive> select * from artists; OK Time taken: 0.244 seconds Regards, Fabien 2013/6/25 Abhishek <[email protected]> Fabien, The mapping I'm taking about is elastic search mapping it's like ES index schema. Your external table structure has three columns and your select statement has only two fields name and id. Try select star(all) or change external table schema to just name and id. You don't need to worry about the mappings. Thanks. Abhishek Sent from my iPhone On Jun 25, 2013, at 11:39 AM, Fabien Chung <[email protected]> wrote:Hi all, I'm encountering some troubles to understand what i should do to push data from Hive to ES. I have installed the elasticsearch pluggin, ES, HIVE and so on. I folow instructions from :https://github.com/__elasticsearch/elasticsearch-__hadoop#configuration-__properties <https://github.com/elasticsearch/elasticsearch-hadoop#configuration-properties> CREATE EXTERNAL TABLE artists ( id BIGINT, name STRING, links STRUCT<url:STRING, picture:STRING>) STORED BY 'org.elasticsearch.hadoop.__hive.ESStorageHandler' TBLPROPERTIES('es.resource' = __'radio/artists/'); That sounds work properly. I created the index artist on Elasticsearch. But, in fine, this command doesn't work : INSERT OVERWRITE TABLE Darty_Mapping SELECT id, name FROM artist_hive; (artist_hive has the same structure as artist, but it's a local hive table) I have this error : Total MapReduce jobs = 1 Launching Job 1 out of 1 Number of reduce tasks is set to 0 since there's no reduce operator Starting Job = job_201306201709_0026, Tracking URL = http://hdpnoddev1.intranet.__darty.fr:50030/jobdetails.jsp?__jobid=job_201306201709_0026 <http://hdpnoddev1.intranet.darty.fr:50030/jobdetails.jsp?jobid=job_201306201709_0026> Kill Command = /usr/lib/hadoop/bin/hadoop job -kill job_201306201709_0026 Hadoop job information for Stage-0: number of mappers: 1; number of reducers: 0 2013-06-25 17:00:14,410 Stage-0 map = 0%, reduce = 0% 2013-06-25 17:00:37,564 Stage-0 map = 100%, reduce = 100% Ended Job = job_201306201709_0026 with errors Error during job, obtaining debugging information... Job Tracking URL: http://hdpnoddev1.intranet.__darty.fr:50030/jobdetails.jsp?__jobid=job_201306201709_0026 <http://hdpnoddev1.intranet.darty.fr:50030/jobdetails.jsp?jobid=job_201306201709_0026> Examining task ID: task_201306201709_0026_m___000002 (and more) from job job_201306201709_0026 Task with the most failures(4): ----- Task ID: task_201306201709_0026_m___000000 URL: http://hdpnoddev1.intranet.__darty.fr:50030/taskdetails.__jsp?jobid=job_201306201709___0026&tipid=task_201306201709___0026_m_000000 <http://hdpnoddev1.intranet.darty.fr:50030/taskdetails.jsp?jobid=job_201306201709_0026&tipid=task_201306201709_0026_m_000000> ----- Diagnostic Messages for this Task: java.lang.RuntimeException: Error in configuring object at org.apache.hadoop.util.__ReflectionUtils.setJobConf(__ReflectionUtils.java:106) at org.apache.hadoop.util.__ReflectionUtils.setConf(__ReflectionUtils.java:72) at org.apache.hadoop.util.__ReflectionUtils.newInstance(__ReflectionUtils.java:130) at org.apache.hadoop.mapred.__MapTask.runOldMapper(MapTask.__java:413) at org.apache.hadoop.mapred.__MapTask.run(MapTask.java:332) at org.apache.hadoop.mapred.__Child$4.run(Child.java:268) at java.security.__AccessController.doPrivileged(__Native Method) at javax.security.auth.Subject.__doAs(Subject.java:396) at org.apache.hadoop.security.__UserGroupInformation.doAs(__UserGroupInformation.java:__1408) at org.apache.hadoop.mapred.__Child.main(Child.java:262) Caused by: java.lang.reflect.__InvocationTargetException at sun.reflect.__NativeMethodAccessorImpl.__invoke0(Native Method) at sun.reflect.__NativeMethodAccessorImpl.__invoke(__NativeMethodAccessorImpl.java:__39) at sun.reflect.__DelegatingMethodAccessorImpl.__invoke(__DelegatingMethodAccessorImpl.__ja FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.__exec.MapRedTask MapReduce Jobs Launched: Job 0: Map: 1 HDFS Read: 0 HDFS Write: 0 FAIL Total MapReduce CPU Time Spent: 0 msec Abhishek speaks about a mapping table ??? what is it exactly ? Any help will be kindly appreciated, Thanks, Fabien PS: i'm a really beginner on Linux / Hadoop environnment, sorry if it's a silly question :) -- You received this message because you are subscribed to a topic in the Google Groups "elasticsearch" group. To unsubscribe from this topic, visit https://groups.google.com/d/__topic/elasticsearch/__BAaoqF6SkiY/unsubscribe <https://groups.google.com/d/topic/elasticsearch/BAaoqF6SkiY/unsubscribe>. To unsubscribe from this group and all its topics, send an email to elasticsearc...@__googlegroups.com. For more options, visit https://groups.google.com/__groups/opt_out <https://groups.google.com/groups/opt_out>.-- You received this message because you are subscribed to a topic in the Google Groups "elasticsearch" group. To unsubscribe from this topic, visit https://groups.google.com/d/__topic/elasticsearch/__BAaoqF6SkiY/unsubscribe <https://groups.google.com/d/topic/elasticsearch/BAaoqF6SkiY/unsubscribe>. To unsubscribe from this group and all its topics, send an email to elasticsearc...@__googlegroups.com. For more options, visit https://groups.google.com/__groups/opt_out <https://groups.google.com/groups/opt_out>. -- Chung Fabien EFREI Promo 2013 Tel : 06 48 03 54 92 <tel:06%2048%2003%2054%2092> -- You received this message because you are subscribed to a topic in the Google Groups "elasticsearch" group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/elasticsearch/BAaoqF6SkiY/unsubscribe. To unsubscribe from this group and all its topics, send an email to [email protected] <mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/9d8cb3ad-3fbf-465b-b167-33b8e9fd6ff0%40googlegroups.com <https://groups.google.com/d/msgid/elasticsearch/9d8cb3ad-3fbf-465b-b167-33b8e9fd6ff0%40googlegroups.com?utm_medium=email&utm_source=footer>. For more options, visit https://groups.google.com/d/optout. -- Chung Fabien Consultant Junior YSANCE Tel : +33 6 48 03 54 92 -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CA%2BtyE3kLEt-MAmGhH4sRHNZta220bzJGEz%2Bc%3D7Tdigikm4qjSg%40mail.gmail.com <https://groups.google.com/d/msgid/elasticsearch/CA%2BtyE3kLEt-MAmGhH4sRHNZta220bzJGEz%2Bc%3D7Tdigikm4qjSg%40mail.gmail.com?utm_medium=email&utm_source=footer>. For more options, visit https://groups.google.com/d/optout.
-- Costin -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/541AC085.4050505%40gmail.com. For more options, visit https://groups.google.com/d/optout.
