public class MetastoreFileTableMetadataProvider extends Object implements TableMetadataProvider
TableMetadataProvider which uses Drill Metastore for providing table metadata
for file-based tables.| Modifier and Type | Class and Description |
|---|---|
static class |
MetastoreFileTableMetadataProvider.Builder<T extends MetastoreFileTableMetadataProvider.Builder<T>> |
| Modifier and Type | Field and Description |
|---|---|
protected BasicTablesRequests |
basicTablesRequests |
protected TableMetadataProviderBuilder |
fallbackBuilder |
protected boolean |
fallbackToFileMetadata |
protected Map<org.apache.hadoop.fs.Path,FileMetadata> |
files |
protected MetastoreTableInfo |
metastoreTableInfo |
protected List<PartitionMetadata> |
partitions |
protected List<String> |
paths |
protected TupleMetadata |
schema |
protected Map<org.apache.hadoop.fs.Path,SegmentMetadata> |
segmentsMetadata |
protected DrillStatsTable |
statsProvider |
protected TableInfo |
tableInfo |
protected BaseTableMetadata |
tableMetadata |
protected boolean |
useSchema |
protected boolean |
useStatistics |
| Modifier | Constructor and Description |
|---|---|
protected |
MetastoreFileTableMetadataProvider(MetastoreFileTableMetadataProvider.Builder<?> builder) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkMetadataVersion()
Whether metadata actuality should be checked.
|
FileMetadata |
getFileMetadata(org.apache.hadoop.fs.Path location)
Returns
FileMetadata instance which corresponds to metadata of file for specified location. |
List<FileMetadata> |
getFilesForPartition(PartitionMetadata partition)
Returns list of
FileMetadata instances which belongs to specified partitions. |
Map<org.apache.hadoop.fs.Path,FileMetadata> |
getFilesMetadataMap()
Returns map of
FileMetadata instances which provides metadata for specific file and its columns. |
NonInterestingColumnsMetadata |
getNonInterestingColumnsMetadata()
Returns
NonInterestingColumnsMetadata instance which provides metadata for non-interesting columns. |
List<SchemaPath> |
getPartitionColumns()
Returns list of partition columns for table from this
TableMetadataProvider. |
List<PartitionMetadata> |
getPartitionMetadata(SchemaPath columnName)
Returns list of
PartitionMetadata instances which corresponds to partitions for specified column
and provides metadata for specific partitions and its columns. |
List<PartitionMetadata> |
getPartitionsMetadata()
Returns list of
PartitionMetadata instances which provides metadata for specific partitions and its columns. |
Map<org.apache.hadoop.fs.Path,SegmentMetadata> |
getSegmentsMetadataMap()
Returns map of
SegmentMetadata instances which provides metadata for segment and its columns. |
TableMetadata |
getTableMetadata()
Returns
TableMetadata instance which provides metadata for table and columns metadata. |
protected void |
throwIfChanged() |
protected final BasicTablesRequests basicTablesRequests
protected final TableInfo tableInfo
protected final MetastoreTableInfo metastoreTableInfo
protected final TupleMetadata schema
protected final DrillStatsTable statsProvider
protected final TableMetadataProviderBuilder fallbackBuilder
protected final boolean useSchema
protected final boolean useStatistics
protected final boolean fallbackToFileMetadata
protected BaseTableMetadata tableMetadata
protected Map<org.apache.hadoop.fs.Path,SegmentMetadata> segmentsMetadata
protected List<PartitionMetadata> partitions
protected Map<org.apache.hadoop.fs.Path,FileMetadata> files
protected MetastoreFileTableMetadataProvider(MetastoreFileTableMetadataProvider.Builder<?> builder)
protected void throwIfChanged()
public TableMetadata getTableMetadata()
TableMetadataProviderTableMetadata instance which provides metadata for table and columns metadata.getTableMetadata in interface TableMetadataProviderTableMetadata instancepublic List<SchemaPath> getPartitionColumns()
TableMetadataProviderTableMetadataProvider.getPartitionColumns in interface TableMetadataProviderpublic List<PartitionMetadata> getPartitionsMetadata()
TableMetadataProviderPartitionMetadata instances which provides metadata for specific partitions and its columns.getPartitionsMetadata in interface TableMetadataProviderPartitionMetadata instancespublic List<PartitionMetadata> getPartitionMetadata(SchemaPath columnName)
TableMetadataProviderPartitionMetadata instances which corresponds to partitions for specified column
and provides metadata for specific partitions and its columns.getPartitionMetadata in interface TableMetadataProviderPartitionMetadata instances which corresponds to partitions for specified columnpublic Map<org.apache.hadoop.fs.Path,FileMetadata> getFilesMetadataMap()
TableMetadataProviderFileMetadata instances which provides metadata for specific file and its columns.getFilesMetadataMap in interface TableMetadataProviderFileMetadata instancespublic Map<org.apache.hadoop.fs.Path,SegmentMetadata> getSegmentsMetadataMap()
TableMetadataProviderSegmentMetadata instances which provides metadata for segment and its columns.getSegmentsMetadataMap in interface TableMetadataProviderSegmentMetadata instancespublic FileMetadata getFileMetadata(org.apache.hadoop.fs.Path location)
TableMetadataProviderFileMetadata instance which corresponds to metadata of file for specified location.getFileMetadata in interface TableMetadataProviderlocation - location of the fileFileMetadata instance which corresponds to metadata of file for specified locationpublic List<FileMetadata> getFilesForPartition(PartitionMetadata partition)
TableMetadataProviderFileMetadata instances which belongs to specified partitions.getFilesForPartition in interface TableMetadataProviderpartition - partition whichFileMetadata instances which belongs to specified partitionspublic NonInterestingColumnsMetadata getNonInterestingColumnsMetadata()
TableMetadataProviderNonInterestingColumnsMetadata instance which provides metadata for non-interesting columns.getNonInterestingColumnsMetadata in interface TableMetadataProviderNonInterestingColumnsMetadata instancepublic boolean checkMetadataVersion()
TableMetadataProvidercheckMetadataVersion in interface TableMetadataProviderCopyright © 2021 The Apache Software Foundation. All rights reserved.