code: private void addAdditionalNamenodesFromConf(final Props props) {
      final String sparkConfDir = getSparkLibConf()[1];
      final File sparkConfFile = new File(sparkConfDir, "spark-defaults.conf");
      try {
        final InputStreamReader inReader =
            new InputStreamReader(new FileInputStream(sparkConfFile), StandardCharsets.UTF_8);
        // Use Properties to avoid needing Spark on our classpath
        final Properties sparkProps = new Properties();
        sparkProps.load(inReader);
        inReader.close();
        final String additionalNamenodes =
            sparkProps.getProperty(SPARK_CONF_ADDITIONAL_NAMENODES);
        if (additionalNamenodes != null && additionalNamenodes.length() > 0) {
          getLog().info("Found property " + SPARK_CONF_ADDITIONAL_NAMENODES +
              " = " + additionalNamenodes + "; setting additional namenodes");
          HadoopJobUtils.addAdditionalNamenodesToProps(props, additionalNamenodes);
        }
      } catch (final IOException e) {
        getLog().warn("Unable to load Spark configuration; not adding any additional " +
            "namenode delegation tokens.", e);
      }
    }
docs: Add additional namenodes specified in the Spark Configuration
  ({@link #SPARK_CONF_ADDITIONAL_NAMENODES}) to the Props provided.
  
  @param props Props to add additional namenodes to.
  @see HadoopJobUtils#addAdditionalNamenodesToProps(Props, String)