hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chia7...@apache.org
Subject hbase git commit: HBASE-19430 Remove the SettableTimestamp and SettableSequenceId
Date Thu, 07 Dec 2017 05:39:57 GMT
Repository: hbase
Updated Branches:
  refs/heads/master 97d17ae19 -> d2b1578b7


HBASE-19430 Remove the SettableTimestamp and SettableSequenceId


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

Branch: refs/heads/master
Commit: d2b1578b735c1d3c42a9cfe9b9be36d9d6fbd7a5
Parents: 97d17ae
Author: Chia-Ping Tsai <chia7712@gmail.com>
Authored: Thu Dec 7 09:29:09 2017 +0800
Committer: Chia-Ping Tsai <chia7712@gmail.com>
Committed: Thu Dec 7 13:28:02 2017 +0800

----------------------------------------------------------------------
 .../apache/hadoop/hbase/ByteBufferKeyValue.java |   4 +-
 .../java/org/apache/hadoop/hbase/CellUtil.java  |  28 +--
 .../org/apache/hadoop/hbase/ExtendedCell.java   |  65 +++++-
 .../hadoop/hbase/IndividualBytesFieldCell.java  |  60 +----
 .../java/org/apache/hadoop/hbase/KeyValue.java  |   4 +-
 .../apache/hadoop/hbase/PrivateCellUtil.java    | 223 ++++++++++++++++---
 .../apache/hadoop/hbase/SettableSequenceId.java |  38 ----
 .../apache/hadoop/hbase/SettableTimestamp.java  |  45 ----
 .../io/encoding/BufferedDataBlockEncoder.java   |  11 +-
 .../hbase/TestIndividualBytesFieldCell.java     |  21 +-
 .../hbase/mapreduce/HFileOutputFormat2.java     |   1 -
 .../apache/hadoop/hbase/util/MapReduceCell.java |   4 +-
 .../hadoop/hbase/io/hfile/BlockCache.java       |   2 +-
 .../hadoop/hbase/regionserver/HRegion.java      |   6 +-
 .../visibility/VisibilityController.java        |   2 +-
 15 files changed, 284 insertions(+), 230 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/d2b1578b/hbase-common/src/main/java/org/apache/hadoop/hbase/ByteBufferKeyValue.java
----------------------------------------------------------------------
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/ByteBufferKeyValue.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/ByteBufferKeyValue.java
index c59b947..cd66312 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/ByteBufferKeyValue.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/ByteBufferKeyValue.java
@@ -296,8 +296,8 @@ public class ByteBufferKeyValue extends ByteBufferCell implements ExtendedCell {
   }
 
   @Override
