[ https://issues.apache.org/jira/browse/GOBBLIN-2190?focusedWorklogId=955093&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-955093 ]
ASF GitHub Bot logged work on GOBBLIN-2190: ------------------------------------------- Author: ASF GitHub Bot Created on: 03/Feb/25 05:15 Start Date: 03/Feb/25 05:15 Worklog Time Spent: 10m Work Description: Blazer-007 commented on code in PR #4093: URL: https://github.com/apache/gobblin/pull/4093#discussion_r1938791672 ########## gobblin-temporal/src/main/java/org/apache/gobblin/temporal/ddm/workflow/impl/NestingExecOfProcessWorkUnitWorkflowImpl.java: ########## @@ -17,39 +17,26 @@ package org.apache.gobblin.temporal.ddm.workflow.impl; -import io.temporal.activity.ActivityOptions; -import io.temporal.common.RetryOptions; +import java.util.Properties; + import io.temporal.workflow.Async; import io.temporal.workflow.Promise; import io.temporal.workflow.Workflow; -import java.time.Duration; +import org.apache.gobblin.temporal.ddm.activity.ActivityType; import org.apache.gobblin.temporal.ddm.activity.ProcessWorkUnit; +import org.apache.gobblin.temporal.ddm.util.TemporalActivityUtils; import org.apache.gobblin.temporal.ddm.work.WorkUnitClaimCheck; import org.apache.gobblin.temporal.util.nesting.workflow.AbstractNestingExecWorkflowImpl; /** {@link org.apache.gobblin.temporal.util.nesting.workflow.NestingExecWorkflow} for {@link ProcessWorkUnit} */ public class NestingExecOfProcessWorkUnitWorkflowImpl extends AbstractNestingExecWorkflowImpl<WorkUnitClaimCheck, Integer> { - public static final Duration processWorkUnitStartToCloseTimeout = Duration.ofHours(3); // TODO: make configurable... also add activity heartbeats - - // RetryOptions specify how to automatically handle retries when Activities fail. - private static final RetryOptions ACTIVITY_RETRY_OPTS = RetryOptions.newBuilder() - .setInitialInterval(Duration.ofSeconds(3)) - .setMaximumInterval(Duration.ofSeconds(100)) - .setBackoffCoefficient(2) - .setMaximumAttempts(4) - .build(); - - private static final ActivityOptions ACTIVITY_OPTS = ActivityOptions.newBuilder() - .setStartToCloseTimeout(processWorkUnitStartToCloseTimeout) - .setRetryOptions(ACTIVITY_RETRY_OPTS) - .build(); - - private final ProcessWorkUnit activityStub = Workflow.newActivityStub(ProcessWorkUnit.class, ACTIVITY_OPTS); @Override - protected Promise<Integer> launchAsyncActivity(final WorkUnitClaimCheck wu) { - return Async.function(activityStub::processWorkUnit, wu); + protected Promise<Integer> launchAsyncActivity(final WorkUnitClaimCheck wu, final Properties props) { Review Comment: Unit tests for older temporal classes needs to be done separately as it will required dedicated effort for this which is beyond the scope of this PR Issue Time Tracking ------------------- Worklog Id: (was: 955093) Time Spent: 20m (was: 10m) > Implement ActivityTimeoutStrategy for all Temporal Activities > ------------------------------------------------------------- > > Key: GOBBLIN-2190 > URL: https://issues.apache.org/jira/browse/GOBBLIN-2190 > Project: Apache Gobblin > Issue Type: Improvement > Reporter: Vivek Rai > Priority: Major > Time Spent: 20m > Remaining Estimate: 0h > > Currently TImeouts of all Temporal Activity are hardcoded and cant change > during runtime, change those to make them configurable. -- This message was sent by Atlassian Jira (v8.20.10#820010)