hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ramkris...@apache.org
Subject [3/3] hbase git commit: HBASE-14047 - Cleanup deprecated APIs from Cell class (Ashish Singhi)
Date Mon, 13 Jul 2015 16:37:23 GMT
HBASE-14047 - Cleanup deprecated APIs from Cell class (Ashish Singhi)


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

Branch: refs/heads/master
Commit: a3d30892b41f604ab5a62d4f612fa7c230267dfe
Parents: 951ec7a
Author: ramkrishna <ramkrishna.s.vasudevan@gmail.com>
Authored: Mon Jul 13 22:06:16 2015 +0530
Committer: ramkrishna <ramkrishna.s.vasudevan@gmail.com>
Committed: Mon Jul 13 22:06:16 2015 +0530

----------------------------------------------------------------------
 .../ipc/TestPayloadCarryingRpcController.java   |  30 ----
 .../main/java/org/apache/hadoop/hbase/Cell.java |  62 +--------
 .../java/org/apache/hadoop/hbase/CellUtil.java  |  55 --------
 .../java/org/apache/hadoop/hbase/KeyValue.java  | 109 +++------------
 .../apache/hadoop/hbase/KeyValueTestUtil.java   |  17 +--
 .../org/apache/hadoop/hbase/KeyValueUtil.java   |   8 +-
 .../apache/hadoop/hbase/codec/CellCodec.java    |   2 +-
 .../hadoop/hbase/codec/CellCodecWithTags.java   |   2 +-
 .../io/encoding/BufferedDataBlockEncoder.java   |  70 +---------
 .../hbase/util/test/RedundantKVGenerator.java   |   4 +-
 .../org/apache/hadoop/hbase/TestCellUtil.java   |  59 +-------
 .../org/apache/hadoop/hbase/TestKeyValue.java   |  72 +++-------
 .../util/TestByteRangeWithKVSerialization.java  |   4 +-
 ...egrationTestBigLinkedListWithVisibility.java |  43 +++---
 .../hbase/codec/prefixtree/PrefixTreeCodec.java |   2 +-
 .../codec/prefixtree/PrefixTreeSeeker.java      |  30 ----
 .../codec/prefixtree/decode/PrefixTreeCell.java |  28 +---
 .../prefixtree/encode/PrefixTreeEncoder.java    |   6 +-
 .../column/data/TestColumnDataRandom.java       |   3 +-
 .../codec/prefixtree/row/TestRowEncoder.java    |   2 +-
 .../hadoop/hbase/rest/client/RemoteHTable.java  |   3 +-
 .../hbase/rest/TestScannersWithFilters.java     | 139 ++++++++++---------
 .../org/apache/hadoop/hbase/TagRewriteCell.java |  30 ----
 .../hadoop/hbase/mapreduce/WALPlayer.java       |  22 +--
 .../hbase/regionserver/ScanQueryMatcher.java    |   2 +-
 .../regionserver/StripeStoreFileManager.java    |   3 +-
 .../hadoop/hbase/regionserver/wal/WALEdit.java  |   8 +-
 .../hbase/replication/ScopeWALEntryFilter.java  |   5 +-
 .../replication/TableCfWALEntryFilter.java      |   5 +-
 .../RegionReplicaReplicationEndpoint.java       |   3 +-
 .../replication/regionserver/Replication.java   |   2 +-
 .../hbase/security/access/AccessController.java |  10 +-
 .../org/apache/hadoop/hbase/util/HBaseFsck.java |   8 +-
 .../hadoop/hbase/wal/WALPrettyPrinter.java      |  20 ++-
 .../hadoop/hbase/client/TestFromClientSide.java |  29 ++--
 .../client/TestPutDeleteEtcCellIteration.java   |   9 +-
 .../coprocessor/SampleRegionWALObserver.java    |  10 +-
 .../hbase/coprocessor/SimpleRegionObserver.java |  51 ++++---
 .../hbase/coprocessor/TestWALObserver.java      |  33 ++---
 .../apache/hadoop/hbase/filter/TestFilter.java  |  28 ++--
 .../hadoop/hbase/filter/TestFilterList.java     |  17 +--
 .../hbase/io/TestHalfStoreFileReader.java       |   5 +-
 .../io/encoding/TestPrefixTreeEncoding.java     |  13 +-
 .../apache/hadoop/hbase/io/hfile/TestHFile.java |  17 +--
 .../hadoop/hbase/io/hfile/TestHFileBlock.java   |  12 +-
 .../io/hfile/TestHFileBlockCompatibility.java   |   2 +-
 .../hbase/io/hfile/TestHFileWriterV2.java       |  14 +-
 .../hbase/io/hfile/TestHFileWriterV3.java       |  17 +--
 .../hadoop/hbase/io/hfile/TestSeekTo.java       |   9 +-
 .../hbase/mapreduce/TestHFileOutputFormat.java  |  11 +-
 .../hbase/mapreduce/TestImportExport.java       |  20 +--
 .../hadoop/hbase/mapreduce/TestWALPlayer.java   |  18 ++-
 .../hbase/mapreduce/TestWALRecordReader.java    |  15 +-
 .../hadoop/hbase/regionserver/TestBulkLoad.java |   2 +-
 .../hbase/regionserver/TestCellSkipListSet.java |  42 ++++--
 .../regionserver/TestCompoundBloomFilter.java   |  11 +-
 .../hbase/regionserver/TestDefaultMemStore.java |  20 +--
 .../hadoop/hbase/regionserver/TestHRegion.java  | 100 ++++++++-----
 .../regionserver/TestHRegionReplayEvents.java   |   2 +-
 .../hbase/regionserver/TestMajorCompaction.java |   8 +-
 .../regionserver/TestScannerWithBulkload.java   |  63 ++++++---
 .../hbase/regionserver/TestStoreFile.java       |  37 ++---
 .../hbase/regionserver/TestStripeCompactor.java |   3 +-
 .../hadoop/hbase/regionserver/TestTags.java     |  14 +-
 .../hbase/regionserver/wal/TestLogRolling.java  |   3 +-
 .../hbase/regionserver/wal/TestProtobufLog.java |  10 +-
 .../replication/TestReplicationWithTags.java    |  12 +-
 ...egionReplicaReplicationEndpointNoMaster.java |  21 ++-
 .../TestDefaultScanLabelGeneratorStack.java     |  52 ++++---
 .../TestVisibilityLabelsReplication.java        |   7 +-
 .../TestVisibilityLablesWithGroups.java         |  54 ++++---
 .../hbase/util/TestCoprocessorScanPolicy.java   |  20 +--
 .../apache/hadoop/hbase/wal/TestSecureWAL.java  |  25 ++--
 .../apache/hadoop/hbase/wal/TestWALFactory.java |  30 ++--
 .../apache/hadoop/hbase/wal/TestWALSplit.java   |  36 ++---
 hbase-shell/src/main/ruby/hbase/table.rb        |  29 ++--
 76 files changed, 752 insertions(+), 1047 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/a3d30892/hbase-client/src/test/java/org/apache/hadoop/hbase/ipc/TestPayloadCarryingRpcController.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/test/java/org/apache/hadoop/hbase/ipc/TestPayloadCarryingRpcController.java b/hbase-client/src/test/java/org/apache/hadoop/hbase/ipc/TestPayloadCarryingRpcController.java
index e6d6f43..11c8ff8 100644
--- a/hbase-client/src/test/java/org/apache/hadoop/hbase/ipc/TestPayloadCarryingRpcController.java
+++ b/hbase-client/src/test/java/org/apache/hadoop/hbase/ipc/TestPayloadCarryingRpcController.java
@@ -139,12 +139,6 @@ public class TestPayloadCarryingRpcController {
               }
 
               @Override
-              public long getMvccVersion() {
-                // unused
-                return 0;
-              }
-
-              @Override
               public long getSequenceId() {
                 // unused
                 return 0;
@@ -182,30 +176,6 @@ public class TestPayloadCarryingRpcController {
                 // unused
                 return null;
               }
-
-              @Override
-              public byte[] getValue() {
-                // unused
-                return null;
-              }
-
-              @Override
-              public byte[] getFamily() {
-                // unused
-                return null;
-              }
-
-              @Override
-              public byte[] getQualifier() {
-                // unused
-                return null;
-              }
-
-              @Override
-              public byte[] getRow() {
-                // unused
-                return null;
-              }
             };
           }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/a3d30892/hbase-common/src/main/java/org/apache/hadoop/hbase/Cell.java
----------------------------------------------------------------------
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/Cell.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/Cell.java
index 46ebeeb..5673ec9 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/Cell.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/Cell.java
@@ -44,12 +44,6 @@ import org.apache.hadoop.hbase.classification.InterfaceStability;
  * the goal of sorting newer cells first.
  * </p>
  * <p>
- * This interface should not include methods that allocate new byte[]'s such as those used in client
- * or debugging code. These users should use the methods found in the {@link CellUtil} class.
- * Currently for to minimize the impact of existing applications moving between 0.94 and 0.96, we
- * include the costly helper methods marked as deprecated.   
- * </p>
- * <p>
  * Cell implements Comparable&lt;Cell&gt; which is only meaningful when
  * comparing to other keys in the
  * same table. It uses CellComparator which does not work on the -ROOT- and hbase:meta tables.
