/** * @return the first key in the file. May be null if file has no entries. Note that this is not * the first row key, but rather the byte form of the first KeyValue. */ @Override public byte[] getFirstKey() { if (dataBlockIndexReader == null) { throw new BlockIndexNotLoadedException(); } return dataBlockIndexReader.isEmpty() ? null : dataBlockIndexReader.getRootBlockKey(0); }
/** * @return the total heap size of data and meta block indexes in bytes. Does not take into account * non-root blocks of a multilevel data index. */ public long indexSize() { return (dataBlockIndexReader != null ? dataBlockIndexReader.heapSize() : 0) + ((metaBlockIndexReader != null) ? metaBlockIndexReader.heapSize() : 0); }