Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
HBase >> mail # user >> Null rowkey with empty get operation


Copy link to this message
-
RE: Null rowkey with empty get operation
Hi Ben,
      In HBase rowkey exists with KVs only. As in your case there is no KVs in the result, and so no rowkey. What is the use case that you are referring here? When you issued Get with a rowkey and empty result for that , you know the rowkey already right? I mean any specific reason why you try to find the rowkey from the result object?

-Anoop-

________________________________________
From: Ben Kim [[EMAIL PROTECTED]]
Sent: Tuesday, May 29, 2012 6:42 AM
To: [EMAIL PROTECTED]
Subject: Null rowkey with empty get operation

I have following Get code with HBase 0.92.0

Get get = new Get(Bytes.toBytes(rowkey));
get.addFamily(family);
Filter filter = new QualifierFilter(CompareOp.NOT_EQUAL, new
BinaryComparator(item));
get.setFilter(filter);
Result r = table.get(get);

System.out.println(r);  // (1) prints "keyvalues=NONE"
System.out.println(Bytes.toString(r.getRow()));  // (2) throws
NullpointerException

printing out the result shows that all columns in a row was filtered out.
but i still want to print out the row key of the empty result.
But the value of r.getRow() is null

Shouldn't r.getRow() return the rowkey even if the keyvalues are emtpy?
--

*Benjamin Kim**
benkimkimben at gmail*
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB