if driver id is application id then yes you can do it with String appId = ctx.sc().applicationId(); //when ctx is java context
On 1 October 2015 at 20:44, Snehal Nagmote <nagmote.sne...@gmail.com> wrote: > Hi , > > I have use case where we need to automate start/stop of spark streaming > application. > > To stop spark job, we need driver/application id of the job . > > For example : > > /app/spark-master/bin/spark-class org.apache.spark.deploy.Client kill > spark://10.65.169.242:7077 $driver_id > > I am thinking to get the driver id when we submit the job in verbose mode > , by parsing the output . > > Does spark provide any api where it provides driver id of application . > > Is there any better or cleaner way to get driver ID ? > > > Any suggestions would be helpful , > > Thanks, > Snehal > >