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 d4913262ac8..36b07a81b7a 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 @@ -53,8 +53,10 @@ public interface ExtendedCell extends RawCell, HeapSize, Cloneable { // Key PrivateCellUtil.writeFlatKey(this, out); - // Value - out.write(getValueArray(), getValueOffset(), getValueLength()); + if (getValueLength() > 0) { + // Value + out.write(getValueArray(), getValueOffset(), getValueLength()); + } // Tags length and tags byte array if (withTags && getTagsLength() > 0) {