diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java index 6cdfc8a4cae..e0c29776b3a 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java @@ -1639,6 +1639,12 @@ public class HTable implements HTableInterface { byte[] startKey, byte[] endKey, final R responsePrototype, final Callback callback) throws ServiceException, Throwable { + if (startKey == null) { + startKey = HConstants.EMPTY_START_ROW; + } + if (endKey == null) { + endKey = HConstants.EMPTY_END_ROW; + } // get regions covered by the row range Pair, List> keysAndRegions = getKeysAndRegionsInRange(startKey, endKey, true);