I'd like to get notified when a Cloud Dataproc job finished. Unfortunately Cloud Dataproc does not seem to provide hooks or some ways to notify a job's lifecycle, I want to implement the mechanism in my own.
I'm planning to push to Pub/Sub when a job finished from my Spark application. But how do I know an information to identify the job inside a Spark application? If I could get User Labels of the job from the application underneath, I'm utilizing it by giving a unique label on submit, then include the label key and value in the Pub/Sub message.