bkonold 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_r365484712
##########
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();
+
+ if (jobConfigs.size() != 1) {
+ throw new SamzaException("Only support single remote job is
supported.");
+ }
+
+ // Merge with default coordinator stream config
+ config = ConfigUtil.override(jobConfigs.get(0),
CoordinatorStreamUtil.buildCoordinatorStreamConfig(jobConfigs.get(0)));
Review comment:
Why are we merging these config keys in? From what I see these were not
being written to the coordinator stream previously but only built and sent
along with the submission to the RM
----------------------------------------------------------------
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