public static long getValueAsLong(Cell cell) {
    if (cell instanceof ByteBufferExtendedCell) {
      return ByteBufferUtils.toLong(((ByteBufferExtendedCell) cell).getValueByteBuffer(),
        ((ByteBufferExtendedCell) cell).getValuePosition());
    }
    return Bytes.toLong(cell.getValueArray(), cell.getValueOffset());
  }
Converts the value bytes of the given cell into a long value
@return value as long
hbase-common/src/main/java/org/apache/hadoop/hbase/PrivateCellUtil.java