public static int getRowAsInt(Cell cell) {
    if (cell instanceof ByteBufferExtendedCell) {
      return ByteBufferUtils.toInt(((ByteBufferExtendedCell) cell).getRowByteBuffer(),
        ((ByteBufferExtendedCell) cell).getRowPosition());
    }
    return Bytes.toInt(cell.getRowArray(), cell.getRowOffset());
  }
Converts the rowkey bytes of the given cell into an int value
@return rowkey as int
hbase-common/src/main/java/org/apache/hadoop/hbase/PrivateCellUtil.java