when working with Java API Java HBase I have a line of code as shown below:
byte[] value = scanner.next().getValue(Bytes.toBytes(family), Bytes.toBytes(qualifier));
Suppose I donโt know if this value is a value of type Int or String , which should I use between Byte.toInt(value)
and Byte.toString(value)
to print the value correctly ?
This is not a HBase / Hadoop question, but rather Java, but I googled and cannot find a way to get it. Is it possible to find out?
In the other direction, from the Java HBase API, how can I find out the data type for a given value stored in the family: qualifier?
Thanks!
leslie
source share