Skip to content

[GOBBLIN-1387] Add function for jobcontext to access datasetstate failures#3225

Closed
Will-Lo wants to merge 1 commit intoapache:masterfrom
Will-Lo:fix-bug-email-failures
Closed

[GOBBLIN-1387] Add function for jobcontext to access datasetstate failures#3225
Will-Lo wants to merge 1 commit intoapache:masterfrom
Will-Lo:fix-bug-email-failures

Conversation

@Will-Lo
Copy link
Copy Markdown
Contributor

@Will-Lo Will-Lo commented Feb 10, 2021

Dear Gobblin maintainers,

Please accept this PR. I understand that it will not be reviewed until I have checked off all the steps below!

JIRA

Description

  • Here are some details about my PR, including screenshots (if applicable):
    Email notifications look into JOB_FAILURES_KEY, which is set by DatasetState.
    JobContext's reference to it's own jobState is misleading here as it does not track dataset state failures (in terms of amounts, only if it is passed/failed).

Add a function to track the dataset state failures from jobContext

Tests

  • My PR adds the following unit tests OR does not need testing for this extremely good reason:
    Added unit tests in JobContextTests

Commits

  • My commits all reference JIRA issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":
    1. Subject is separated from body by a blank line
    2. Subject is limited to 50 characters
    3. Subject does not end with a period
    4. Subject uses the imperative mood ("add", not "adding")
    5. Body wraps at 72 characters
    6. Body explains "what" and "why", not "how"

@codecov-io
Copy link
Copy Markdown

codecov-io commented Feb 10, 2021

Codecov Report

Merging #3225 (79a44fa) into master (f6e0632) will decrease coverage by 3.34%.
The diff coverage is 83.33%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #3225      +/-   ##
============================================
- Coverage     46.18%   42.84%   -3.35%     
+ Complexity     9771     9203     -568     
============================================
  Files          2019     2030      +11     
  Lines         77529    78718    +1189     
  Branches       8608     8755     +147     
============================================
- Hits          35809    33723    -2086     
- Misses        38386    41785    +3399     
+ Partials       3334     3210     -124     
Impacted Files Coverage Δ Complexity Δ
...untime/listeners/EmailNotificationJobListener.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...in/java/org/apache/gobblin/runtime/JobContext.java 74.86% <100.00%> (-1.51%) 51.00 <2.00> (+1.00) ⬇️
.../org/apache/gobblin/util/filters/HiddenFilter.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (-5.00%)
...g/apache/gobblin/cluster/HelixMessageSubTypes.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (-1.00%)
...gobblin/runtime/mapreduce/GobblinOutputFormat.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (-2.00%)
...obblin/compaction/source/CompactionFailedTask.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (-3.00%)
...n/cluster/event/ClusterManagerShutdownRequest.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (-1.00%)
...in/compaction/action/CompactionCompleteAction.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (-1.00%)
...n/compaction/mapreduce/orc/OrcKeyDedupReducer.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (-10.00%)
...action/audit/KafkaAuditCountHttpClientFactory.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (-2.00%)
... and 166 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f6e0632...79a44fa. Read the comment docs.

Comment on lines +559 to +561
if (!this.datasetStatesByUrns.isPresent()) {
return 0;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You could just use getDatasetStatesByUrns from this class, and it will return an empty map if not present, so this method would still correctly return 0.

@Will-Lo Will-Lo force-pushed the fix-bug-email-failures branch from 1f189da to 79a44fa Compare February 11, 2021 01:17
Copy link
Copy Markdown
Contributor

@jack-moseley jack-moseley left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Contributor

@sv2000 sv2000 left a comment

Choose a reason for hiding this comment

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

+1.

@asfgit asfgit closed this in 5a2fb0d Feb 11, 2021
jhsenjaliya pushed a commit to jhsenjaliya/incubator-gobblin that referenced this pull request Feb 25, 2021
Will-Lo added a commit to Will-Lo/incubator-gobblin that referenced this pull request Mar 5, 2021
@Will-Lo Will-Lo deleted the fix-bug-email-failures branch June 7, 2021 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants