[ 
https://issues.apache.org/jira/browse/GOBBLIN-1989?focusedWorklogId=902679&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-902679
 ]

ASF GitHub Bot logged work on GOBBLIN-1989:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 30/Jan/24 15:27
            Start Date: 30/Jan/24 15:27
    Worklog Time Spent: 10m 
      Work Description: homatthew commented on code in PR #3843:
URL: https://github.com/apache/gobblin/pull/3843#discussion_r1471440976


##########
gobblin-temporal/src/main/java/org/apache/gobblin/temporal/ddm/workflow/impl/ProcessWorkUnitsWorkflowImpl.java:
##########
@@ -56,45 +55,42 @@
 import org.apache.gobblin.temporal.util.nesting.work.Workload;
 import org.apache.gobblin.temporal.util.nesting.workflow.NestingExecWorkflow;
 import org.apache.gobblin.temporal.workflows.metrics.EventTimer;
-import org.apache.gobblin.temporal.workflows.metrics.SubmitGTEActivity;
 import org.apache.gobblin.temporal.workflows.metrics.TemporalEventTimer;
-import org.apache.gobblin.temporal.workflows.metrics.TrackingEventMetadata;
+import org.apache.gobblin.temporal.workflows.metrics.EventSubmitterContext;
 
 
 @Slf4j
 public class ProcessWorkUnitsWorkflowImpl implements ProcessWorkUnitsWorkflow {
   public static final String CHILD_WORKFLOW_ID_BASE = "NestingExecWorkUnits";
   public static final String COMMIT_STEP_WORKFLOW_ID_BASE = 
"CommitStepWorkflow";
-  private final ActivityOptions options = ActivityOptions.newBuilder()
-      .setStartToCloseTimeout(Duration.ofSeconds(60))
-      .build();
-  private final SubmitGTEActivity submitGTEActivity = Workflow.newActivityStub(
-      SubmitGTEActivity.class, options);
-
-  private static final int MAX_DESERIALIZATION_FS_LOAD_ATTEMPTS = 5;
 
   @Override
   public int process(WUProcessingSpec workSpec) {
-    // NOTE: We are using the metrics tags from Job Props to create the metric 
context for the timer and NOT
-    // the deserialized jobState from HDFS that is created by the real distcp 
job. This is because the AZ runtime
-    // settings we want are for the job launcher that launched this Yarn job.
-
     try {
-      FileSystem fs = Help.loadFileSystemForce(workSpec);
-      JobState jobState = Help.loadJobStateUncached(workSpec, fs);
-      List<Tag<?>> tagsFromCurrentJob = workSpec.getTags();
-      String metricsSuffix = workSpec.getMetricsSuffix();
-      List<Tag<?>> tags = getTags(tagsFromCurrentJob, metricsSuffix, jobState);
-
-      TemporalEventTimer.Factory timerFactory = new 
TemporalEventTimer.Factory(submitGTEActivity, new TrackingEventMetadata(tags, 
JobMetrics.NAMESPACE));
-      try (EventTimer timer = timerFactory.getJobTimer()) {
+      EventSubmitterContext eventSubmitterContext = 
getEventSubmitterContext(workSpec);
+      TemporalEventTimer.Factory timerFactory = new 
TemporalEventTimer.Factory(eventSubmitterContext);
+      try (EventTimer timer = timerFactory.createJobTimer()) {

Review Comment:
   Adding to the `EventTImer` interface





Issue Time Tracking
-------------------

    Worklog Id:     (was: 902679)
    Time Spent: 2h  (was: 1h 50m)

> TemporaI: Implementation of GTE for GaaS Observability Event in MR 
> deprecation for distcp
> -----------------------------------------------------------------------------------------
>
>                 Key: GOBBLIN-1989
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-1989
>             Project: Apache Gobblin
>          Issue Type: Improvement
>            Reporter: Matthew Ho
>            Priority: Major
>          Time Spent: 2h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to