public static String[] getTempFilesFromConf(Configuration conf) {
    if (conf == null) {
      return new String[0]; // In tests.
    }
    String addedFiles = Utilities.getResourceFiles(conf, SessionState.ResourceType.FILE);
    if (StringUtils.isNotBlank(addedFiles)) {
      HiveConf.setVar(conf, ConfVars.HIVE_ADDED_FILES, addedFiles);
    }
    String addedJars = Utilities.getResourceFiles(conf, SessionState.ResourceType.JAR);
    if (StringUtils.isNotBlank(addedJars)) {
      HiveConf.setVar(conf, ConfVars.HIVE_ADDED_JARS, addedJars);
    }
    String auxJars = HiveConf.getVar(conf, HiveConf.ConfVars.HIVE_AUX_JARS);
    String reloadableAuxJars = SessionState.get() == null ? null : SessionState.get().getReloadableAuxJars();

    // need to localize the additional jars and files
    // we need the directory on hdfs to which we shall put all these files
    String allFiles =
        HiveStringUtils.joinIgnoringEmpty(new String[]{auxJars, reloadableAuxJars, addedJars, addedFiles}, ',');
    return allFiles.split(",");
  }
Localizes files, archives and jars the user has instructed us
to provide on the cluster as resources for execution.

@param conf
@return List&lt;LocalResource&gt; local resources to add to execution
@throws IOException when hdfs operation fails
@throws LoginException when getDefaultDestDir fails with the same exception
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/DagUtils.java