From 37ac17f62638420430e1004aa48e29d5291e07b5 Mon Sep 17 00:00:00 2001 From: anoopsjohn Date: Sun, 26 Oct 2014 08:09:21 +0530 Subject: [PATCH] HBASE-12202 Support DirectByteBuffer usage in HFileBlock - addendum --- .../java/org/apache/hadoop/hbase/util/ByteBufferUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 94515429425..2a7b8c0e938 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; }