Hi Guys,
I have ES installed on 16 nodes in my Cloudera Hadoop cluster. All looks
good from an ES point of view.
I now want to test a very simple data load from hdfs to ES but am
struggling. I am using PIG and have elasticsearch-hadoop installed.
I want to load a single file, it is a pipe-delimited text file and is on
the hdfs:
$ hdfs dfs -ls /logfiles/20140820
Found 1 items
-rw-r--r-- 3 bob supergroup 2015426946 2014-08-20 06:45 /logfiles/20140820
Can someone help me with a really simple test using PIG? When I try the
following I get:
grunt> DEFINE EsStorage org.elasticsearch.hadoop.pig.EsStorage();
grunt> data = load '/logfiles/20140820' using PigStorage('\n')
grunt> B = foreach data generate $0 as id;
grunt> STORE B INTO 'esTEST' using EsStorage('es.http.timeout = 5m');
You need to have the output in the format of [index]/[type]!
So change:
STORE B INTO 'esTEST' using EsStorage('es.http.timeout = 5m');
to
STORE B INTO 'demo/esTEST' using EsStorage('es.http.timeout = 5m');
All working now
------------------------
On Wednesday, August 20, 2014 12:25:32 PM UTC+1, bob.w...@gmail.com wrote:
Hi Guys,
I have ES installed on 16 nodes in my Cloudera Hadoop cluster. All looks
good from an ES point of view.
I now want to test a very simple data load from hdfs to ES but am
struggling. I am using PIG and have elasticsearch-hadoop installed.
I want to load a single file, it is a pipe-delimited text file and is on
the hdfs:
$ hdfs dfs -ls /logfiles/20140820
Found 1 items
-rw-r--r-- 3 bob supergroup 2015426946 2014-08-20 06:45
/logfiles/20140820
Can someone help me with a really simple test using PIG? When I try the
following I get:
grunt> DEFINE EsStorage org.elasticsearch.hadoop.pig.EsStorage();
grunt> data = load '/logfiles/20140820' using PigStorage('\n')
grunt> B = foreach data generate $0 as id;
grunt> STORE B INTO 'esTEST' using EsStorage('es.http.timeout = 5m');
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.