phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Taylor <>
Subject Re: Perform Scan-like range query on VARBINARY key column
Date Mon, 06 Jul 2015 18:04:51 GMT
You can use a regular SQL query with comparison operators (=, <, <=, >, >=,
!=) against constants with your keys. Any type will be autocast to
VARBINARY and you can use PrepareStatement.setBytes(<colIndexOrString) for
bind variables that are arbitrary bytes for your key. The salting will
happen transparently, so  you don't have to do anything special.


On Mon, Jul 6, 2015 at 9:06 AM, Yiannis Gkoufas <>

> Hi all,
> I have created a table in that way:
> CREATE TABLE TWEETS (my_key VARBINARY, text varchar, tweetid varchar, user
> varchar, date varchar, CONSTRAINT my_pk PRIMARY
> KEY(my_key)) SALT_BUCKETS=120
> my_key is a custom byte array key I have constructed
> What I want to do is to actually perform a Scan on the key, but I cannot
> use the Hbase Core API because of the Salting applied.
> Any idea on how I can perform a range query on the key column?
> Thanks a lot!

View raw message