phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anil gupta <anilgupt...@gmail.com>
Subject Re: Composite primary keys
Date Wed, 04 Mar 2015 07:23:33 GMT
Yes, your understanding is correct regarding use of zero byte char in
rowkey. Also, AFAIK, if the var length component is at the end of rowkey
then also zero byte char is not used.

~Anil

On Tue, Mar 3, 2015 at 11:03 PM, Krishna <research800@gmail.com> wrote:

> Thanks Jeffrey. Is zero byte char separator used between fixed width
> variables? From the text on the website, it looks like separator byte is
> used only between variable length data types - if I'm understanding it
> correctly.
>
> Our composite row keys are formed by simply concatenating the values
>> together, with a zero byte character used as a separator after a variable
>> length type.
>
>
>
> On Tue, Mar 3, 2015 at 10:32 PM, Jeffrey Zhong <jzhong@hortonworks.com>
> wrote:
>
>>
>> Composite row keys are formed by simply concatenating the values together,
>> with a zero byte character used as a separator after a variable length
>> type.
>>
>> You can check code on PTableImpl#newKey
>>
>> On 3/3/15, 10:02 PM, "Krishna" <research800@gmail.com> wrote:
>>
>> >Hi,
>> >
>> >How does phoenix store composite primary keys in HBase?
>> >For example, if the primary key is a composite of two columns:
>> >col1 short
>> >col2 integer
>> >
>> >Does phoenix concatenate 1 byte short with 4 byte integer to create a 5
>> >byte array to make HBase rowkey?
>> >
>> >Please point me to the code that I can refer for details.
>> >
>> >Thanks
>>
>>
>


-- 
Thanks & Regards,
Anil Gupta

Mime
View raw message