Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GOBBLIN-1829] Fixes bug where the wrong workunit event was being tracked for keepin… #3691

Merged
merged 2 commits into from
May 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ private GobblinTrackingEvent createWorkUnitTimingEvent() {
Map<String, String> 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);
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this to set job status as running?

Copy link
Contributor Author

@Will-Lo Will-Lo May 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we don't in particular, but it helps store all the specific event metadata in the state store. Since if the event is being tracked, then it would add all the event metadata as part of the properties. Otherwise the switch statement will return null so the event gets completely ignored.

properties.put(JobStatusRetriever.EVENT_NAME_FIELD, ExecutionStatus.RUNNING.name());
break;
case TimingEvent.LauncherTimings.JOB_PENDING:
Expand Down