Fix bug for schedule compaction manually
This commit is contained in:
@@ -226,17 +226,14 @@ public class HoodieFlinkCompactor {
|
|||||||
|
|
||||||
// checks the compaction plan and do compaction.
|
// checks the compaction plan and do compaction.
|
||||||
if (cfg.schedule) {
|
if (cfg.schedule) {
|
||||||
Option<String> compactionInstantTimeOption = CompactionUtil.getCompactionInstantTime(metaClient);
|
boolean scheduled = writeClient.scheduleCompaction(Option.empty()).isPresent();
|
||||||
if (compactionInstantTimeOption.isPresent()) {
|
if (!scheduled) {
|
||||||
boolean scheduled = writeClient.scheduleCompactionAtInstant(compactionInstantTimeOption.get(), Option.empty());
|
// do nothing.
|
||||||
if (!scheduled) {
|
LOG.info("No compaction plan for this job ");
|
||||||
// do nothing.
|
compactClosed("No compaction plan for this job ", null);
|
||||||
LOG.info("No compaction plan for this job ");
|
return;
|
||||||
compactClosed("No compaction plan for this job ", null);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
table.getMetaClient().reloadActiveTimeline();
|
|
||||||
}
|
}
|
||||||
|
table.getMetaClient().reloadActiveTimeline();
|
||||||
}
|
}
|
||||||
|
|
||||||
// fetch the instant based on the configured execution sequence
|
// fetch the instant based on the configured execution sequence
|
||||||
|
|||||||
Reference in New Issue
Block a user