public JobInfo getLaunchedJobInfo()

in src/main/java/com/google/cloud/dfmetrics/commands/TemplateLauncherCommand.java [91:104]


  public JobInfo getLaunchedJobInfo(
      DataflowJobManager jobManager, JobConfig jobConfig, TemplateConfig templateConfig)
      throws IOException {

    LOG.info("Job started running..");
    JobInfo.Builder jobInfoBuilder = jobManager.getJobInfoBuilder(jobConfig);

    // Combine the pipeline options and environment options supplied
    Map<String, String> parameters = new HashMap<>(templateConfig.parameters());
    templateConfig.environment().forEach((key, val) -> parameters.put(key, val.toString()));

    jobInfoBuilder.setParameters(ImmutableMap.copyOf(parameters));
    return jobInfoBuilder.build();
  }