Retrieving Flink job ID/YARN Id programmatically

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Retrieving Flink job ID/YARN Id programmatically

Lei Nie
Hello,
I am currently executing streaming jobs via StreamExecutionEnvironment. Is it possible to retrieve the Flink job ID/YARN ID within the context of a job? I'd like to be able to automatically register the job such that monitoring jobs can run (REST api requires for example job id).

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Retrieving Flink job ID/YARN Id programmatically

vino yang
Hi Lei Nie,

You can use `StreamExecutionEnvironment#getStreamGraph#getJobGraph#getJobID` to get the job id.

Best,
Vino

Lei Nie <[hidden email]> 于2019年11月8日周五 上午8:38写道:
Hello,
I am currently executing streaming jobs via StreamExecutionEnvironment. Is it possible to retrieve the Flink job ID/YARN ID within the context of a job? I'd like to be able to automatically register the job such that monitoring jobs can run (REST api requires for example job id).

Thanks