phet commented on code in PR #3700:
URL: https://github.com/apache/gobblin/pull/3700#discussion_r1222130343
##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/scheduler/GobblinServiceJobScheduler.java:
##########
@@ -200,9 +206,9 @@ public
GobblinServiceJobScheduler(@Named(InjectionNames.SERVICE_NAME) String ser
public GobblinServiceJobScheduler(String serviceName, Config config,
FlowStatusGenerator flowStatusGenerator,
Optional<HelixManager> helixManager,
Optional<FlowCatalog> flowCatalog, Optional<TopologyCatalog>
topologyCatalog, Optional<DagManager> dagManager, Optional<UserQuotaManager>
quotaManager,
- SchedulerService schedulerService, Optional<Logger> log, boolean
warmStandbyEnabled) throws Exception {
+ SchedulerService schedulerService, Optional<Logger> log, boolean
warmStandbyEnabled, boolean multiActiveSchedulerEnabled,
SchedulerLeaseAlgoHandler schedulerLeaseAlgoHandler) throws Exception {
this(serviceName, config, helixManager, flowCatalog, topologyCatalog,
- new Orchestrator(config, flowStatusGenerator, topologyCatalog,
dagManager, log), schedulerService, quotaManager, log, warmStandbyEnabled);
+ new Orchestrator(config, flowStatusGenerator, topologyCatalog,
dagManager, log, multiActiveSchedulerEnabled, schedulerLeaseAlgoHandler),
schedulerService, quotaManager, log, warmStandbyEnabled,
multiActiveSchedulerEnabled, schedulerLeaseAlgoHandler);
Review Comment:
seeing this repeated over and over `(boolean, ScheduledLeaseAlgoHandler)`
make me wonder... would `Optional<ScheduledLeaseAlgoHandler>` be sufficient?
e.g. `Optional.absent()` stands in for when currently the `boolean` is
`false`? if `schedulerLeaseAlgoHandler` would be `null` in that case,
`Optional` would definitely be preferable for its type safety.
--
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]