Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
HBase, mail # user - HBase thrift API - Mutation store a float in a column


+
Nicolas Seyvet 2013-05-03, 13:23
+
manoj p 2013-05-03, 13:31
+
Nicolas Seyvet 2013-05-03, 13:35
+
Ted Yu 2013-05-03, 13:47
Copy link to this message
-
RE: HBase thrift API - Mutation store a float in a column
Nicolas Seyvet 2013-05-03, 13:58
Hi,

Thanks Ted.

I think you mean to use flip() in order to pre-dispose the buffer for read (ie a get). if I use flip() after generating the ByteBuffer then my data gets to be stored in the row.

ByteBuffer buf = ByteBuffer.allocate(8);

buf.putFloat(12f)
buf.flip();
mutation.setValue(buf);

works...

Is this value readable by something else than another Thrift client? For example can it be read by a Java Native client as a float?
+
Ted Yu 2013-05-03, 14:13
+
Nicolas Seyvet 2013-05-03, 14:28