phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mohammad Adnan Raza <adnanfai...@gmail.com>
Subject How phoenix converts Integer to byte array under the hood
Date Tue, 22 Mar 2016 08:30:35 GMT
Hello Everyone,

I have created phoenix table like this

CREATE TABLE PRODUCT_DETAILS(NAME VARCHAR NOT NULL PRIMARY KEY,CF.VOLUME
INTEGER,CF.PRICE INTEGER,CF.DISCOUNT INTEGER,CF.BASELINE INTEGER,CF.UPLIFT
INTEGER,CF.FINALPRICE INTEGER,CF.SALEPRICE INTEGER);

Now the datatype Integer is 4 byte signed integer. I wonder how phoenix
converts this to hbase specific byte array.
https://phoenix.apache.org/language/datatypes.html link does talk about
conversion of other data types but not for INTEGER. For example
UNSIGNED_INT is converted as Bytes.toInt(). I don't get a proper method for
integer.
anyone knows about it?

-- 

*With Best Regards,*

*       Mohd Adnan*

Mime
View raw message