If you are using Yarn's nodemanager, you can add to your configuration:
to save the environmental directories of the applications (by default in /tmp/nm-local-dir) that the nodemanager starts so that you can examine them later.
Set the above value long enough so that you have time to examine the contents before the nodemanager's DeletionService removes them.
This setting is defined in hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java, and used in hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/DeletionService.java.
It's a useful configuration setting for developers, but seems not to be documented currently (see http://hadoop.apache.org/common/docs/r0.23.0/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/yarn-default.xml).