You do it exactly the way you described. Separate varchars by zero and
use fixed 8 bytes for the long. So, for example if you have (varchar,
u_long, varchar) primary key, the rowkey for values like 'X',1,'Y'
will be :
('X', 0x00) (0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01), ('Y')
Thanks,
Sergey
On Mon, Feb 22, 2016 at 8:43 AM, Sanooj Padmakumar <[email protected]> wrote:
> Hi,
>
> I have a HBase table created using Phoenix and the primary key is a
> combination of 7 columns out of which one is of type UNSIGNED_LONG and the
> rest are varchar.
>
> I want to perform select and upsert operation on this table using direct
> HBase api's. How do I construct the rowkey in this case ? I read that the
> separator used is (byte) 0 for varchar columns. But in my table there is an
> UNSIGNED_LONG and hence the question.
>
> Any suggestions will be of great help. Thanks
>
> PS : I cannot use direct phoenix here because Phoenix on Spark within a
> kerberised cluster is not working
>
> --
> Thanks,
> Sanooj Padmakumar