From 193e0d60246441a00ef96a3f4b92b7cfd3b4cb1f Mon Sep 17 00:00:00 2001 From: Ramkrishna Date: Thu, 13 Oct 2016 14:31:01 +0530 Subject: [PATCH] revert HBASE-16792 due to test failures --- .../src/main/java/org/apache/hadoop/hbase/KeyValue.java | 8 -------- .../hbase/io/encoding/BufferedDataBlockEncoder.java | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValue.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValue.java index da5677d6ce7..8f8554cf2aa 100644 --- a/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValue.java +++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValue.java @@ -43,7 +43,6 @@ import org.apache.hadoop.hbase.util.Bytes; import org.apache.hadoop.hbase.util.ClassSize; import org.apache.hadoop.io.IOUtils; import org.apache.hadoop.io.RawComparator; - import com.google.common.annotations.VisibleForTesting; /** @@ -2642,13 +2641,6 @@ public class KeyValue implements ExtendedCell { this.rowLen = Bytes.toShort(this.bytes, this.offset); } - public void clear() { - rowLen = -1; - bytes = null; - offset = 0; - length = 0; - } - @Override public int getKeyOffset() { return this.offset; diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/io/encoding/BufferedDataBlockEncoder.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/io/encoding/BufferedDataBlockEncoder.java index 514e829149f..4d3a26c9d15 100644 --- a/hbase-common/src/main/java/org/apache/hadoop/hbase/io/encoding/BufferedDataBlockEncoder.java +++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/io/encoding/BufferedDataBlockEncoder.java @@ -139,7 +139,7 @@ abstract class BufferedDataBlockEncoder extends AbstractDataBlockEncoder { protected void invalidate() { valueOffset = -1; tagsCompressedLength = 0; - currentKey.clear(); + currentKey = new KeyValue.KeyOnlyKeyValue(); uncompressTags = true; currentBuffer = null; }