Fix bug for schedule compaction manually
This commit is contained in:
@@ -226,9 +226,7 @@ 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()) {
|
|
||||||
boolean scheduled = writeClient.scheduleCompactionAtInstant(compactionInstantTimeOption.get(), Option.empty());
|
|
||||||
if (!scheduled) {
|
if (!scheduled) {
|
||||||
// do nothing.
|
// do nothing.
|
||||||
LOG.info("No compaction plan for this job ");
|
LOG.info("No compaction plan for this job ");
|
||||||
@@ -237,7 +235,6 @@ public class HoodieFlinkCompactor {
|
|||||||
}
|
}
|
||||||
table.getMetaClient().reloadActiveTimeline();
|
table.getMetaClient().reloadActiveTimeline();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// fetch the instant based on the configured execution sequence
|
// fetch the instant based on the configured execution sequence
|
||||||
HoodieTimeline pendingCompactionTimeline = table.getActiveTimeline().filterPendingCompactionTimeline();
|
HoodieTimeline pendingCompactionTimeline = table.getActiveTimeline().filterPendingCompactionTimeline();
|
||||||
|
|||||||
Reference in New Issue
Block a user