Committed as a YARN patch even though all the code changes are in common. (cherry picked from commit 5ca97f1e60b8a7848f6eadd15f6c08ed390a8cda)
Committed as a YARN patch even though all the code changes are in common. (cherry picked from commit 5ca97f1e60b8a7848f6eadd15f6c08ed390a8cda)