-  public void setTimestamp(byte[] ts, int tsOffset) throws IOException {
-    ByteBufferUtils.copyFromArrayToBuffer(this.buf, this.getTimestampOffset(), ts, tsOffset,
+  public void setTimestamp(byte[] ts) throws IOException {
+    ByteBufferUtils.copyFromArrayToBuffer(this.buf, this.getTimestampOffset(), ts, 0,
         Bytes.SIZEOF_LONG);
   }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/d2b1578b/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 9fabfdd..0940e63 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
@@ -34,16 +34,16 @@ import java.util.List;
 import java.util.Map.Entry;
 import java.util.NavigableMap;
 import java.util.Optional;
-
 import org.apache.hadoop.hbase.KeyValue.Type;
 import org.apache.hadoop.hbase.io.HeapSize;
-import org.apache.hadoop.hbase.shaded.com.google.common.annotations.VisibleForTesting;
 import org.apache.hadoop.hbase.util.ByteBufferUtils;
 import org.apache.hadoop.hbase.util.ByteRange;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.yetus.audience.InterfaceAudience;
 import org.apache.yetus.audience.InterfaceAudience.Private;
 
+import org.apache.hadoop.hbase.shaded.com.google.common.annotations.VisibleForTesting;
+
 /**
  * Utility methods helpful for slinging {@link Cell} instances. Some methods below are for internal
  * use only and are marked InterfaceAudience.Private at the method level. Note that all such methods
@@ -564,7 +564,7 @@ public final class CellUtil {
    * @return A new cell which is having the extra tags also added to it.
    * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0.
    *             Use CP environment to build Cell using {@link ExtendedCellBuilder}
-   *        
+   *
    */
   @Deprecated
   public static Cell createCell(Cell cell, List<Tag> tags) {
@@ -935,7 +935,7 @@ public final class CellUtil {
   }
 
   /**
-   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0. 
+   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0.
    */
   @Deprecated
   public static boolean isDeleteFamily(final Cell cell) {
@@ -943,7 +943,7 @@ public final class CellUtil {
   }
 
   /**
-   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0. 
+   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0.
    */
   @Deprecated
   public static boolean isDeleteFamilyVersion(final Cell cell) {
@@ -951,7 +951,7 @@ public final class CellUtil {
   }
 
   /**
-   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0. 
+   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0.
    */
   @Deprecated
   public static boolean isDeleteColumns(final Cell cell) {
@@ -959,7 +959,7 @@ public final class CellUtil {
   }
 
   /**
-   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0. 
+   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0.
    */
   @Deprecated
   public static boolean isDeleteColumnVersion(final Cell cell) {
@@ -1112,7 +1112,7 @@ public final class CellUtil {
    * Setting a Cell sequenceid is an internal implementation detail not for general public use.
    * @param cell
    * @param seqId
-   * @throws IOException when the passed cell is not of type {@link SettableSequenceId}
+   * @throws IOException when the passed cell is not of type {@link ExtendedCell}
    * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0.
    */
   @Deprecated
@@ -1124,7 +1124,7 @@ public final class CellUtil {
    * Sets the given timestamp to the cell.
    * @param cell
    * @param ts
-   * @throws IOException when the passed cell is not of type {@link SettableTimestamp}
+   * @throws IOException when the passed cell is not of type {@link ExtendedCell}
    * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0.
    */
   @Deprecated
@@ -1137,12 +1137,12 @@ public final class CellUtil {
    * @param cell
    * @param ts buffer containing the timestamp value
    * @param tsOffset offset to the new timestamp
-   * @throws IOException when the passed cell is not of type {@link SettableTimestamp}
+   * @throws IOException when the passed cell is not of type {@link ExtendedCell}
    * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0.
    */
   @Deprecated
   public static void setTimestamp(Cell cell, byte[] ts, int tsOffset) throws IOException {
-    PrivateCellUtil.setTimestamp(cell, ts, tsOffset);
+    PrivateCellUtil.setTimestamp(cell, Bytes.toLong(ts, tsOffset));
   }
 
   /**
@@ -1151,7 +1151,7 @@ public final class CellUtil {
    * @param cell
    * @param ts
    * @return True if cell timestamp is modified.
-   * @throws IOException when the passed cell is not of type {@link SettableTimestamp}
+   * @throws IOException when the passed cell is not of type {@link ExtendedCell}
    * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0.
    */
   @Deprecated
@@ -1166,12 +1166,12 @@ public final class CellUtil {
    * @param ts buffer containing the timestamp value
    * @param tsOffset offset to the new timestamp
    * @return True if cell timestamp is modified.
-   * @throws IOException when the passed cell is not of type {@link SettableTimestamp}
+   * @throws IOException when the passed cell is not of type {@link ExtendedCell}
    * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0.
    */
   @Deprecated
   public static boolean updateLatestStamp(Cell cell, byte[] ts, int tsOffset) throws IOException {
-    return PrivateCellUtil.updateLatestStamp(cell, ts, tsOffset);
+    return PrivateCellUtil.updateLatestStamp(cell, Bytes.toLong(ts, tsOffset));
   }
 
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/d2b1578b/hbase-common/src/main/java/org/apache/hadoop/hbase/ExtendedCell.java
----------------------------------------------------------------------
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/ExtendedCell.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/ExtendedCell.java
index b5ce095..73fbf67 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/ExtendedCell.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/ExtendedCell.java
@@ -20,21 +20,18 @@ package org.apache.hadoop.hbase;
 import java.io.IOException;
 import java.io.OutputStream;
 import java.nio.ByteBuffer;
-
 import org.apache.hadoop.hbase.io.HeapSize;
+import org.apache.hadoop.hbase.util.ByteBufferUtils;
 import org.apache.yetus.audience.InterfaceAudience;
 
 /**
  * Extension to {@link Cell} with server side required functions. Server side Cell implementations
  * must implement this.
- * @see SettableSequenceId
- * @see SettableTimestamp
  */
 @InterfaceAudience.Private
-public interface ExtendedCell extends RawCell, SettableSequenceId, SettableTimestamp, HeapSize,
-    Cloneable {
+public interface ExtendedCell extends RawCell, HeapSize, Cloneable {
 
-  public static int CELL_NOT_BASED_ON_CHUNK = -1;
+  int CELL_NOT_BASED_ON_CHUNK = -1;
   /**
    * Write this cell to an OutputStream in a {@link KeyValue} format.
    * <br> KeyValue format <br>
@@ -48,7 +45,29 @@ public interface ExtendedCell extends RawCell, SettableSequenceId, SettableTimes
    * @throws IOException
    */
   // TODO remove the boolean param once HBASE-16706 is done.
-  int write(OutputStream out, boolean withTags) throws IOException;
+  default int write(OutputStream out, boolean withTags) throws IOException {
+    // Key length and then value length
+    ByteBufferUtils.putInt(out, KeyValueUtil.keyLength(this));
+    ByteBufferUtils.putInt(out, getValueLength());
+
+    // Key
+    PrivateCellUtil.writeFlatKey(this, out);
+
+    // Value
+    out.write(getValueArray());
+
+    // Tags length and tags byte array
+    if (withTags && getTagsLength() > 0) {
+      // Tags length
+      out.write((byte)(0xff & (getTagsLength() >> 8)));
+      out.write((byte)(0xff & getTagsLength()));
+
+      // Tags byte array
+      out.write(getTagsArray(), getTagsOffset(), getTagsLength());
+    }
+
+    return getSerializedSize(withTags);
+  }
 
   /**
    * @param withTags Whether to write tags.
@@ -60,20 +79,28 @@ public interface ExtendedCell extends RawCell, SettableSequenceId, SettableTimes
    * &lt;tags&gt;</code>
    */
   // TODO remove the boolean param once HBASE-16706 is done.
-  int getSerializedSize(boolean withTags);
+  default int getSerializedSize(boolean withTags) {
+    return KeyValueUtil.length(getRowLength(), getFamilyLength(), getQualifierLength(),
+        getValueLength(), getTagsLength(), withTags);
+  }
 
   /**
    * Write this Cell into the given buf's offset in a {@link KeyValue} format.
    * @param buf The buffer where to write the Cell.
    * @param offset The offset within buffer, to write the Cell.
    */
-  void write(ByteBuffer buf, int offset);
+  default void write(ByteBuffer buf, int offset) {
+    KeyValueUtil.appendTo(this, buf, offset, true);
+  }
 
   /**
    * Does a deep copy of the contents to a new memory area and returns it as a new cell.
    * @return The deep cloned cell
    */
-  ExtendedCell deepClone();
+  default ExtendedCell deepClone() {
+    // When being added to the memstore, deepClone() is called and KeyValue has less heap overhead.
+    return new KeyValue(this);
+  }
 
   /**
    * Extracts the id of the backing bytebuffer of this cell if it was obtained from fixed sized
@@ -83,4 +110,22 @@ public interface ExtendedCell extends RawCell, SettableSequenceId, SettableTimes
   default int getChunkId() {
     return CELL_NOT_BASED_ON_CHUNK;
   }
+
+  /**
+   * Sets with the given seqId.
+   * @param seqId sequence ID
+   */
+  void setSequenceId(long seqId) throws IOException;
+
+  /**
+   * Sets with the given timestamp.
+   * @param ts timestamp
+   */
+  void setTimestamp(long ts) throws IOException;
+
+  /**
+   * Sets with the given timestamp.
+   * @param ts buffer containing the timestamp value
+   */
+  void setTimestamp(byte[] ts) throws IOException;
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/d2b1578b/hbase-common/src/main/java/org/apache/hadoop/hbase/IndividualBytesFieldCell.java
----------------------------------------------------------------------
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/IndividualBytesFieldCell.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/IndividualBytesFieldCell.java
index 78ad578..4049e3d 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/IndividualBytesFieldCell.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/IndividualBytesFieldCell.java
@@ -18,16 +18,10 @@
 
 package org.apache.hadoop.hbase;
 
-import org.apache.yetus.audience.InterfaceAudience;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.nio.ByteBuffer;
-
 import org.apache.hadoop.hbase.util.ArrayUtils;
-import org.apache.hadoop.hbase.util.ByteBufferUtils;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.util.ClassSize;
+import org.apache.yetus.audience.InterfaceAudience;
 
 @InterfaceAudience.Private
 public class IndividualBytesFieldCell implements ExtendedCell {
@@ -136,42 +130,6 @@ public class IndividualBytesFieldCell implements ExtendedCell {
     }
   }
 
-  @Override
-  public int write(OutputStream out, boolean withTags) throws IOException {
-    // Key length and then value length
-    ByteBufferUtils.putInt(out, KeyValueUtil.keyLength(this));
-    ByteBufferUtils.putInt(out, getValueLength());
-
-    // Key
-    PrivateCellUtil.writeFlatKey(this, out);
-
-    // Value
-    out.write(getValueArray());
-
-    // Tags length and tags byte array
-    if (withTags && getTagsLength() > 0) {
-      // Tags length
-      out.write((byte)(0xff & (getTagsLength() >> 8)));
-      out.write((byte)(0xff & getTagsLength()));
-
-      // Tags byte array
-      out.write(tags, tagsOffset, tagsLength);
-    }
-
-    return getSerializedSize(withTags);
-  }
-
-  @Override
-  public void write(ByteBuffer buf, int offset) {
-    KeyValueUtil.appendTo(this, buf, offset, true);
-  }
-
-  @Override
-  public int getSerializedSize(boolean withTags) {
-    return KeyValueUtil.length(getRowLength(), getFamilyLength(), getQualifierLength(),
-                               getValueLength(), getTagsLength(), withTags);
-  }
-
   private long heapOverhead() {
     return   FIXED_OVERHEAD
            + ClassSize.ARRAY                               // row      , can not be null
@@ -181,12 +139,6 @@ public class IndividualBytesFieldCell implements ExtendedCell {
            + ((tags      == null) ? 0 : ClassSize.ARRAY);  // tags     , can be null
   }
 
-  @Override
-  public ExtendedCell deepClone() {
-    // When being added to the memstore, deepClone() is called and KeyValue has less heap overhead.
-    return new KeyValue(this);
-  }
-
   /**
    * Implement Cell interface
    */
@@ -320,9 +272,6 @@ public class IndividualBytesFieldCell implements ExtendedCell {
     return super.clone();  // only a shadow copy
   }
 
-  /**
-   * Implement SettableSequenceId interface
-   */
   @Override
   public void setSequenceId(long seqId) {
     if (seqId < 0) {
@@ -331,9 +280,6 @@ public class IndividualBytesFieldCell implements ExtendedCell {
     this.seqId = seqId;
   }
 
-  /**
-   * Implement SettableTimestamp interface
-   */
   @Override
   public void setTimestamp(long ts) {
     if (ts < 0) {
@@ -343,8 +289,8 @@ public class IndividualBytesFieldCell implements ExtendedCell {
   }
 
   @Override
-  public void setTimestamp(byte[] ts, int tsOffset) {
-    setTimestamp(Bytes.toLong(ts, tsOffset));
+  public void setTimestamp(byte[] ts) {
+    setTimestamp(Bytes.toLong(ts, 0));
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/hbase/blob/d2b1578b/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 fa027b4..727eede 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
@@ -1445,8 +1445,8 @@ public class KeyValue implements ExtendedCell {
   }
 
   @Override
-  public void setTimestamp(byte[] ts, int tsOffset) {
-    Bytes.putBytes(this.bytes, this.getTimestampOffset(), ts, tsOffset, Bytes.SIZEOF_LONG);
+  public void setTimestamp(byte[] ts) {
+    Bytes.putBytes(this.bytes, this.getTimestampOffset(), ts, 0, Bytes.SIZEOF_LONG);
   }
 
   //---------------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hbase/blob/d2b1578b/hbase-common/src/main/java/org/apache/hadoop/hbase/PrivateCellUtil.java
----------------------------------------------------------------------
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/PrivateCellUtil.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/PrivateCellUtil.java
index 1acb490..79b8b31 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/PrivateCellUtil.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/PrivateCellUtil.java
@@ -20,6 +20,7 @@ package org.apache.hadoop.hbase;
 import static org.apache.hadoop.hbase.HConstants.EMPTY_BYTE_ARRAY;
 import static org.apache.hadoop.hbase.Tag.TAG_LENGTH_SIZE;
 
+import com.google.common.annotations.VisibleForTesting;
 import java.io.DataOutput;
 import java.io.DataOutputStream;
 import java.io.IOException;
@@ -30,7 +31,6 @@ import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Optional;
-
 import org.apache.hadoop.hbase.KeyValue.Type;
 import org.apache.hadoop.hbase.filter.ByteArrayComparable;
 import org.apache.hadoop.hbase.io.HeapSize;
@@ -43,8 +43,6 @@ import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.util.ClassSize;
 import org.apache.yetus.audience.InterfaceAudience;
 
-import com.google.common.annotations.VisibleForTesting;
-
 /**
  * Utility methods helpful slinging {@link Cell} instances. It has more powerful and
  * rich set of APIs than those in {@link CellUtil} for internal usage.
@@ -260,19 +258,19 @@ public final class PrivateCellUtil {
 
     @Override
     public void setTimestamp(long ts) throws IOException {
-      // The incoming cell is supposed to be SettableTimestamp type.
+      // The incoming cell is supposed to be ExtendedCell type.
       PrivateCellUtil.setTimestamp(cell, ts);
     }
 
     @Override
-    public void setTimestamp(byte[] ts, int tsOffset) throws IOException {
-      // The incoming cell is supposed to be SettableTimestamp type.
-      PrivateCellUtil.setTimestamp(cell, ts, tsOffset);
+    public void setTimestamp(byte[] ts) throws IOException {
+      // The incoming cell is supposed to be ExtendedCell type.
+      PrivateCellUtil.setTimestamp(cell, ts);
     }
 
     @Override
     public void setSequenceId(long seqId) throws IOException {
-      // The incoming cell is supposed to be SettableSequenceId type.
+      // The incoming cell is supposed to be ExtendedCell type.
       PrivateCellUtil.setSequenceId(cell, seqId);
     }
 
@@ -442,8 +440,8 @@ public final class PrivateCellUtil {
     }
 
     @Override
-    public void setTimestamp(byte[] ts, int tsOffset) throws IOException {
-      PrivateCellUtil.setTimestamp(this.cell, ts, tsOffset);
+    public void setTimestamp(byte[] ts) throws IOException {
+      PrivateCellUtil.setTimestamp(this.cell, ts);
     }
 
     @Override
@@ -1251,7 +1249,7 @@ public final class PrivateCellUtil {
    * These cells are used in reseeks/seeks to improve the read performance. They are not real cells
    * that are returned back to the clients
    */
-  private static abstract class EmptyCell implements Cell, SettableSequenceId {
+  private static abstract class EmptyCell implements ExtendedCell {
 
     @Override
     public void setSequenceId(long seqId) {
@@ -1259,6 +1257,16 @@ public final class PrivateCellUtil {
     }
 
     @Override
+    public void setTimestamp(long ts) {
+      // Fake cells can't be changed timestamp, so leaving it as a noop.
+    }
+
+    @Override
+    public void setTimestamp(byte[] ts) {
+      // Fake cells can't be changed timestamp, so leaving it as a noop.
+    }
+
+    @Override
     public byte[] getRowArray() {
       return EMPTY_BYTE_ARRAY;
     }
@@ -1344,7 +1352,7 @@ public final class PrivateCellUtil {
    * that are returned back to the clients
    */
   private static abstract class EmptyByteBufferCell extends ByteBufferCell
-      implements SettableSequenceId {
+      implements ExtendedCell {
 
     @Override
     public void setSequenceId(long seqId) {
@@ -1352,6 +1360,16 @@ public final class PrivateCellUtil {
     }
 
     @Override
+    public void setTimestamp(long ts) {
+      // Fake cells can't be changed timestamp, so leaving it as a noop.
+    }
+
+    @Override
+    public void setTimestamp(byte[] ts) {
+      // Fake cells can't be changed timestamp, so leaving it as a noop.
+    }
+
+    @Override
     public byte[] getRowArray() {
       return CellUtil.cloneRow(this);
     }
@@ -1483,6 +1501,11 @@ public final class PrivateCellUtil {
   }
 
   private static class FirstOnRowCell extends EmptyCell {
+    private static final long FIXED_HEAPSIZE =
+        ClassSize.OBJECT // object
+      + ClassSize.REFERENCE // row array
+      + Bytes.SIZEOF_INT // row offset
+      + Bytes.SIZEOF_SHORT;  // row length
     private final byte[] rowArray;
     private final int roffset;
     private final short rlength;
@@ -1494,6 +1517,13 @@ public final class PrivateCellUtil {
     }
 
     @Override
+    public long heapSize() {
+      return ClassSize.align(FIXED_HEAPSIZE)
+          // array overhead
+          + (rlength == 0 ? ClassSize.sizeOfByteArray(rlength) : rlength);
+    }
+
+    @Override
     public byte[] getRowArray() {
       return this.rowArray;
     }
@@ -1520,6 +1550,11 @@ public final class PrivateCellUtil {
   }
 
   private static class FirstOnRowByteBufferCell extends EmptyByteBufferCell {
+    private static final int FIXED_OVERHEAD =
+        ClassSize.OBJECT // object
+        + ClassSize.REFERENCE // row buffer
+        + Bytes.SIZEOF_INT // row offset
+        + Bytes.SIZEOF_SHORT; // row length
     private final ByteBuffer rowBuff;
     private final int roffset;
     private final short rlength;
@@ -1531,6 +1566,14 @@ public final class PrivateCellUtil {
     }
 
     @Override
+    public long heapSize() {
+      if (this.rowBuff.hasArray()) {
+        return ClassSize.align(FIXED_OVERHEAD + rlength);
+      }
+      return ClassSize.align(FIXED_OVERHEAD);
+    }
+
+    @Override
     public ByteBuffer getRowByteBuffer() {
       return this.rowBuff;
     }
@@ -1557,6 +1600,11 @@ public final class PrivateCellUtil {
   }
 
   private static class LastOnRowByteBufferCell extends EmptyByteBufferCell {
+    private static final int FIXED_OVERHEAD =
+        ClassSize.OBJECT // object
+      + ClassSize.REFERENCE // rowBuff
+      + Bytes.SIZEOF_INT // roffset
+      + Bytes.SIZEOF_SHORT; // rlength
     private final ByteBuffer rowBuff;
     private final int roffset;
     private final short rlength;
@@ -1568,6 +1616,14 @@ public final class PrivateCellUtil {
     }
 
     @Override
+    public long heapSize() {
+      if (this.rowBuff.hasArray()) {
+        return ClassSize.align(FIXED_OVERHEAD + rlength);
+      }
+      return ClassSize.align(FIXED_OVERHEAD);
+    }
+
+    @Override
     public ByteBuffer getRowByteBuffer() {
       return this.rowBuff;
     }
@@ -1594,6 +1650,11 @@ public final class PrivateCellUtil {
   }
 
   private static class FirstOnRowColByteBufferCell extends FirstOnRowByteBufferCell {
+    private static final int FIXED_OVERHEAD =
+        FirstOnRowByteBufferCell.FIXED_OVERHEAD
+        + ClassSize.REFERENCE * 2 // family buffer and column buffer
+        + Bytes.SIZEOF_INT * 3 // famOffset, colOffset, colLength
+        + Bytes.SIZEOF_BYTE; // famLength
     private final ByteBuffer famBuff;
     private final int famOffset;
     private final byte famLength;
@@ -1614,6 +1675,19 @@ public final class PrivateCellUtil {
     }
 
     @Override
+    public long heapSize() {
+      if (famBuff.hasArray() && colBuff.hasArray()) {
+        return ClassSize.align(FIXED_OVERHEAD + famLength + colLength);
+      } else if (famBuff.hasArray()) {
+        return ClassSize.align(FIXED_OVERHEAD + famLength);
+      } else if (colBuff.hasArray()) {
+        return ClassSize.align(FIXED_OVERHEAD + colLength);
+      } else {
+        return ClassSize.align(FIXED_OVERHEAD);
+      }
+    }
+
+    @Override
     public ByteBuffer getFamilyByteBuffer() {
       return this.famBuff;
     }
@@ -1645,6 +1719,11 @@ public final class PrivateCellUtil {
   }
 
   private static class FirstOnRowColCell extends FirstOnRowCell {
+    private static final long FIXED_HEAPSIZE =
+        FirstOnRowCell.FIXED_HEAPSIZE
+      + Bytes.SIZEOF_BYTE // flength
+      + Bytes.SIZEOF_INT * 3 // foffset, qoffset, qlength
+      + ClassSize.REFERENCE * 2; // fArray, qArray
     private final byte[] fArray;
     private final int foffset;
     private final byte flength;
@@ -1664,6 +1743,14 @@ public final class PrivateCellUtil {
     }
 
     @Override
+    public long heapSize() {
+      return ClassSize.align(FIXED_HEAPSIZE)
+          // array overhead
+          + (flength == 0 ? ClassSize.sizeOfByteArray(flength) : flength)
+          + (qlength == 0 ? ClassSize.sizeOfByteArray(qlength) : qlength);
+    }
+
+    @Override
     public byte[] getFamilyArray() {
       return this.fArray;
     }
@@ -1695,7 +1782,9 @@ public final class PrivateCellUtil {
   }
 
   private static class FirstOnRowColTSCell extends FirstOnRowColCell {
-
+    private static final long FIXED_HEAPSIZE =
+        FirstOnRowColCell.FIXED_HEAPSIZE
+            + Bytes.SIZEOF_LONG; // ts
     private long ts;
 
     public FirstOnRowColTSCell(byte[] rArray, int roffset, short rlength, byte[] fArray,
@@ -1708,10 +1797,17 @@ public final class PrivateCellUtil {
     public long getTimestamp() {
       return this.ts;
     }
+
+    @Override
+    public long heapSize() {
+      return ClassSize.align(FIXED_HEAPSIZE);
+    }
   }
 
   private static class FirstOnRowColTSByteBufferCell extends FirstOnRowColByteBufferCell {
-
+    private static final int FIXED_OVERHEAD =
+        FirstOnRowColByteBufferCell.FIXED_OVERHEAD
+            + Bytes.SIZEOF_LONG; // ts
     private long ts;
 
     public FirstOnRowColTSByteBufferCell(ByteBuffer rBuffer, int roffset, short rlength,
@@ -1725,9 +1821,19 @@ public final class PrivateCellUtil {
     public long getTimestamp() {
       return this.ts;
     }
+
+    @Override
+    public long heapSize() {
+      return ClassSize.align(FIXED_OVERHEAD + super.heapSize());
+    }
   }
 
   private static class LastOnRowCell extends EmptyCell {
+    private static final long FIXED_OVERHEAD =
+        ClassSize.OBJECT // object
+      + ClassSize.REFERENCE // row array
+      + Bytes.SIZEOF_INT // row offset
+      + Bytes.SIZEOF_SHORT; // row length
     private final byte[] rowArray;
     private final int roffset;
     private final short rlength;
@@ -1739,6 +1845,13 @@ public final class PrivateCellUtil {
     }
 
     @Override
+    public long heapSize() {
+      return ClassSize.align(FIXED_OVERHEAD)
+          // array overhead
+          + (rlength == 0 ? ClassSize.sizeOfByteArray(rlength) : rlength);
+    }
+
+    @Override
     public byte[] getRowArray() {
       return this.rowArray;
     }
@@ -1765,6 +1878,10 @@ public final class PrivateCellUtil {
   }
 
   private static class LastOnRowColCell extends LastOnRowCell {
+    private static final long FIXED_OVERHEAD = LastOnRowCell.FIXED_OVERHEAD
+        + ClassSize.REFERENCE * 2 // fArray and qArray
+        + Bytes.SIZEOF_INT * 3 // foffset, qoffset, qlength
+        + Bytes.SIZEOF_BYTE; // flength
     private final byte[] fArray;
     private final int foffset;
     private final byte flength;
@@ -1784,6 +1901,14 @@ public final class PrivateCellUtil {
     }
 
     @Override
+    public long heapSize() {
+      return ClassSize.align(FIXED_OVERHEAD)
+          // array overhead
+          + (flength == 0 ? ClassSize.sizeOfByteArray(flength) : flength)
+          + (qlength == 0 ? ClassSize.sizeOfByteArray(qlength) : qlength);
+    }
+
+    @Override
     public byte[] getFamilyArray() {
       return this.fArray;
     }
@@ -1815,6 +1940,11 @@ public final class PrivateCellUtil {
   }
 
   private static class LastOnRowColByteBufferCell extends LastOnRowByteBufferCell {
+    private static final int FIXED_OVERHEAD =
+        LastOnRowByteBufferCell.FIXED_OVERHEAD
+            + ClassSize.REFERENCE * 2 // fBuffer and qBuffer
+            + Bytes.SIZEOF_INT * 3 // foffset, qoffset, qlength
+            + Bytes.SIZEOF_BYTE; // flength
     private final ByteBuffer fBuffer;
     private final int foffset;
     private final byte flength;
@@ -1835,6 +1965,19 @@ public final class PrivateCellUtil {
     }
 
     @Override
+    public long heapSize() {
+      if (fBuffer.hasArray() && qBuffer.hasArray()) {
+        return ClassSize.align(FIXED_OVERHEAD + flength + qlength);
+      } else if (fBuffer.hasArray()) {
+        return ClassSize.align(FIXED_OVERHEAD + flength);
+      } else if (qBuffer.hasArray()) {
+        return ClassSize.align(FIXED_OVERHEAD + qlength);
+      } else {
+        return ClassSize.align(FIXED_OVERHEAD);
+      }
+    }
+
+    @Override
     public ByteBuffer getFamilyByteBuffer() {
       return this.fBuffer;
     }
@@ -1866,6 +2009,11 @@ public final class PrivateCellUtil {
   }
 
   private static class FirstOnRowDeleteFamilyCell extends EmptyCell {
+    private static final int FIXED_OVERHEAD =
+        ClassSize.OBJECT // object
+      + ClassSize.REFERENCE * 2 // fBuffer and qBuffer
+      + Bytes.SIZEOF_INT * 3 // foffset, qoffset, qlength
+      + Bytes.SIZEOF_BYTE; // flength
     private final byte[] row;
     private final byte[] fam;
 
@@ -1875,6 +2023,15 @@ public final class PrivateCellUtil {
     }
 
     @Override
+    public long heapSize() {
+      return ClassSize.align(FIXED_OVERHEAD)
+        // array overhead
+        + (getRowLength() == 0 ? ClassSize.sizeOfByteArray(getRowLength()) : getRowLength())
+        + (getFamilyLength() == 0 ?
+          ClassSize.sizeOfByteArray(getFamilyLength()) : getFamilyLength());
+    }
+
+    @Override
     public byte[] getRowArray() {
       return this.row;
     }
@@ -2035,14 +2192,14 @@ public final class PrivateCellUtil {
    * sequenceid is an internal implementation detail not for general public use.
    * @param cell
    * @param seqId
-   * @throws IOException when the passed cell is not of type {@link SettableSequenceId}
+   * @throws IOException when the passed cell is not of type {@link ExtendedCell}
    */
   public static void setSequenceId(Cell cell, long seqId) throws IOException {
-    if (cell instanceof SettableSequenceId) {
-      ((SettableSequenceId) cell).setSequenceId(seqId);
+    if (cell instanceof ExtendedCell) {
+      ((ExtendedCell) cell).setSequenceId(seqId);
     } else {
       throw new IOException(new UnsupportedOperationException(
-          "Cell is not of type " + SettableSequenceId.class.getName()));
+          "Cell is not of type " + ExtendedCell.class.getName()));
     }
   }
 
@@ -2050,14 +2207,14 @@ public final class PrivateCellUtil {
    * Sets the given timestamp to the cell.
    * @param cell
    * @param ts
-   * @throws IOException when the passed cell is not of type {@link SettableTimestamp}
+   * @throws IOException when the passed cell is not of type {@link ExtendedCell}
    */
   public static void setTimestamp(Cell cell, long ts) throws IOException {
-    if (cell instanceof SettableTimestamp) {
-      ((SettableTimestamp) cell).setTimestamp(ts);
+    if (cell instanceof ExtendedCell) {
+      ((ExtendedCell) cell).setTimestamp(ts);
     } else {
       throw new IOException(new UnsupportedOperationException(
-          "Cell is not of type " + SettableTimestamp.class.getName()));
+          "Cell is not of type " + ExtendedCell.class.getName()));
     }
   }
 
@@ -2065,15 +2222,14 @@ public final class PrivateCellUtil {
    * Sets the given timestamp to the cell.
    * @param cell
    * @param ts buffer containing the timestamp value
-   * @param tsOffset offset to the new timestamp
-   * @throws IOException when the passed cell is not of type {@link SettableTimestamp}
+   * @throws IOException when the passed cell is not of type {@link ExtendedCell}
    */
-  public static void setTimestamp(Cell cell, byte[] ts, int tsOffset) throws IOException {
-    if (cell instanceof SettableTimestamp) {
-      ((SettableTimestamp) cell).setTimestamp(ts, tsOffset);
+  public static void setTimestamp(Cell cell, byte[] ts) throws IOException {
+    if (cell instanceof ExtendedCell) {
+      ((ExtendedCell) cell).setTimestamp(ts);
     } else {
       throw new IOException(new UnsupportedOperationException(
-          "Cell is not of type " + SettableTimestamp.class.getName()));
+          "Cell is not of type " + ExtendedCell.class.getName()));
     }
   }
 
@@ -2083,7 +2239,7 @@ public final class PrivateCellUtil {
    * @param cell
    * @param ts
    * @return True if cell timestamp is modified.
-   * @throws IOException when the passed cell is not of type {@link SettableTimestamp}
+   * @throws IOException when the passed cell is not of type {@link ExtendedCell}
    */
   public static boolean updateLatestStamp(Cell cell, long ts) throws IOException {
     if (cell.getTimestamp() == HConstants.LATEST_TIMESTAMP) {
@@ -2098,13 +2254,12 @@ public final class PrivateCellUtil {
    * {@link HConstants#LATEST_TIMESTAMP}.
    * @param cell
    * @param ts buffer containing the timestamp value
-   * @param tsOffset offset to the new timestamp
    * @return True if cell timestamp is modified.
-   * @throws IOException when the passed cell is not of type {@link SettableTimestamp}
+   * @throws IOException when the passed cell is not of type {@link ExtendedCell}
    */
-  public static boolean updateLatestStamp(Cell cell, byte[] ts, int tsOffset) throws IOException {
+  public static boolean updateLatestStamp(Cell cell, byte[] ts) throws IOException {
     if (cell.getTimestamp() == HConstants.LATEST_TIMESTAMP) {
-      setTimestamp(cell, ts, tsOffset);
+      setTimestamp(cell, ts);
       return true;
     }
     return false;
@@ -2517,7 +2672,7 @@ public final class PrivateCellUtil {
         // Serialization is probably preceded by a length (it is in the KeyValueCodec at least).
         Bytes.SIZEOF_INT;
   }
-  
+
   /**
    * @param cell
    * @return Sum of the lengths of all the elements in a Cell; does not count in any infrastructure

http://git-wip-us.apache.org/repos/asf/hbase/blob/d2b1578b/hbase-common/src/main/java/org/apache/hadoop/hbase/SettableSequenceId.java
----------------------------------------------------------------------
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/SettableSequenceId.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/SettableSequenceId.java
deleted file mode 100644
index c55b7cf..0000000
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/SettableSequenceId.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.hadoop.hbase;
-
-import java.io.IOException;
-
-import org.apache.yetus.audience.InterfaceAudience;
-
-/**
- * Using this Interface one can mark a Cell as Sequence stampable. <br>
- * Note : Make sure to make Cell implementation of this type in server side.
- * @deprecated as of 2.0 and will be removed in 3.0. Use {@link ExtendedCell} instead
- */
-@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.COPROC)
-@Deprecated
-public interface SettableSequenceId {
-
-  /**
-   * Sets with the given seqId.
-   * @param seqId
-   */
-  void setSequenceId(long seqId) throws IOException;
-}

http://git-wip-us.apache.org/repos/asf/hbase/blob/d2b1578b/hbase-common/src/main/java/org/apache/hadoop/hbase/SettableTimestamp.java
----------------------------------------------------------------------
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/SettableTimestamp.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/SettableTimestamp.java
deleted file mode 100644
index 73c1488..0000000
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/SettableTimestamp.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.hadoop.hbase;
-
-import java.io.IOException;
-
-import org.apache.yetus.audience.InterfaceAudience;
-
-/**
- * Using this Interface one can mark a Cell as timestamp changeable. <br>
- * Note : Server side Cell implementations in write path must implement this.
- * @deprecated as of 2.0 and will be removed in 3.0. Use {@link ExtendedCell} instead
- */
-@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.COPROC)
-@Deprecated
-public interface SettableTimestamp {
-
-  /**
-   * Sets with the given timestamp.
-   * @param ts
-   */
-  void setTimestamp(long ts) throws IOException;
-
-  /**
-   * Sets with the given timestamp.
-   * @param ts buffer containing the timestamp value
-   * @param tsOffset offset to the new timestamp
-   */
-  void setTimestamp(byte[] ts, int tsOffset) throws IOException;
-}

http://git-wip-us.apache.org/repos/asf/hbase/blob/d2b1578b/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 e224046..67a337d 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
@@ -21,18 +21,16 @@ import java.io.DataOutputStream;
 import java.io.IOException;
 import java.io.OutputStream;
 import java.nio.ByteBuffer;
-
 import org.apache.hadoop.hbase.ByteBufferCell;
 import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.CellComparator;
 import org.apache.hadoop.hbase.CellUtil;
 import org.apache.hadoop.hbase.ExtendedCell;
 import org.apache.hadoop.hbase.HConstants;
-import org.apache.hadoop.hbase.PrivateCellUtil;
 import org.apache.hadoop.hbase.KeyValue;
 import org.apache.hadoop.hbase.KeyValue.Type;
 import org.apache.hadoop.hbase.KeyValueUtil;
-import org.apache.yetus.audience.InterfaceAudience;
+import org.apache.hadoop.hbase.PrivateCellUtil;
 import org.apache.hadoop.hbase.io.TagCompressionContext;
 import org.apache.hadoop.hbase.io.util.LRUDictionary;
 import org.apache.hadoop.hbase.io.util.StreamUtils;
@@ -42,6 +40,7 @@ import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.util.ClassSize;
 import org.apache.hadoop.hbase.util.ObjectIntPair;
 import org.apache.hadoop.io.WritableUtils;
+import org.apache.yetus.audience.InterfaceAudience;
 
 /**
  * Base class for all data block encoders that use a buffer.
@@ -278,7 +277,7 @@ abstract class BufferedDataBlockEncoder extends AbstractDataBlockEncoder {
    * 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
-  // there. So this has to be an instance of SettableSequenceId.
+  // there. So this has to be an instance of ExtendedCell.
   protected static class OnheapDecodedCell implements ExtendedCell {
     private static final long FIXED_OVERHEAD = ClassSize.align(ClassSize.OBJECT
         + (3 * ClassSize.REFERENCE) + (2 * Bytes.SIZEOF_LONG) + (7 * Bytes.SIZEOF_INT)
@@ -465,7 +464,7 @@ abstract class BufferedDataBlockEncoder extends AbstractDataBlockEncoder {
     }
 
     @Override
-    public void setTimestamp(byte[] ts, int tsOffset) throws IOException {
+    public void setTimestamp(byte[] ts) throws IOException {
       // This is not used in actual flow. Throwing UnsupportedOperationException
       throw new UnsupportedOperationException();
     }
@@ -704,7 +703,7 @@ abstract class BufferedDataBlockEncoder extends AbstractDataBlockEncoder {
     }
 
     @Override
-    public void setTimestamp(byte[] ts, int tsOffset) throws IOException {
+    public void setTimestamp(byte[] ts) throws IOException {
       // This is not used in actual flow. Throwing UnsupportedOperationException
       throw new UnsupportedOperationException();
     }

http://git-wip-us.apache.org/repos/asf/hbase/blob/d2b1578b/hbase-common/src/test/java/org/apache/hadoop/hbase/TestIndividualBytesFieldCell.java
----------------------------------------------------------------------
diff --git a/hbase-common/src/test/java/org/apache/hadoop/hbase/TestIndividualBytesFieldCell.java b/hbase-common/src/test/java/org/apache/hadoop/hbase/TestIndividualBytesFieldCell.java
index 0fde1a3..f98c68e 100644
--- a/hbase-common/src/test/java/org/apache/hadoop/hbase/TestIndividualBytesFieldCell.java
+++ b/hbase-common/src/test/java/org/apache/hadoop/hbase/TestIndividualBytesFieldCell.java
@@ -18,9 +18,12 @@
 
 package org.apache.hadoop.hbase;
 
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
 import java.io.IOException;
 import java.nio.ByteBuffer;
-
 import org.apache.hadoop.hbase.io.ByteArrayOutputStream;
 import org.apache.hadoop.hbase.testclassification.MiscTests;
 import org.apache.hadoop.hbase.testclassification.SmallTests;
@@ -29,10 +32,6 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
 @Category({MiscTests.class, SmallTests.class})
 public class TestIndividualBytesFieldCell {
   private static IndividualBytesFieldCell ic0  = null;
@@ -168,16 +167,10 @@ public class TestIndividualBytesFieldCell {
     assertEquals(kv1.getTagsLength()     , ic1.getTagsLength());
   }
 
-  // Verify if SettableSequenceId interface is implemented
-  @Test
-  public void testIfSettableSequenceIdImplemented() {
-    assertTrue(ic0 instanceof SettableSequenceId);
-  }
-
-  // Verify if SettableTimestamp interface is implemented
+  // Verify if ExtendedCell interface is implemented
   @Test
-  public void testIfSettableTimestampImplemented() {
-    assertTrue(ic0 instanceof SettableTimestamp);
+  public void testIfExtendedCellImplemented() {
+    assertTrue(ic0 instanceof ExtendedCell);
   }
 
   @Test(expected = IllegalArgumentException.class)

http://git-wip-us.apache.org/repos/asf/hbase/blob/d2b1578b/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/HFileOutputFormat2.java
----------------------------------------------------------------------
diff --git a/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/HFileOutputFormat2.java b/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/HFileOutputFormat2.java
index 954118b..ffe1c85 100644
--- a/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/HFileOutputFormat2.java
+++ b/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/HFileOutputFormat2.java
@@ -334,7 +334,6 @@ public class HFileOutputFormat2
         }
 
         // we now have the proper WAL writer. full steam ahead
-        // TODO : Currently in SettableTimeStamp but this will also move to ExtendedCell
         PrivateCellUtil.updateLatestStamp(cell, this.now);
         wl.writer.append(kv);
         wl.written += length;

http://git-wip-us.apache.org/repos/asf/hbase/blob/d2b1578b/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/util/MapReduceCell.java
----------------------------------------------------------------------
diff --git a/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/util/MapReduceCell.java b/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/util/MapReduceCell.java
index f3bac52..38ff59b 100644
--- a/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/util/MapReduceCell.java
+++ b/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/util/MapReduceCell.java
@@ -236,8 +236,8 @@ public class MapReduceCell extends ByteBufferCell implements ExtendedCell {
   }
 
   @Override
-  public void setTimestamp(byte[] ts, int tsOffset) throws IOException {
-    PrivateCellUtil.setTimestamp(cell, ts, tsOffset);
+  public void setTimestamp(byte[] ts) throws IOException {
+    PrivateCellUtil.setTimestamp(cell, ts);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/hbase/blob/d2b1578b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCache.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCache.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCache.java
index 20ec8ee..3ed7e7d 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCache.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCache.java
@@ -119,7 +119,7 @@ public interface BlockCache extends Iterable<CachedBlock> {
    * @return number of blocks in the cache
    */
   long getBlockCount();
- 
+
  /**
   * Returns the number of data blocks currently cached in the block cache.
   * @return number of blocks in the cache

http://git-wip-us.apache.org/repos/asf/hbase/blob/d2b1578b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
index e66ad59..1b74166 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
@@ -2876,7 +2876,7 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
             updateDeleteLatestVersionTimeStamp(cell, get, count, byteNow);
           }
         } else {
-          PrivateCellUtil.updateLatestStamp(cell, byteNow, 0);
+          PrivateCellUtil.updateLatestStamp(cell, byteNow);
         }
       }
     }
@@ -2888,7 +2888,7 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
 
     if (result.size() < count) {
       // Nothing to delete
-      PrivateCellUtil.updateLatestStamp(cell, byteNow, 0);
+      PrivateCellUtil.updateLatestStamp(cell, byteNow);
       return;
     }
     if (result.size() > count) {
@@ -4104,7 +4104,7 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
       assert cells instanceof RandomAccess;
       int listSize = cells.size();
       for (int i = 0; i < listSize; i++) {
-        PrivateCellUtil.updateLatestStamp(cells.get(i), now, 0);
+        PrivateCellUtil.updateLatestStamp(cells.get(i), now);
       }
     }
   }

http://git-wip-us.apache.org/repos/asf/hbase/blob/d2b1578b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/VisibilityController.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/VisibilityController.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/VisibilityController.java
index ba2e22c..c6f81c4 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/VisibilityController.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/VisibilityController.java
@@ -405,7 +405,7 @@ public class VisibilityController implements MasterCoprocessor, RegionCoprocesso
 
     if (result.size() < get.getMaxVersions()) {
       // Nothing to delete
-      PrivateCellUtil.updateLatestStamp(cell, byteNow, 0);
+      PrivateCellUtil.updateLatestStamp(cell, byteNow);
       return;
     }
     if (result.size() > get.getMaxVersions()) {


Mime
View raw message