Author: vikram
Date: Tue Dec 30 22:40:35 2014
New Revision: 1648622
URL: http://svn.apache.org/r1648622
Log:
HIVE-9205: Change default tez install directory to use /tmp instead of /user
and create the directory if it does not exist (Vikram Dixit K, reviewed by
Prasanth J and Gunther Hagleitner)
Modified:
hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/DagUtils.java
Modified:
hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/DagUtils.java
URL:
http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/DagUtils.java?rev=1648622&r1=1648621&r2=1648622&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/DagUtils.java
(original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/DagUtils.java Tue
Dec 30 22:40:35 2014
@@ -770,9 +770,14 @@ public class DagUtils {
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");