You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by an...@apache.org on 2014/10/26 03:38:42 UTC

git commit: HBASE-12202 Support DirectByteBuffer usage in HFileBlock - addendum

Repository: hbase
Updated Branches:
  refs/heads/master 0fb4c4d5f -> 34f996261


HBASE-12202 Support DirectByteBuffer usage in HFileBlock - addendum


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

Branch: refs/heads/master
Commit: 34f9962618c85ad041ca7eac4913453335a81647
Parents: 0fb4c4d
Author: anoopsjohn <an...@intel.com>
Authored: Sun Oct 26 08:07:53 2014 +0530
Committer: anoopsjohn <an...@intel.com>
Committed: Sun Oct 26 08:07:53 2014 +0530

----------------------------------------------------------------------
 .../main/java/org/apache/hadoop/hbase/util/ByteBufferUtils.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/34f99626/hbase-common/src/main/java/org/apache/hadoop/hbase/util/ByteBufferUtils.java
----------------------------------------------------------------------
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/ByteBufferUtils.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/ByteBufferUtils.java
index 9451542..2a7b8c0 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/ByteBufferUtils.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/ByteBufferUtils.java
@@ -486,8 +486,8 @@ public final class ByteBufferUtils {
     int end1 = o1 + len1;
     int end2 = o2 + len2;
     for (int i = o1, j = o2; i < end1 && j < end2; i++, j++) {
-      byte a = buf1.get(i);
-      byte b = buf2.get(j);
+      int a = buf1.get(i) & 0xFF;
+      int b = buf2.get(j) & 0xFF;
       if (a != b) {
         return a - b;
       }