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-334] Implement SharedResourceFactory for LineageInfo #2187

Closed
wants to merge 6 commits into from

Conversation

zxcware
Copy link
Contributor

@zxcware zxcware commented Dec 5, 2017

Dear Gobblin maintainers,

JIRA

Description

  • Here are some details about my PR:
    • Currently, setting or putting a DatasetDescriptor with LineageInfo creates a new DatasetResolver every time. It's not performant.
    • The SharedResourceFactory (LineageInfoFactory) creates a single job level LineageInfo instance so that one job process creates only one LineageInfo object, hence only one DatasetResolver object.

Tests

  • My PR adds the following unit tests:
    • LineageEventTest

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"

@zxcware
Copy link
Contributor Author

zxcware commented Dec 5, 2017

@ibuenros Please review.

/**
* A {@link SharedResourceKey} with only a string name
*/
public class SharedNameKey implements SharedResourceKey {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you rename to something more descriptive? Maybe StringNameSharedResourceKey

Copy link
Contributor Author

Choose a reason for hiding this comment

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

+1

/**
* A {@link SharedResourceFactory} to share a job level {@link LineageInfo} instance
*/
public class LineageInfoFactory implements SharedResourceFactory<LineageInfo, SharedNameKey, GobblinScopeTypes> {
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 you need a name instead of just an EmptyKey?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

+1

@ibuenros
Copy link
Contributor

ibuenros commented Dec 8, 2017

+1

@asfgit asfgit closed this in 95e15f0 Dec 8, 2017
autumnust pushed a commit to autumnust/gobblin that referenced this pull request Jan 9, 2018
autumnust pushed a commit to autumnust/gobblin that referenced this pull request Jan 9, 2018
@zxcware zxcware deleted the share branch January 16, 2018 21:16
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