public class CleanPlanner<T,I,K,O> extends Object implements Serializable
1) It provides sufficient time for existing queries running on older versions, to close
2) It bounds the growth of the files in the file system
| Modifier and Type | Field and Description |
|---|---|
static Integer |
CLEAN_PLAN_VERSION_1 |
static Integer |
CLEAN_PLAN_VERSION_2 |
static Integer |
LATEST_CLEAN_PLAN_VERSION |
| Constructor and Description |
|---|
CleanPlanner(HoodieEngineContext context,
HoodieTable<T,I,K,O> hoodieTable,
HoodieWriteConfig config) |
| Modifier and Type | Method and Description |
|---|---|
Pair<Boolean,List<CleanFileInfo>> |
getDeletePaths(String partitionPath,
Option<HoodieInstant> earliestCommitToRetain)
Returns files to be cleaned for the given partitionPath based on cleaning policy.
|
Option<HoodieInstant> |
getEarliestCommitToRetain()
Returns earliest commit to retain based on cleaning policy.
|
String |
getLastCompletedCommitTimestamp()
Returns the last completed commit timestamp before clean.
|
List<String> |
getPartitionPathsToClean(Option<HoodieInstant> earliestRetainedInstant)
Returns list of partitions where clean operations needs to be performed.
|
Stream<String> |
getSavepointedDataFiles(String savepointTime)
Get the list of data file names savepointed.
|
public static final Integer CLEAN_PLAN_VERSION_1
public static final Integer CLEAN_PLAN_VERSION_2
public static final Integer LATEST_CLEAN_PLAN_VERSION
public CleanPlanner(HoodieEngineContext context, HoodieTable<T,I,K,O> hoodieTable, HoodieWriteConfig config)
public Stream<String> getSavepointedDataFiles(String savepointTime)
public List<String> getPartitionPathsToClean(Option<HoodieInstant> earliestRetainedInstant) throws IOException
earliestRetainedInstant - New instant to be retained after this cleanup operationIOException - when underlying file-system throws this exceptionpublic Pair<Boolean,List<CleanFileInfo>> getDeletePaths(String partitionPath, Option<HoodieInstant> earliestCommitToRetain)
public Option<HoodieInstant> getEarliestCommitToRetain()
public String getLastCompletedCommitTimestamp()
Copyright © 2023 The Apache Software Foundation. All rights reserved.