hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas Seyvet <nicolas.sey...@ericsson.com>
Subject HBase thrift API - Mutation store a float in a column
Date Fri, 03 May 2013 13:23:01 GMT
Hi,

Using the HBase thrift API, and Java as a programming language, it seems that when setting
a value in a Mutation :

Mutation mutation = new Mutation();
mutation.setIsDelete(false);
 mutation.setColumn(StringUtils.bytes("data latitude"));

ByteBuffer buf = ByteBuffer.allocate(8);
mutation.setValue(buf.putFloat(12f));

The resulting value in HBase (as seen from the shell) is always:

1234##2013-05-123 03:49:13                            column=data:latitude, timestamp=1367587243318,
value=\x00\x00\x00\x00

What am I doing wrong?

Mime
View raw message