public class FileSystemBackedTableMetadata extends Object implements HoodieTableMetadata
EMPTY_PARTITION_NAME, METADATA_TABLE_NAME_SUFFIX, NON_PARTITIONED_NAME, RECORDKEY_PARTITION_LIST, SOLO_COMMIT_TIMESTAMP| Constructor and Description |
|---|
FileSystemBackedTableMetadata(HoodieEngineContext engineContext,
SerializableConfiguration conf,
String datasetBasePath,
boolean assumeDatePartitioning) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
org.apache.hadoop.fs.FileStatus[] |
getAllFilesInPartition(org.apache.hadoop.fs.Path partitionPath)
Fetch all the files at the given partition path, per the latest snapshot of the metadata.
|
Map<String,org.apache.hadoop.fs.FileStatus[]> |
getAllFilesInPartitions(List<String> partitionPaths)
Fetch all files for given partition paths.
|
List<String> |
getAllPartitionPaths()
Fetch list of all partition paths, per the latest snapshot of the metadata.
|
Option<BloomFilter> |
getBloomFilter(String partitionName,
String fileName)
Get the bloom filter for the FileID from the metadata table.
|
Map<Pair<String,String>,BloomFilter> |
getBloomFilters(List<Pair<String,String>> partitionNameFileNameList)
Get bloom filters for files from the metadata table index.
|
Map<Pair<String,String>,HoodieMetadataColumnStats> |
getColumnStats(List<Pair<String,String>> partitionNameFileNameList,
String columnName)
Get column stats for files from the metadata table index.
|
Option<String> |
getLatestCompactionTime()
Returns the timestamp of the latest compaction.
|
HoodieData<HoodieRecord<HoodieMetadataPayload>> |
getRecordsByKeyPrefixes(List<String> keyPrefixes,
String partitionName,
boolean shouldLoadInMemory)
Fetch records by key prefixes.
|
Option<String> |
getSyncedInstantTime()
Get the instant time to which the metadata is synced w.r.t data timeline.
|
void |
reset()
Clear the states of the table metadata.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreate, create, createFSBackedTableMetadata, createHoodieBackedTableMetadata, getDatasetBasePath, getDataTableBasePathFromMetadataTable, getMetadataTableBasePath, isMetadataTablepublic FileSystemBackedTableMetadata(HoodieEngineContext engineContext, SerializableConfiguration conf, String datasetBasePath, boolean assumeDatePartitioning)
public org.apache.hadoop.fs.FileStatus[] getAllFilesInPartition(org.apache.hadoop.fs.Path partitionPath)
throws IOException
HoodieTableMetadatagetAllFilesInPartition in interface HoodieTableMetadataIOExceptionpublic List<String> getAllPartitionPaths() throws IOException
HoodieTableMetadatagetAllPartitionPaths in interface HoodieTableMetadataIOExceptionpublic Map<String,org.apache.hadoop.fs.FileStatus[]> getAllFilesInPartitions(List<String> partitionPaths) throws IOException
HoodieTableMetadatagetAllFilesInPartitions in interface HoodieTableMetadataIOExceptionpublic Option<String> getSyncedInstantTime()
HoodieTableMetadatagetSyncedInstantTime in interface HoodieTableMetadatapublic Option<String> getLatestCompactionTime()
HoodieTableMetadatagetLatestCompactionTime in interface HoodieTableMetadatapublic void close()
throws Exception
close in interface AutoCloseableExceptionpublic void reset()
HoodieTableMetadatareset in interface HoodieTableMetadatapublic Option<BloomFilter> getBloomFilter(String partitionName, String fileName) throws HoodieMetadataException
HoodieTableMetadatagetBloomFilter in interface HoodieTableMetadatapartitionName - - Partition namefileName - - File name for which bloom filter needs to be retrievedHoodieMetadataExceptionpublic Map<Pair<String,String>,BloomFilter> getBloomFilters(List<Pair<String,String>> partitionNameFileNameList) throws HoodieMetadataException
HoodieTableMetadatagetBloomFilters in interface HoodieTableMetadatapartitionNameFileNameList - - List of partition and file name pair for which bloom filters need to be retrievedHoodieMetadataExceptionpublic Map<Pair<String,String>,HoodieMetadataColumnStats> getColumnStats(List<Pair<String,String>> partitionNameFileNameList, String columnName) throws HoodieMetadataException
HoodieTableMetadatagetColumnStats in interface HoodieTableMetadatapartitionNameFileNameList - - List of partition and file name pair for which bloom filters need to be retrievedcolumnName - - Column name for which stats are neededHoodieMetadataExceptionpublic HoodieData<HoodieRecord<HoodieMetadataPayload>> getRecordsByKeyPrefixes(List<String> keyPrefixes, String partitionName, boolean shouldLoadInMemory)
HoodieTableMetadatagetRecordsByKeyPrefixes in interface HoodieTableMetadatakeyPrefixes - list of key prefixes for which interested records are looked up for.partitionName - partition name in metadata table where the records are looked up for.HoodieData of HoodieRecords with records matching the passed in key prefixes.Copyright © 2022 The Apache Software Foundation. All rights reserved.