This is an automated email from the ASF dual-hosted git repository.
wlo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/gobblin.git
The following commit(s) were added to refs/heads/master by this push:
new 7dbf7b6a5 Enable scheduler for non-leader in multi-active scheduler
configuration (#3736)
7dbf7b6a5 is described below
commit 7dbf7b6a5fc9298332335eca6a9aaf76b39cf715
Author: umustafi <[email protected]>
AuthorDate: Fri Aug 11 10:30:42 2023 -0700
Enable scheduler for non-leader in multi-active scheduler configuration
(#3736)
Co-authored-by: Urmi Mustafi <[email protected]>
---
.../gobblin/service/modules/core/GobblinServiceManager.java | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git
a/gobblin-service/src/main/java/org/apache/gobblin/service/modules/core/GobblinServiceManager.java
b/gobblin-service/src/main/java/org/apache/gobblin/service/modules/core/GobblinServiceManager.java
index b8513f5a8..23ae03406 100644
---
a/gobblin-service/src/main/java/org/apache/gobblin/service/modules/core/GobblinServiceManager.java
+++
b/gobblin-service/src/main/java/org/apache/gobblin/service/modules/core/GobblinServiceManager.java
@@ -330,8 +330,9 @@ public class GobblinServiceManager implements
ApplicationLauncher, StandardMetri
LOGGER.info("Leader lost notification for {} HM.isLeader {}",
this.helixManager.get().getInstanceName(),
this.helixManager.get().isLeader());
- if (configuration.isSchedulerEnabled()) {
- LOGGER.info("Gobblin Service is now running in slave instance mode,
disabling Scheduler.");
+ if (configuration.isSchedulerEnabled() &&
!configuration.isMultiActiveSchedulerEnabled()) {
+ LOGGER.info("Gobblin Service is now running in non-leader mode
without multi-active scheduler enabled, "
+ + "disabling Scheduler.");
this.scheduler.setActive(false);
}
@@ -473,7 +474,12 @@ public class GobblinServiceManager implements
ApplicationLauncher, StandardMetri
} else {
if (configuration.isSchedulerEnabled()) {
- LOGGER.info("[Init] Gobblin Service is running in slave instance
mode, not enabling Scheduler.");
+ if (configuration.isMultiActiveSchedulerEnabled()) {
+ LOGGER.info("[Init] Gobblin Service enabling scheduler for
non-leader since multi-active scheduler enabled");
+ this.scheduler.setActive(true);
+ } else {
+ LOGGER.info("[Init] Gobblin Service is running in non-leader
instance mode, not enabling Scheduler.");
+ }
}
if (helixLeaderGauges.isPresent()) {
helixLeaderGauges.get().setState(LeaderState.SLAVE);