Class BaseParquetMetadataProvider
java.lang.Object
org.apache.drill.exec.store.parquet.BaseParquetMetadataProvider
- All Implemented Interfaces:
ParquetMetadataProvider,TableMetadataProvider
- Direct Known Subclasses:
ParquetTableMetadataProviderImpl
Implementation of
ParquetMetadataProvider which contains base methods for obtaining metadata from
parquet statistics.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final List<ReadEntryWithPath> protected Set<org.apache.hadoop.fs.Path> static final ObjectHashBasedTablecannot contain nulls, used this object to represent null values.protected MetadataBase.ParquetTableMetadataBaseprotected final ParquetReaderConfigprotected TupleMetadataprotected DrillStatsTableprotected final org.apache.hadoop.fs.Pathprotected final String -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns list ofReadEntryWithPathinstances which represents paths to files to be scanned.getFileMetadata(org.apache.hadoop.fs.Path location) Set<org.apache.hadoop.fs.Path> Returns list of file locations for table.getFilesForPartition(PartitionMetadata partition) Map<org.apache.hadoop.fs.Path, FileMetadata> List<org.apache.hadoop.fs.Path> Returns list of file paths which belong to current table.getPartitionMetadata(SchemaPath columnName) Returns list ofRowGroupMetadatainstances which provides metadata for specific row group and its columns.com.google.common.collect.Multimap<org.apache.hadoop.fs.Path, RowGroupMetadata> Returns multimap ofRowGroupMetadatainstances which provides metadata for specific row group and its columns mapped to their locations.Map<org.apache.hadoop.fs.Path, SegmentMetadata> protected voidinit(BaseParquetMetadataProvider metadataProvider) voidMethod which initializes all metadata kinds to get rid of parquetTableMetadata.protected abstract void
-
Field Details
-
NULL_VALUE
HashBasedTablecannot contain nulls, used this object to represent null values. -
entries
-
readerConfig
-
tableName
-
tableLocation
protected final org.apache.hadoop.fs.Path tableLocation -
parquetTableMetadata
-
fileSet
-
schema
-
statsTable
-
-
Constructor Details
-
BaseParquetMetadataProvider
-
-
Method Details
-
init
- Throws:
IOException
-
initializeMetadata
public void initializeMetadata()Method which initializes all metadata kinds to get rid of parquetTableMetadata. Once deserialization and serialization from/into metastore classes is done, this method should be removed to allow lazy initialization. -
getNonInterestingColumnsMetadata
- Specified by:
getNonInterestingColumnsMetadatain interfaceTableMetadataProvider
-
getTableMetadata
- Specified by:
getTableMetadatain interfaceTableMetadataProvider
-
getPartitionColumns
- Specified by:
getPartitionColumnsin interfaceTableMetadataProvider
-
getPartitionsMetadata
- Specified by:
getPartitionsMetadatain interfaceTableMetadataProvider
-
getPartitionMetadata
- Specified by:
getPartitionMetadatain interfaceTableMetadataProvider
-
getFileMetadata
- Specified by:
getFileMetadatain interfaceTableMetadataProvider
-
getFilesForPartition
- Specified by:
getFilesForPartitionin interfaceTableMetadataProvider
-
getSegmentsMetadataMap
- Specified by:
getSegmentsMetadataMapin interfaceTableMetadataProvider
-
getFilesMetadataMap
- Specified by:
getFilesMetadataMapin interfaceTableMetadataProvider
-
getEntries
Description copied from interface:ParquetMetadataProviderReturns list ofReadEntryWithPathinstances which represents paths to files to be scanned.- Specified by:
getEntriesin interfaceParquetMetadataProvider- Returns:
- list of
ReadEntryWithPathinstances whith file paths
-
getFileSet
Description copied from interface:ParquetMetadataProviderReturns list of file locations for table.- Specified by:
getFileSetin interfaceParquetMetadataProvider- Returns:
- list of file locations for table
-
getRowGroupsMeta
Description copied from interface:ParquetMetadataProviderReturns list ofRowGroupMetadatainstances which provides metadata for specific row group and its columns.- Specified by:
getRowGroupsMetain interfaceParquetMetadataProvider- Returns:
- list of
RowGroupMetadatainstances
-
getLocations
Description copied from interface:ParquetMetadataProviderReturns list of file paths which belong to current table.- Specified by:
getLocationsin interfaceParquetMetadataProvider- Returns:
- list of file paths
-
getRowGroupsMetadataMap
public com.google.common.collect.Multimap<org.apache.hadoop.fs.Path,RowGroupMetadata> getRowGroupsMetadataMap()Description copied from interface:ParquetMetadataProviderReturns multimap ofRowGroupMetadatainstances which provides metadata for specific row group and its columns mapped to their locations.- Specified by:
getRowGroupsMetadataMapin interfaceParquetMetadataProvider- Returns:
- multimap of
RowGroupMetadatainstances
-
checkMetadataVersion
public boolean checkMetadataVersion()- Specified by:
checkMetadataVersionin interfaceTableMetadataProvider
-
initInternal
- Throws:
IOException
-