On 19 Dec 2015, at 13:34, Steve Loughran 
<[email protected]<mailto:[email protected]>> wrote:


On 18 Dec 2015, at 21:39, Andrew Or 
<[email protected]<mailto:[email protected]>> wrote:

Hi Roy,

I believe Spark just gets its application ID from YARN, so you can just do 
`sc.applicationId`.

If you listen for a spark start event you get the app ID, but not the real 
spark attempt ID; SPARK-11314 adds an extension point to the process in charge 
of the yarn app which will get both (with an appID of None for client-managed).

to find a running app., you can use

yarn list --appTypes SPARK

to list all spark apps, then filter by name

you can also set the conf option "spark.yarn.tags" to set one or more comma 
separated tags (e.g "production" which you can use for production code)


Looking @ the yarn command, you can't currently filter the listing by tag (or 
by user & queue), even though those (and start time) are things you can filter 
by.

you could create a YARN JIRA to add those features

That's YARN-4491; expect it to surface some time next year.

adding something to the spark cli would be faster, or you could implement it 
yourself in a fairly short bit of code.

Reply via email to