Skip to content

Commit b9ff67e

Browse files
committed
Throw an exception if the working directory or mapred.system dir doesn't exist. bz1115113
1 parent a5cbbe8 commit b9ff67e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/main/java/org/apache/hadoop/fs/glusterfs/GlusterVolume.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,15 +136,17 @@ public void setConf(Configuration conf){
136136
}
137137

138138
if(sameVolume(mapredSysDirectory) && !exists(mapredSysDirectory) ){
139-
mkdirs(mapredSysDirectory);
139+
// mkdirs(mapredSysDirectory);
140+
throw new RuntimeException("Error (mapred.system.dir/mapreduce.jobtracker.system.dir) does not exist: " + mapredSysDirectory);
140141
}
141142
//Working directory setup
142143

143144
Path workingDirectory = getInitialWorkingDirectory();
144145
if(!sameVolume(workingDirectory)){
145146
workingDirectory = new Path("/");
146147
}else if( !exists(workingDirectory)){
147-
mkdirs(workingDirectory);
148+
// mkdirs(workingDirectory);
149+
throw new RuntimeException("Error working directory does not exist: " + workingDirectory);
148150
}
149151
setWorkingDirectory(workingDirectory);
150152

0 commit comments

Comments
 (0)