You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by GitBox <gi...@apache.org> on 2020/01/11 01:12:16 UTC

[GitHub] [samza] kw2542 commented on a change in pull request #1248: SAMZA-2410: Update ClusterBasedJobCoordinator config retrieval logic from loader.

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:
users@infra.apache.org


With regards,
Apache Git Services