patch for https://issues.apache.org/jira/browse/MAPREDUCE-5877