HBase String.getBytes or Bytes.toBytes
We normally come across the question on whether to use String.getBytes of Bytes.toBytes, while converting the existing String values to Bytes, as HBase stores all information in Bytes format. There is a difference between them. Bytes.toBytes() converts the parameter to a byte[] using UTF-8. String.getBytes() converts the String to byte[] using the OS default encoding.…
HBase String.getBytes or Bytes.toBytes was originally published on













