public Path getMRScratchDir() {
    return getMRScratchDir(!isExplainSkipExecution() && !isLoadingMaterializedView());
  }
Create a map-reduce scratch directory on demand and return it.
ql/src/java/org/apache/hadoop/hive/ql/Context.java