diff --git common/src/java/org/apache/hadoop/hive/conf/HiveConf.java common/src/java/org/apache/hadoop/hive/conf/HiveConf.java index 10ad3ea..061b575 100644 --- common/src/java/org/apache/hadoop/hive/conf/HiveConf.java +++ common/src/java/org/apache/hadoop/hive/conf/HiveConf.java @@ -1847,7 +1847,7 @@ HIVE_JAR_DIRECTORY("hive.jar.directory", null, "This is the location hive in tez mode will look for to find a site wide \n" + "installed hive instance."), - HIVE_USER_INSTALL_DIR("hive.user.install.directory", "hdfs:///user/", + HIVE_USER_INSTALL_DIR("hive.user.install.directory", "hdfs:///tmp/", "If hive (in tez mode only) cannot find a usable hive jar in \"hive.jar.directory\", \n" + "it will upload the hive jar to \"hive.user.install.directory/user.name\"\n" + "and use it to run queries."), diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/tez/DagUtils.java ql/src/java/org/apache/hadoop/hive/ql/exec/tez/DagUtils.java index 033f463..d06bdb9 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/tez/DagUtils.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/tez/DagUtils.java @@ -770,9 +770,14 @@ public Path getDefaultDestDir(Configuration conf) throws LoginException, IOExcep String hdfsDirPathStr = jarPathStr; Path hdfsDirPath = new Path(hdfsDirPathStr); - FileStatus fstatus = fs.getFileStatus(hdfsDirPath); - if (!fstatus.isDir()) { - throw new IOException(ErrorMsg.INVALID_DIR.format(hdfsDirPath.toString())); + try { + FileStatus fstatus = fs.getFileStatus(hdfsDirPath); + if (!fstatus.isDir()) { + throw new IOException(ErrorMsg.INVALID_DIR.format(hdfsDirPath.toString())); + } + } catch (FileNotFoundException e) { + // directory does not exist, create it + fs.mkdirs(hdfsDirPath); } Path retPath = new Path(hdfsDirPath.toString() + "/.hiveJars");