public abstract class BaseHoodieTableFileIndex extends Object implements AutoCloseable
| Modifier and Type | Class and Description |
|---|---|
protected static interface |
BaseHoodieTableFileIndex.FileStatusCache |
static class |
BaseHoodieTableFileIndex.PartitionPath |
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.hadoop.fs.Path |
basePath |
protected Map<BaseHoodieTableFileIndex.PartitionPath,List<FileSlice>> |
cachedAllInputFileSlices |
protected long |
cachedFileSize |
protected HoodieMetadataConfig |
metadataConfig |
protected boolean |
queryAsNonePartitionedTable |
protected List<org.apache.hadoop.fs.Path> |
queryPaths |
| Constructor and Description |
|---|
BaseHoodieTableFileIndex(HoodieEngineContext engineContext,
HoodieTableMetaClient metaClient,
TypedProperties configProperties,
HoodieTableQueryType queryType,
List<org.apache.hadoop.fs.Path> queryPaths,
Option<String> specifiedQueryInstant,
boolean shouldIncludePendingCommits,
boolean shouldValidateInstant,
BaseHoodieTableFileIndex.FileStatusCache fileStatusCache) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected HoodieTimeline |
getActiveTimeline() |
protected List<BaseHoodieTableFileIndex.PartitionPath> |
getAllQueryPartitionPaths() |
String |
getBasePath()
Returns table's base-path
|
int |
getFileSlicesCount() |
Option<HoodieInstant> |
getLatestCompletedInstant()
Returns latest completed instant as seen by this instance of the file-index
|
Map<String,List<FileSlice>> |
listFileSlices()
Fetch list of latest base files and log files per partition.
|
protected abstract Object[] |
parsePartitionColumnValues(String[] partitionColumns,
String partitionPath) |
protected void |
refresh() |
protected final HoodieMetadataConfig metadataConfig
protected final List<org.apache.hadoop.fs.Path> queryPaths
protected final org.apache.hadoop.fs.Path basePath
protected transient volatile long cachedFileSize
protected transient volatile Map<BaseHoodieTableFileIndex.PartitionPath,List<FileSlice>> cachedAllInputFileSlices
protected volatile boolean queryAsNonePartitionedTable
public BaseHoodieTableFileIndex(HoodieEngineContext engineContext, HoodieTableMetaClient metaClient, TypedProperties configProperties, HoodieTableQueryType queryType, List<org.apache.hadoop.fs.Path> queryPaths, Option<String> specifiedQueryInstant, boolean shouldIncludePendingCommits, boolean shouldValidateInstant, BaseHoodieTableFileIndex.FileStatusCache fileStatusCache)
engineContext - Hudi engine-specific contextmetaClient - Hudi table's meta-clientconfigProperties - unifying configuration (in the form of generic properties)queryType - target query typequeryPaths - target DFS paths being queriedspecifiedQueryInstant - instant as of which table is being queriedshouldIncludePendingCommits - flags whether file-index should exclude any pending operationsshouldValidateInstant - flags to validate whether query instant is present in the timelinefileStatusCache - transient cache of fetched [[FileStatus]]esprotected abstract Object[] parsePartitionColumnValues(String[] partitionColumns, String partitionPath)
public Option<HoodieInstant> getLatestCompletedInstant()
public String getBasePath()
public Map<String,List<FileSlice>> listFileSlices()
public int getFileSlicesCount()
public void close()
throws Exception
close in interface AutoCloseableExceptionprotected List<BaseHoodieTableFileIndex.PartitionPath> getAllQueryPartitionPaths()
protected void refresh()
protected HoodieTimeline getActiveTimeline()
Copyright © 2022 The Apache Software Foundation. All rights reserved.