Interface JobStatusHook

  • All Superinterfaces:
    Serializable

    @Internal
    public interface JobStatusHook
    extends Serializable
    Hooks on job status changing. Triggered at the initial(CREATED) and final state(FINISHED/CANCELED/FAILED) of the job.

    Usage examples:

         StreamGraph streamGraph = env.getStreamGraph();
         streamGraph.registerJobStatusHook(myJobStatusHook);
         streamGraph.setJobName("my_flink");
         env.execute(streamGraph);
     
    • Method Detail

      • onCreated

        void onCreated​(JobID jobId)
        When Job becomes JobStatus.CREATED status, it would only be called one time.
      • onFinished

        void onFinished​(JobID jobId)
        When job finished successfully.
      • onFailed

        void onFailed​(JobID jobId,
                      Throwable throwable)
        When job failed finally.
      • onCanceled

        void onCanceled​(JobID jobId)
        When job get canceled by users.