Unable to create index and insert data?

(Abdul Gaffar Shaikh) #1

hey Guys ,

I am trying to index data from hive into elasticsearch , however when i ran the below query , there is no error and index is not created in elasticsearch.

create external table es_names_text (employeeid int,firstname string,title string,state string,laptop string) STORED BY 'org.elasticsearch.hadoop.hive.EsStorageHandler' TBLPROPERTIES('es.resource' = 'es_names_text/employee', 'es.nodes'='localhost','es.port'='9200','es.index.auto.create' = 'true') ;

It is a single node cluster Also if i try to insert data into this , below snippet is show indefinitely

Total jobs = 1
Launching Job 1 out of 1
Number of reduce tasks is set to 0 since there's no reduce operator

Also i have not created index explicitly on elasticsearch.

please let me know how to create it and insert data without waiting for mr job to execute.

edit note:- elasticsearch and hadoop and hive are on the same machine but are on installed using different user id's. Hadoop and hive in login A and elasticsearch on login B. does this affect hive connecting to elasticsearch ?

(Abdul Gaffar Shaikh) #2

HI team,

I have already solved the above problem. the es.nodes was set to localhost and it was not set in /etc/hosts file. Also we need to increase the ulimit size so that the job is fast.

(system) closed #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.