You have commented out registering application master, etc ? Are you sure this PR allows yarn mode to still work ? Was this tested ?

Btw, please do not reorder the comments - the HADOOP-8406 was specific reference to numCore only; not rest of the code.
(Different issue that it is probably not relevant anymore. Any thoughts @tgravescs ?)