@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 [email protected] | 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, [email protected] <[email protected]> wrote: > in java, you can use as this: > byte [] rk = org.apache.phoenix.schema.PDataType.INTEGER.toBytes(rowkey); > > ------------------------------ > [email protected] > > > *From:* ashish tapdiya <[email protected]> > *Date:* 2014-07-30 10:19 > *To:* user <[email protected]> > *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.
