1
0

[HUDI-3346] Fixing non existant marker dir handling in TwoToOnedowngrade (#4726)

This commit is contained in:
Sivabalan Narayanan
2022-02-01 08:21:55 -05:00
committed by GitHub
parent 7ce0f4522b
commit f140c58d9e

View File

@@ -115,11 +115,13 @@ public class TwoToOneDowngradeHandler implements DowngradeHandler {
+ "\" is not supported for rollback."); + "\" is not supported for rollback.");
} }
} else { } else {
if (fileSystem.exists(new Path(markerDir))) {
// In case of partial failures during downgrade, there is a chance that marker type file was deleted, // In case of partial failures during downgrade, there is a chance that marker type file was deleted,
// but timeline server based marker files are left. So deletes them if any // but timeline server based marker files are left. So deletes them if any
deleteTimelineBasedMarkerFiles(context, markerDir, fileSystem, parallelism); deleteTimelineBasedMarkerFiles(context, markerDir, fileSystem, parallelism);
} }
} }
}
private void deleteTimelineBasedMarkerFiles(HoodieEngineContext context, String markerDir, private void deleteTimelineBasedMarkerFiles(HoodieEngineContext context, String markerDir,
FileSystem fileSystem, int parallelism) throws IOException { FileSystem fileSystem, int parallelism) throws IOException {