1
0

[HUDI-1744] rollback fails on mor table when the partition path hasn't any files (#2749)

Co-authored-by: lrz <lrz@lrzdeMacBook-Pro.local>
This commit is contained in:
li36909
2021-04-20 06:44:11 +08:00
committed by GitHub
parent d21753d903
commit 6b4b878d08
2 changed files with 19 additions and 0 deletions

View File

@@ -112,6 +112,9 @@ public class RollbackUtils {
String commit = instantToRollback.getTimestamp();
HoodieWriteConfig config = table.getConfig();
List<String> partitions = FSUtils.getAllPartitionPaths(context, config.getMetadataConfig(), table.getMetaClient().getBasePath());
if (partitions.isEmpty()) {
return new ArrayList<>();
}
int sparkPartitions = Math.max(Math.min(partitions.size(), config.getRollbackParallelism()), 1);
context.setJobStatus(RollbackUtils.class.getSimpleName(), "Generate all rollback requests");
return context.flatMap(partitions, partitionPath -> {