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-970: Pass metric context from the KafkaSource to the KafkaWor… #2815

Closed
wants to merge 2 commits into from

Conversation

sv2000
Copy link
Contributor

@sv2000 sv2000 commented Nov 18, 2019

…kUnitPacker for emission of metrics from the packer.

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):
    Pass metric context from the KafkaSource to the KafkaWorkUnitPacker for emission of bin packing related metrics.

Tests

  • My PR adds the following unit tests OR does not need testing for this extremely good reason:
    Modified KafkaWorkUnitPackerTest.

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"

…kUnitPacker for emission of metrics from the packer.
@sv2000
Copy link
Contributor Author

sv2000 commented Nov 18, 2019

@autumnust @ZihanLi58 Please review.

@codecov-io
Copy link

codecov-io commented Nov 18, 2019

Codecov Report

Merging #2815 into master will decrease coverage by <.01%.
The diff coverage is 42.85%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2815      +/-   ##
============================================
- Coverage     45.56%   45.56%   -0.01%     
+ Complexity     8954     8951       -3     
============================================
  Files          1900     1900              
  Lines         71213    71217       +4     
  Branches       7856     7856              
============================================
- Hits          32451    32449       -2     
- Misses        35780    35782       +2     
- Partials       2982     2986       +4
Impacted Files Coverage Δ Complexity Δ
...bblin/runtime/StateStoreBasedWatermarkStorage.java 0% <ø> (ø) 0 <0> (ø) ⬇️
...in/source/extractor/extract/kafka/KafkaSource.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...act/kafka/workunit/packer/KafkaWorkUnitPacker.java 16.31% <50%> (+0.27%) 7 <1> (+1) ⬆️
...a/org/apache/gobblin/util/limiter/NoopLimiter.java 40% <0%> (-20%) 2% <0%> (-1%)
...lin/util/filesystem/FileSystemInstrumentation.java 92.85% <0%> (-7.15%) 3% <0%> (-1%)
...ava/org/apache/gobblin/fsm/FiniteStateMachine.java 73.48% <0%> (-3.04%) 18% <0%> (-3%)
.../org/apache/gobblin/cluster/GobblinTaskRunner.java 63.42% <0%> (-1.39%) 27% <0%> (-1%)
...pache/gobblin/runtime/GobblinMultiTaskAttempt.java 56.3% <0%> (ø) 27% <0%> (ø) ⬇️
...va/org/apache/gobblin/metrics/event/EventName.java 0% <0%> (ø) 0% <0%> (ø) ⬇️
...lin/restli/throttling/ZookeeperLeaderElection.java 72.22% <0%> (+2.22%) 13% <0%> (ø) ⬇️
... and 1 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 e24bc26...0c4d74f. Read the comment docs.

Copy link
Contributor

@ZihanLi58 ZihanLi58 left a comment

Choose a reason for hiding this comment

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

LGTM, just a minor comment.

@@ -367,19 +368,19 @@ private static void logMultiWorkUnitInfo(Iterable<MultiWorkUnit> mwus) {
return partitions;
}

public static KafkaWorkUnitPacker getInstance(AbstractSource<?, ?> source, SourceState state) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we keep the original function to make the change backward compatible?

Copy link
Contributor

@ZihanLi58 ZihanLi58 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
Contributor

@htran1 htran1 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 ae62669 Nov 21, 2019
haojiliu pushed a commit to haojiliu/incubator-gobblin that referenced this pull request Apr 9, 2020
jhsenjaliya pushed a commit to jhsenjaliya/incubator-gobblin that referenced this pull request Apr 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants