Spark 3177 Yarn-alpha ClientBaseSuite Unit test failed


Yarn-alpha ClientBaseSuite Unit test failed due to differences of MRJobConfig API between yarn-stable and yarn-alpha.
The class field
MRJobConfig.DEFAULT_MAPREDUCE_APPLICATION_CLASSPATH
in yarn-alpha 
  returns String Array

in yarn 
   returns String

the method will works for yarn-stable but will fail as it try to cast String Array to String.

val knownDefMRAppCP: Seq[String] =
getFieldValue[String, Seq[String]](classOf[MRJobConfig],
"DEFAULT_MAPREDUCE_APPLICATION_CLASSPATH",
Seq[String]())(a => a.split(","))


The fix is  change the code : 

val knownDefMRAppCP: Seq[String] = ClientBase.getDefaultMRApplicationClasspath.getOrElse(Seq[String]())