Hi Mohammad, The right class to look into is PInteger. It has static class IntCodec which is using for code/decode integers.
Thanks, Sergey On Tue, Mar 22, 2016 at 7:15 AM, Mohammad Adnan Raza <adnanfai...@gmail.com> wrote: > I am changing my question a bit to be more precise... > Given a phoenix table with INTEGER column type. And if I fire upsert > statement with integer value. How phoenix converts it to byte array and put > in the Hbase table. > Or if anyone can tell me which class is responsible for that conversion so I > can look that code. > > > > On Tue, Mar 22, 2016 at 2:00 PM, Mohammad Adnan Raza <adnanfai...@gmail.com> > wrote: >> >> 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 >> > > > > -- > > With Best Regards, > > Mohd Adnan > > Feature Development Lead > > Mobile +91-7498194516 > Blog adnanfaizan.blogspot.in >