hba
hba

Reputation: 7800

how can i retrieve a unique spark job-id in Java?

I've already seen this post. But I don't seem to be able to find applicationid on JavaSparkContext.

Actually want I need is a unique id that identifies the application. I could just generate uuid and set it as app-name. Is there a better way?

Upvotes: 0

Views: 1668

Answers (1)

morfious902002
morfious902002

Reputation: 918

Try this :-

JavaSC.env().conf().getAppId(); 

or

ctxt.getConf().getAppId()

Upvotes: 2

Related Questions