-
Notifications
You must be signed in to change notification settings - Fork 334
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
SAMZA-2171 : Implement MetadataResourceManager to encapsulate loading of metadata resources #1006
SAMZA-2171 : Implement MetadataResourceManager to encapsulate loading of metadata resources #1006
Conversation
samza-core/src/main/java/org/apache/samza/coordinator/MetadataResourceLoader.java
Outdated
Show resolved
Hide resolved
* Creates and loads the required metadata resources for checkpoints, changelog stream and other | ||
* resources related to the metadata system | ||
*/ | ||
public void createResources() { |
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.
For the follow on startpoint work, I plan to add either the fan out call here for the fan out model or the ack clean up call here for the intent-ack model.
samza-core/src/main/java/org/apache/samza/coordinator/MetadataResourceManager.java
Outdated
Show resolved
Hide resolved
samza-core/src/main/java/org/apache/samza/coordinator/MetadataResourceManager.java
Outdated
Show resolved
Hide resolved
samza-core/src/main/java/org/apache/samza/coordinator/MetadataResourceManager.java
Outdated
Show resolved
Hide resolved
samza-core/src/main/java/org/apache/samza/zk/ZkJobCoordinator.java
Outdated
Show resolved
Hide resolved
samza-core/src/main/java/org/apache/samza/coordinator/MetadataResourceManager.java
Outdated
Show resolved
Hide resolved
samza-core/src/main/java/org/apache/samza/coordinator/MetadataResourceManager.java
Outdated
Show resolved
Hide resolved
samza-core/src/main/java/org/apache/samza/coordinator/MetadataResourceManager.java
Outdated
Show resolved
Hide resolved
samza-core/src/main/java/org/apache/samza/coordinator/MetadataResourceManager.java
Outdated
Show resolved
Hide resolved
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.
Thanks @cameronlee314 and @prateekm for your reviews. Please see my responses.
samza-core/src/main/java/org/apache/samza/coordinator/MetadataResourceManager.java
Outdated
Show resolved
Hide resolved
samza-core/src/main/java/org/apache/samza/coordinator/MetadataResourceManager.java
Outdated
Show resolved
Hide resolved
samza-core/src/main/java/org/apache/samza/coordinator/MetadataResourceManager.java
Outdated
Show resolved
Hide resolved
samza-core/src/main/java/org/apache/samza/coordinator/MetadataResourceManager.java
Outdated
Show resolved
Hide resolved
samza-core/src/main/java/org/apache/samza/coordinator/MetadataResourceManager.java
Outdated
Show resolved
Hide resolved
samza-core/src/main/java/org/apache/samza/coordinator/MetadataResourceManager.java
Outdated
Show resolved
Hide resolved
samza-core/src/main/java/org/apache/samza/coordinator/MetadataResourceManager.java
Outdated
Show resolved
Hide resolved
samza-core/src/main/java/org/apache/samza/zk/ZkJobCoordinator.java
Outdated
Show resolved
Hide resolved
* Creates and loads the required metadata resources for checkpoints, changelog stream and other | ||
* resources related to the metadata system | ||
*/ | ||
public void createResources() { |
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.
For the follow on startpoint work, I plan to add either the fan out call here for the fan out model or the ack clean up call here for the intent-ack model.
@cameronlee314 & @prateekm please see my responses and updates. Thanks. |
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.
One minor comment, otherwise LGTM.
samza-core/src/test/java/org/apache/samza/coordinator/TestMetadataResourceUtil.java
Outdated
Show resolved
Hide resolved
samza-core/src/main/java/org/apache/samza/coordinator/MetadataResourceUtil.java
Outdated
Show resolved
Hide resolved
samza-core/src/main/java/org/apache/samza/coordinator/MetadataResourceUtil.java
Outdated
Show resolved
Hide resolved
samza-core/src/main/scala/org/apache/samza/job/local/ThreadJobFactory.scala
Outdated
Show resolved
Hide resolved
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.
LGTM.
@prateekm do you have further comments/concerns? Otherwise, will merge. |
@cameronlee314 - He told me offline he wasn't actively reviewing this PR and he gave a 👍 for my response on his sole comment. |
Motivation: Before this PR, the code to create the checkpoint and changelog streams are copy and pasted to each JobCoordinator implementation. This PR encapsulates that logic in a
MetadataResourceManager
so that future JobCoordinator implementations don't have to copy and paste duplicate logic and we can add other metadata resources that we may want to create in the future.@shanthoosh @prateekm @cameronlee314 - please take a look when you get a chance. The likely follow on is to add the startpoint manager fan out call in the
MetadataResourceManager#createResources
method.