hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject git commit: HBASE-11234 FastDiffDeltaEncoder#getFirstKeyInBlock returns wrong result (Chunhui)
Date Tue, 27 May 2014 14:44:09 GMT
Repository: hbase
Updated Branches:
  refs/heads/0.94 09c60d770 -> a616bb42c


HBASE-11234 FastDiffDeltaEncoder#getFirstKeyInBlock returns wrong result (Chunhui)


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

Branch: refs/heads/0.94
Commit: a616bb42c651ed7ab79f25c55d8f6baaea585676
Parents: 09c60d7
Author: Ted Yu <tedyu@apache.org>
Authored: Tue May 27 14:43:59 2014 +0000
Committer: Ted Yu <tedyu@apache.org>
Committed: Tue May 27 14:43:59 2014 +0000

----------------------------------------------------------------------
 .../org/apache/hadoop/hbase/io/encoding/FastDiffDeltaEncoder.java  | 2 +-
 .../org/apache/hadoop/hbase/io/encoding/PrefixKeyDeltaEncoder.java | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/a616bb42/src/main/java/org/apache/hadoop/hbase/io/encoding/FastDiffDeltaEncoder.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/hbase/io/encoding/FastDiffDeltaEncoder.java b/src/main/java/org/apache/hadoop/hbase/io/encoding/FastDiffDeltaEncoder.java
index 0ca02c8..7959e0e 100644
--- a/src/main/java/org/apache/hadoop/hbase/io/encoding/FastDiffDeltaEncoder.java
+++ b/src/main/java/org/apache/hadoop/hbase/io/encoding/FastDiffDeltaEncoder.java
@@ -389,7 +389,7 @@ public class FastDiffDeltaEncoder extends BufferedDataBlockEncoder {
     ByteBufferUtils.readCompressedInt(block); // commonLength
     int pos = block.position();
     block.reset();
-    return ByteBuffer.wrap(block.array(), pos, keyLength).slice();
+    return ByteBuffer.wrap(block.array(), block.arrayOffset() + pos, keyLength).slice();
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/hbase/blob/a616bb42/src/main/java/org/apache/hadoop/hbase/io/encoding/PrefixKeyDeltaEncoder.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/hbase/io/encoding/PrefixKeyDeltaEncoder.java
b/src/main/java/org/apache/hadoop/hbase/io/encoding/PrefixKeyDeltaEncoder.java
index ac63ead..3e4416f 100644
--- a/src/main/java/org/apache/hadoop/hbase/io/encoding/PrefixKeyDeltaEncoder.java
+++ b/src/main/java/org/apache/hadoop/hbase/io/encoding/PrefixKeyDeltaEncoder.java
@@ -154,7 +154,7 @@ public class PrefixKeyDeltaEncoder extends BufferedDataBlockEncoder {
     }
     int pos = block.position();
     block.reset();
-    return ByteBuffer.wrap(block.array(), pos, keyLength).slice();
+    return ByteBuffer.wrap(block.array(), block.arrayOffset() + pos, keyLength).slice();
   }
 
   @Override


Mime
View raw message