# Unable to create index and insert data?

**URL:** <https://discuss.elastic.co/t/unable-to-create-index-and-insert-data/166286>\
**Category:** Elasticsearch\
**Tags:** es-hadoop\
**Created:** [January 30, 2019, 7:28am UTC](https://discuss.elastic.co/t/unable-to-create-index-and-insert-data/166286 "2019-01-30T07:28:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abdul\_Gaffar\_Shaikh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abdul_gaffar_shaikh/32/78006_2.png) [@Abdul\_Gaffar\_Shaikh](https://discuss.elastic.co/u/Abdul_Gaffar_Shaikh)\
**Post date:** [January 30, 2019, 7:28am UTC](https://discuss.elastic.co/t/unable-to-create-index-and-insert-data/166286/1 "2019-01-30T07:28:26Z")

</div>

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 ?

---

<div class="post-metadata">

**Author:** ![Abdul\_Gaffar\_Shaikh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abdul_gaffar_shaikh/32/78006_2.png) [@Abdul\_Gaffar\_Shaikh](https://discuss.elastic.co/u/Abdul_Gaffar_Shaikh)\
**Post date:** [February 8, 2019, 9:18am UTC](https://discuss.elastic.co/t/unable-to-create-index-and-insert-data/166286/2 "2019-02-08T09:18:34Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 8, 2019, 9:18am UTC](https://discuss.elastic.co/t/unable-to-create-index-and-insert-data/166286/3 "2019-03-08T09:18:35Z")

</div>

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