HBASE-16624 Fix MVCC DeSerialization bug in the HFileScannerImpl

Change-Id: Ia970619ac7369d24ed432e827319dfdca16143c2

Signed-off-by: stack <st...@apache.org>


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

Branch: refs/heads/hbase-12439
Commit: 8c4b09dfbaf53fd770fe3963df6095fc690f2ef5
Parents: 56be3ac
Author: Nitin Aggarwal <naggar...@rocketfuelinc.com>
Authored: Mon Sep 12 22:50:07 2016 -0700
Committer: stack <st...@apache.org>
Committed: Thu Sep 15 11:01:51 2016 -0700

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hbase/io/hfile/HFileReaderImpl.java    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/8c4b09df/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderImpl.java
----------------------------------------------------------------------
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderImpl.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderImpl.java
index fc1c04e..c9e6aea 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderImpl.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderImpl.java
@@ -662,7 +662,8 @@ public class HFileReaderImpl implements HFile.Reader, 
Configurable {
         long i = 0;
         offsetFromPos++;
         if (remaining >= Bytes.SIZEOF_INT) {
-          i = blockBuffer.getIntAfterPosition(offsetFromPos);
+          // The int read has to be converted to unsigned long so the & op
+          i = (blockBuffer.getIntAfterPosition(offsetFromPos) & 
0x00000000ffffffffL);
           remaining -= Bytes.SIZEOF_INT;
           offsetFromPos += Bytes.SIZEOF_INT;
         }

Reply via email to