From bb24a3ff0e1e295cf8f640aa589fcb0085e30861 Mon Sep 17 00:00:00 2001 From: Elliott Clark Date: Fri, 30 Aug 2013 16:20:52 -0700 Subject: [PATCH] HBASE-9401 add getQualifierBufferShallowCopy --- .../src/main/java/org/apache/hadoop/hbase/CellUtil.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git hbase-common/src/main/java/org/apache/hadoop/hbase/CellUtil.java hbase-common/src/main/java/org/apache/hadoop/hbase/CellUtil.java index 4d78f9b..ff381d2 100644 --- hbase-common/src/main/java/org/apache/hadoop/hbase/CellUtil.java +++ hbase-common/src/main/java/org/apache/hadoop/hbase/CellUtil.java @@ -117,7 +117,12 @@ public final class CellUtil { public static ByteBuffer getValueBufferShallowCopy(Cell cell) { ByteBuffer buffer = ByteBuffer.wrap(cell.getValueArray(), cell.getValueOffset(), cell.getValueLength()); -// buffer.position(buffer.limit());//make it look as if value was appended + return buffer; + } + + public static ByteBuffer getQualifierBufferShallowCopy(Cell cell) { + ByteBuffer buffer = ByteBuffer.wrap(cell.getQualifierArray(), cell.getQualifierOffset(), + cell.getQualifierLength()); return buffer; } -- 1.7.10.2 (Apple Git-33)