danny0405 commented on code in PR #6566:
URL: https://github.com/apache/hudi/pull/6566#discussion_r962089276
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/compact/HoodieFlinkCompactor.java:
##########
@@ -259,26 +271,31 @@ private void compact() throws Exception {
if (compactionPlans.isEmpty()) {
// No compaction plan, do nothing and return.
LOG.info("No compaction plan for instant " + String.join(",",
compactionInstantTimes));
+ executeDummyPipeline();
return;
}
- List<HoodieInstant> instants =
compactionInstantTimes.stream().map(HoodieTimeline::getCompactionRequestedInstant).collect(Collectors.toList());
+ List<HoodieInstant> instants = compactionInstantTimes.stream()
+
.map(HoodieTimeline::getCompactionRequestedInstant).collect(Collectors.toList());
for (HoodieInstant instant : instants) {
if (!pendingCompactionTimeline.containsInstant(instant)) {
// this means that the compaction plan was written to auxiliary
path(.tmp)
// but not the meta path(.hoodie), this usually happens when the job
crush
// exceptionally.
// clean the compaction plan in auxiliary path and cancels the
compaction.
- LOG.warn("The compaction plan was fetched through the auxiliary
path(.tmp) but not the meta path(.hoodie).\n"
- + "Clean the compaction plan in auxiliary path and cancels the
compaction");
+ LOG.warn(
+ "The compaction plan was fetched through the auxiliary
path(.tmp) but not the meta path(.hoodie).\n"
+ + "Clean the compaction plan in auxiliary path and cancels
the compaction");
CompactionUtil.cleanInstant(table.getMetaClient(), instant);
Review Comment:
Revert all the unnecessary change.
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/compact/HoodieFlinkCompactor.java:
##########
@@ -259,26 +271,31 @@ private void compact() throws Exception {
if (compactionPlans.isEmpty()) {
// No compaction plan, do nothing and return.
LOG.info("No compaction plan for instant " + String.join(",",
compactionInstantTimes));
+ executeDummyPipeline();
return;
}
- List<HoodieInstant> instants =
compactionInstantTimes.stream().map(HoodieTimeline::getCompactionRequestedInstant).collect(Collectors.toList());
+ List<HoodieInstant> instants = compactionInstantTimes.stream()
+
.map(HoodieTimeline::getCompactionRequestedInstant).collect(Collectors.toList());
for (HoodieInstant instant : instants) {
if (!pendingCompactionTimeline.containsInstant(instant)) {
// this means that the compaction plan was written to auxiliary
path(.tmp)
// but not the meta path(.hoodie), this usually happens when the job
crush
// exceptionally.
// clean the compaction plan in auxiliary path and cancels the
compaction.
- LOG.warn("The compaction plan was fetched through the auxiliary
path(.tmp) but not the meta path(.hoodie).\n"
- + "Clean the compaction plan in auxiliary path and cancels the
compaction");
+ LOG.warn(
+ "The compaction plan was fetched through the auxiliary
path(.tmp) but not the meta path(.hoodie).\n"
+ + "Clean the compaction plan in auxiliary path and cancels
the compaction");
CompactionUtil.cleanInstant(table.getMetaClient(), instant);
+ executeDummyPipeline();
return;
}
}
// get compactionParallelism.
int compactionParallelism =
conf.getInteger(FlinkOptions.COMPACTION_TASKS) == -1
- ? Math.toIntExact(compactionPlans.stream().mapToLong(pair ->
pair.getRight().getOperations().size()).sum())
+ ? Math.toIntExact(
+ compactionPlans.stream().mapToLong(pair ->
pair.getRight().getOperations().size()).sum())
Review Comment:
Revert all the unnecessary change.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]