public interface HoodieTableMetadata extends Serializable, AutoCloseable
| Modifier and Type | Field and Description |
|---|---|
static String |
EMPTY_PARTITION_NAME |
static String |
METADATA_TABLE_NAME_SUFFIX |
static String |
NON_PARTITIONED_NAME |
static String |
RECORDKEY_PARTITION_LIST |
static String |
SOLO_COMMIT_TIMESTAMP
Timestamp for a commit when the base dataset had not had any commits yet.
|
| Modifier and Type | Method and Description |
|---|---|
static HoodieTableMetadata |
create(HoodieEngineContext engineContext,
HoodieMetadataConfig metadataConfig,
String datasetBasePath,
String spillableMapPath) |
static HoodieTableMetadata |
create(HoodieEngineContext engineContext,
HoodieMetadataConfig metadataConfig,
String datasetBasePath,
String spillableMapPath,
boolean reuse) |
static FileSystemBackedTableMetadata |
createFSBackedTableMetadata(HoodieEngineContext engineContext,
HoodieMetadataConfig metadataConfig,
String datasetBasePath) |
static HoodieBackedTableMetadata |
createHoodieBackedTableMetadata(HoodieEngineContext engineContext,
HoodieMetadataConfig metadataConfig,
String datasetBasePath,
String spillableMapPath,
boolean reuse) |
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.
|
static String |
getDatasetBasePath(String metadataTableBasePath)
Return the base path of the dataset.
|
static String |
getDataTableBasePathFromMetadataTable(String metadataTableBasePath)
Returns the base path of the Dataset provided the base-path of the Metadata Table of this
Dataset
|
Option<String> |
getLatestCompactionTime()
Returns the timestamp of the latest compaction.
|
static String |
getMetadataTableBasePath(String dataTableBasePath)
Return the base-path of the Metadata Table for the given Dataset identified by base-path
|
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.
|
static boolean |
isMetadataTable(String basePath)
Returns
True if the given path contains a metadata table. |
void |
reset()
Clear the states of the table metadata.
|
closestatic final String METADATA_TABLE_NAME_SUFFIX
static final String SOLO_COMMIT_TIMESTAMP
HoodieTimeline.INIT_INSTANT_TS, such that the metadata table
can be prepped even before bootstrap is done.static final String RECORDKEY_PARTITION_LIST
static final String NON_PARTITIONED_NAME
static final String EMPTY_PARTITION_NAME
static String getMetadataTableBasePath(String dataTableBasePath)
static String getDataTableBasePathFromMetadataTable(String metadataTableBasePath)
static String getDatasetBasePath(String metadataTableBasePath)
metadataTableBasePath - The base path of the metadata tablestatic boolean isMetadataTable(String basePath)
True if the given path contains a metadata table.basePath - The base path to checkstatic HoodieTableMetadata create(HoodieEngineContext engineContext, HoodieMetadataConfig metadataConfig, String datasetBasePath, String spillableMapPath)
static HoodieTableMetadata create(HoodieEngineContext engineContext, HoodieMetadataConfig metadataConfig, String datasetBasePath, String spillableMapPath, boolean reuse)
static FileSystemBackedTableMetadata createFSBackedTableMetadata(HoodieEngineContext engineContext, HoodieMetadataConfig metadataConfig, String datasetBasePath)
static HoodieBackedTableMetadata createHoodieBackedTableMetadata(HoodieEngineContext engineContext, HoodieMetadataConfig metadataConfig, String datasetBasePath, String spillableMapPath, boolean reuse)
org.apache.hadoop.fs.FileStatus[] getAllFilesInPartition(org.apache.hadoop.fs.Path partitionPath)
throws IOException
IOExceptionList<String> getAllPartitionPaths() throws IOException
IOExceptionMap<String,org.apache.hadoop.fs.FileStatus[]> getAllFilesInPartitions(List<String> partitionPaths) throws IOException
IOExceptionOption<BloomFilter> getBloomFilter(String partitionName, String fileName) throws HoodieMetadataException
partitionName - - Partition namefileName - - File name for which bloom filter needs to be retrievedHoodieMetadataExceptionMap<Pair<String,String>,BloomFilter> getBloomFilters(List<Pair<String,String>> partitionNameFileNameList) throws HoodieMetadataException
partitionNameFileNameList - - List of partition and file name pair for which bloom filters need to be retrievedHoodieMetadataExceptionMap<Pair<String,String>,HoodieMetadataColumnStats> getColumnStats(List<Pair<String,String>> partitionNameFileNameList, String columnName) throws HoodieMetadataException
partitionNameFileNameList - - List of partition and file name pair for which bloom filters need to be retrievedcolumnName - - Column name for which stats are neededHoodieMetadataExceptionHoodieData<HoodieRecord<HoodieMetadataPayload>> getRecordsByKeyPrefixes(List<String> keyPrefixes, String partitionName, boolean shouldLoadInMemory)
keyPrefixes - 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.Option<String> getSyncedInstantTime()
Option<String> getLatestCompactionTime()
void reset()
Copyright © 2022 The Apache Software Foundation. All rights reserved.