ElasticsearchHadoop Hive integration issue

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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/dd63310c-dc07-4dc6-9354-69051a05da3f%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

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
elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/dd63310c-dc07-4dc6-9354-69051a05da3f%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/52CBDC15.6040307%40gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Hi Costin,

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

https://groups.google.com/d/msgid/elasticsearch/dd63310c-dc07-4dc6-9354-69051a05da3f%40googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
--
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/fdcdffc0-bffc-45b3-96dd-30e894c68677%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.