phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Abhilash L L <abhil...@capillarytech.com>
Subject Re: Regarding rowkey encoding in Phoenix as compared to HBase
Date Wed, 30 Jul 2014 07:11:09 GMT
@Ashish
Phoenix flips the sign bit, so that negative numbers are sorted before
positive values

Refer http://phoenix.apache.org/language/datatypes.html for more details.


Regards,
Abhilash L L
Capillary Technologies
M:919886208262
abhilash@capillarytech.com | www.capillarytech.com

Email from people at capillarytech.com may not represent official policy of
 Capillary Technologies unless explicitly stated. Please see our
Corporate-Email-Policy
<http://support.capillary.co.in/policy-public/Corporate-Email-Policy.pdf>
for details. Contents of this email are confidential. Please contact the
Sender if you have received this email in error.



On Wed, Jul 30, 2014 at 10:10 AM, yinxl@shencai.cc <yinxl@shencai.cc> wrote:

> in java, you can use as this:
> byte [] rk = org.apache.phoenix.schema.PDataType.INTEGER.toBytes(rowkey);
>
> ------------------------------
> yinxl@shencai.cc
>
>
> *From:* ashish tapdiya <ashishtapdiya@gmail.com>
> *Date:* 2014-07-30 10:19
> *To:* user <user@phoenix.apache.org>
> *Subject:* Regarding rowkey encoding in Phoenix as compared to HBase
> Hi
>
> I have created a table using Phoenix. The key type is integer. When I
> insert a row from phoenix with key value 55 and scan the table from HBase
> shell I get key value as \x80\x00\x007
>
> I created another table using HBase shell and inserted row with key value
> 55. Scanning the table shows that the key is stored as \x00\x00\x007.
>
> Wondering if Phoenix makes any changes to the key before storing. How can
> I access the tables created in Phoenix using HBase API.
>
> Thanks,
> ~Ashish
>
>

-- 
Email from people at capillarytech.com may not represent official policy of 
Capillary Technologies unless explicitly stated. Please see our 
Corporate-Email-Policy for details.Contents of this email are confidential. 
Please contact the Sender if you have received this email in error.

Mime
View raw message