cameronlee314 commented on a change in pull request #1006: SAMZA-2171 :
Implement MetadataResourceManager to encapsulate loading of metadata resources
URL: https://github.com/apache/samza/pull/1006#discussion_r279126433
##########
File path: samza-core/src/main/java/org/apache/samza/zk/ZkJobCoordinator.java
##########
@@ -296,15 +288,19 @@ void doOnProcessorChange() {
/**
* Stores the configuration of the job in the coordinator stream.
*/
- private void storeConfigInCoordinatorStream() {
+ private void loadMetadataResources(JobModel jobModel) {
MetadataStore metadataStore = null;
try {
// Creates the coordinator stream if it does not exists.
createCoordinatorStream();
-
MetadataStoreFactory metadataStoreFactory = Util.getObj(new
JobConfig(config).getMetadataStoreFactory(), MetadataStoreFactory.class);
metadataStore = metadataStoreFactory.getMetadataStore(SetConfig.TYPE,
config, metrics.getMetricsRegistry());
metadataStore.init();
+
+ MetadataResourceManager metadataResourceManager =
Review comment:
Minor: Just to keep the same ordering, could this logic to above
`createCoordinatorStream`? Maybe it would be slightly better since then the
coordinator stream is created right before its usage (e.g. if
`metadataResourceManager` fails, then we can skip trying to create the coord
stream).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services