HBASE-13417 batchCoprocessorService() does not handle NULL keys (Abhishek Singh Chouhan)
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/93ff1955 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/93ff1955 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/93ff1955 Branch: refs/heads/0.98 Commit: 93ff1955944391d6135331bc967303c58da2253f Parents: 31d3226 Author: Nick Dimiduk <[email protected]> Authored: Tue Apr 28 16:37:58 2015 -0700 Committer: Andrew Purtell <[email protected]> Committed: Mon May 11 16:03:32 2015 -0700 ---------------------------------------------------------------------- .../src/main/java/org/apache/hadoop/hbase/client/HTable.java | 6 ++++++ 1 file changed, 6 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/93ff1955/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java ---------------------------------------------------------------------- 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 736064e..7f641fb 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 @@ -1726,6 +1726,12 @@ public class HTable implements HTableInterface { byte[] startKey, byte[] endKey, final R responsePrototype, final Callback<R> 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<byte[]>, List<HRegionLocation>> keysAndRegions = getKeysAndRegionsInRange(startKey, endKey, true);
