private Path createRootHDFSDir(HiveConf conf) throws IOException {
    Path rootHDFSDirPath = new Path(HiveConf.getVar(conf, HiveConf.ConfVars.SCRATCH_DIR));
    Utilities.ensurePathIsWritable(rootHDFSDirPath, conf);
    return rootHDFSDirPath;
  }
Create the root scratch dir on hdfs (if it doesn't already exist) and make it writable
@param conf
@return
@throws IOException
ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java