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-1107: Lazily initialize Helix TaskStateModelFactory in Gobbli… #2947

Closed
wants to merge 9 commits into from

Conversation

sv2000
Copy link
Contributor

@sv2000 sv2000 commented Apr 1, 2020

…nTaskRunner

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):
    Current behavior eagerly initializes the taskStateModelFactory inside the constructor. This causes Helix task assignment to be stuck when a Helix manager connection needs to be retried.

Tests

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

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"

@sv2000
Copy link
Contributor Author

sv2000 commented Apr 1, 2020

@autumnust please review.

@codecov-io
Copy link

codecov-io commented Apr 2, 2020

Codecov Report

Merging #2947 into master will decrease coverage by 0.92%.
The diff coverage is 86.36%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2947      +/-   ##
============================================
- Coverage     45.56%   44.64%   -0.93%     
+ Complexity     9153     8988     -165     
============================================
  Files          1936     1936              
  Lines         73292    73295       +3     
  Branches       8088     8088              
============================================
- Hits          33395    32722     -673     
- Misses        36800    37521     +721     
+ Partials       3097     3052      -45     
Impacted Files Coverage Δ Complexity Δ
.../org/apache/gobblin/cluster/GobblinTaskRunner.java 67.04% <86.36%> (+1.94%) 33.00 <2.00> (+4.00)
...gobblin/runtime/mapreduce/GobblinOutputFormat.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (-2.00%)
...askStateCollectorServiceHiveRegHandlerFactory.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (-2.00%)
...re/filesystem/FsDatasetStateStoreEntryManager.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (-3.00%)
...in/runtime/mapreduce/CustomizedProgresserBase.java 0.00% <0.00%> (-83.34%) 0.00% <0.00%> (-1.00%)
...rg/apache/gobblin/runtime/ZkDatasetStateStore.java 0.00% <0.00%> (-80.77%) 0.00% <0.00%> (-7.00%)
...lin/runtime/locks/LegacyJobLockFactoryManager.java 0.00% <0.00%> (-78.58%) 0.00% <0.00%> (-2.00%)
.../apache/gobblin/metastore/ZkStateStoreFactory.java 0.00% <0.00%> (-71.43%) 0.00% <0.00%> (-2.00%)
...he/gobblin/runtime/ZkDatasetStateStoreFactory.java 0.00% <0.00%> (-71.43%) 0.00% <0.00%> (-2.00%)
...apache/gobblin/runtime/MysqlDatasetStateStore.java 0.00% <0.00%> (-70.00%) 0.00% <0.00%> (-7.00%)
... and 44 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 112e455...ec4b8e3. Read the comment docs.

@@ -156,13 +179,73 @@ public void testConnectHelixManagerWithRetry() {
//Ensure that connect with retry succeeds
corruptGobblinTaskRunner.connectHelixManagerWithRetry();
Assert.assertTrue(true);

corruptGobblinTaskRunner.disconnectHelixManager();
Copy link
Contributor

Choose a reason for hiding this comment

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

Should corruptGobblinTaskRunner be a local variable?

Copy link
Contributor

@autumnust autumnust left a comment

Choose a reason for hiding this comment

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

Minor comment, LGTM if addressed.

/**
* A helper method that creates a partial instance structure in ZK.
*/
private static void createPartialInstanceStructure(HelixManager helixManager, String zkConnectString) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be moved into utils class newly created ?

@autumnust
Copy link
Contributor

+1 LGTM.

@asfgit asfgit closed this in 9ef461a Apr 3, 2020
haojiliu pushed a commit to haojiliu/incubator-gobblin that referenced this pull request Apr 9, 2020
arekusuri pushed a commit to arekusuri/incubator-gobblin that referenced this pull request May 18, 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
3 participants