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
Conversation
@ibuenros Please review. |
/** | ||
* A {@link SharedResourceKey} with only a string name | ||
*/ | ||
public class SharedNameKey implements SharedResourceKey { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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> { |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
+1 |
Closes apache#2187 from zxcware/share
Closes apache#2187 from zxcware/share
Dear Gobblin maintainers,
JIRA
Description
DatasetDescriptor
withLineageInfo
creates a newDatasetResolver
every time. It's not performant.SharedResourceFactory
(LineageInfoFactory
) creates a single job levelLineageInfo
instance so that one job process creates only oneLineageInfo
object, hence only oneDatasetResolver
object.Tests
LineageEventTest
Commits