public String[] configureJobConfAndExtractJars(JobConf jobConf) {
    String[] oldTmpJars = jobConf.getStrings(MR_JAR_PROPERTY);
    jobConf.setStrings(MR_JAR_PROPERTY, new String[0]);
    for (BaseWork work : workGraph.keySet()) {
      work.configureJobConf(jobConf);
    }
    String[] newTmpJars = jobConf.getStrings(MR_JAR_PROPERTY);
    if (oldTmpJars != null || newTmpJars != null) {
      String[] finalTmpJars;
      if (oldTmpJars == null || oldTmpJars.length == 0) {
        // Avoid a copy when oldTmpJars is null or empty
        finalTmpJars = newTmpJars;
      } else if (newTmpJars == null || newTmpJars.length == 0) {
        // Avoid a copy when newTmpJars is null or empty
        finalTmpJars = oldTmpJars;
      } else {
        // Both are non-empty, only copy now
        finalTmpJars = new String[oldTmpJars.length + newTmpJars.length];
        System.arraycopy(oldTmpJars, 0, finalTmpJars, 0, oldTmpJars.length);
        System.arraycopy(newTmpJars, 0, finalTmpJars, oldTmpJars.length, newTmpJars.length);
      }

      jobConf.setStrings(MR_JAR_PROPERTY, finalTmpJars);
      return finalTmpJars;
    }
    return newTmpJars;
   }
Calls configureJobConf on instances of work that are part of this TezWork.
Uses the passed job configuration to extract "tmpjars" added by these, so that Tez
could add them to the job proper Tez way. This is a very hacky way but currently
there's no good way to get these JARs - both storage handler interface, and HBase
code, would have to change to get the list directly (right now it adds to tmpjars).
This will happen in 0.14 hopefully.
@param jobConf Job configuration.
@return List of files added to tmpjars by storage handlers.
ql/src/java/org/apache/hadoop/hive/ql/plan/TezWork.java