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 :
>
> - {
> - _index: radio
> - _type: artists
> - _id: 1
> - _score: 1
> - _source: {
> - id: 1
> - name: tata
> }
> }
> - {
> - _index: radio
> - _type: artists
> - _id: 2
> - _score: 1
> - _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] <javascript:>>
>
>> 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]
>> <javascript:>> 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
>>
>> 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
>> 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
>> 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
>> -----
>> 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.
>> To unsubscribe from this group and all its topics, send an email to
>> [email protected] <javascript:>.
>> For more options, visit 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.
>> To unsubscribe from this group and all its topics, send an email to
>> [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>
>
> --
> Chung Fabien
>
>
>
> EFREI Promo 2013
> Tel : 06 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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/9d8cb3ad-3fbf-465b-b167-33b8e9fd6ff0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.