Ramasubramanian, I think that you can if you know the maximum number of bytes the fields 2,3,5 are going to use. This is easy if the fields are all primitive types. Judging by the names of the columns you want to use for keys, it looks like long, long, boolean would work.
In your code use Bytes.toBytes() to convert the fields to byte arrays individually, then use Bytes.add() to glue the fields together to become your row key. -John On Sat, Sep 22, 2012 at 10:45 AM, Ramasubramanian Narayanan < [email protected]> wrote: > Hi, > > Can we create rowkey with multiple columns? If so can u please share the > syntax of doing the same for the below scenario. > > Table Name : TXNTABLE > Columns : > 1) Branch > 2) Account Number > 3) Txn Date > 4) Debit credit flag > 5) Txn Reference number. > > In the above scenario I want to create a rowkey for the combination of > columns 2,3 & 5 > > regards, > Rams >
