phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yiannis Gkoufas <johngou...@gmail.com>
Subject Re: Perform Scan-like range query on VARBINARY key column
Date Wed, 08 Jul 2015 10:00:55 GMT
Hi James,

the queries seem to work, but I am not getting the same results with a scan
in an unsalted hbase table (not phoenix) with the same data loaded, so
probably I am doing something wrong.
How can I debug the scans issued to hbase to validate that everything is
correct with my query?

Thanks a lot!

On 6 July 2015 at 23:55, Yiannis Gkoufas <johngouf85@gmail.com> wrote:

> Thanks James for your reply!
> I will give it a shot!
>
>
> On 6 July 2015 at 19:04, James Taylor <jamestaylor@apache.org> wrote:
>
>> 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.
>>
>> Thanks,
>> James
>>
>> On Mon, Jul 6, 2015 at 9:06 AM, Yiannis Gkoufas <johngouf85@gmail.com>
>> wrote:
>>
>>> 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!
>>>
>>
>>
>

Mime
View raw message