public abstract class BaseTableMetadata extends Object implements HoodieTableMetadata
| Modifier and Type | Field and Description |
|---|---|
static int |
BUFFER_SIZE |
protected SerializablePath |
dataBasePath |
protected HoodieTableMetaClient |
dataMetaClient |
protected HoodieEngineContext |
engineContext |
protected SerializableConfiguration |
hadoopConf |
protected boolean |
isBloomFilterIndexEnabled |
protected boolean |
isColumnStatsIndexEnabled |
protected boolean |
isMetadataTableEnabled |
static long |
MAX_MEMORY_SIZE_IN_BYTES |
protected HoodieMetadataConfig |
metadataConfig |
protected Option<HoodieMetadataMetrics> |
metrics |
protected String |
spillableMapDirectory |
EMPTY_PARTITION_NAME, METADATA_TABLE_NAME_SUFFIX, NON_PARTITIONED_NAME, RECORDKEY_PARTITION_LIST, SOLO_COMMIT_TIMESTAMP| Modifier | Constructor and Description |
|---|---|
protected |
BaseTableMetadata(HoodieEngineContext engineContext,
HoodieMetadataConfig metadataConfig,
String dataBasePath,
String spillableMapDirectory) |
| Modifier and Type | Method and Description |
|---|---|
protected List<String> |
fetchAllPartitionPaths()
Returns a list of all partitions.
|
org.apache.hadoop.fs.FileStatus[] |
getAllFilesInPartition(org.apache.hadoop.fs.Path partitionPath)
Return the list of files in a partition.
|
Map<String,org.apache.hadoop.fs.FileStatus[]> |
getAllFilesInPartitions(List<String> partitions)
Fetch all files for given partition paths.
|
List<String> |
getAllPartitionPaths()
Return the list of partitions in the dataset.
|
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.
|
protected HoodieEngineContext |
getEngineContext() |
protected String |
getLatestDataInstantTime() |
HoodieMetadataConfig |
getMetadataConfig() |
protected abstract Option<HoodieRecord<HoodieMetadataPayload>> |
getRecordByKey(String key,
String partitionName) |
abstract List<Pair<String,Option<HoodieRecord<HoodieMetadataPayload>>>> |
getRecordsByKeys(List<String> key,
String partitionName) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreate, create, createFSBackedTableMetadata, createHoodieBackedTableMetadata, getDatasetBasePath, getDataTableBasePathFromMetadataTable, getLatestCompactionTime, getMetadataTableBasePath, getRecordsByKeyPrefixes, getSyncedInstantTime, isMetadataTable, resetclosepublic static final long MAX_MEMORY_SIZE_IN_BYTES
public static final int BUFFER_SIZE
protected final transient HoodieEngineContext engineContext
protected final SerializableConfiguration hadoopConf
protected final SerializablePath dataBasePath
protected final HoodieTableMetaClient dataMetaClient
protected final Option<HoodieMetadataMetrics> metrics
protected final HoodieMetadataConfig metadataConfig
protected final String spillableMapDirectory
protected boolean isMetadataTableEnabled
protected boolean isBloomFilterIndexEnabled
protected boolean isColumnStatsIndexEnabled
protected BaseTableMetadata(HoodieEngineContext engineContext, HoodieMetadataConfig metadataConfig, String dataBasePath, String spillableMapDirectory)
public List<String> getAllPartitionPaths() throws IOException
If the Metadata Table is enabled, the listing is retrieved from the stored metadata. Otherwise, the list of
partitions is retrieved directly from the underlying FileSystem.
On any errors retrieving the listing from the metadata, defaults to using the file system listings.
getAllPartitionPaths in interface HoodieTableMetadataIOExceptionpublic org.apache.hadoop.fs.FileStatus[] getAllFilesInPartition(org.apache.hadoop.fs.Path partitionPath)
throws IOException
If the Metadata Table is enabled, the listing is retrieved from the stored metadata. Otherwise, the list of
partitions is retrieved directly from the underlying FileSystem.
On any errors retrieving the listing from the metadata, defaults to using the file system listings.
getAllFilesInPartition in interface HoodieTableMetadatapartitionPath - The absolute path of the partition to listIOExceptionpublic Map<String,org.apache.hadoop.fs.FileStatus[]> getAllFilesInPartitions(List<String> partitions) throws IOException
HoodieTableMetadatagetAllFilesInPartitions in interface HoodieTableMetadataIOExceptionpublic 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 neededHoodieMetadataExceptionprotected List<String> fetchAllPartitionPaths()
protected abstract Option<HoodieRecord<HoodieMetadataPayload>> getRecordByKey(String key, String partitionName)
public abstract List<Pair<String,Option<HoodieRecord<HoodieMetadataPayload>>>> getRecordsByKeys(List<String> key, String partitionName)
protected HoodieEngineContext getEngineContext()
public HoodieMetadataConfig getMetadataConfig()
protected String getLatestDataInstantTime()
Copyright © 2022 The Apache Software Foundation. All rights reserved.