From 729352a9bef757a23d10ee8d97464164d91a91bd Mon Sep 17 00:00:00 2001 From: William Lo Date: Tue, 2 May 2023 18:57:46 -0400 Subject: [PATCH 1/2] Fixes bug where the wrong workunit event was being tracked for keeping track of work discovery time --- .../gobblin/service/monitoring/KafkaAvroJobStatusMonitor.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gobblin-service/src/main/java/org/apache/gobblin/service/monitoring/KafkaAvroJobStatusMonitor.java b/gobblin-service/src/main/java/org/apache/gobblin/service/monitoring/KafkaAvroJobStatusMonitor.java index 56f37c29301..c152970cb1a 100644 --- a/gobblin-service/src/main/java/org/apache/gobblin/service/monitoring/KafkaAvroJobStatusMonitor.java +++ b/gobblin-service/src/main/java/org/apache/gobblin/service/monitoring/KafkaAvroJobStatusMonitor.java @@ -127,13 +127,14 @@ public org.apache.gobblin.configuration.State parseJobStatus(GobblinTrackingEven case TimingEvent.FlowTimings.FLOW_COMPILED: properties.put(JobStatusRetriever.EVENT_NAME_FIELD, ExecutionStatus.COMPILED.name()); break; - case TimingEvent.LauncherTimings.WORK_UNITS_PREPARATION: + case TimingEvent.LauncherTimings.WORK_UNITS_CREATION: properties.put(TimingEvent.WORKUNIT_PLAN_START_TIME, properties.getProperty(TimingEvent.METADATA_START_TIME)); properties.put(TimingEvent.WORKUNIT_PLAN_END_TIME, properties.getProperty(TimingEvent.METADATA_END_TIME)); break; case TimingEvent.LauncherTimings.JOB_START: case TimingEvent.FlowTimings.FLOW_RUNNING: case TimingEvent.LauncherTimings.JOB_SUMMARY: + case TimingEvent.LauncherTimings.WORK_UNITS_PREPARATION: properties.put(JobStatusRetriever.EVENT_NAME_FIELD, ExecutionStatus.RUNNING.name()); break; case TimingEvent.LauncherTimings.JOB_PENDING: From 2ac3b7eb8b6c7a3c21e5f6d290f91c7dc5873248 Mon Sep 17 00:00:00 2001 From: William Lo Date: Tue, 2 May 2023 20:46:26 -0400 Subject: [PATCH 2/2] Fix tests --- .../apache/gobblin/runtime/KafkaAvroJobStatusMonitorTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gobblin-modules/gobblin-kafka-09/src/test/java/org/apache/gobblin/runtime/KafkaAvroJobStatusMonitorTest.java b/gobblin-modules/gobblin-kafka-09/src/test/java/org/apache/gobblin/runtime/KafkaAvroJobStatusMonitorTest.java index 5c78989a580..e63969b860f 100644 --- a/gobblin-modules/gobblin-kafka-09/src/test/java/org/apache/gobblin/runtime/KafkaAvroJobStatusMonitorTest.java +++ b/gobblin-modules/gobblin-kafka-09/src/test/java/org/apache/gobblin/runtime/KafkaAvroJobStatusMonitorTest.java @@ -689,7 +689,7 @@ private GobblinTrackingEvent createWorkUnitTimingEvent() { Map metadata = Maps.newHashMap(); metadata.put(TimingEvent.METADATA_START_TIME, "2"); metadata.put(TimingEvent.METADATA_END_TIME, "3"); - return createGTE(TimingEvent.RunJobTimings.WORK_UNITS_PREPARATION, metadata); + return createGTE(TimingEvent.LauncherTimings.WORK_UNITS_CREATION, metadata); }