Interface IndexCache


public interface IndexCache
A cache for caching indexes(including: ColumnIndex, OffsetIndex and BloomFilter)
  • Method Details

    • create

      static IndexCache create(ParquetFileReader fileReader, Set<org.apache.parquet.hadoop.metadata.ColumnPath> columns, IndexCache.CacheStrategy cacheStrategy, boolean freeCacheAfterGet)
      Create an index cache for the given file reader
      Parameters:
      fileReader - the file reader
      columns - the columns that need to do cache
      cacheStrategy - the cache strategy, supports NONE and PREFETCH_BLOCK
      freeCacheAfterGet - whether free the given index cache after calling the given get method
      Returns:
      the index cache
    • setBlockMetadata

      void setBlockMetadata(BlockMetaData currentBlockMetadata) throws IOException
      Set the current BlockMetadata
      Throws:
      IOException
    • getColumnIndex

      org.apache.parquet.internal.column.columnindex.ColumnIndex getColumnIndex(ColumnChunkMetaData chunk) throws IOException
      Get the ColumnIndex for the given column in the set row group.
      Parameters:
      chunk - the given column chunk
      Returns:
      the ColumnIndex for the given column
      Throws:
      IOException - if any I/O error occurs during get the ColumnIndex
    • getOffsetIndex

      org.apache.parquet.internal.column.columnindex.OffsetIndex getOffsetIndex(ColumnChunkMetaData chunk) throws IOException
      Get the OffsetIndex for the given column in the set row group.
      Parameters:
      chunk - the given column chunk
      Returns:
      the OffsetIndex for the given column
      Throws:
      IOException - if any I/O error occurs during get the OffsetIndex
    • getBloomFilter

      org.apache.parquet.column.values.bloomfilter.BloomFilter getBloomFilter(ColumnChunkMetaData chunk) throws IOException
      Get the BloomFilter for the given column in the set row group.
      Parameters:
      chunk - the given column chunk
      Returns:
      the BloomFilter for the given column
      Throws:
      IOException - if any I/O error occurs during get the BloomFilter
    • clean

      void clean()
      Clean the cache