The problem here is that it is not really how it does it between hadoop versions, which is what I think of SparkHadoopUtil being used for.  Its either Yarn deployed or its for instance standalone deploy.   We can move a bit of the logic into SparkHadoopUtil, like the code inside of the isYarnMode blocks, but we would still need the yarn check or abstract that out somewhere else.

is sounds like we are going to want to add better support for this for the standalone deploy so for now I suggest we leave this as is until we get a better idea of how that is going to work.