If the original problem is that the bin commands don't pick up this up, this fix makes the assumption that HADOOP_CLASSPATH allows inheritance from the parent shell. The default examples in trunk specifically don't do this to prevent the double settings problem that plagues prior releases.
The original problem is that the commands don't pick up CLASSPATH set by users on the shell - Owen tells me offline that this went long back.
In fact, since HADOOP_CLASSPATH is really intended for users to use, why are we overloading it? For trunk at least, it would probably be better to have a different var that is handled via mapreduce's shellprofile.d bit.
The specific scenario here user is spawning bin/hadoop commands within his/her tasks - so this blurs the lines between interactive vs non-interactive usecases - and the user is expecting distributed-cache to be accessed in the spawned shells.
I am going to get this in only into branch-2 and branch-2.7/2.6. We will have to think more about the right-approach for trunk. Will open a separate ticket for this.
-1 whitespace 0m 1s The patch has 1 line(s) that end in whitespace. Use git apply --whitespace=fix.
Will do jenkins. Ty.