Class BaseParquetMetadataProvider
java.lang.Object
org.apache.drill.exec.store.parquet.BaseParquetMetadataProvider
- All Implemented Interfaces:
ParquetMetadataProvider,TableMetadataProvider
- Direct Known Subclasses:
DeltaParquetTableMetadataProvider,HiveParquetTableMetadataProvider,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 TypeMethodDescriptionbooleanWhether metadata actuality should be checked.Returns list ofReadEntryWithPathinstances which represents paths to files to be scanned.getFileMetadata(org.apache.hadoop.fs.Path location) ReturnsFileMetadatainstance which corresponds to metadata of file for specified location.Set<org.apache.hadoop.fs.Path> Returns list of file locations for table.getFilesForPartition(PartitionMetadata partition) Returns list ofFileMetadatainstances which belongs to specified partitions.Map<org.apache.hadoop.fs.Path, FileMetadata> Returns map ofFileMetadatainstances which provides metadata for specific file and its columns.List<org.apache.hadoop.fs.Path> Returns list of file paths which belong to current table.ReturnsNonInterestingColumnsMetadatainstance which provides metadata for non-interesting columns.Returns list of partition columns for table from thisTableMetadataProvider.getPartitionMetadata(SchemaPath columnName) Returns list ofPartitionMetadatainstances which corresponds to partitions for specified column and provides metadata for specific partitions and its columns.Returns list ofPartitionMetadatainstances which provides metadata for specific partitions and its columns.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> Returns map ofSegmentMetadatainstances which provides metadata for segment and its columns.ReturnsTableMetadatainstance which provides metadata for table and columns metadata.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
Description copied from interface:TableMetadataProviderReturnsNonInterestingColumnsMetadatainstance which provides metadata for non-interesting columns.- Specified by:
getNonInterestingColumnsMetadatain interfaceTableMetadataProvider- Returns:
NonInterestingColumnsMetadatainstance
-
getTableMetadata
Description copied from interface:TableMetadataProviderReturnsTableMetadatainstance which provides metadata for table and columns metadata.- Specified by:
getTableMetadatain interfaceTableMetadataProvider- Returns:
TableMetadatainstance
-
getPartitionColumns
Description copied from interface:TableMetadataProviderReturns list of partition columns for table from thisTableMetadataProvider.- Specified by:
getPartitionColumnsin interfaceTableMetadataProvider- Returns:
- list of partition columns
-
getPartitionsMetadata
Description copied from interface:TableMetadataProviderReturns list ofPartitionMetadatainstances which provides metadata for specific partitions and its columns.- Specified by:
getPartitionsMetadatain interfaceTableMetadataProvider- Returns:
- list of
PartitionMetadatainstances
-
getPartitionMetadata
Description copied from interface:TableMetadataProviderReturns list ofPartitionMetadatainstances which corresponds to partitions for specified column and provides metadata for specific partitions and its columns.- Specified by:
getPartitionMetadatain interfaceTableMetadataProvider- Returns:
- list of
PartitionMetadatainstances which corresponds to partitions for specified column
-
getFileMetadata
Description copied from interface:TableMetadataProviderReturnsFileMetadatainstance which corresponds to metadata of file for specified location.- Specified by:
getFileMetadatain interfaceTableMetadataProvider- Parameters:
location- location of the file- Returns:
FileMetadatainstance which corresponds to metadata of file for specified location
-
getFilesForPartition
Description copied from interface:TableMetadataProviderReturns list ofFileMetadatainstances which belongs to specified partitions.- Specified by:
getFilesForPartitionin interfaceTableMetadataProvider- Parameters:
partition- partition which- Returns:
- list of
FileMetadatainstances which belongs to specified partitions
-
getSegmentsMetadataMap
Description copied from interface:TableMetadataProviderReturns map ofSegmentMetadatainstances which provides metadata for segment and its columns.- Specified by:
getSegmentsMetadataMapin interfaceTableMetadataProvider- Returns:
- map of
SegmentMetadatainstances
-
getFilesMetadataMap
Description copied from interface:TableMetadataProviderReturns map ofFileMetadatainstances which provides metadata for specific file and its columns.- Specified by:
getFilesMetadataMapin interfaceTableMetadataProvider- Returns:
- map of
FileMetadatainstances
-
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()Description copied from interface:TableMetadataProviderWhether metadata actuality should be checked.- Specified by:
checkMetadataVersionin interfaceTableMetadataProvider- Returns:
- true if metadata actuality should be checked
-
initInternal
- Throws:
IOException
-