public static MapConfig generateSingleJobConfig(Map<String, String> userConfigs) {
    Map<String, String> generatedConfig = new HashMap<>(userConfigs);

    if (!userConfigs.containsKey(JobConfig.JOB_NAME) && !userConfigs.containsKey(ApplicationConfig.APP_NAME)) {
      throw new SamzaException("Samza app name should not be null, Please set either app.name (preferred) or job.name (deprecated) in configs");
    }

    if (userConfigs.containsKey(ApplicationConfig.APP_NAME)) {
      String appName =  userConfigs.get(ApplicationConfig.APP_NAME);
      generatedConfig.put(JobConfig.JOB_NAME, appName);
    }

    if (userConfigs.containsKey(ApplicationConfig.APP_ID)) {
      String appId =  userConfigs.get(ApplicationConfig.APP_ID);
      generatedConfig.put(JobConfig.JOB_ID, appId);
    }

    return new MapConfig(generatedConfig);
  }
Generates configs for a single job in app, 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 userConfigs configs passed from user
samza-core/src/main/java/org/apache/samza/execution/JobPlanner.java