Skip to content
Merged
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
13 changes: 11 additions & 2 deletions tez-dag/src/main/java/org/apache/tez/client/LocalClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,17 @@ public void run() {
// Prepare Environment
Path logDir = new Path(userDir, "localmode-log-dir");
Path localDir = new Path(userDir, "localmode-local-dir");
localFs.mkdirs(logDir);
localFs.mkdirs(localDir);

// fail fast if the local directories (on the paths that were used on HDFS) cannot be created
// in this case, user might want to choose a different staging path, which works on the local FS too
if (!localFs.mkdirs(logDir)) {
throw new IOException(
"Unable to create log directory, try to create it manually for further insights: " + logDir);
}
if (!localFs.mkdirs(localDir)) {
throw new IOException(
"Unable to create local directory, try to create it manually for further insights: " + localDir);
}

UserGroupInformation.setConfiguration(conf);
// Add session specific credentials to the AM credentials.
Expand Down