Interface JobListener


  • @PublicEvolving
    public interface JobListener
    A listener that is notified on specific job status changed, which should be firstly registered by #registerJobListener of execution environments.

    It is highly recommended NOT to perform any blocking operation inside the callbacks. If you block the thread the invoker of environment execute methods is possibly blocked.

    • Method Detail

      • onJobSubmitted

        void onJobSubmitted​(@Nullable
                            JobClient jobClient,
                            @Nullable
                            Throwable throwable)
        Callback on job submission. This is called when execute() or executeAsync() is called.

        Exactly one of the passed parameters is null, respectively for failure or success.

        Parameters:
        jobClient - a JobClient for the submitted Flink job
        throwable - the cause if submission failed
      • onJobExecuted

        void onJobExecuted​(@Nullable
                           JobExecutionResult jobExecutionResult,
                           @Nullable
                           Throwable throwable)
        Callback on job execution finished, successfully or unsuccessfully. It is only called back when you call execute() instead of executeAsync() methods of execution environments.

        Exactly one of the passed parameters is null, respectively for failure or success.