Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java
Original file line number Diff line number Diff line change
Expand Up @@ -662,8 +662,11 @@ private static void setPlanPath(Configuration conf, Path hiveScratchDir) throws
// this is the unique conf ID, which is kept in JobConf as part of the plan file name
String jobID = UUID.randomUUID().toString();
Path planPath = new Path(hiveScratchDir, jobID);
FileSystem fs = planPath.getFileSystem(conf);
fs.mkdirs(planPath);
if (!HiveConf.getBoolVar(conf, ConfVars.HIVE_RPC_QUERY_PLAN)) {
FileSystem fs = planPath.getFileSystem(conf);
// since we are doing RPC creating a directory is un-necessary
fs.mkdirs(planPath);
}
HiveConf.setVar(conf, HiveConf.ConfVars.PLAN, planPath.toUri().toString());
}
}
Expand Down
13 changes: 8 additions & 5 deletions ql/src/java/org/apache/hadoop/hive/ql/exec/tez/DagUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -1509,11 +1509,14 @@ public Path createTezDir(Path scratchDir, Configuration conf)
scratchDir = new Path(scratchDir, userName);

Path tezDir = getTezDir(scratchDir);
FileSystem fs = tezDir.getFileSystem(conf);
LOG.debug("TezDir path set " + tezDir + " for user: " + userName);
// since we are adding the user name to the scratch dir, we do not
// need to give more permissions here
fs.mkdirs(tezDir);
if (!HiveConf.getBoolVar(conf, ConfVars.HIVE_RPC_QUERY_PLAN)) {
FileSystem fs = tezDir.getFileSystem(conf);
LOG.debug("TezDir path set " + tezDir + " for user: " + userName);
// since we are adding the user name to the scratch dir, we do not
// need to give more permissions here
// Since we are doing RPC creating a dir is not necessary
fs.mkdirs(tezDir);
}

return tezDir;

Expand Down