Package org.apache.parquet.hadoop
Interface IndexCache
-
public interface IndexCacheA cache for caching indexes(including: ColumnIndex, OffsetIndex and BloomFilter)
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classIndexCache.CacheStrategy
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclean()Clean the cachestatic IndexCachecreate(ParquetFileReader fileReader, Set<ColumnPath> columns, IndexCache.CacheStrategy cacheStrategy, boolean freeCacheAfterGet)Create an index cache for the given file readerBloomFiltergetBloomFilter(ColumnChunkMetaData chunk)Get the BloomFilter for the given column in the set row group.ColumnIndexgetColumnIndex(ColumnChunkMetaData chunk)Get the ColumnIndex for the given column in the set row group.OffsetIndexgetOffsetIndex(ColumnChunkMetaData chunk)Get the OffsetIndex for the given column in the set row group.voidsetBlockMetadata(BlockMetaData currentBlockMetadata)Set the current BlockMetadata
-
-
-
Method Detail
-
create
static IndexCache create(ParquetFileReader fileReader, Set<ColumnPath> columns, IndexCache.CacheStrategy cacheStrategy, boolean freeCacheAfterGet)
Create an index cache for the given file reader- Parameters:
fileReader- the file readercolumns- the columns that need to do cachecacheStrategy- the cache strategy, supports NONE and PREFETCH_BLOCKfreeCacheAfterGet- 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
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
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
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
-
-