public static void createTmpDirs(Configuration conf, ReduceWork rWork)
      throws IOException {
    if (rWork == null) {
      return;
    }
    List<Operator<? extends OperatorDesc>> ops
      = new LinkedList<Operator<? extends OperatorDesc>>();
    ops.add(rWork.getReducer());
    createTmpDirs(conf, ops);
  }
Hive uses tmp directories to capture the output of each FileSinkOperator.
This method creates all necessary tmp directories for FileSinks in the ReduceWork.

@param conf Used to get the right FileSystem
@param rWork Used to find FileSinkOperators
@throws IOException
ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java