hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject hbase git commit: HBASE-16160 Support RPC encryption with direct ByteBuffers (Colin Ma via garyh)
Date Mon, 01 Aug 2016 23:45:52 GMT
Repository: hbase
Updated Branches:
  refs/heads/0.98 e8a146a78 -> 896148af0


HBASE-16160 Support RPC encryption with direct ByteBuffers (Colin Ma via garyh)

Amending-Author: Andrew Purtell <apurtell@apache.org>

0.98 version of this patch contains fix to BufferChain but drops
unit tests that rely on secure test frameworks from later versions
of HBase and Hadoop.


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

Branch: refs/heads/0.98
Commit: 896148af070d896463408940026cd06764798077
Parents: e8a146a
Author: Gary Helmling <garyh@apache.org>
Authored: Mon Jul 11 10:33:22 2016 -0700
Committer: Andrew Purtell <apurtell@apache.org>
Committed: Mon Aug 1 16:41:50 2016 -0700

----------------------------------------------------------------------
 .../src/main/java/org/apache/hadoop/hbase/ipc/BufferChain.java  | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/896148af/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/BufferChain.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/BufferChain.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/BufferChain.java
index 8154ab5..7bbf2d6 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/BufferChain.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/BufferChain.java
@@ -57,8 +57,9 @@ class BufferChain {
     byte [] bytes = new byte [this.remaining];
     int offset = 0;
     for (ByteBuffer bb: this.buffers) {
-      System.arraycopy(bb.array(), bb.arrayOffset(), bytes, offset, bb.limit());
-      offset += bb.capacity();
+      int length = bb.remaining();
+      bb.get(bytes, offset, length);
+      offset += length;
     }
     return bytes;
   }


Mime
View raw message