hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bigdata <bigdatab...@outlook.com>
Subject how to create a Result object with some null value?
Date Wed, 27 Feb 2013 12:34:17 GMT
Now I want to test HBase with mock Result object.In the map(), we get value like this:








byte[] date = value.getValue(Bytes.toBytes("f"),
					Bytes.toBytes("date"));
Sometimes,  the byte[] date will be null because of null value in hbase.
Now I want to create fake HBase object by using :







new KeyValue(
					Bytes.toBytes(rowkey),
					Bytes.toBytes(family),
					Bytes.toBytes(qualifier),
					1,
					Bytes.toBytes(value));
But I can't set value to null to create KeyValue object.
Anybody knows how to simulate this situation? 		 	   		  
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message