[ https://issues.apache.org/jira/browse/GOBBLIN-2190?focusedWorklogId=955100&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-955100 ]
ASF GitHub Bot logged work on GOBBLIN-2190: ------------------------------------------- Author: ASF GitHub Bot Created on: 03/Feb/25 06:15 Start Date: 03/Feb/25 06:15 Worklog Time Spent: 10m Work Description: vsinghal85 commented on code in PR #4093: URL: https://github.com/apache/gobblin/pull/4093#discussion_r1938829892 ########## 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) { + final ProcessWorkUnit processWorkUnitStub = Workflow.newActivityStub(ProcessWorkUnit.class, TemporalActivityUtils.buildActivityOptions( + ActivityType.PROCESS_WORKUNIT, props)); + return Async.function(processWorkUnitStub::processWorkUnit, wu); Review Comment: Since inside the function appropriate logging is added anyway we can skip this Issue Time Tracking ------------------- Worklog Id: (was: 955100) Time Spent: 1h 20m (was: 1h 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: 1h 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)