diff --git a/src/java/org/apache/hadoop/hbase/client/HTable.java b/src/java/org/apache/hadoop/hbase/client/HTable.java index 83ef61b..aad8c4a 100644 --- a/src/java/org/apache/hadoop/hbase/client/HTable.java +++ b/src/java/org/apache/hadoop/hbase/client/HTable.java @@ -1863,9 +1863,22 @@ public class HTable { * filter. */ private boolean filterSaysStop(final byte [] endKey) { + if (scan.getStopRow().length > 0) { + // there is a stop row, check to see if we are past it. + byte [] stopRow = scan.getStopRow(); + int cmp = Bytes.compareTo(stopRow, 0, stopRow.length, + endKey, 0, endKey.length); + if (cmp <= 0) { + // stopRow <= endKey (endKey is equals to or larger than stopRow) + // This is a stop. + return true; + } + } + if(!scan.hasFilter()) { return false; } + if (scan.getFilter() != null) { // Let the filter see current row. scan.getFilter().filterRowKey(endKey, 0, endKey.length);