HBase
  1. HBase
  2. HBASE-1301

HTable.getRow() returns null if the row does no exist

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.19.0, 0.19.1
    • Fix Version/s: 0.19.2, 0.20.0
    • Component/s: Client, documentation
    • Labels:
      None
    • Release Note:
      Fix API doc of HTable.getRow (non-existent row key returns null instead of empty RowResult)

      Description

      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.

      1. 1301.patch
        5 kB
        Rong-En Fan

        Issue Links

          Activity

            People

            • Assignee:
              Rong-En Fan
              Reporter:
              Rong-En Fan
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development