Hi there,

I was trying to experiment a bit with accessing Phoenix-enabled tables
using the HBase API directly. My primary key is compound consisting of a
String and an Unsigned Long.
By printing the bytes of the Row I realized that the byte that splits the
values is 0.
Moreover I realized that the first byte is the salting byte.
The approach that I have now is to identify the first 0 byte position and
extract the string and the long:

val stringId = Bytes.toString(key,1,position_of_first_zero)
val millis = 
PUnsignedLong.INSTANCE.getCodec.decodeLong(key,position_of_first_zero+1,SortOrder.getDefault)


Is there a most sophisticated way to do that?

Thanks a lot!

Reply via email to