code: public void writeConfiguration(final YarnClusterSubmissionFromCS yarnClusterSubmissionFromCS,
                                   final JobFolder jobFolderOnDFS) throws IOException {
      final File yarnAppParametersFile = new File(yarnClusterSubmissionFromCS.getDriverFolder(),
          fileNames.getYarnBootstrapAppParamFilePath());
  
      final File yarnJobParametersFile = new File(yarnClusterSubmissionFromCS.getDriverFolder(),
          fileNames.getYarnBootstrapJobParamFilePath());
  
      try (final FileOutputStream appFileOutputStream = new FileOutputStream(yarnAppParametersFile)) {
        try (final FileOutputStream jobFileOutputStream = new FileOutputStream(yarnJobParametersFile)) {
          // this is mainly a test hook.
          writeAvroYarnAppSubmissionParametersToOutputStream(yarnClusterSubmissionFromCS, appFileOutputStream);
          writeAvroYarnJobSubmissionParametersToOutputStream(
              yarnClusterSubmissionFromCS, jobFolderOnDFS.getPath().toString(), jobFileOutputStream);
        }
      }
    }
docs: Writes driver configuration to disk.
  @param yarnClusterSubmissionFromCS the information needed to submit encode YARN parameters and create the
  YARN job for submission from the cluster.
  @throws IOException