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 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.
-
Method Details
-
getTableMetadata
TableMetadata getTableMetadata()ReturnsTableMetadata
instance which provides metadata for table and columns metadata.- Returns:
TableMetadata
instance
-
getPartitionColumns
List<SchemaPath> getPartitionColumns()Returns list of partition columns for table from thisTableMetadataProvider
.- Returns:
- list of partition columns
-
getPartitionsMetadata
List<PartitionMetadata> getPartitionsMetadata()Returns list ofPartitionMetadata
instances which provides metadata for specific partitions and its columns.- Returns:
- list of
PartitionMetadata
instances
-
getPartitionMetadata
Returns list ofPartitionMetadata
instances which corresponds to partitions for specified column and provides metadata for specific partitions and its columns.- Returns:
- list of
PartitionMetadata
instances which corresponds to partitions for specified column
-
getFilesMetadataMap
Map<org.apache.hadoop.fs.Path,FileMetadata> getFilesMetadataMap()Returns map ofFileMetadata
instances which provides metadata for specific file and its columns.- Returns:
- map of
FileMetadata
instances
-
getSegmentsMetadataMap
Map<org.apache.hadoop.fs.Path,SegmentMetadata> getSegmentsMetadataMap()Returns map ofSegmentMetadata
instances which provides metadata for segment and its columns.- Returns:
- map of
SegmentMetadata
instances
-
getFileMetadata
ReturnsFileMetadata
instance which corresponds to metadata of file for specified location.- Parameters:
location
- location of the file- Returns:
FileMetadata
instance which corresponds to metadata of file for specified location
-
getFilesForPartition
Returns list ofFileMetadata
instances which belongs to specified partitions.- Parameters:
partition
- partition which- Returns:
- list of
FileMetadata
instances which belongs to specified partitions
-
getNonInterestingColumnsMetadata
NonInterestingColumnsMetadata getNonInterestingColumnsMetadata()ReturnsNonInterestingColumnsMetadata
instance which provides metadata for non-interesting columns.- Returns:
NonInterestingColumnsMetadata
instance
-
checkMetadataVersion
boolean checkMetadataVersion()Whether metadata actuality should be checked.- Returns:
- true if metadata actuality should be checked
-