[
https://issues.apache.org/jira/browse/HBASE-1301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12694298#action_12694298
]
stack commented on HBASE-1301:
------------------------------
Thanks Andrew for the kick. Looking at code, I see this change that went in:
{code}
$ svn diff -r722690:722707
src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
Index: src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
===================================================================
--- src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
(revision 722690)
+++ src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
(revision 722707)
@@ -1287,7 +1287,8 @@
}
public RowResult getRow(final byte [] regionName, final byte [] row,
- final byte [][] columns, final long ts, final long lockId)
+ final byte [][] columns, final long ts,
+ final int numVersions, final long lockId)
throws IOException {
checkOpen();
requestCount.incrementAndGet();
@@ -1300,13 +1301,11 @@
}
HRegion region = getRegion(regionName);
- Map<byte [], Cell> map = region.getFull(row, columnSet, ts,
- getLockFromId(lockId));
- if (map == null || map.isEmpty())
- return null;
HbaseMapWritable<byte [], Cell> result =
- new HbaseMapWritable<byte [], Cell>();
- result.putAll(map);
+ region.getFull(row, columnSet,
+ ts, numVersions, getLockFromId(lockId));
+ if (result == null || result.isEmpty())
+ return null;
return new RowResult(row, result);
} catch (IOException e) {
checkOOME(e);
{code}
The commit mentions "HBASE-847 new API: HTable.getRow with numVersion
specified" but that doesn't seem to be the right issue. This seems to be it
HBASE-1028.
So, yeah, seems like its the doc thats wrong.
> HTable.getRow() returns null if the row does no exist
> -----------------------------------------------------
>
> Key: HBASE-1301
> URL: https://issues.apache.org/jira/browse/HBASE-1301
> Project: Hadoop HBase
> Issue Type: Bug
> Components: client
> Affects Versions: 0.19.1
> Reporter: Rong-En Fan
> Priority: Minor
>
> The HBase API docs says when the row does not exist, getRow() returns
> RowResult is empty if row does not exist.
> However, in regionserver/HRegionServer.java's getRow():
> if (result == null || result.isEmpty())
> return null;
> return new RowResult(row, result);
> It actually returns null. Either fix the code or the document.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.