Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-12214

Add JobListener(hook) in flink job lifecycle

    XMLWordPrintableJSON

Details

    Description

      Third party library would like to add some hook when submitting jobs. So it would be nice to have JobListener for flink.

      More details about the motivation:

      The background is that I am working on integrating flink with apache zeppelin notebook. In apache zeppelin notebook, we allow user to run flink scala code or sql. For each piece fo code, I'd like to associate it with its corresponding flink job. So that user can link to flink job ui in zeppelin notebook, also he can cancel this job. Here's one screenshot of my POC, in this screenshot you can see the FLINK JOB link which will link to the flink job ui. That's why I'd like to add hook in flink's job submission, so that I can link each piece of flink code to paragraph (the following screenshot) which is a concept of zeppelin and is a container that host this piece of code. 

      Here's the sample code for reference about how I use JobListener in zeppelin.

      https://github.com/zjffdu/zeppelin/blob/blink_poc/flink/src/main/scala/org/apache/zeppelin/flink/FlinkScalaInterpreter.scala#L251

       

      Attachments

        1. image-2019-04-17-00-11-00-020.png
          95 kB
          Jeff Zhang
        2. image-2019-04-17-00-13-15-999.png
          101 kB
          Jeff Zhang
        3. image-2019-04-17-00-15-16-750.png
          101 kB
          Jeff Zhang

        Activity

          People

            zjffdu Jeff Zhang
            zjffdu Jeff Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 20m
                20m