I am loading my data from an Hbase table into Elasticsearch engine using
Pig.
I have a column in my Hbase table called timestamp (with data like
"2014-03-18 11:05:37.503").
I want this field to be automatically detected as the timestamp field by
the Elasticsearch (I need to add time filter on my Kibana dashboard).
Here's what I do in the PIG grunt shell:
REGISTER /path-to-my/elasticsearch-hadoop.jar;
A = LOAD 'hbase://demo' USING
org.apache.pig.backend.hadoop.hbase.HBaseStorage('cf:timestamp') as (
timestamp:chararray);
STORE A INTO 'demo/demo' USING org.elasticsearch.hadoop.pig.ESStorage();
Should I store the values for the field in any particular format?
How do I alter the above steps to suit my requirement?
You can either convert the timestamp field in Pig to UTF format (try the dateTime type and its associated functions [1])
or you can create the index mapping in Elasticsearch before indexing and define the time field format accordingly [2]
I am loading my data from an Hbase table into Elasticsearch engine using Pig.
I have a column in my Hbase table called timestamp (with data like "2014-03-18 11:05:37.503").
I want this field to be automatically detected as the timestamp field by the Elasticsearch (I need to add time filter on
my Kibana dashboard).
Here's what I do in the PIG grunt shell:
REGISTER /path-to-my/elasticsearch-hadoop.jar;
A = LOAD 'hbase://demo' USING org.apache.pig.backend.hadoop.hbase.HBaseStorage('cf:timestamp') as ( timestamp:chararray);
STORE A INTO 'demo/demo' USING org.elasticsearch.hadoop.pig.ESStorage();
Should I store the values for the field in any particular format?
How do I alter the above steps to suit my requirement?
You can either convert the timestamp field in Pig to UTF format (try the dateTime type and its associated functions [1])
or you can create the index mapping in Elasticsearch before indexing and define the time field format accordingly [2]
I am loading my data from an Hbase table into Elasticsearch engine using Pig.
I have a column in my Hbase table called timestamp (with data like "2014-03-18 11:05:37.503").
I want this field to be automatically detected as the timestamp field by the Elasticsearch (I need to add time filter on
my Kibana dashboard).
Here's what I do in the PIG grunt shell:
REGISTER /path-to-my/elasticsearch-hadoop.jar;
A = LOAD 'hbase://demo' USING org.apache.pig.backend.hadoop.hbase.HBaseStorage('cf:timestamp') as ( timestamp:chararray);
STORE A INTO 'demo/demo' USING org.elasticsearch.hadoop.pig.ESStorage();
Should I store the values for the field in any particular format?
How do I alter the above steps to suit my requirement?
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.