@@ -146,19 +140,7 @@ public interface Cell {
   byte getTypeByte();
 
 
-  //6) MvccVersion
-
-  /**
-   * @deprecated as of 1.0, use {@link Cell#getSequenceId()}
-   * 
-   * Internal use only. A region-specific sequence ID given to each operation. It always exists for
-   * cells in the memstore but is not retained forever. It may survive several flushes, but
-   * generally becomes irrelevant after the cell's row is no longer involved in any operations that
-   * require strict consistency.
-   * @return mvccVersion (always &gt;= 0 if exists), or 0 if it no longer exists
-   */
-  @Deprecated
-  long getMvccVersion();
+  //6) SequenceId
 
   /**
    * A region-specific unique monotonically increasing sequence ID given to each Cell. It always
@@ -187,7 +169,7 @@ public interface Cell {
    * @return Number of value bytes.  Must be &lt; valueArray.length - offset.
    */
   int getValueLength();
-  
+
   /**
    * @return the tags byte array
    */
@@ -202,44 +184,4 @@ public interface Cell {
    * @return the total length of the tags in the Cell.
    */
   int getTagsLength();
-  
-  /**
-   * WARNING do not use, expensive.  This gets an arraycopy of the cell's value.
-   *
-   * Added to ease transition from  0.94 -&gt; 0.96.
-   * 
-   * @deprecated as of 0.96, use {@link CellUtil#cloneValue(Cell)}
-   */
-  @Deprecated
-  byte[] getValue();
-  
-  /**
-   * WARNING do not use, expensive.  This gets an arraycopy of the cell's family. 
-   *
-   * Added to ease transition from  0.94 -&gt; 0.96.
-   * 
-   * @deprecated as of 0.96, use {@link CellUtil#cloneFamily(Cell)}
-   */
-  @Deprecated
-  byte[] getFamily();
-
-  /**
-   * WARNING do not use, expensive.  This gets an arraycopy of the cell's qualifier.
-   *
-   * Added to ease transition from  0.94 -&gt; 0.96.
-   * 
-   * @deprecated as of 0.96, use {@link CellUtil#cloneQualifier(Cell)}
-   */
-  @Deprecated
-  byte[] getQualifier();
-
-  /**
-   * WARNING do not use, expensive.  this gets an arraycopy of the cell's row.
-   *
-   * Added to ease transition from  0.94 -&gt; 0.96.
-   * 
-   * @deprecated as of 0.96, use {@link CellUtil#getRowByte(Cell, int)}
-   */
-  @Deprecated
-  byte[] getRow();
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/a3d30892/hbase-common/src/main/java/org/apache/hadoop/hbase/CellUtil.java
----------------------------------------------------------------------
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/CellUtil.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/CellUtil.java
index a9b59e5..207f275 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/CellUtil.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/CellUtil.java
@@ -1336,11 +1336,6 @@ public final class CellUtil {
     }
 
     @Override
-    public long getMvccVersion() {
-      return getSequenceId();
-    }
-
-    @Override
     public long getSequenceId() {
       return 0;
     }
@@ -1374,26 +1369,6 @@ public final class CellUtil {
     public int getTagsLength() {
       return 0;
     }
-
-    @Override
-    public byte[] getValue() {
-      return EMPTY_BYTE_ARRAY;
-    }
-
-    @Override
-    public byte[] getFamily() {
-      return EMPTY_BYTE_ARRAY;
-    }
-
-    @Override
-    public byte[] getQualifier() {
-      return EMPTY_BYTE_ARRAY;
-    }
-
-    @Override
-    public byte[] getRow() {
-      return EMPTY_BYTE_ARRAY;
-    }
   }
 
   @InterfaceAudience.Private
@@ -1432,11 +1407,6 @@ public final class CellUtil {
     public byte getTypeByte() {
       return Type.Maximum.getCode();
     }
-
-    @Override
-    public byte[] getRow() {
-      return Bytes.copy(this.rowArray, this.roffset, this.rlength);
-    }
   }
 
   @InterfaceAudience.Private
@@ -1488,16 +1458,6 @@ public final class CellUtil {
     public int getQualifierLength() {
       return this.qlength;
     }
-
-    @Override
-    public byte[] getFamily() {
-      return Bytes.copy(this.fArray, this.foffset, this.flength);
-    }
-
-    @Override
-    public byte[] getQualifier() {
-      return Bytes.copy(this.qArray, this.qoffset, this.qlength);
-    }
   }
 
   @InterfaceAudience.Private
@@ -1553,11 +1513,6 @@ public final class CellUtil {
     public byte getTypeByte() {
       return Type.Minimum.getCode();
     }
-
-    @Override
-    public byte[] getRow() {
-      return Bytes.copy(this.rowArray, this.roffset, this.rlength);
-    }
   }
 
   @InterfaceAudience.Private
@@ -1609,15 +1564,5 @@ public final class CellUtil {
     public int getQualifierLength() {
       return this.qlength;
     }
-
-    @Override
-    public byte[] getFamily() {
-      return Bytes.copy(this.fArray, this.foffset, this.flength);
-    }
-
-    @Override
-    public byte[] getQualifier() {
-      return Bytes.copy(this.qArray, this.qoffset, this.qlength);
-    }
   }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hbase/blob/a3d30892/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValue.java
----------------------------------------------------------------------
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 2fc7975..8c73984 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
@@ -50,12 +50,13 @@ import com.google.common.annotations.VisibleForTesting;
 /**
  * An HBase Key/Value. This is the fundamental HBase Type.
  * <p>
- * HBase applications and users should use the Cell interface and avoid directly using KeyValue
- * and member functions not defined in Cell.
+ * HBase applications and users should use the Cell interface and avoid directly using KeyValue and
+ * member functions not defined in Cell.
  * <p>
- * If being used client-side, the primary methods to access individual fields are {@link #getRow()},
- * {@link #getFamily()}, {@link #getQualifier()}, {@link #getTimestamp()}, and {@link #getValue()}.
- * These methods allocate new byte arrays and return copies. Avoid their use server-side.
+ * If being used client-side, the primary methods to access individual fields are
+ * {@link #getRowArray()}, {@link #getFamilyArray()}, {@link #getQualifierArray()},
+ * {@link #getTimestamp()}, and {@link #getValueArray()}. These methods allocate new byte arrays
+ * and return copies. Avoid their use server-side.
  * <p>
  * Instances of this class are immutable. They do not implement Comparable but Comparators are
  * provided. Comparators change with context, whether user table or a catalog table comparison. Its
@@ -64,23 +65,20 @@ import com.google.common.annotations.VisibleForTesting;
  * <p>
  * KeyValue wraps a byte array and takes offsets and lengths into passed array at where to start
  * interpreting the content as KeyValue. The KeyValue format inside a byte array is:
- * <code>&lt;keylength&gt; &lt;valuelength&gt; &lt;key&gt; &lt;value&gt;</code>
- * Key is further decomposed as:
- * <code>&lt;rowlength&gt; &lt;row&gt; &lt;columnfamilylength&gt;
+ * <code>&lt;keylength&gt; &lt;valuelength&gt; &lt;key&gt; &lt;value&gt;</code> Key is further
+ * decomposed as: <code>&lt;rowlength&gt; &lt;row&gt; &lt;columnfamilylength&gt;
  * &lt;columnfamily&gt; &lt;columnqualifier&gt;
- * &lt;timestamp&gt; &lt;keytype&gt;</code>
- * The <code>rowlength</code> maximum is <code>Short.MAX_SIZE</code>, column family length maximum
- * is <code>Byte.MAX_SIZE</code>, and column qualifier + key length must be &lt;
- * <code>Integer.MAX_SIZE</code>. The column does not contain the family/qualifier delimiter,
- * {@link #COLUMN_FAMILY_DELIMITER}<br>
+ * &lt;timestamp&gt; &lt;keytype&gt;</code> The <code>rowlength</code> maximum is
+ * <code>Short.MAX_SIZE</code>, column family length maximum is <code>Byte.MAX_SIZE</code>, and
+ * column qualifier + key length must be &lt; <code>Integer.MAX_SIZE</code>. The column does not
+ * contain the family/qualifier delimiter, {@link #COLUMN_FAMILY_DELIMITER}<br>
  * KeyValue can optionally contain Tags. When it contains tags, it is added in the byte array after
  * the value part. The format for this part is: <code>&lt;tagslength&gt;&lt;tagsbytes&gt;</code>.
  * <code>tagslength</code> maximum is <code>Short.MAX_SIZE</code>. The <code>tagsbytes</code>
  * contain one or more tags where as each tag is of the form
- * <code>&lt;taglength&gt;&lt;tagtype&gt;&lt;tagbytes&gt;</code>.
- * <code>tagtype</code> is one byte and
- * <code>taglength</code> maximum is <code>Short.MAX_SIZE</code> and it includes 1 byte type length
- * and actual tag bytes length.
+ * <code>&lt;taglength&gt;&lt;tagtype&gt;&lt;tagbytes&gt;</code>. <code>tagtype</code> is one byte
+ * and <code>taglength</code> maximum is <code>Short.MAX_SIZE</code> and it includes 1 byte type
+ * length and actual tag bytes length.
  */
 @InterfaceAudience.Private
 public class KeyValue implements Cell, HeapSize, Cloneable, SettableSequenceId,
@@ -296,12 +294,6 @@ public class KeyValue implements Cell, HeapSize, Cloneable, SettableSequenceId,
 
   /** Here be dragons **/
 
-  // used to achieve atomic operations in the memstore.
-  @Override
-  public long getMvccVersion() {
-    return this.getSequenceId();
-  }
-
   /**
    * used to achieve atomic operations in the memstore.
    */
@@ -1172,9 +1164,11 @@ public class KeyValue implements Cell, HeapSize, Cloneable, SettableSequenceId,
    */
   public Map<String, Object> toStringMap() {
     Map<String, Object> stringMap = new HashMap<String, Object>();
-    stringMap.put("row", Bytes.toStringBinary(getRow()));
-    stringMap.put("family", Bytes.toStringBinary(getFamily()));
-    stringMap.put("qualifier", Bytes.toStringBinary(getQualifier()));
+    stringMap.put("row", Bytes.toStringBinary(getRowArray(), getRowOffset(), getRowLength()));
+    stringMap.put("family",
+      Bytes.toStringBinary(getFamilyArray(), getFamilyOffset(), getFamilyLength()));
+    stringMap.put("qualifier",
+      Bytes.toStringBinary(getQualifierArray(), getQualifierOffset(), getQualifierLength()));
     stringMap.put("timestamp", getTimestamp());
     stringMap.put("vlen", getValueLength());
     List<Tag> tags = getTags();
@@ -1472,10 +1466,9 @@ public class KeyValue implements Cell, HeapSize, Cloneable, SettableSequenceId,
   //---------------------------------------------------------------------------
 
   /**
-   * Do not use unless you have to.  Used internally for compacting and testing.
-   *
-   * Use {@link #getRow()}, {@link #getFamily()}, {@link #getQualifier()}, and
-   * {@link #getValue()} if accessing a KeyValue client-side.
+   * Do not use unless you have to. Used internally for compacting and testing. Use
+   * {@link #getRowArray()}, {@link #getFamilyArray()}, {@link #getQualifierArray()}, and
+   * {@link #getValueArray()} if accessing a KeyValue client-side.
    * @return Copy of the key portion only.
    */
   public byte [] getKey() {
@@ -1486,33 +1479,6 @@ public class KeyValue implements Cell, HeapSize, Cloneable, SettableSequenceId,
   }
 
   /**
-   * Returns value in a new byte array.
-   * Primarily for use client-side. If server-side, use
-   * {@link #getBuffer()} with appropriate offsets and lengths instead to
-   * save on allocations.
-   * @return Value in a new byte array.
-   */
-  @Override
-  @Deprecated // use CellUtil.getValueArray()
-  public byte [] getValue() {
-    return CellUtil.cloneValue(this);
-  }
-
-  /**
-   * Primarily for use client-side.  Returns the row of this KeyValue in a new
-   * byte array.<p>
-   *
-   * If server-side, use {@link #getBuffer()} with appropriate offsets and
-   * lengths instead.
-   * @return Row in a new byte array.
-   */
-  @Override
-  @Deprecated // use CellUtil.getRowArray()
-  public byte [] getRow() {
-    return CellUtil.cloneRow(this);
-  }
-
-  /**
    *
    * @return Timestamp
    */
@@ -1557,35 +1523,6 @@ public class KeyValue implements Cell, HeapSize, Cloneable, SettableSequenceId,
   }
 
   /**
-   * Primarily for use client-side.  Returns the family of this KeyValue in a
-   * new byte array.<p>
-   *
-   * If server-side, use {@link #getBuffer()} with appropriate offsets and
-   * lengths instead.
-   * @return Returns family. Makes a copy.
-   */
-  @Override
-  @Deprecated // use CellUtil.getFamilyArray
-  public byte [] getFamily() {
-    return CellUtil.cloneFamily(this);
-  }
-
-  /**
-   * Primarily for use client-side.  Returns the column qualifier of this
-   * KeyValue in a new byte array.<p>
-   *
-   * If server-side, use {@link #getBuffer()} with appropriate offsets and
-   * lengths instead.
-   * Use {@link #getBuffer()} with appropriate offsets and lengths instead.
-   * @return Returns qualifier. Makes a copy.
-   */
-  @Override
-  @Deprecated // use CellUtil.getQualifierArray
-  public byte [] getQualifier() {
-    return CellUtil.cloneQualifier(this);
-  }
-
-  /**
    * This returns the offset where the tag actually starts.
    */
   @Override

http://git-wip-us.apache.org/repos/asf/hbase/blob/a3d30892/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValueTestUtil.java
----------------------------------------------------------------------
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValueTestUtil.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValueTestUtil.java
index 50a409d..0de627a 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValueTestUtil.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValueTestUtil.java
@@ -73,9 +73,9 @@ public class KeyValueTestUtil {
 
   /**
    * Checks whether KeyValues from kvCollection2 are contained in kvCollection1.
-   * 
+   *
    * The comparison is made without distinguishing MVCC version of the KeyValues
-   * 
+   *
    * @param kvCollection1
    * @param kvCollection2
    * @return true if KeyValues from kvCollection2 are contained in kvCollection1
@@ -91,7 +91,7 @@ public class KeyValueTestUtil {
     }
     return true;
   }
-  
+
   public static List<KeyValue> rewindThenToList(final ByteBuffer bb,
       final boolean includesMemstoreTS, final boolean useTags) {
     bb.rewind();
@@ -161,15 +161,16 @@ public class KeyValueTestUtil {
   }
 
   protected static String getRowString(final KeyValue kv) {
-    return Bytes.toStringBinary(kv.getRow());
+    return Bytes.toStringBinary(kv.getRowArray(), kv.getRowOffset(), kv.getRowLength());
   }
 
   protected static String getFamilyString(final KeyValue kv) {
-    return Bytes.toStringBinary(kv.getFamily());
+    return Bytes.toStringBinary(kv.getFamilyArray(), kv.getFamilyOffset(), kv.getFamilyLength());
   }
 
   protected static String getQualifierString(final KeyValue kv) {
-    return Bytes.toStringBinary(kv.getQualifier());
+    return Bytes.toStringBinary(kv.getQualifierArray(), kv.getQualifierOffset(),
+      kv.getQualifierLength());
   }
 
   protected static String getTimestampString(final KeyValue kv) {
@@ -177,11 +178,11 @@ public class KeyValueTestUtil {
   }
 
   protected static String getTypeString(final KeyValue kv) {
-    return KeyValue.Type.codeToType(kv.getType()).toString();
+    return KeyValue.Type.codeToType(kv.getTypeByte()).toString();
   }
 
   protected static String getValueString(final KeyValue kv) {
-    return Bytes.toStringBinary(kv.getValue());
+    return Bytes.toStringBinary(kv.getValueArray(), kv.getValueOffset(), kv.getValueLength());
   }
 
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/a3d30892/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValueUtil.java
----------------------------------------------------------------------
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValueUtil.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValueUtil.java
index 74a26a2..59519e0 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValueUtil.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValueUtil.java
@@ -81,7 +81,7 @@ public class KeyValueUtil {
   public static int lengthWithMvccVersion(final KeyValue kv, final boolean includeMvccVersion) {
     int length = kv.getLength();
     if (includeMvccVersion) {
-      length += WritableUtils.getVIntSize(kv.getMvccVersion());
+      length += WritableUtils.getVIntSize(kv.getSequenceId());
     }
     return length;
   }
@@ -101,7 +101,7 @@ public class KeyValueUtil {
   public static KeyValue copyToNewKeyValue(final Cell cell) {
     byte[] bytes = copyToNewByteArray(cell);
     KeyValue kvCell = new KeyValue(bytes, 0, bytes.length);
-    kvCell.setSequenceId(cell.getMvccVersion());
+    kvCell.setSequenceId(cell.getSequenceId());
     return kvCell;
   }
 
@@ -173,9 +173,9 @@ public class KeyValueUtil {
     bb.limit(bb.position() + kv.getLength());
     bb.put(kv.getBuffer(), kv.getOffset(), kv.getLength());
     if (includeMvccVersion) {
-      int numMvccVersionBytes = WritableUtils.getVIntSize(kv.getMvccVersion());
+      int numMvccVersionBytes = WritableUtils.getVIntSize(kv.getSequenceId());
       ByteBufferUtils.extendLimit(bb, numMvccVersionBytes);
-      ByteBufferUtils.writeVLong(bb, kv.getMvccVersion());
+      ByteBufferUtils.writeVLong(bb, kv.getSequenceId());
     }
   }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/a3d30892/hbase-common/src/main/java/org/apache/hadoop/hbase/codec/CellCodec.java
----------------------------------------------------------------------
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/codec/CellCodec.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/codec/CellCodec.java
index 2ed89f1..a54c76e 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/codec/CellCodec.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/codec/CellCodec.java
@@ -56,7 +56,7 @@ public class CellCodec implements Codec {
       // Value
       write(cell.getValueArray(), cell.getValueOffset(), cell.getValueLength());
       // MvccVersion
-      this.out.write(Bytes.toBytes(cell.getMvccVersion()));
+      this.out.write(Bytes.toBytes(cell.getSequenceId()));
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/hbase/blob/a3d30892/hbase-common/src/main/java/org/apache/hadoop/hbase/codec/CellCodecWithTags.java
----------------------------------------------------------------------
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/codec/CellCodecWithTags.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/codec/CellCodecWithTags.java
index a614026..d79be17 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/codec/CellCodecWithTags.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/codec/CellCodecWithTags.java
@@ -58,7 +58,7 @@ public class CellCodecWithTags implements Codec {
       // Tags
       write(cell.getTagsArray(), cell.getTagsOffset(), cell.getTagsLength());
       // MvccVersion
-      this.out.write(Bytes.toBytes(cell.getMvccVersion()));
+      this.out.write(Bytes.toBytes(cell.getSequenceId()));
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/hbase/blob/a3d30892/hbase-common/src/main/java/org/apache/hadoop/hbase/io/encoding/BufferedDataBlockEncoder.java
----------------------------------------------------------------------
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 5107271..03875dc 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
@@ -24,13 +24,12 @@ import java.nio.ByteBuffer;
 
 import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.CellComparator;
-import org.apache.hadoop.hbase.CellUtil;
 import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.KeyValue;
 import org.apache.hadoop.hbase.KeyValue.Type;
 import org.apache.hadoop.hbase.KeyValueUtil;
-import org.apache.hadoop.hbase.Streamable;
 import org.apache.hadoop.hbase.SettableSequenceId;
+import org.apache.hadoop.hbase.Streamable;
 import org.apache.hadoop.hbase.classification.InterfaceAudience;
 import org.apache.hadoop.hbase.io.ByteBufferOutputStream;
 import org.apache.hadoop.hbase.io.HeapSize;
@@ -257,11 +256,6 @@ abstract class BufferedDataBlockEncoder implements DataBlockEncoder {
     }
 
     @Override
-    public long getMvccVersion() {
-      return memstoreTS;
-    }
-
-    @Override
     public long getSequenceId() {
       return memstoreTS;
     }
@@ -303,30 +297,6 @@ abstract class BufferedDataBlockEncoder implements DataBlockEncoder {
     }
 
     @Override
-    @Deprecated
-    public byte[] getValue() {
-      throw new UnsupportedOperationException("getValue() not supported");
-    }
-
-    @Override
-    @Deprecated
-    public byte[] getFamily() {
-      throw new UnsupportedOperationException("getFamily() not supported");
-    }
-
-    @Override
-    @Deprecated
-    public byte[] getQualifier() {
-      throw new UnsupportedOperationException("getQualifier() not supported");
-    }
-
-    @Override
-    @Deprecated
-    public byte[] getRow() {
-      throw new UnsupportedOperationException("getRow() not supported");
-    }
-
-    @Override
     public String toString() {
       return KeyValue.keyToString(this.keyBuffer, 0, KeyValueUtil.keyLength(this)) + "/vlen="
           + getValueLength() + "/seqid=" + memstoreTS;
@@ -334,7 +304,7 @@ abstract class BufferedDataBlockEncoder implements DataBlockEncoder {
 
     public Cell shallowCopy() {
       return new ClonedSeekerState(currentBuffer, keyBuffer, currentKey.getRowLength(),
-          currentKey.getFamilyOffset(), currentKey.getFamilyLength(), keyLength, 
+          currentKey.getFamilyOffset(), currentKey.getFamilyLength(), keyLength,
           currentKey.getQualifierOffset(), currentKey.getQualifierLength(),
           currentKey.getTimestamp(), currentKey.getTypeByte(), valueLength, valueOffset,
           memstoreTS, tagsOffset, tagsLength, tagCompressionContext, tagsBuffer);
@@ -342,9 +312,9 @@ abstract class BufferedDataBlockEncoder implements DataBlockEncoder {
   }
 
   /**
-   * Copies only the key part of the keybuffer by doing a deep copy and passes the 
+   * Copies only the key part of the keybuffer by doing a deep copy and passes the
    * seeker state members for taking a clone.
-   * Note that the value byte[] part is still pointing to the currentBuffer and the 
+   * Note that the value byte[] part is still pointing to the currentBuffer and the
    * represented by the valueOffset and valueLength
    */
   // We return this as a Cell to the upper layers of read flow and might try setting a new SeqId
@@ -372,7 +342,7 @@ abstract class BufferedDataBlockEncoder implements DataBlockEncoder {
     private byte[] cloneTagsBuffer;
     private long seqId;
     private TagCompressionContext tagCompressionContext;
-    
+
     protected ClonedSeekerState(ByteBuffer currentBuffer, byte[] keyBuffer, short rowLength,
         int familyOffset, byte familyLength, int keyLength, int qualOffset, int qualLength,
         long timeStamp, byte typeByte, int valueLen, int valueOffset, long seqId,
@@ -456,12 +426,6 @@ abstract class BufferedDataBlockEncoder implements DataBlockEncoder {
     }
 
     @Override
-    @Deprecated
-    public long getMvccVersion() {
-      return getSequenceId();
-    }
-
-    @Override
     public long getSequenceId() {
       return seqId;
     }
@@ -503,30 +467,6 @@ abstract class BufferedDataBlockEncoder implements DataBlockEncoder {
     }
 
     @Override
-    @Deprecated
-    public byte[] getValue() {
-      return CellUtil.cloneValue(this);
-    }
-
-    @Override
-    @Deprecated
-    public byte[] getFamily() {
-      return CellUtil.cloneFamily(this);
-    }
-
-    @Override
-    @Deprecated
-    public byte[] getQualifier() {
-      return CellUtil.cloneQualifier(this);
-    }
-
-    @Override
-    @Deprecated
-    public byte[] getRow() {
-      return CellUtil.cloneRow(this);
-    }
-
-    @Override
     public String toString() {
       return KeyValue.keyToString(this.keyOnlyBuffer, 0, KeyValueUtil.keyLength(this)) + "/vlen="
           + getValueLength() + "/seqid=" + seqId;

http://git-wip-us.apache.org/repos/asf/hbase/blob/a3d30892/hbase-common/src/main/java/org/apache/hadoop/hbase/util/test/RedundantKVGenerator.java
----------------------------------------------------------------------
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/test/RedundantKVGenerator.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/test/RedundantKVGenerator.java
index 26b513c..fa98f70 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/test/RedundantKVGenerator.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/test/RedundantKVGenerator.java
@@ -301,7 +301,7 @@ public class RedundantKVGenerator {
     for (KeyValue kv : keyValues) {
       totalSize += kv.getLength();
       if (includesMemstoreTS) {
-        totalSize += WritableUtils.getVIntSize(kv.getMvccVersion());
+        totalSize += WritableUtils.getVIntSize(kv.getSequenceId());
       }
     }
 
@@ -309,7 +309,7 @@ public class RedundantKVGenerator {
     for (KeyValue kv : keyValues) {
       result.put(kv.getBuffer(), kv.getOffset(), kv.getLength());
       if (includesMemstoreTS) {
-        ByteBufferUtils.writeVLong(result, kv.getMvccVersion());
+        ByteBufferUtils.writeVLong(result, kv.getSequenceId());
       }
     }
     return result;

http://git-wip-us.apache.org/repos/asf/hbase/blob/a3d30892/hbase-common/src/test/java/org/apache/hadoop/hbase/TestCellUtil.java
----------------------------------------------------------------------
diff --git a/hbase-common/src/test/java/org/apache/hadoop/hbase/TestCellUtil.java b/hbase-common/src/test/java/org/apache/hadoop/hbase/TestCellUtil.java
index ed8f901..d9e76e6 100644
--- a/hbase-common/src/test/java/org/apache/hadoop/hbase/TestCellUtil.java
+++ b/hbase-common/src/test/java/org/apache/hadoop/hbase/TestCellUtil.java
@@ -18,7 +18,9 @@
 
 package org.apache.hadoop.hbase;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 
 import java.io.IOException;
 import java.math.BigDecimal;
@@ -155,12 +157,6 @@ public class TestCellUtil {
     }
 
     @Override
-    public long getMvccVersion() {
-      // TODO Auto-generated method stub
-      return 0;
-    }
-
-    @Override
     public byte[] getValueArray() {
       // TODO Auto-generated method stub
       return null;
@@ -191,30 +187,6 @@ public class TestCellUtil {
     }
 
     @Override
-    public byte[] getValue() {
-      // TODO Auto-generated method stub
-      return null;
-    }
-
-    @Override
-    public byte[] getFamily() {
-      // TODO Auto-generated method stub
-      return null;
-    }
-
-    @Override
-    public byte[] getQualifier() {
-      // TODO Auto-generated method stub
-      return null;
-    }
-
-    @Override
-    public byte[] getRow() {
-      // TODO Auto-generated method stub
-      return null;
-    }
-
-    @Override
     public long getSequenceId() {
       // TODO Auto-generated method stub
       return 0;
@@ -593,11 +565,6 @@ public class TestCellUtil {
     }
 
     @Override
-    public long getMvccVersion() {
-      return 0;
-    }
-
-    @Override
     public long getSequenceId() {
       return 0;
     }
@@ -640,26 +607,6 @@ public class TestCellUtil {
     }
 
     @Override
-    public byte[] getValue() {
-      throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public byte[] getFamily() {
-      throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public byte[] getQualifier() {
-      throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public byte[] getRow() {
-      throw new UnsupportedOperationException();
-    }
-
-    @Override
     public ByteBuffer getRowByteBuffer() {
       return this.buffer;
     }

http://git-wip-us.apache.org/repos/asf/hbase/blob/a3d30892/hbase-common/src/test/java/org/apache/hadoop/hbase/TestKeyValue.java
----------------------------------------------------------------------
diff --git a/hbase-common/src/test/java/org/apache/hadoop/hbase/TestKeyValue.java b/hbase-common/src/test/java/org/apache/hadoop/hbase/TestKeyValue.java
index 5cb61c3..cc1e511 100644
--- a/hbase-common/src/test/java/org/apache/hadoop/hbase/TestKeyValue.java
+++ b/hbase-common/src/test/java/org/apache/hadoop/hbase/TestKeyValue.java
@@ -93,7 +93,8 @@ public class TestKeyValue extends TestCase {
   private void check(final byte [] row, final byte [] family, byte [] qualifier,
     final long timestamp, final byte [] value) {
     KeyValue kv = new KeyValue(row, family, qualifier, timestamp, value);
-    assertTrue(Bytes.compareTo(kv.getRow(), row) == 0);
+    assertTrue(Bytes.compareTo(kv.getRowArray(), kv.getRowOffset(), kv.getRowLength(), row, 0,
+      row.length) == 0);
     assertTrue(CellUtil.matchingColumn(kv, family, qualifier));
     // Call toString to make sure it works.
     LOG.info(kv.toString());
@@ -390,9 +391,10 @@ public class TestKeyValue extends TestCase {
         // keys are still the same
         assertTrue(kv1.equals(kv1ko));
         // but values are not
-        assertTrue(kv1ko.getValue().length == (useLen?Bytes.SIZEOF_INT:0));
+        assertTrue(kv1ko.getValueLength() == (useLen?Bytes.SIZEOF_INT:0));
         if (useLen) {
-          assertEquals(kv1.getValueLength(), Bytes.toInt(kv1ko.getValue()));
+          assertEquals(kv1.getValueLength(),
+            Bytes.toInt(kv1ko.getValueArray(), kv1ko.getValueOffset(), kv1ko.getValueLength()));
         }
       }
     }
@@ -442,10 +444,14 @@ public class TestKeyValue extends TestCase {
     KeyValue kv = new KeyValue(row, cf, q, HConstants.LATEST_TIMESTAMP, value, new Tag[] {
         new Tag((byte) 1, metaValue1), new Tag((byte) 2, metaValue2) });
     assertTrue(kv.getTagsLength() > 0);
-    assertTrue(Bytes.equals(kv.getRow(), row));
-    assertTrue(Bytes.equals(kv.getFamily(), cf));
-    assertTrue(Bytes.equals(kv.getQualifier(), q));
-    assertTrue(Bytes.equals(kv.getValue(), value));
+    assertTrue(Bytes.equals(kv.getRowArray(), kv.getRowOffset(), kv.getRowLength(), row, 0,
+      row.length));
+    assertTrue(Bytes.equals(kv.getFamilyArray(), kv.getFamilyOffset(), kv.getFamilyLength(), cf, 0,
+      cf.length));
+    assertTrue(Bytes.equals(kv.getQualifierArray(), kv.getQualifierOffset(),
+      kv.getQualifierLength(), q, 0, q.length));
+    assertTrue(Bytes.equals(kv.getValueArray(), kv.getValueOffset(), kv.getValueLength(), value, 0,
+      value.length));
     List<Tag> tags = kv.getTags();
     assertNotNull(tags);
     assertEquals(2, tags.size());
@@ -492,7 +498,7 @@ public class TestKeyValue extends TestCase {
     Bytes.equals(next.getValue(), metaValue2);
     assertFalse(tagItr.hasNext());
   }
-  
+
   public void testMetaKeyComparator() {
     CellComparator c = CellComparator.META_COMPARATOR;
     long now = System.currentTimeMillis();
@@ -500,23 +506,23 @@ public class TestKeyValue extends TestCase {
     KeyValue a = new KeyValue(Bytes.toBytes("table1"), now);
     KeyValue b = new KeyValue(Bytes.toBytes("table2"), now);
     assertTrue(c.compare(a, b) < 0);
-    
+
     a = new KeyValue(Bytes.toBytes("table1,111"), now);
     b = new KeyValue(Bytes.toBytes("table2"), now);
     assertTrue(c.compare(a, b) < 0);
-    
+
     a = new KeyValue(Bytes.toBytes("table1"), now);
     b = new KeyValue(Bytes.toBytes("table2,111"), now);
     assertTrue(c.compare(a, b) < 0);
-    
+
     a = new KeyValue(Bytes.toBytes("table,111"), now);
     b = new KeyValue(Bytes.toBytes("table,2222"), now);
     assertTrue(c.compare(a, b) < 0);
-    
+
     a = new KeyValue(Bytes.toBytes("table,111,aaaa"), now);
     b = new KeyValue(Bytes.toBytes("table,2222"), now);
     assertTrue(c.compare(a, b) < 0);
-    
+
     a = new KeyValue(Bytes.toBytes("table,111"), now);
     b = new KeyValue(Bytes.toBytes("table,2222.bbb"), now);
     assertTrue(c.compare(a, b) < 0);
@@ -524,7 +530,7 @@ public class TestKeyValue extends TestCase {
     a = new KeyValue(Bytes.toBytes("table,,aaaa"), now);
     b = new KeyValue(Bytes.toBytes("table,111,bbb"), now);
     assertTrue(c.compare(a, b) < 0);
-    
+
     a = new KeyValue(Bytes.toBytes("table,111,aaaa"), now);
     b = new KeyValue(Bytes.toBytes("table,111,bbb"), now);
     assertTrue(c.compare(a, b) < 0);
@@ -532,7 +538,7 @@ public class TestKeyValue extends TestCase {
     a = new KeyValue(Bytes.toBytes("table,111,xxxx"), now);
     b = new KeyValue(Bytes.toBytes("table,111,222,bbb"), now);
     assertTrue(c.compare(a, b) < 0);
-    
+
     a = new KeyValue(Bytes.toBytes("table,111,11,xxx"), now);
     b = new KeyValue(Bytes.toBytes("table,111,222,bbb"), now);
     assertTrue(c.compare(a, b) < 0);
@@ -590,12 +596,6 @@ public class TestKeyValue extends TestCase {
       return this.kv.getTagsOffset();
     }
 
-    // used to achieve atomic operations in the memstore.
-    @Override
-    public long getMvccVersion() {
-      return this.kv.getMvccVersion();
-    }
-
     /**
      * used to achieve atomic operations in the memstore.
      */
@@ -613,7 +613,7 @@ public class TestKeyValue extends TestCase {
     }
 
     /**
-     * 
+     *
      * @return Timestamp
      */
     @Override
@@ -729,34 +729,6 @@ public class TestKeyValue extends TestCase {
       return this.kv.getQualifierLength();
     }
 
-    @Override
-    @Deprecated
-    public byte[] getValue() {
-      // TODO Auto-generated method stub
-      return null;
-    }
-
-    @Override
-    @Deprecated
-    public byte[] getFamily() {
-      // TODO Auto-generated method stub
-      return null;
-    }
-
-    @Override
-    @Deprecated
-    public byte[] getQualifier() {
-      // TODO Auto-generated method stub
-      return null;
-    }
-
-    @Override
-    @Deprecated
-    public byte[] getRow() {
-      // TODO Auto-generated method stub
-      return null;
-    }
-
     /**
      * @return the backing array of the entire KeyValue (all KeyValue fields are
      *         in a single array)

http://git-wip-us.apache.org/repos/asf/hbase/blob/a3d30892/hbase-common/src/test/java/org/apache/hadoop/hbase/util/TestByteRangeWithKVSerialization.java
----------------------------------------------------------------------
diff --git a/hbase-common/src/test/java/org/apache/hadoop/hbase/util/TestByteRangeWithKVSerialization.java b/hbase-common/src/test/java/org/apache/hadoop/hbase/util/TestByteRangeWithKVSerialization.java
index a6b7cc5..bd2a29d 100644
--- a/hbase-common/src/test/java/org/apache/hadoop/hbase/util/TestByteRangeWithKVSerialization.java
+++ b/hbase-common/src/test/java/org/apache/hadoop/hbase/util/TestByteRangeWithKVSerialization.java
@@ -40,7 +40,7 @@ public class TestByteRangeWithKVSerialization {
     pbr.put((byte) (tagsLen >> 8 & 0xff));
     pbr.put((byte) (tagsLen & 0xff));
     pbr.put(kv.getTagsArray(), kv.getTagsOffset(), tagsLen);
-    pbr.putVLong(kv.getMvccVersion());
+    pbr.putVLong(kv.getSequenceId());
   }
 
   static KeyValue readCell(PositionedByteRange pbr) throws Exception {
@@ -88,7 +88,7 @@ public class TestByteRangeWithKVSerialization {
       Assert.assertTrue(Bytes.equals(kv.getTagsArray(), kv.getTagsOffset(),
           kv.getTagsLength(), kv1.getTagsArray(), kv1.getTagsOffset(),
           kv1.getTagsLength()));
-      Assert.assertEquals(kv1.getMvccVersion(), kv.getMvccVersion());
+      Assert.assertEquals(kv1.getSequenceId(), kv.getSequenceId());
     }
   }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hbase/blob/a3d30892/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedListWithVisibility.java
----------------------------------------------------------------------
diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedListWithVisibility.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedListWithVisibility.java
index a49d9ca..adc0eb7 100644
--- a/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedListWithVisibility.java
+++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedListWithVisibility.java
@@ -30,6 +30,7 @@ import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.conf.Configured;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hbase.Cell;
+import org.apache.hadoop.hbase.CellUtil;
 import org.apache.hadoop.hbase.HBaseConfiguration;
 import org.apache.hadoop.hbase.HColumnDescriptor;
 import org.apache.hadoop.hbase.HRegionLocation;
@@ -74,24 +75,24 @@ import org.junit.experimental.categories.Category;
 
 /**
  * IT test used to verify the deletes with visibility labels.
- * The test creates three tables tablename_0, tablename_1 and tablename_2 and each table 
+ * The test creates three tables tablename_0, tablename_1 and tablename_2 and each table
  * is associated with a unique pair of labels.
- * Another common table with the name 'commontable' is created and it has the data combined 
- * from all these 3 tables such that there are 3 versions of every row but the visibility label 
- * in every row corresponds to the table from which the row originated.  
- * Then deletes are issued to the common table by selecting the visibility label 
- * associated with each of the smaller tables. 
- * After the delete is issued with one set of visibility labels we try to scan the common table 
- * with each of the visibility pairs defined for the 3 tables.  
- * So after the first delete is issued, a scan with the first set of visibility labels would 
- * return zero result whereas the scan issued with the other two sets of visibility labels 
- * should return all the rows corresponding to that set of visibility labels.  The above 
- * process of delete and scan is repeated until after the last set of visibility labels are 
+ * Another common table with the name 'commontable' is created and it has the data combined
+ * from all these 3 tables such that there are 3 versions of every row but the visibility label
+ * in every row corresponds to the table from which the row originated.
+ * Then deletes are issued to the common table by selecting the visibility label
+ * associated with each of the smaller tables.
+ * After the delete is issued with one set of visibility labels we try to scan the common table
+ * with each of the visibility pairs defined for the 3 tables.
+ * So after the first delete is issued, a scan with the first set of visibility labels would
+ * return zero result whereas the scan issued with the other two sets of visibility labels
+ * should return all the rows corresponding to that set of visibility labels.  The above
+ * process of delete and scan is repeated until after the last set of visibility labels are
  * used for the deletes the common table should not return any row.
- * 
- * To use this 
+ *
+ * To use this
  * ./hbase org.apache.hadoop.hbase.test.IntegrationTestBigLinkedListWithVisibility Loop 1 1 20000 /tmp 1 10000
- * or 
+ * or
  * ./hbase org.apache.hadoop.hbase.IntegrationTestsDriver -r .*IntegrationTestBigLinkedListWithVisibility.*
  */
 @Category(IntegrationTests.class)
@@ -211,7 +212,7 @@ public class IntegrationTestBigLinkedListWithVisibility extends IntegrationTestB
           for (int j = 0; j < DEFAULT_TABLES_COUNT; j++) {
             Put put = new Put(current[i]);
             put.add(FAMILY_NAME, COLUMN_PREV, prev == null ? NO_KEY : prev[i]);
-            
+
             if (count >= 0) {
               put.add(FAMILY_NAME, COLUMN_COUNT, Bytes.toBytes(count + i));
             }
@@ -331,7 +332,7 @@ public class IntegrationTestBigLinkedListWithVisibility extends IntegrationTestB
     @Override
     protected void processKV(ImmutableBytesWritable key, Result result,
         org.apache.hadoop.mapreduce.Mapper.Context context, Put put,
-        org.apache.hadoop.hbase.client.Delete delete) throws 
+        org.apache.hadoop.hbase.client.Delete delete) throws
         IOException, InterruptedException {
       String visibilityExps = split[index * 2] + OR + split[(index * 2) + 1];
       for (Cell kv : result.rawCells()) {
@@ -343,7 +344,7 @@ public class IntegrationTestBigLinkedListWithVisibility extends IntegrationTestB
           delete = new Delete(key.get());
         }
         delete.setCellVisibility(new CellVisibility(visibilityExps));
-        delete.deleteFamily(kv.getFamily());
+        delete.deleteFamily(CellUtil.cloneFamily(kv));
       }
       if (delete != null) {
         context.write(key, delete);
@@ -356,14 +357,14 @@ public class IntegrationTestBigLinkedListWithVisibility extends IntegrationTestB
     super.addOptions();
     addOptWithArg("u", USER_OPT, "User name");
   }
-  
+
   @Override
   protected void processOptions(CommandLine cmd) {
     super.processOptions(cmd);
     if (cmd.hasOption(USER_OPT)) {
       userName = cmd.getOptionValue(USER_OPT);
     }
-    
+
   }
   @Override
   public void setUpCluster() throws Exception {
@@ -561,7 +562,7 @@ public class IntegrationTestBigLinkedListWithVisibility extends IntegrationTestB
       }
     }
 
-    private void verify(int numReducers, long expectedNumNodes, 
+    private void verify(int numReducers, long expectedNumNodes,
         Path iterationOutput, Verify verify) throws Exception {
       verify.setConf(getConf());
       int retCode = verify.run(iterationOutput, numReducers);

http://git-wip-us.apache.org/repos/asf/hbase/blob/a3d30892/hbase-prefix-tree/src/main/java/org/apache/hadoop/hbase/codec/prefixtree/PrefixTreeCodec.java
----------------------------------------------------------------------
diff --git a/hbase-prefix-tree/src/main/java/org/apache/hadoop/hbase/codec/prefixtree/PrefixTreeCodec.java b/hbase-prefix-tree/src/main/java/org/apache/hadoop/hbase/codec/prefixtree/PrefixTreeCodec.java
index 7fceaa5..d903d79 100644
--- a/hbase-prefix-tree/src/main/java/org/apache/hadoop/hbase/codec/prefixtree/PrefixTreeCodec.java
+++ b/hbase-prefix-tree/src/main/java/org/apache/hadoop/hbase/codec/prefixtree/PrefixTreeCodec.java
@@ -102,7 +102,7 @@ public class PrefixTreeCodec implements DataBlockEncoder {
         ByteBufferUtils.skip(result, keyValueLength);
         offset += keyValueLength;
         if (includesMvcc) {
-          ByteBufferUtils.writeVLong(result, currentCell.getMvccVersion());
+          ByteBufferUtils.writeVLong(result, currentCell.getSequenceId());
         }
       }
       result.position(result.limit());//make it appear as if we were appending

http://git-wip-us.apache.org/repos/asf/hbase/blob/a3d30892/hbase-prefix-tree/src/main/java/org/apache/hadoop/hbase/codec/prefixtree/PrefixTreeSeeker.java
----------------------------------------------------------------------
diff --git a/hbase-prefix-tree/src/main/java/org/apache/hadoop/hbase/codec/prefixtree/PrefixTreeSeeker.java b/hbase-prefix-tree/src/main/java/org/apache/hadoop/hbase/codec/prefixtree/PrefixTreeSeeker.java
index 8a45f13..eefd953 100644
--- a/hbase-prefix-tree/src/main/java/org/apache/hadoop/hbase/codec/prefixtree/PrefixTreeSeeker.java
+++ b/hbase-prefix-tree/src/main/java/org/apache/hadoop/hbase/codec/prefixtree/PrefixTreeSeeker.java
@@ -315,12 +315,6 @@ public class PrefixTreeSeeker implements EncodedSeeker {
     }
 
     @Override
-    @Deprecated
-    public long getMvccVersion() {
-      return getSequenceId();
-    }
-
-    @Override
     public long getSequenceId() {
       return seqId;
     }
@@ -356,30 +350,6 @@ public class PrefixTreeSeeker implements EncodedSeeker {
     }
 
     @Override
-    @Deprecated
-    public byte[] getValue() {
-      return this.val;
-    }
-
-    @Override
-    @Deprecated
-    public byte[] getFamily() {
-      return this.fam;
-    }
-
-    @Override
-    @Deprecated
-    public byte[] getQualifier() {
-      return this.qual;
-    }
-
-    @Override
-    @Deprecated
-    public byte[] getRow() {
-      return this.row;
-    }
-
-    @Override
     public String toString() {
       String row = Bytes.toStringBinary(getRowArray(), getRowOffset(), getRowLength());
       String family = Bytes.toStringBinary(getFamilyArray(), getFamilyOffset(), getFamilyLength());

http://git-wip-us.apache.org/repos/asf/hbase/blob/a3d30892/hbase-prefix-tree/src/main/java/org/apache/hadoop/hbase/codec/prefixtree/decode/PrefixTreeCell.java
----------------------------------------------------------------------
diff --git a/hbase-prefix-tree/src/main/java/org/apache/hadoop/hbase/codec/prefixtree/decode/PrefixTreeCell.java b/hbase-prefix-tree/src/main/java/org/apache/hadoop/hbase/codec/prefixtree/decode/PrefixTreeCell.java
index f06634c..82d1d7e 100644
--- a/hbase-prefix-tree/src/main/java/org/apache/hadoop/hbase/codec/prefixtree/decode/PrefixTreeCell.java
+++ b/hbase-prefix-tree/src/main/java/org/apache/hadoop/hbase/codec/prefixtree/decode/PrefixTreeCell.java
@@ -131,7 +131,7 @@ public class PrefixTreeCell implements Cell, SettableSequenceId, Comparable<Cell
   }
 
   @Override
-  public long getMvccVersion() {
+  public long getSequenceId() {
     if (!includeMvccVersion) {
       return 0L;
     }
@@ -139,11 +139,6 @@ public class PrefixTreeCell implements Cell, SettableSequenceId, Comparable<Cell
   }
 
   @Override
-  public long getSequenceId() {
-    return getMvccVersion();
-  }
-
-  @Override
   public int getValueLength() {
     return valueLength;
   }
@@ -208,27 +203,6 @@ public class PrefixTreeCell implements Cell, SettableSequenceId, Comparable<Cell
     return type.getCode();
   }
 
-  /* Deprecated methods pushed into the Cell interface */
-  @Override
-  public byte[] getValue() {
-    return CellUtil.cloneValue(this);
-  }
-
-  @Override
-  public byte[] getFamily() {
-    return CellUtil.cloneFamily(this);
-  }
-
-  @Override
-  public byte[] getQualifier() {
-    return CellUtil.cloneQualifier(this);
-  }
-
-  @Override
-  public byte[] getRow() {
-    return CellUtil.cloneRow(this);
-  }
-
   /************************* helper methods *************************/
 
   /**

http://git-wip-us.apache.org/repos/asf/hbase/blob/a3d30892/hbase-prefix-tree/src/main/java/org/apache/hadoop/hbase/codec/prefixtree/encode/PrefixTreeEncoder.java
----------------------------------------------------------------------
diff --git a/hbase-prefix-tree/src/main/java/org/apache/hadoop/hbase/codec/prefixtree/encode/PrefixTreeEncoder.java b/hbase-prefix-tree/src/main/java/org/apache/hadoop/hbase/codec/prefixtree/encode/PrefixTreeEncoder.java
index 926cf30..299d20d 100644
--- a/hbase-prefix-tree/src/main/java/org/apache/hadoop/hbase/codec/prefixtree/encode/PrefixTreeEncoder.java
+++ b/hbase-prefix-tree/src/main/java/org/apache/hadoop/hbase/codec/prefixtree/encode/PrefixTreeEncoder.java
@@ -296,9 +296,9 @@ public class PrefixTreeEncoder implements CellOutputStream {
 
     // memstore timestamps
     if (includeMvccVersion) {
-      mvccVersions[totalCells] = cell.getMvccVersion();
-      mvccVersionEncoder.add(cell.getMvccVersion());
-      totalUnencodedBytes += WritableUtils.getVIntSize(cell.getMvccVersion());
+      mvccVersions[totalCells] = cell.getSequenceId();
+      mvccVersionEncoder.add(cell.getSequenceId());
+      totalUnencodedBytes += WritableUtils.getVIntSize(cell.getSequenceId());
     }else{
       //must overwrite in case there was a previous version in this array slot
       mvccVersions[totalCells] = 0L;

http://git-wip-us.apache.org/repos/asf/hbase/blob/a3d30892/hbase-prefix-tree/src/test/java/org/apache/hadoop/hbase/codec/prefixtree/column/data/TestColumnDataRandom.java
----------------------------------------------------------------------
diff --git a/hbase-prefix-tree/src/test/java/org/apache/hadoop/hbase/codec/prefixtree/column/data/TestColumnDataRandom.java b/hbase-prefix-tree/src/test/java/org/apache/hadoop/hbase/codec/prefixtree/column/data/TestColumnDataRandom.java
index ad08a29..579c5a0 100644
--- a/hbase-prefix-tree/src/test/java/org/apache/hadoop/hbase/codec/prefixtree/column/data/TestColumnDataRandom.java
+++ b/hbase-prefix-tree/src/test/java/org/apache/hadoop/hbase/codec/prefixtree/column/data/TestColumnDataRandom.java
@@ -20,6 +20,7 @@ package org.apache.hadoop.hbase.codec.prefixtree.column.data;
 
 import java.util.List;
 
+import org.apache.hadoop.hbase.CellUtil;
 import org.apache.hadoop.hbase.KeyValue;
 import org.apache.hadoop.hbase.codec.prefixtree.column.TestColumnData;
 import org.apache.hadoop.hbase.util.ByteRange;
@@ -40,7 +41,7 @@ public class TestColumnDataRandom implements TestColumnData {
     ByteRangeSet sortedColumns = new ByteRangeTreeSet();
     List<KeyValue> d = generator.generateTestKeyValues(numColumns);
     for (KeyValue col : d) {
-      ByteRange colRange = new SimpleMutableByteRange(col.getQualifier());
+      ByteRange colRange = new SimpleMutableByteRange(CellUtil.cloneQualifier(col));
       inputs.add(colRange);
       sortedColumns.add(colRange);
     }

http://git-wip-us.apache.org/repos/asf/hbase/blob/a3d30892/hbase-prefix-tree/src/test/java/org/apache/hadoop/hbase/codec/prefixtree/row/TestRowEncoder.java
----------------------------------------------------------------------
diff --git a/hbase-prefix-tree/src/test/java/org/apache/hadoop/hbase/codec/prefixtree/row/TestRowEncoder.java b/hbase-prefix-tree/src/test/java/org/apache/hadoop/hbase/codec/prefixtree/row/TestRowEncoder.java
index ec11551..0c8caf4 100644
--- a/hbase-prefix-tree/src/test/java/org/apache/hadoop/hbase/codec/prefixtree/row/TestRowEncoder.java
+++ b/hbase-prefix-tree/src/test/java/org/apache/hadoop/hbase/codec/prefixtree/row/TestRowEncoder.java
@@ -181,7 +181,7 @@ public class TestRowEncoder {
     // assert keys are equal (doesn't compare values)
     Assert.assertEquals(expected, actual);
     if (includeMemstoreTS) {
-      Assert.assertEquals(expected.getMvccVersion(), actual.getMvccVersion());
+      Assert.assertEquals(expected.getSequenceId(), actual.getSequenceId());
     }
     // assert values equal
     Assert.assertTrue(Bytes.equals(expected.getValueArray(), expected.getValueOffset(),

http://git-wip-us.apache.org/repos/asf/hbase/blob/a3d30892/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java
index a12c747..f85d745 100644
--- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java
+++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java
@@ -115,7 +115,8 @@ public class RemoteHTable implements Table {
             if (o instanceof byte[]) {
               sb.append(Bytes.toStringBinary((byte[])o));
             } else if (o instanceof KeyValue) {
-              sb.append(Bytes.toStringBinary(((KeyValue)o).getQualifier()));
+              sb.append(Bytes.toStringBinary(((KeyValue) o).getRowArray(),
+                ((KeyValue) o).getRowOffset(), ((KeyValue) o).getRowLength()));
             } else {
               throw new RuntimeException("object type not handled");
             }

http://git-wip-us.apache.org/repos/asf/hbase/blob/a3d30892/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestScannersWithFilters.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestScannersWithFilters.java b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestScannersWithFilters.java
index 3acddc1..22ee31d 100644
--- a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestScannersWithFilters.java
+++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestScannersWithFilters.java
@@ -19,6 +19,10 @@
 
 package org.apache.hadoop.hbase.rest;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
 import java.io.ByteArrayInputStream;
 import java.io.StringWriter;
 import java.util.ArrayList;
@@ -32,16 +36,24 @@ import javax.xml.bind.Unmarshaller;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.hadoop.hbase.*;
+import org.apache.hadoop.hbase.CellUtil;
+import org.apache.hadoop.hbase.HBaseTestingUtility;
+import org.apache.hadoop.hbase.HColumnDescriptor;
+import org.apache.hadoop.hbase.HConstants;
+import org.apache.hadoop.hbase.HTableDescriptor;
+import org.apache.hadoop.hbase.KeyValue;
+import org.apache.hadoop.hbase.TableName;
 import org.apache.hadoop.hbase.client.Admin;
 import org.apache.hadoop.hbase.client.Delete;
+import org.apache.hadoop.hbase.client.Durability;
 import org.apache.hadoop.hbase.client.Put;
 import org.apache.hadoop.hbase.client.Scan;
-import org.apache.hadoop.hbase.client.Durability;
 import org.apache.hadoop.hbase.client.Table;
 import org.apache.hadoop.hbase.filter.BinaryComparator;
+import org.apache.hadoop.hbase.filter.CompareFilter.CompareOp;
 import org.apache.hadoop.hbase.filter.Filter;
 import org.apache.hadoop.hbase.filter.FilterList;
+import org.apache.hadoop.hbase.filter.FilterList.Operator;
 import org.apache.hadoop.hbase.filter.FirstKeyOnlyFilter;
 import org.apache.hadoop.hbase.filter.InclusiveStopFilter;
 import org.apache.hadoop.hbase.filter.PageFilter;
@@ -52,8 +64,6 @@ import org.apache.hadoop.hbase.filter.RowFilter;
 import org.apache.hadoop.hbase.filter.SkipFilter;
 import org.apache.hadoop.hbase.filter.SubstringComparator;
 import org.apache.hadoop.hbase.filter.ValueFilter;
-import org.apache.hadoop.hbase.filter.CompareFilter.CompareOp;
-import org.apache.hadoop.hbase.filter.FilterList.Operator;
 import org.apache.hadoop.hbase.rest.client.Client;
 import org.apache.hadoop.hbase.rest.client.Cluster;
 import org.apache.hadoop.hbase.rest.client.Response;
@@ -64,9 +74,6 @@ import org.apache.hadoop.hbase.rest.model.ScannerModel;
 import org.apache.hadoop.hbase.testclassification.MediumTests;
 import org.apache.hadoop.hbase.testclassification.RestTests;
 import org.apache.hadoop.hbase.util.Bytes;
-
-import static org.junit.Assert.*;
-
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -108,7 +115,7 @@ public class TestScannersWithFilters {
   };
 
   private static final HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();
-  private static final HBaseRESTTestingUtility REST_TEST_UTIL = 
+  private static final HBaseRESTTestingUtility REST_TEST_UTIL =
     new HBaseRESTTestingUtility();
   private static Client client;
   private static JAXBContext context;
@@ -128,7 +135,7 @@ public class TestScannersWithFilters {
         ScannerModel.class);
     marshaller = context.createMarshaller();
     unmarshaller = context.createUnmarshaller();
-    client = new Client(new Cluster().add("localhost", 
+    client = new Client(new Cluster().add("localhost",
       REST_TEST_UTIL.getServletPort()));
     Admin admin = TEST_UTIL.getHBaseAdmin();
     if (!admin.tableExists(TABLE)) {
@@ -154,7 +161,7 @@ public class TestScannersWithFilters {
         }
         table.put(p);
       }
-      
+
       // Insert second half (reverse families)
       for(byte [] ROW : ROWS_ONE) {
         Put p = new Put(ROW);
@@ -172,14 +179,14 @@ public class TestScannersWithFilters {
         }
         table.put(p);
       }
-      
+
       // Delete the second qualifier from all rows and families
       for(byte [] ROW : ROWS_ONE) {
         Delete d = new Delete(ROW);
         d.deleteColumns(FAMILIES[0], QUALIFIERS_ONE[1]);
         d.deleteColumns(FAMILIES[1], QUALIFIERS_ONE[1]);
         table.delete(d);
-      }    
+      }
       for(byte [] ROW : ROWS_TWO) {
         Delete d = new Delete(ROW);
         d.deleteColumns(FAMILIES[0], QUALIFIERS_TWO[1]);
@@ -187,7 +194,7 @@ public class TestScannersWithFilters {
         table.delete(d);
       }
       colsPerRow -= 2;
-      
+
       // Delete the second rows from both groups, one column at a time
       for(byte [] QUALIFIER : QUALIFIERS_ONE) {
         Delete d = new Delete(ROWS_ONE[1]);
@@ -212,7 +219,7 @@ public class TestScannersWithFilters {
     TEST_UTIL.shutdownMiniCluster();
   }
 
-  private static void verifyScan(Scan s, long expectedRows, long expectedKeys) 
+  private static void verifyScan(Scan s, long expectedRows, long expectedKeys)
       throws Exception {
     ScannerModel model = ScannerModel.fromScan(s);
     model.setBatch(Integer.MAX_VALUE); // fetch it all at once
@@ -234,7 +241,7 @@ public class TestScannersWithFilters {
       unmarshaller.unmarshal(new ByteArrayInputStream(response.getBody()));
 
     int rows = cells.getRows().size();
-    assertTrue("Scanned too many rows! Only expected " + expectedRows + 
+    assertTrue("Scanned too many rows! Only expected " + expectedRows +
         " total but scanned " + rows, expectedRows == rows);
     for (RowModel row: cells.getRows()) {
       int count = row.getCells().size();
@@ -247,7 +254,7 @@ public class TestScannersWithFilters {
     assertEquals(response.getCode(), 200);
   }
 
-  private static void verifyScanFull(Scan s, KeyValue [] kvs) 
+  private static void verifyScanFull(Scan s, KeyValue [] kvs)
       throws Exception {
     ScannerModel model = ScannerModel.fromScan(s);
     model.setBatch(Integer.MAX_VALUE); // fetch it all at once
@@ -281,19 +288,19 @@ public class TestScannersWithFilters {
       RowModel rowModel = i.next();
       List<CellModel> cells = rowModel.getCells();
       if (cells.isEmpty()) break;
-      assertTrue("Scanned too many keys! Only expected " + kvs.length + 
-        " total but already scanned " + (cells.size() + idx), 
+      assertTrue("Scanned too many keys! Only expected " + kvs.length +
+        " total but already scanned " + (cells.size() + idx),
         kvs.length >= idx + cells.size());
       for (CellModel cell: cells) {
-        assertTrue("Row mismatch", 
-            Bytes.equals(rowModel.getKey(), kvs[idx].getRow()));
+        assertTrue("Row mismatch",
+            Bytes.equals(rowModel.getKey(), CellUtil.cloneRow(kvs[idx])));
         byte[][] split = KeyValue.parseColumn(cell.getColumn());
-        assertTrue("Family mismatch", 
-            Bytes.equals(split[0], kvs[idx].getFamily()));
-        assertTrue("Qualifier mismatch", 
-            Bytes.equals(split[1], kvs[idx].getQualifier()));
-        assertTrue("Value mismatch", 
-            Bytes.equals(cell.getValue(), kvs[idx].getValue()));
+        assertTrue("Family mismatch",
+            Bytes.equals(split[0], CellUtil.cloneFamily(kvs[idx])));
+        assertTrue("Qualifier mismatch",
+            Bytes.equals(split[1], CellUtil.cloneQualifier(kvs[idx])));
+        assertTrue("Value mismatch",
+            Bytes.equals(cell.getValue(), CellUtil.cloneValue(kvs[idx])));
         idx++;
       }
     }
@@ -309,7 +316,7 @@ public class TestScannersWithFilters {
     marshaller.marshal(model, writer);
     LOG.debug(writer.toString());
     byte[] body = Bytes.toBytes(writer.toString());
-    Response response = client.put("/" + TABLE + "/scanner", 
+    Response response = client.put("/" + TABLE + "/scanner",
       Constants.MIMETYPE_XML, body);
     assertEquals(response.getCode(), 201);
     String scannerURI = response.getLocation();
@@ -334,7 +341,7 @@ public class TestScannersWithFilters {
       RowModel rowModel = i.next();
       List<CellModel> cells = rowModel.getCells();
       if (cells.isEmpty()) break;
-      assertTrue("Scanned too many rows! Only expected " + expectedRows + 
+      assertTrue("Scanned too many rows! Only expected " + expectedRows +
         " total but already scanned " + (j+1), expectedRows > j);
       assertEquals("Expected " + expectedKeys + " keys per row but " +
         "returned " + cells.size(), expectedKeys, cells.size());
@@ -348,7 +355,7 @@ public class TestScannersWithFilters {
     // No filter
     long expectedRows = numRows;
     long expectedKeys = colsPerRow;
-    
+
     // Both families
     Scan s = new Scan();
     verifyScan(s, expectedRows, expectedKeys);
@@ -416,7 +423,7 @@ public class TestScannersWithFilters {
       new KeyValue(ROWS_TWO[3], FAMILIES[1], QUALIFIERS_TWO[2], VALUES[1]),
       new KeyValue(ROWS_TWO[3], FAMILIES[1], QUALIFIERS_TWO[3], VALUES[1])
     };
-    
+
     // Grab all 6 rows
     long expectedRows = 6;
     long expectedKeys = colsPerRow;
@@ -425,7 +432,7 @@ public class TestScannersWithFilters {
     verifyScan(s, expectedRows, expectedKeys);
     s.setFilter(new PageFilter(expectedRows));
     verifyScanFull(s, expectedKVs);
-    
+
     // Grab first 4 rows (6 cols per row)
     expectedRows = 4;
     expectedKeys = colsPerRow;
@@ -434,7 +441,7 @@ public class TestScannersWithFilters {
     verifyScan(s, expectedRows, expectedKeys);
     s.setFilter(new PageFilter(expectedRows));
     verifyScanFull(s, Arrays.copyOf(expectedKVs, 24));
-    
+
     // Grab first 2 rows
     expectedRows = 2;
     expectedKeys = colsPerRow;
@@ -451,20 +458,20 @@ public class TestScannersWithFilters {
     s.setFilter(new PageFilter(expectedRows));
     verifyScan(s, expectedRows, expectedKeys);
     s.setFilter(new PageFilter(expectedRows));
-    verifyScanFull(s, Arrays.copyOf(expectedKVs, 6));    
+    verifyScanFull(s, Arrays.copyOf(expectedKVs, 6));
   }
 
   @Test
   public void testInclusiveStopFilter() throws Exception {
     // Grab rows from group one
-    
+
     // If we just use start/stop row, we get total/2 - 1 rows
     long expectedRows = (numRows / 2) - 1;
     long expectedKeys = colsPerRow;
-    Scan s = new Scan(Bytes.toBytes("testRowOne-0"), 
+    Scan s = new Scan(Bytes.toBytes("testRowOne-0"),
         Bytes.toBytes("testRowOne-3"));
     verifyScan(s, expectedRows, expectedKeys);
-    
+
     // Now use start row with inclusive stop filter
     expectedRows = numRows / 2;
     s = new Scan(Bytes.toBytes("testRowOne-0"));
@@ -472,14 +479,14 @@ public class TestScannersWithFilters {
     verifyScan(s, expectedRows, expectedKeys);
 
     // Grab rows from group two
-    
+
     // If we just use start/stop row, we get total/2 - 1 rows
     expectedRows = (numRows / 2) - 1;
     expectedKeys = colsPerRow;
-    s = new Scan(Bytes.toBytes("testRowTwo-0"), 
+    s = new Scan(Bytes.toBytes("testRowTwo-0"),
         Bytes.toBytes("testRowTwo-3"));
     verifyScan(s, expectedRows, expectedKeys);
-    
+
     // Now use start row with inclusive stop filter
     expectedRows = numRows / 2;
     s = new Scan(Bytes.toBytes("testRowTwo-0"));
@@ -497,7 +504,7 @@ public class TestScannersWithFilters {
     Scan s = new Scan();
     s.setFilter(f);
     verifyScanNoEarlyOut(s, expectedRows, expectedKeys);
-    
+
     // Match keys less than same qualifier
     // Expect only two keys (one from each family) in half the rows
     expectedRows = numRows / 2;
@@ -507,7 +514,7 @@ public class TestScannersWithFilters {
     s = new Scan();
     s.setFilter(f);
     verifyScanNoEarlyOut(s, expectedRows, expectedKeys);
-    
+
     // Match keys less than or equal
     // Expect four keys (two from each family) in half the rows
     expectedRows = numRows / 2;
@@ -517,7 +524,7 @@ public class TestScannersWithFilters {
     s = new Scan();
     s.setFilter(f);
     verifyScanNoEarlyOut(s, expectedRows, expectedKeys);
-    
+
     // Match keys not equal
     // Expect four keys (two from each family)
     // Only look in first group of rows
@@ -528,7 +535,7 @@ public class TestScannersWithFilters {
     s = new Scan(HConstants.EMPTY_START_ROW, Bytes.toBytes("testRowTwo"));
     s.setFilter(f);
     verifyScanNoEarlyOut(s, expectedRows, expectedKeys);
-    
+
     // Match keys greater or equal
     // Expect four keys (two from each family)
     // Only look in first group of rows
@@ -539,7 +546,7 @@ public class TestScannersWithFilters {
     s = new Scan(HConstants.EMPTY_START_ROW, Bytes.toBytes("testRowTwo"));
     s.setFilter(f);
     verifyScanNoEarlyOut(s, expectedRows, expectedKeys);
-    
+
     // Match keys greater
     // Expect two keys (one from each family)
     // Only look in first group of rows
@@ -550,7 +557,7 @@ public class TestScannersWithFilters {
     s = new Scan(HConstants.EMPTY_START_ROW, Bytes.toBytes("testRowTwo"));
     s.setFilter(f);
     verifyScanNoEarlyOut(s, expectedRows, expectedKeys);
-    
+
     // Match keys not equal to
     // Look across rows and fully validate the keys and ordering
     // Expect varied numbers of keys, 4 per row in group one, 6 per row in
@@ -559,7 +566,7 @@ public class TestScannersWithFilters {
         new BinaryComparator(QUALIFIERS_ONE[2]));
     s = new Scan();
     s.setFilter(f);
-    
+
     KeyValue [] kvs = {
         // testRowOne-0
         new KeyValue(ROWS_ONE[0], FAMILIES[0], QUALIFIERS_ONE[0], VALUES[0]),
@@ -599,7 +606,7 @@ public class TestScannersWithFilters {
         new KeyValue(ROWS_TWO[3], FAMILIES[1], QUALIFIERS_TWO[3], VALUES[1]),
     };
     verifyScanFull(s, kvs);
-     
+
     // Test across rows and groups with a regex
     // Filter out "test*-2"
     // Expect 4 keys per row across both groups
@@ -607,7 +614,7 @@ public class TestScannersWithFilters {
         new RegexStringComparator("test.+-2"));
     s = new Scan();
     s.setFilter(f);
-    
+
     kvs = new KeyValue [] {
         // testRowOne-0
         new KeyValue(ROWS_ONE[0], FAMILIES[0], QUALIFIERS_ONE[0], VALUES[0]),
@@ -653,7 +660,7 @@ public class TestScannersWithFilters {
     Scan s = new Scan();
     s.setFilter(f);
     verifyScanNoEarlyOut(s, expectedRows, expectedKeys);
-    
+
     // Match a two rows, one from each group, using regex
     expectedRows = 2;
     expectedKeys = colsPerRow;
@@ -662,7 +669,7 @@ public class TestScannersWithFilters {
     s = new Scan();
     s.setFilter(f);
     verifyScanNoEarlyOut(s, expectedRows, expectedKeys);
-    
+
     // Match rows less than
     // Expect all keys in one row
     expectedRows = 1;
@@ -672,7 +679,7 @@ public class TestScannersWithFilters {
     s = new Scan();
     s.setFilter(f);
     verifyScanNoEarlyOut(s, expectedRows, expectedKeys);
-    
+
     // Match rows less than or equal
     // Expect all keys in two rows
     expectedRows = 2;
@@ -682,7 +689,7 @@ public class TestScannersWithFilters {
     s = new Scan();
     s.setFilter(f);
     verifyScanNoEarlyOut(s, expectedRows, expectedKeys);
-    
+
     // Match rows not equal
     // Expect all keys in all but one row
     expectedRows = numRows - 1;
@@ -692,7 +699,7 @@ public class TestScannersWithFilters {
     s = new Scan();
     s.setFilter(f);
     verifyScanNoEarlyOut(s, expectedRows, expectedKeys);
-    
+
     // Match keys greater or equal
     // Expect all keys in all but one row
     expectedRows = numRows - 1;
@@ -702,7 +709,7 @@ public class TestScannersWithFilters {
     s = new Scan();
     s.setFilter(f);
     verifyScanNoEarlyOut(s, expectedRows, expectedKeys);
-    
+
     // Match keys greater
     // Expect all keys in all but two rows
     expectedRows = numRows - 2;
@@ -712,7 +719,7 @@ public class TestScannersWithFilters {
     s = new Scan();
     s.setFilter(f);
     verifyScanNoEarlyOut(s, expectedRows, expectedKeys);
-    
+
     // Match rows not equal to testRowTwo-2
     // Look across rows and fully validate the keys and ordering
     // Should see all keys in all rows but testRowTwo-2
@@ -720,7 +727,7 @@ public class TestScannersWithFilters {
         new BinaryComparator(Bytes.toBytes("testRowOne-2")));
     s = new Scan();
     s.setFilter(f);
-    
+
     KeyValue [] kvs = {
         // testRowOne-0
         new KeyValue(ROWS_ONE[0], FAMILIES[0], QUALIFIERS_ONE[0], VALUES[0]),
@@ -759,7 +766,7 @@ public class TestScannersWithFilters {
         new KeyValue(ROWS_TWO[3], FAMILIES[1], QUALIFIERS_TWO[3], VALUES[1]),
     };
     verifyScanFull(s, kvs);
-    
+
     // Test across rows and groups with a regex
     // Filter out everything that doesn't match "*-2"
     // Expect all keys in two rows
@@ -767,7 +774,7 @@ public class TestScannersWithFilters {
         new RegexStringComparator(".+-2"));
     s = new Scan();
     s.setFilter(f);
-    
+
     kvs = new KeyValue [] {
         // testRowOne-2
         new KeyValue(ROWS_ONE[2], FAMILIES[0], QUALIFIERS_ONE[0], VALUES[0]),
@@ -825,7 +832,7 @@ public class TestScannersWithFilters {
     s = new Scan();
     s.setFilter(f);
     verifyScanNoEarlyOut(s, expectedRows, expectedKeys);
-    
+
     // Match values less than or equal
     // Expect all rows
     expectedRows = numRows;
@@ -845,7 +852,7 @@ public class TestScannersWithFilters {
     s = new Scan();
     s.setFilter(f);
     verifyScanNoEarlyOut(s, expectedRows, expectedKeys);
-    
+
     // Match values not equal
     // Expect half the rows
     expectedRows = numRows / 2;
@@ -855,7 +862,7 @@ public class TestScannersWithFilters {
     s = new Scan();
     s.setFilter(f);
     verifyScanNoEarlyOut(s, expectedRows, expectedKeys);
-    
+
     // Match values greater or equal
     // Expect all rows
     expectedRows = numRows;
@@ -865,7 +872,7 @@ public class TestScannersWithFilters {
     s = new Scan();
     s.setFilter(f);
     verifyScanNoEarlyOut(s, expectedRows, expectedKeys);
-    
+
     // Match values greater
     // Expect half rows
     expectedRows = numRows / 2;
@@ -875,7 +882,7 @@ public class TestScannersWithFilters {
     s = new Scan();
     s.setFilter(f);
     verifyScanNoEarlyOut(s, expectedRows, expectedKeys);
-    
+
     // Match values not equal to testValueOne
     // Look across rows and fully validate the keys and ordering
     // Should see all keys in all group two rows
@@ -883,7 +890,7 @@ public class TestScannersWithFilters {
         new BinaryComparator(Bytes.toBytes("testValueOne")));
     s = new Scan();
     s.setFilter(f);
-    
+
     KeyValue [] kvs = {
         // testRowTwo-0
         new KeyValue(ROWS_TWO[0], FAMILIES[0], QUALIFIERS_TWO[0], VALUES[1]),
@@ -918,7 +925,7 @@ public class TestScannersWithFilters {
         new BinaryComparator(Bytes.toBytes("testQualifierOne-2"))));
     Scan s = new Scan();
     s.setFilter(f);
-    
+
     KeyValue [] kvs = {
         // testRowTwo-0
         new KeyValue(ROWS_TWO[0], FAMILIES[0], QUALIFIERS_TWO[0], VALUES[1]),
@@ -947,7 +954,7 @@ public class TestScannersWithFilters {
 
   @Test
   public void testFilterList() throws Exception {
-    // Test getting a single row, single key using Row, Qualifier, and Value 
+    // Test getting a single row, single key using Row, Qualifier, and Value
     // regular expression and substring filters
     // Use must pass all
     List<Filter> filters = new ArrayList<Filter>();

http://git-wip-us.apache.org/repos/asf/hbase/blob/a3d30892/hbase-server/src/main/java/org/apache/hadoop/hbase/TagRewriteCell.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/TagRewriteCell.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/TagRewriteCell.java
index eb6d3be..3ada51a 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/TagRewriteCell.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/TagRewriteCell.java
@@ -107,12 +107,6 @@ public class TagRewriteCell implements Cell, SettableSequenceId, SettableTimesta
   }
 
   @Override
-  @Deprecated
-  public long getMvccVersion() {
-    return getSequenceId();
-  }
-
-  @Override
   public long getSequenceId() {
     return cell.getSequenceId();
   }
@@ -152,30 +146,6 @@ public class TagRewriteCell implements Cell, SettableSequenceId, SettableTimesta
   }
 
   @Override
-  @Deprecated
-  public byte[] getValue() {
-    return cell.getValue();
-  }
-
-  @Override
-  @Deprecated
-  public byte[] getFamily() {
-    return cell.getFamily();
-  }
-
-  @Override
-  @Deprecated
-  public byte[] getQualifier() {
-    return cell.getQualifier();
-  }
-
-  @Override
-  @Deprecated
-  public byte[] getRow() {
-    return cell.getRow();
-  }
-
-  @Override
   public long heapSize() {
     long sum = CellUtil.estimatedHeapSizeOf(cell) - cell.getTagsLength();
     sum += ClassSize.OBJECT;// this object itself

http://git-wip-us.apache.org/repos/asf/hbase/blob/a3d30892/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/WALPlayer.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/WALPlayer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/WALPlayer.java
index c067fc3..9d9cee0 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/WALPlayer.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/WALPlayer.java
@@ -17,6 +17,12 @@
  */
 package org.apache.hadoop.hbase.mapreduce;
 
+import java.io.IOException;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Map;
+import java.util.TreeMap;
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
@@ -48,12 +54,6 @@ import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
 import org.apache.hadoop.util.Tool;
 import org.apache.hadoop.util.ToolRunner;
 
-import java.io.IOException;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Map;
-import java.util.TreeMap;
-
 /**
  * A tool to replay WAL files as a M/R job.
  * The WAL can be replayed for a set of tables or all tables,
@@ -106,8 +106,8 @@ public class WALPlayer extends Configured implements Tool {
         if (Bytes.equals(table, key.getTablename().getName())) {
           for (Cell cell : value.getCells()) {
             KeyValue kv = KeyValueUtil.ensureKeyValue(cell);
-            if (WALEdit.isMetaEditFamily(kv.getFamily())) continue;
-            context.write(new ImmutableBytesWritable(kv.getRow()), kv);
+            if (WALEdit.isMetaEditFamily(kv)) continue;
+            context.write(new ImmutableBytesWritable(CellUtil.cloneRow(kv)), kv);
           }
         }
       } catch (InterruptedException e) {
@@ -149,7 +149,7 @@ public class WALPlayer extends Configured implements Tool {
           Cell lastCell = null;
           for (Cell cell : value.getCells()) {
             // filtering WAL meta entries
-            if (WALEdit.isMetaEditFamily(cell.getFamily())) continue;
+            if (WALEdit.isMetaEditFamily(cell)) continue;
 
             // Allow a subclass filter out this cell.
             if (filter(context, cell)) {
@@ -163,9 +163,9 @@ public class WALPlayer extends Configured implements Tool {
                 if (put != null) context.write(tableOut, put);
                 if (del != null) context.write(tableOut, del);
                 if (CellUtil.isDelete(cell)) {
-                  del = new Delete(cell.getRow());
+                  del = new Delete(CellUtil.cloneRow(cell));
                 } else {
-                  put = new Put(cell.getRow());
+                  put = new Put(CellUtil.cloneRow(cell));
                 }
               }
               if (CellUtil.isDelete(cell)) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/a3d30892/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ScanQueryMatcher.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ScanQueryMatcher.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ScanQueryMatcher.java
index d6dfb76..02a73f8 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ScanQueryMatcher.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ScanQueryMatcher.java
@@ -329,7 +329,7 @@ public class ScanQueryMatcher {
      *    they affect
      */
     byte typeByte = cell.getTypeByte();
-    long mvccVersion = cell.getMvccVersion();
+    long mvccVersion = cell.getSequenceId();
     if (CellUtil.isDelete(cell)) {
       if (keepDeletedCells == KeepDeletedCells.FALSE
           || (keepDeletedCells == KeepDeletedCells.TTL && timestamp < ttl)) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/a3d30892/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StripeStoreFileManager.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StripeStoreFileManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StripeStoreFileManager.java
index 45610fa..bb49aba 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StripeStoreFileManager.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StripeStoreFileManager.java
@@ -34,6 +34,7 @@ import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.CellComparator;
+import org.apache.hadoop.hbase.CellUtil;
 import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.KeyValue;
 import org.apache.hadoop.hbase.KeyValue.KeyOnlyKeyValue;
@@ -168,7 +169,7 @@ public class StripeStoreFileManager
     // Order matters for this call.
     result.addSublist(state.level0Files);
     if (!state.stripeFiles.isEmpty()) {
-      int lastStripeIndex = findStripeForRow(targetKey.getRow(), false);
+      int lastStripeIndex = findStripeForRow(CellUtil.cloneRow(targetKey), false);
       for (int stripeIndex = lastStripeIndex; stripeIndex >= 0; --stripeIndex) {
         result.addSublist(state.stripeFiles.get(stripeIndex));
       }

http://git-wip-us.apache.org/repos/asf/hbase/blob/a3d30892/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/WALEdit.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/WALEdit.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/WALEdit.java
index f6619e8..a752ff1 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/WALEdit.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/WALEdit.java
@@ -288,7 +288,7 @@ public class WALEdit implements Writable, HeapSize {
 
   public static FlushDescriptor getFlushDescriptor(Cell cell) throws IOException {
     if (CellUtil.matchingColumn(cell, METAFAMILY, FLUSH)) {
-      return FlushDescriptor.parseFrom(cell.getValue());
+      return FlushDescriptor.parseFrom(CellUtil.cloneValue(cell));
     }
     return null;
   }
@@ -302,7 +302,7 @@ public class WALEdit implements Writable, HeapSize {
 
   public static RegionEventDescriptor getRegionEventDescriptor(Cell cell) throws IOException {
     if (CellUtil.matchingColumn(cell, METAFAMILY, REGION_EVENT)) {
-      return RegionEventDescriptor.parseFrom(cell.getValue());
+      return RegionEventDescriptor.parseFrom(CellUtil.cloneValue(cell));
     }
     return null;
   }
@@ -336,7 +336,7 @@ public class WALEdit implements Writable, HeapSize {
    */
   public static CompactionDescriptor getCompaction(Cell kv) throws IOException {
     if (CellUtil.matchingColumn(kv, METAFAMILY, COMPACTION)) {
-      return CompactionDescriptor.parseFrom(kv.getValue());
+      return CompactionDescriptor.parseFrom(CellUtil.cloneValue(kv));
     }
     return null;
   }
@@ -365,7 +365,7 @@ public class WALEdit implements Writable, HeapSize {
    */
   public static WALProtos.BulkLoadDescriptor getBulkLoadDescriptor(Cell cell) throws IOException {
     if (CellUtil.matchingColumn(cell, METAFAMILY, BULK_LOAD)) {
-      return WALProtos.BulkLoadDescriptor.parseFrom(cell.getValue());
+      return WALProtos.BulkLoadDescriptor.parseFrom(CellUtil.cloneValue(cell));
     }
     return null;
   }

http://git-wip-us.apache.org/repos/asf/hbase/blob/a3d30892/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/ScopeWALEntryFilter.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/ScopeWALEntryFilter.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/ScopeWALEntryFilter.java
index 166dc37..3501f3e 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/ScopeWALEntryFilter.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/ScopeWALEntryFilter.java
@@ -23,6 +23,7 @@ import java.util.NavigableMap;
 
 import org.apache.hadoop.hbase.classification.InterfaceAudience;
 import org.apache.hadoop.hbase.Cell;
+import org.apache.hadoop.hbase.CellUtil;
 import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.wal.WAL.Entry;
 
@@ -44,8 +45,8 @@ public class ScopeWALEntryFilter implements WALEntryFilter {
       Cell cell = cells.get(i);
       // The scope will be null or empty if
       // there's nothing to replicate in that WALEdit
-      if (!scopes.containsKey(cell.getFamily())
-          || scopes.get(cell.getFamily()) == HConstants.REPLICATION_SCOPE_LOCAL) {
+      byte[] fam = CellUtil.cloneFamily(cell);
+      if (!scopes.containsKey(fam) || scopes.get(fam) == HConstants.REPLICATION_SCOPE_LOCAL) {
         cells.remove(i);
       }
     }


Mime
View raw message