Skip to content

Commit 2a02746

Browse files
committed
added additional staging heuristic for hadopo 2.x
1 parent 748cba3 commit 2a02746

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

conf/mapred-site.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@
1616
<name>mapred.system.dir</name>
1717
<value>glusterfs:///mapred/system</value>
1818
</property>
19+
<property>
20+
<name>mapreduce.jobhistory.done-dir</name>
21+
<value>glusterfs:///job-history/done</value>
22+
</property>
23+
24+
<property>
25+
<name>mapreduce.jobhistory.intermediate-done-dir</name>
26+
<value>glusterfs:///job-history/intermediate-done</value>
27+
</property>
28+
1929
<property>
2030
<name>mapreduce.jobtracker.staging.root.dir</name>
2131
<value>glusterfs:///user</value>

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public AclPathFilter(Configuration conf){
2424
} catch (IOException e) {
2525

2626
}
27-
String stagingRootDir = new Path(conf.get("mapreduce.jobtracker.staging.root.dir", "/tmp/hadoop/mapred/staging")).toString();
27+
String stagingRootDir = new Path(conf.get("yarn.app.mapreduce.am.staging-dir",conf.get("mapreduce.jobtracker.staging.root.dir", "/tmp/hadoop/mapred/staging"))).toString();
2828
String user;
2929
String randid = "\\d*";
3030
if (ugi != null) {
@@ -33,8 +33,10 @@ public AclPathFilter(Configuration conf){
3333
user = "dummy";
3434
}
3535
paths.add("^" + new Path(stagingRootDir, user + randid +"/.staging").toString() + ".*");
36+
paths.add("^" + (new Path(stagingRootDir, user + randid +"/.staging")).toUri().getPath() + ".*");
3637
stagingRootDir = new Path(conf.get("mapreduce.jobtracker.staging.root.dir","/tmp/hadoop/mapred/staging")).toString();
3738
paths.add("^" + new Path(stagingRootDir, user+"/.staging").toString() + ".*");
39+
paths.add("^" + (new Path(stagingRootDir, user+"/.staging")).toUri().getPath() + ".*");
3840

3941
}
4042

0 commit comments

Comments
 (0)