kw2542 commented on a change in pull request #1248: SAMZA-2410: Update 
ClusterBasedJobCoordinator config retrieval logic from loader.
URL: https://github.com/apache/samza/pull/1248#discussion_r365486270
 
 

 ##########
 File path: 
samza-core/src/main/java/org/apache/samza/clustermanager/ClusterBasedJobCoordinator.java
 ##########
 @@ -178,9 +185,35 @@
   public ClusterBasedJobCoordinator(Config coordinatorSystemConfig) {
     metrics = new MetricsRegistryMap();
 
-    coordinatorStreamStore = new 
CoordinatorStreamStore(coordinatorSystemConfig, metrics);
-    coordinatorStreamStore.init();
-    config = 
CoordinatorStreamUtil.readConfigFromCoordinatorStream(coordinatorStreamStore);
+    JobConfig jobConfig = new JobConfig(coordinatorSystemConfig);
+
+    if (jobConfig.getConfigLoaderFactory().isPresent()) {
+      // load full job config with ConfigLoader
+      Config originalConfig = ConfigUtil.loadConfig(coordinatorSystemConfig);
+
+      // Execute planning
+      ApplicationDescriptorImpl<? extends ApplicationDescriptor>
+          appDesc = 
ApplicationDescriptorUtil.getAppDescriptor(ApplicationUtil.fromConfig(originalConfig),
 originalConfig);
+      RemoteJobPlanner planner = new RemoteJobPlanner(appDesc);
+      List<JobConfig> jobConfigs = planner.prepareJobs();
 
 Review comment:
   Good question, both RemoteApplicationRunner and LocalJobPlanner themselves 
only works for single-job applications anyway, we may update them, but I think 
it is better to do it separately. It also relies on our plan to support multi 
job applications too. 

----------------------------------------------------------------
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

Reply via email to