Skip to content

Commit

Permalink
Use MESOS_DIRECTORY in MesosExecutor process (not user.dir property)
Browse files Browse the repository at this point in the history
We shouldn't rely on working dir (user.dir) of MesosExecutor process, for
setting  the mapred.local.dir as it can point to a directory which is not
in a mesos sandbox, nor strictly local in the first place.
  • Loading branch information
hansbogert committed Mar 2, 2015
1 parent 4022866 commit 0cfb366
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/apache/hadoop/mapred/MesosExecutor.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ private JobConf configure(final TaskInfo task) {

// Set the mapred.local directory inside the executor sandbox, so that
// different TaskTrackers on the same host do not step on each other.
conf.set("mapred.local.dir", System.getProperty("user.dir") + "/mapred");
conf.set("mapred.local.dir", System.getenv("MESOS_DIRECTORY") + "/mapred");

return conf;
}
Expand Down

0 comments on commit 0cfb366

Please sign in to comment.