I am trying to index data from hive table to elasticsearch and and using
the latest elasticsearch-hadoop-master plugin.
My elasticsearch version is 0.90.9 and hive version is hive-0.11.0.
As per the documentation of elasticsearch-hadoop plugin (hive integration),
I successfully created an external table with the below command
Even though the external table is created
I am not able to either insert data or even query the external table.
When I do a select * from es_products;
I get the below exception.
hive> select * from es_products;
OK
Failed with exception
java.io.IOException:java.lang.StringIndexOutOfBoundsException: String index
out of range: -1
Time taken: 1.699 seconds
Can someone please suggest what / where I am wrong!
The 'es.resource' you specified is incorrect - you need to specify both an index and a type - e.g. myIndex/products
P.S. Are you using M1 or the current master - the latter should give a proper error (and message).
Thanks,
On 07/01/2014 9:48 AM, Badal Mohapatra wrote:
Hi,
I am trying to index data from hive table to elasticsearch and and using the latest elasticsearch-hadoop-master plugin.
My elasticsearch version is 0.90.9 and hive version is hive-0.11.0.
As per the documentation of elasticsearch-hadoop plugin (hive integration), I successfully created an external table
with the below command
/CREATE EXTERNAL TABLE es_products (
sku int,rating float,
name string,
type string,
saleprice float,
department string,
manufacturer string,
userid string,
category_name string,
query string)
STORED BY 'org.elasticsearch.hadoop.hive.ESStorageHandler'
TBLPROPERTIES('es.resource' ='products');/
Even though the external table is created
I am not able to either insert data or even query the external table.
When I do a /select * from es_products;/
I get the below exception.
hive> select * from es_products;
OK
Failed with exception java.io.IOException:java.lang.StringIndexOutOfBoundsException: String index out of range: -1
Time taken: 1.699 seconds
Can someone please suggest what / where I am wrong!
Thanks for your kind reply.
After specifying the type in es.resource I am now able to index.
I am using M1, will try with master once indexing is done.
Regards,
Badal
On Tuesday, 7 January 2014 16:21:01 UTC+5:30, Costin Leau wrote:
Hi,
The 'es.resource' you specified is incorrect - you need to specify both an
index and a type - e.g. myIndex/products
P.S. Are you using M1 or the current master - the latter should give a
proper error (and message).
Thanks,
On 07/01/2014 9:48 AM, Badal Mohapatra wrote:
Hi,
I am trying to index data from hive table to elasticsearch and and
using the latest elasticsearch-hadoop-master plugin.
My elasticsearch version is 0.90.9 and hive version is hive-0.11.0.
As per the documentation of elasticsearch-hadoop plugin (hive
integration), I successfully created an external table
with the below command
/CREATE EXTERNAL TABLE es_products (
sku int,rating float,
name string,
type string,
saleprice float,
department string,
manufacturer string,
userid string,
category_name string,
query string)
STORED BY 'org.elasticsearch.hadoop.hive.ESStorageHandler'
TBLPROPERTIES('es.resource' ='products');/
Even though the external table is created
I am not able to either insert data or even query the external table.
When I do a /select * from es_products;/
I get the below exception.
hive> select * from es_products;
OK
Failed with exception
java.io.IOException:java.lang.StringIndexOutOfBoundsException: String index
out of range: -1
Time taken: 1.699 seconds
Can someone please suggest what / where I am wrong!
Kind Regards,
Badal
--
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 elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.