Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Pig, mail # user - HbaseStorage / OpenTSDB queries issue


+
shazz Ng 2011-09-06, 11:58
Copy link to this message
-
Re: HbaseStorage / OpenTSDB queries issue
Norbert Burger 2011-09-06, 13:37
On Tue, Sep 6, 2011 at 7:58 AM, shazz Ng <[EMAIL PROTECTED]> wrote:
> So from Pig when I want to retrieve only the metrics and their value (= id
> for the data table) I do :
> tsd_metrics     = LOAD 'hbase://tsdb-uid' using
> org.apache.pig.backend.hadoop.hbase.HBaseStorage('id:metrics', '-loadKey
> true') AS (metrics:bytearray);
> dump tsd_metrics;

Shazz -- if you use the "-loadKey" option to HbaseStorage, then your
LOAD schema includes an extra column containing the row key, and you
should add equivalent to your schema column mapping (the AS clause).
Try the following:

tsd_metrics = LOAD 'hbase://tsdb-uid' using
org.apache.pig.backend.hadoop.hbase.HBaseStorage('id:metrics',
'-loadKey true') AS (key:bytearray, metrics:bytearray);

Norbert
+
shazz Ng 2011-09-06, 13:59
+
Bryce Poole 2011-09-06, 14:18
+
shazz Ng 2011-09-06, 14:30
+
shazz Ng 2011-09-06, 15:00
+
Bryce Poole 2011-09-06, 17:03
+
Dmitriy Ryaboy 2011-09-06, 17:10
+
Dmitriy Ryaboy 2011-09-06, 17:10
+
shazz Ng 2011-09-07, 06:40