MR Job with Compression Codec can fail because of LD_LIBRARY_PATH missing in mapred-site.xml.
<value>LD_LIBRARY_PATH=/usr/lib/hadoop/lib/native:/usr/lib/hadoop/lib/native/`$JAVA_HOME/bin/java -d32 -version &> /dev/null;if [ $? -eq 0 ]; then echo Linux-i386-32; else echo Linux-amd64-64;fi`</value>
Verifying the change ...
+1 for the patch.
Problem was that Ambari UI was putting invalid XML characters as values. When they get persisted to say yarn-site.xml, YARN trips trying to parse an invalid XML file.
The fix is that Ambari UI now escapes all invalid XML characters as documented in http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Predefined_entities_in_XML.
Users can enter either the escaped or unescaped values. Both would work fine.