Interface TableMetadataProvider
- All Known Subinterfaces:
ParquetMetadataProvider,ParquetTableMetadataProvider
- All Known Implementing Classes:
BaseParquetMetadataProvider,DeltaParquetTableMetadataProvider,HiveParquetTableMetadataProvider,MetastoreFileTableMetadataProvider,MetastoreParquetTableMetadataProvider,ParquetTableMetadataProviderImpl,SimpleFileTableMetadataProvider
public interface TableMetadataProvider
Base interface for providing table, partition, file etc. metadata for specific table.
getPartitionsMetadata(), getFilesMetadata() and other methods which return collections return
empty collection instead of null for the case when required metadata level is not available,
or cannot re obtained using current
TableMetadataProvider instance.-
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether metadata actuality should be checked.getFileMetadata(org.apache.hadoop.fs.Path location) ReturnsFileMetadatainstance which corresponds to metadata of file for specified location.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.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.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.
-
Method Details
-
getTableMetadata
TableMetadata getTableMetadata()ReturnsTableMetadatainstance which provides metadata for table and columns metadata.- Returns:
TableMetadatainstance
-
getPartitionColumns
List<SchemaPath> getPartitionColumns()Returns list of partition columns for table from thisTableMetadataProvider.- Returns:
- list of partition columns
-
getPartitionsMetadata
List<PartitionMetadata> getPartitionsMetadata()Returns list ofPartitionMetadatainstances which provides metadata for specific partitions and its columns.- Returns:
- list of
PartitionMetadatainstances
-
getPartitionMetadata
Returns list ofPartitionMetadatainstances which corresponds to partitions for specified column and provides metadata for specific partitions and its columns.- Returns:
- list of
PartitionMetadatainstances which corresponds to partitions for specified column
-
getFilesMetadataMap
Map<org.apache.hadoop.fs.Path,FileMetadata> getFilesMetadataMap()Returns map ofFileMetadatainstances which provides metadata for specific file and its columns.- Returns:
- map of
FileMetadatainstances
-
getSegmentsMetadataMap
Map<org.apache.hadoop.fs.Path,SegmentMetadata> getSegmentsMetadataMap()Returns map ofSegmentMetadatainstances which provides metadata for segment and its columns.- Returns:
- map of
SegmentMetadatainstances
-
getFileMetadata
ReturnsFileMetadatainstance which corresponds to metadata of file for specified location.- Parameters:
location- location of the file- Returns:
FileMetadatainstance which corresponds to metadata of file for specified location
-
getFilesForPartition
Returns list ofFileMetadatainstances which belongs to specified partitions.- Parameters:
partition- partition which- Returns:
- list of
FileMetadatainstances which belongs to specified partitions
-
getNonInterestingColumnsMetadata
NonInterestingColumnsMetadata getNonInterestingColumnsMetadata()ReturnsNonInterestingColumnsMetadatainstance which provides metadata for non-interesting columns.- Returns:
NonInterestingColumnsMetadatainstance
-
checkMetadataVersion
boolean checkMetadataVersion()Whether metadata actuality should be checked.- Returns:
- true if metadata actuality should be checked
-