@Override
  public int getTagsLength() {
    int tagsLen =
      this.length - (getKeyLength() + getValueLength() + KeyValue.KEYVALUE_INFRASTRUCTURE_SIZE);
    if (tagsLen > 0) {
      // There are some Tag bytes in the byte[]. So reduce 2 bytes which is
      // added to denote the tags
      // length
      tagsLen -= KeyValue.TAGS_LENGTH_SIZE;
    }
    return tagsLen;
  }
This Cell is an implementation of {@link ByteBufferExtendedCell} where the data resides in off
heap/ on heap ByteBuffer
hbase-common/src/main/java/org/apache/hadoop/hbase/ByteBufferKeyValue.java