hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From devush <devushan...@gmail.com>
Subject ToBytes or ToString
Date Fri, 11 Feb 2011 21:01:11 GMT
hi,
 I want to have the fixed size row key. i want to see the key in the
shell also. Currently i have java Long as the key id, so the string
representation is 19 characters maximum. I am using java
String.format("%019d", myLongVariable).

I am not sure if this is the correct way. If i use bytes array

byte[] b = Bytes.toBytes(long), then i will have the length equal 8
which is correct as the SIZEOF_LONG is 8. But in this case i am not
able to see the decimal values in hbase shell.

what is the best way to handle this. My row is rather big, but
contains only the Long values i.e. digits.

thanks
devush.

Mime
View raw message