@Override
  public long heapSize() {
    long size = FIXED_OVERHEAD;
    if (this.hfileName != null) {
      size += ClassSize.STRING + this.hfileName.length();
    }
    if (this.columnFamily != null) {
      size += ClassSize.sizeOfByteArray(this.columnFamily.length);
    }
    if (this.tableName != null) {
      size += ClassSize.sizeOfByteArray(this.tableName.length);
    }
    if (this.decompressionContext != null) {
      size += this.decompressionContext.heapSize();
    }
    return size;
  }
HeapSize implementation. NOTE : The heap size should be altered when new state variable are
added.
@return heap size of the HFileContext
hbase-common/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileContext.java