Ejemplo n.º 1
0
  /**
   * Copies the names file into HDFS (if necessary) and adds it to the distributed cache for the job
   *
   * @param conf
   * @return the filename part of the path
   * @throws IOException
   */
  protected String handleNamesFile(Configuration conf) throws IOException {
    String namesFile = environmentSubstitute(getAttributeNamesFile());

    String filenameOnly =
        HDFSUtils.addFileToDistributedCache(m_mrConfig.getHDFSConfig(), conf, namesFile, m_env);

    return filenameOnly;
  }