phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pariksheet Barapatre <pbarapa...@gmail.com>
Subject Phoenix Table partial key scan
Date Wed, 17 Sep 2014 05:00:00 GMT
Hello All,

I have created sample phoenix table as below -

CREATE TABLE TEST.PHOENIX_TEST
(
PK1 VARCHAR NOT NULL
,PK2 VARCHAR NOT NULL
,PK3 VARCHAR NOT NULL
,D.COL1 VARCHAR
,D.COL2 VARCHAR
CONSTRAINT PK PRIMARY KEY (PK1,PK2,PK3)
)
SALT_BUCKETS = 20
;

UPSERT INTO TEST.PHOENIX_TEST VALUES('12','34','45','pari','yume');
UPSERT INTO TEST.PHOENIX_TEST VALUES('3','45','45','pari','yume');
UPSERT INTO TEST.PHOENIX_TEST VALUES('4','45','45','pari4','yume');
UPSERT INTO TEST.PHOENIX_TEST VALUES('5','45','45','pari5','yume');
UPSERT INTO TEST.PHOENIX_TEST VALUES('6','45','45','pari6','yume');


I can do partial key scan through phoenix -

explain SELECT * FROM TEST.PHOENIX_TEST WHERE PK1='3';
+------------+
|    PLAN    |
+------------+
| CLIENT PARALLEL 632-WAY SKIP SCAN ON 20 KEYS OVER TEST.PHOENIX_TEST
[0,'3'] - [19,'3'] |
| CLIENT MERGE SORT |


I want to do same thing through HBase shell -

Full scan works -

hbase(main):025:0> scan 'TEST.PHOENIX_TEST'
ROW
COLUMN+CELL

 \x036\x0045\x0045                   column=D:COL1,
timestamp=1410927748527,
value=pari6
 \x036\x0045\x0045                   column=D:COL2,
timestamp=1410927748527,
value=yume
 \x036\x0045\x0045                   column=D:_0, timestamp=1410927748527,
value=
 \x0A12\x0034\x0045                  column=D:COL1,
timestamp=1410926036259,
value=pari
 \x0A12\x0034\x0045                  column=D:COL2,
timestamp=1410926036259,
value=yume
 \x0A12\x0034\x0045                  column=D:_0, timestamp=1410926036259,
value=
 \x0A3\x0045\x0045                   column=D:COL1,
timestamp=1410926714598,
value=pari
 \x0A3\x0045\x0045                   column=D:COL2,
timestamp=1410926714598,
value=yume
 \x0A3\x0045\x0045                   column=D:_0, timestamp=1410926714598,
value=
 \x0B4\x0045\x0045                   column=D:COL1,
timestamp=1410927745682,
value=pari4
 \x0B4\x0045\x0045                   column=D:COL2,
timestamp=1410927745682,
value=yume
 \x0B4\x0045\x0045                   column=D:_0, timestamp=1410927745682,
value=
 \x0C5\x0045\x0045                   column=D:COL1,
timestamp=1410927745713,
value=pari5
 \x0C5\x0045\x0045                   column=D:COL2,
timestamp=1410927745713,
value=yume
 \x0C5\x0045\x0045                   column=D:_0, timestamp=1410927745713,
value=


But partial key scan not working -

hbase(main):026:0> scan 'TEST.PHOENIX_TEST' , {STARTROW => '0' , ENDROW =>
'19'}
ROW
COLUMN+CELL

0 row(s) in 0.0150 seconds

How to run phoenix partial scan query through HBase?




Cheers,
Pari

Mime
View raw message