Sanil15 commented on a change in pull request #920: SAMZA-2106: Samza app and 
job config refactor
URL: https://github.com/apache/samza/pull/920#discussion_r258288145
 
 

 ##########
 File path: samza-core/src/main/java/org/apache/samza/execution/JobPlanner.java
 ##########
 @@ -155,4 +158,33 @@ final void writePlanJsonFile(String planJson) {
         systemStreamConfigs.put(JobConfig.JOB_DEFAULT_SYSTEM(), 
dsd.getSystemName()));
     return systemStreamConfigs;
   }
+
+  /**
+   * Generates job.id from app.id and job.name from app.name config
+   * If both job.id and app.id is defined, app.id takes precedence and job.id 
is set to value of app.id
+   * If both job.name and app.name is defined, app.name takes precedence and 
job.name is set to value of app.name
+   *
+   * @param allowedUserConfig configs passed from user
+   */
+  void generateJobIdAndName(Map<String, String> allowedUserConfig) {
+    if (allowedUserConfig.containsKey(JobConfig.JOB_ID())) {
+      LOG.warn("{} is a deprecated configuration, use app.id instead.", 
JobConfig.JOB_ID());
 
 Review comment:
   Thanks for the review @shanthoosh 
   
   1. Sure will do
   
   2. We will be able to migrate this once a release containing these changes 
is published but I have that in mind
   
   3. I changed a few, once again this change is user-facing for not using 
job.id and job.name. Hence we need to only change user-facing 
samples/prototypes/tests
   
   4. Rewriters are a pluggable component, that is defined by a user. Changes I 
am proposing is independent of rewriting/aliasing. Changes I have proposed will 
make Samza framework generate job.id and job.name consistently and internally 
use it.  
   
   5. I was planning to do those in another RB, but the changes are small 
enough so I included them here. 
   
   Thanks
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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