[
https://issues.apache.org/jira/browse/GOBBLIN-2019?focusedWorklogId=912289&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-912289
]
ASF GitHub Bot logged work on GOBBLIN-2019:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 29/Mar/24 18:30
Start Date: 29/Mar/24 18:30
Worklog Time Spent: 10m
Work Description: umustafi commented on code in PR #3899:
URL: https://github.com/apache/gobblin/pull/3899#discussion_r1544756071
##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/core/GobblinServiceGuiceModule.java:
##########
@@ -202,21 +203,25 @@ public void configure(Binder binder) {
OptionalBinder.newOptionalBinder(binder, DagManagementStateStore.class);
OptionalBinder.newOptionalBinder(binder, DagProcFactory.class);
OptionalBinder.newOptionalBinder(binder, DagProcessingEngine.class);
+ OptionalBinder.newOptionalBinder(binder, DagActionReminderScheduler.class);
if (serviceConfig.isDagProcessingEngineEnabled()) {
- binder.bind(DagManagement.class).to(DagManagementTaskStreamImpl.class);
- binder.bind(DagTaskStream.class).to(DagManagementTaskStreamImpl.class);
-
binder.bind(DagManagementStateStore.class).to(MostlyMySqlDagManagementStateStore.class).in(Singleton.class);
- binder.bind(DagProcFactory.class);
- binder.bind(DagProcessingEngine.class);
-
+ /* Note that two instances of the same class can only be differentiated
with an `annotatedWith` marker provided at
+ binding time (optionally bound classes cannot have names associated with
them). Unlike, the scheduler lease arbiter,
+ the execution lease arbiter is used in single-active or multi-active
execution. */
+ binder.bind(MultiActiveLeaseArbiter.class).
+
annotatedWith(Names.named(ConfigurationKeys.PROCESSING_LEASE_ARBITER_NAME))
+ .toProvider(
+ DagActionProcessingMultiActiveLeaseArbiterFactory.class);
// Multi-active execution is only compatible with dagProcessingEngine
configuration
- OptionalBinder.newOptionalBinder(binder,
ReminderSettingDagProcLeaseArbiter.class);
- OptionalBinder.newOptionalBinder(binder,
DagActionReminderScheduler.class);
if (serviceConfig.isMultiActiveExecutionEnabled()) {
-
binder.bind(MultiActiveLeaseArbiter.class).annotatedWith(Names.named(EXECUTOR_LEASE_ARBITER_NAME)).to(MysqlMultiActiveLeaseArbiter.class);
binder.bind(DagActionReminderScheduler.class);
- binder.bind(ReminderSettingDagProcLeaseArbiter.class);
}
+
Review Comment:
Yes, I originally had it after but `DagManagementTaskStreamImpl` is
dependent on `DagActionReminderScheduler`
Issue Time Tracking
-------------------
Worklog Id: (was: 912289)
Remaining Estimate: 0h
Time Spent: 10m
> Remove Circular Dependency & Initialize multi-active execution classes
> ----------------------------------------------------------------------
>
> Key: GOBBLIN-2019
> URL: https://issues.apache.org/jira/browse/GOBBLIN-2019
> Project: Apache Gobblin
> Issue Type: Improvement
> Components: gobblin-service
> Reporter: Urmi Mustafi
> Assignee: Abhishek Tiwari
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> The following PR removes a circular dependency between
> {{dagManagementTaskStream & }}{{{}ReminderSettingDagProcLeaseArbiter{}}}{{{}.
> {}}}
> describing the circular dependency: {{dagManagementTaskStream}} uses
> {{ReminderSettingDagProcLeaseArbiter}} to obtain lease, if it fails to obtain
> lease then the {{ReminderSettingDagProcLeaseArbiter}} was setting reminder on
> {{DagActionReminderScheduler}} and when reminder fires add the action back to
> {{{}dagManagementTaskStream{}}}. To remove circular dependency, I remove the
> {{ReminderSettingDagProcLeaseArbiter}} and use the more generic
> {{InstrumentedLeaseArbiter}} that will only provide the status. Instead,
> {{dagManagementTaskStream}} will call {{DagActionReminderScheduler}} to set
> reminders and re-add to task stream
> other changes
> * refactor {{MySqlMultiActiveLeaseArbiter}} and it's initialization to
> specify table names through a prefix to differentiate btwn multiple instances
> * adds {{jobName}} to {{dagActionChangeEvent}}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)