Check out the bytes utility class had methods for converting songs to byte arrays and vice versa. If you have numeric data, you can save on space by using the Bytes.toBytes(int) etc calls, instead of converting to string first. This can make it a bit harder top display in the shell since it will look like a hex dump not a number, but consider a long can have 19 decimal digits, but only takes up 8 bytes, you can see the attraction.
At su we use binary storage, but it does make hive interop a little harder. But the savings can be substantial! On Jan 26, 2011 1:47 AM, "Eric" <[email protected]> wrote: > I'm wondering what the best way is to store my data in HBase. I'm currently > converting everything to a string and then to a bytes array. > What are others doing? Plain text to to byte arrays and eventually convert > your data back to floats, int, etcetera?
