mynameborat commented on a change in pull request #938: SAMZA-1531: Support 
run.id in standalone for batch processing.
URL: https://github.com/apache/samza/pull/938#discussion_r264937250
 
 

 ##########
 File path: 
samza-core/src/main/java/org/apache/samza/runtime/LocalApplicationRunner.java
 ##########
 @@ -77,16 +90,70 @@
    */
   public LocalApplicationRunner(SamzaApplication app, Config config) {
     this.appDesc = ApplicationDescriptorUtil.getAppDescriptor(app, config);
-    this.planner = new LocalJobPlanner(appDesc);
+    Boolean isAppModeBatch = new 
ApplicationConfig(appDesc.getConfig()).getAppMode() == 
ApplicationConfig.ApplicationMode.BATCH;
+    if(isAppModeBatch) {
+      initializeCoordinationUtils(config);
+      initializeRunId();
+    }
+    this.planner = new LocalJobPlanner(appDesc, coordinationUtils, uid, runId);
 
 Review comment:
   looks like the planner isn't needed for the entirety of this class. We only 
need it during run. I'd prefer to move the logic to initialize the runId and 
creation of planner to run method to keep constructor light weight.

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


With regards,
Apache Git Services

Reply via email to