Instead of us fixing like this, we should have tez provide a API similar to mapreduce (/basepath/<username>/.staging) and use that instead of checking TezConfiguration.TEZ_AM_STAGING_DIR ourselves. This is required for security as well to separate out users and have 700 on the <username> directory making it readable only by that user.
public static Path getStagingAreaDir(Configuration conf, String user)
return new Path(conf.get(MRJobConfig.MR_AM_STAGING_DIR,
+ Path.SEPARATOR + user + Path.SEPARATOR + STAGING_CONSTANT);
We can keep this jira open to change to that API once they provide that.