[HUDI-3799] Fixing not deleting empty instants w/o archiving (#5261)
This commit is contained in:
committed by
GitHub
parent
3d8fc78c66
commit
f91e9e63e1
@@ -248,6 +248,10 @@ public class FileCreateUtils {
|
||||
createMetaFile(basePath, instantTime, HoodieTimeline.REQUESTED_ROLLBACK_EXTENSION, content);
|
||||
}
|
||||
|
||||
public static void createRequestedRollbackFile(String basePath, String instantTime) throws IOException {
|
||||
createMetaFile(basePath, instantTime, HoodieTimeline.REQUESTED_ROLLBACK_EXTENSION);
|
||||
}
|
||||
|
||||
public static void createInflightRollbackFile(String basePath, String instantTime) throws IOException {
|
||||
createMetaFile(basePath, instantTime, HoodieTimeline.INFLIGHT_ROLLBACK_EXTENSION);
|
||||
}
|
||||
|
||||
@@ -282,13 +282,13 @@ public class HoodieTestTable {
|
||||
}
|
||||
|
||||
public HoodieTestTable addClean(String instantTime, HoodieCleanerPlan cleanerPlan, HoodieCleanMetadata metadata) throws IOException {
|
||||
return addClean(instantTime, cleanerPlan, metadata, false);
|
||||
return addClean(instantTime, cleanerPlan, metadata, false, false);
|
||||
}
|
||||
|
||||
public HoodieTestTable addClean(String instantTime, HoodieCleanerPlan cleanerPlan, HoodieCleanMetadata metadata, boolean isEmpty) throws IOException {
|
||||
createRequestedCleanFile(basePath, instantTime, cleanerPlan, isEmpty);
|
||||
createInflightCleanFile(basePath, instantTime, cleanerPlan, isEmpty);
|
||||
createCleanFile(basePath, instantTime, metadata, isEmpty);
|
||||
public HoodieTestTable addClean(String instantTime, HoodieCleanerPlan cleanerPlan, HoodieCleanMetadata metadata, boolean isEmptyForAll, boolean isEmptyCompleted) throws IOException {
|
||||
createRequestedCleanFile(basePath, instantTime, cleanerPlan, isEmptyForAll);
|
||||
createInflightCleanFile(basePath, instantTime, cleanerPlan, isEmptyForAll);
|
||||
createCleanFile(basePath, instantTime, metadata, isEmptyCompleted);
|
||||
currentInstantTime = instantTime;
|
||||
return this;
|
||||
}
|
||||
@@ -335,6 +335,7 @@ public class HoodieTestTable {
|
||||
}
|
||||
|
||||
public HoodieTestTable addRollback(String instantTime, HoodieRollbackMetadata rollbackMetadata, boolean isEmpty) throws IOException {
|
||||
createRequestedRollbackFile(basePath, instantTime);
|
||||
createInflightRollbackFile(basePath, instantTime);
|
||||
createRollbackFile(basePath, instantTime, rollbackMetadata, isEmpty);
|
||||
currentInstantTime = instantTime;
|
||||
|
||||
Reference in New Issue
Block a user