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-616: Add ability to fork jobs when concatenating Dags. #2483

Closed
wants to merge 3 commits into from

Conversation

sv2000
Copy link
Contributor

@sv2000 sv2000 commented Oct 19, 2018

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):
    We add the ability to fork jobs when concatenating 2 dags, as part of constructing a multi-hop path. An example use case is to allow retention jobs on each hop of the path to run in parallel to the distcp jobs along a multi-hop path, thus preventing the data copy on a subsequent hop from being blocked on a retention job on a previous hop.

Tests

  • My PR adds the following unit tests OR does not need testing for this extremely good reason:
    Added test cases to DagTest and FlowGraphPathTest classes.

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"

otherNode.addParentNode(node);
}
} else {
for (DagNode otherNode: other.startNodes) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can a parent of a forkable node also be forkable?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No. Only nodes which are in the list of "endNodes" of a Dag are eligible for being forkable.

//Append all the entries from the other dag's parentChildMap to this dag's parentChildMap
for (Map.Entry<DagNode, List<DagNode<T>>> entry: other.parentChildMap.entrySet()) {
for (Iterator<Map.Entry<DagNode, List<DagNode<T>>>> iterator = other.parentChildMap.entrySet().iterator();
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not use Map.putAll()?

@sv2000
Copy link
Contributor Author

sv2000 commented Oct 22, 2018

Addressed the requested change.

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 95eff37 Oct 22, 2018
sv2000 pushed a commit to sv2000/incubator-gobblin that referenced this pull request Oct 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants