I'm using the following Scala code (as a custom spark-submit wrapper) to submit a Spark application to a YARN cluster:
val result = Seq(spark_submit_script_here).!!
All I have at the time of submission is spark-submit and the Spark application's jar (no SparkContext). I'd like to capture applicationId from result, but it's empty.
I can see in my command line output the applicationId and rest of the Yarn messages:
INFO yarn.Client: Application report for application_1450268755662_0110
How can I read it within code and get the applicationId ?