Class MetastoreFileTableMetadataProvider
java.lang.Object
org.apache.drill.exec.metastore.store.MetastoreFileTableMetadataProvider
- All Implemented Interfaces:
TableMetadataProvider
- Direct Known Subclasses:
MetastoreParquetTableMetadataProvider
Implementation of
TableMetadataProvider
which uses Drill Metastore for providing table metadata
for file-based tables.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
-
Field Summary
Modifier and TypeFieldDescriptionprotected final BasicTablesRequests
protected final TableMetadataProviderBuilder
protected final boolean
protected Map<org.apache.hadoop.fs.Path,
FileMetadata> protected final MetastoreTableInfo
protected List<PartitionMetadata>
protected final TupleMetadata
protected Map<org.apache.hadoop.fs.Path,
SegmentMetadata> protected final DrillStatsTable
protected final TableInfo
protected BaseTableMetadata
protected final boolean
protected final boolean
-
Constructor Summary
ModifierConstructorDescriptionprotected
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Whether metadata actuality should be checked.getFileMetadata
(org.apache.hadoop.fs.Path location) ReturnsFileMetadata
instance which corresponds to metadata of file for specified location.getFilesForPartition
(PartitionMetadata partition) Returns list ofFileMetadata
instances which belongs to specified partitions.Map<org.apache.hadoop.fs.Path,
FileMetadata> Returns map ofFileMetadata
instances which provides metadata for specific file and its columns.ReturnsNonInterestingColumnsMetadata
instance which provides metadata for non-interesting columns.Returns list of partition columns for table from thisTableMetadataProvider
.getPartitionMetadata
(SchemaPath columnName) Returns list ofPartitionMetadata
instances which corresponds to partitions for specified column and provides metadata for specific partitions and its columns.Returns list ofPartitionMetadata
instances which provides metadata for specific partitions and its columns.Map<org.apache.hadoop.fs.Path,
SegmentMetadata> Returns map ofSegmentMetadata
instances which provides metadata for segment and its columns.ReturnsTableMetadata
instance which provides metadata for table and columns metadata.protected void
-
Field Details
-
basicTablesRequests
-
tableInfo
-
metastoreTableInfo
-
schema
-
paths
-
statsProvider
-
fallbackBuilder
-
useSchema
protected final boolean useSchema -
useStatistics
protected final boolean useStatistics -
fallbackToFileMetadata
protected final boolean fallbackToFileMetadata -
tableMetadata
-
segmentsMetadata
-
partitions
-
files
-
-
Constructor Details
-
MetastoreFileTableMetadataProvider
-
-
Method Details
-
throwIfChanged
protected void throwIfChanged() -
getTableMetadata
Description copied from interface:TableMetadataProvider
ReturnsTableMetadata
instance which provides metadata for table and columns metadata.- Specified by:
getTableMetadata
in interfaceTableMetadataProvider
- Returns:
TableMetadata
instance
-
getPartitionColumns
Description copied from interface:TableMetadataProvider
Returns list of partition columns for table from thisTableMetadataProvider
.- Specified by:
getPartitionColumns
in interfaceTableMetadataProvider
- Returns:
- list of partition columns
-
getPartitionsMetadata
Description copied from interface:TableMetadataProvider
Returns list ofPartitionMetadata
instances which provides metadata for specific partitions and its columns.- Specified by:
getPartitionsMetadata
in interfaceTableMetadataProvider
- Returns:
- list of
PartitionMetadata
instances
-
getPartitionMetadata
Description copied from interface:TableMetadataProvider
Returns list ofPartitionMetadata
instances which corresponds to partitions for specified column and provides metadata for specific partitions and its columns.- Specified by:
getPartitionMetadata
in interfaceTableMetadataProvider
- Returns:
- list of
PartitionMetadata
instances which corresponds to partitions for specified column
-
getFilesMetadataMap
Description copied from interface:TableMetadataProvider
Returns map ofFileMetadata
instances which provides metadata for specific file and its columns.- Specified by:
getFilesMetadataMap
in interfaceTableMetadataProvider
- Returns:
- map of
FileMetadata
instances
-
getSegmentsMetadataMap
Description copied from interface:TableMetadataProvider
Returns map ofSegmentMetadata
instances which provides metadata for segment and its columns.- Specified by:
getSegmentsMetadataMap
in interfaceTableMetadataProvider
- Returns:
- map of
SegmentMetadata
instances
-
getFileMetadata
Description copied from interface:TableMetadataProvider
ReturnsFileMetadata
instance which corresponds to metadata of file for specified location.- Specified by:
getFileMetadata
in interfaceTableMetadataProvider
- Parameters:
location
- location of the file- Returns:
FileMetadata
instance which corresponds to metadata of file for specified location
-
getFilesForPartition
Description copied from interface:TableMetadataProvider
Returns list ofFileMetadata
instances which belongs to specified partitions.- Specified by:
getFilesForPartition
in interfaceTableMetadataProvider
- Parameters:
partition
- partition which- Returns:
- list of
FileMetadata
instances which belongs to specified partitions
-
getNonInterestingColumnsMetadata
Description copied from interface:TableMetadataProvider
ReturnsNonInterestingColumnsMetadata
instance which provides metadata for non-interesting columns.- Specified by:
getNonInterestingColumnsMetadata
in interfaceTableMetadataProvider
- Returns:
NonInterestingColumnsMetadata
instance
-
checkMetadataVersion
public boolean checkMetadataVersion()Description copied from interface:TableMetadataProvider
Whether metadata actuality should be checked.- Specified by:
checkMetadataVersion
in interfaceTableMetadataProvider
- Returns:
- true if metadata actuality should be checked
-