phet commented on code in PR #3899:
URL: https://github.com/apache/gobblin/pull/3899#discussion_r1538720406
##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/DagManagementTaskStreamImpl.java:
##########
@@ -108,6 +137,36 @@ public DagTask next() {
return null;
}
+ /**
+ * Returns a {@link
org.apache.gobblin.runtime.api.MultiActiveLeaseArbiter.LeaseAttemptStatus}
associated with the
+ * `dagAction`. If in multi-active execution mode, it retrieves the status
from calling
+ * {@link MultiActiveLeaseArbiter#tryAcquireLease(DagActionStore.DagAction,
long, boolean, boolean)}, otherwise
+ * it returns a {@link
org.apache.gobblin.runtime.api.MultiActiveLeaseArbiter.LeaseObtainedStatus}
that will not
+ * expire for a very long time to the current instance.
+ * @param dagAction
+ * @return
+ * @throws IOException
+ * @throws SchedulerException
+ */
+ private MultiActiveLeaseArbiter.LeaseAttemptStatus
retrieveLeaseStatus(DagActionStore.DagAction dagAction)
+ throws IOException, SchedulerException {
+ MultiActiveLeaseArbiter.LeaseAttemptStatus leaseAttemptStatus;
+ if (!this.isMultiActiveExecutionEnabled) {
+ leaseAttemptStatus = new
MultiActiveLeaseArbiter.LeaseObtainedStatus(dagAction,
System.currentTimeMillis(), Long.MAX_VALUE, null);
+ } else {
Review Comment:
why the complexity of the either-or as opposed to just initializing the ctor
w/ a MALA "stub" form always returns a `LeaseObtainedStatus`. (and use in
conjunction w/ an absent `DagActionReminderScheduler`)
--
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]