Repository: hbase
Updated Branches:
  refs/heads/branch-2 3b84c9c8d -> 1e167e4e2


HBASE-20928 Rewrite calculation of midpoint - addemdum

Signed-off-by: tedyu <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/1e167e4e
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/1e167e4e
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/1e167e4e

Branch: refs/heads/branch-2
Commit: 1e167e4e2ea241717ad2a3c218d6939734ea7011
Parents: 3b84c9c
Author: Xu Cang <[email protected]>
Authored: Tue Jul 24 11:37:21 2018 -0700
Committer: tedyu <[email protected]>
Committed: Wed Jul 25 10:01:56 2018 -0700

----------------------------------------------------------------------
 hbase-common/src/main/java/org/apache/hadoop/hbase/util/Bytes.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/1e167e4e/hbase-common/src/main/java/org/apache/hadoop/hbase/util/Bytes.java
----------------------------------------------------------------------
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/Bytes.java 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/Bytes.java
index 12aaa67..e63c0db 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/Bytes.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/Bytes.java
@@ -2068,7 +2068,7 @@ public class Bytes implements Comparable<Bytes> {
     int high = arr.length - 1;
     KeyValue.KeyOnlyKeyValue r = new KeyValue.KeyOnlyKeyValue();
     while (low <= high) {
-      int mid = (low+high) >>> 1;
+      int mid = low + ((high - low) >> 1);
       // we have to compare in this order, because the comparator order
       // has special logic when the 'left side' is a special key.
       r.setKey(arr[mid], 0, arr[mid].length);

Reply via email to