YARN-1303. Reverted the wrong patch committed earlier and committing the correct patch now. In one go.