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

Return jar name when jar is uploaded

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3.0
    • Component/s: Web Client
    • Labels:
      None

      Description

      As as a Jenkins user who wants to uplaod jar through http call, I want jar file name is returned after jar is uploaded.
      Currently it returns nothing, as the code shown:
      File newFile = new File(jarDir, UUID.randomUUID() + "_" + filename);
      if (tempFile.renameTo(newFile)) {
      // all went well
      return "{}";
      }
      Ref: https://github.com/apache/flink/blob/master/flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/handlers/JarUploadHandler.java#L58

      My proposal will be

      reuturn

      {"fileName": newFile.getName()}

      Any suggestion is welcome.

        Issue Links

          Activity

          Hide
          bill.liu8904 Bill Liu added a comment -

          I vote for this, the jar id is required to run the job via Rest API.
          So it's better to return it in the upload result.

          Show
          bill.liu8904 Bill Liu added a comment - I vote for this, the jar id is required to run the job via Rest API. So it's better to return it in the upload result.
          Hide
          wolli Fabian Wollert added a comment -

          +1 ... i could also do this, if wanted/approved as an issue ...

          Show
          wolli Fabian Wollert added a comment - +1 ... i could also do this, if wanted/approved as an issue ...
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user drummerwolli opened a pull request:

          https://github.com/apache/flink/pull/3469

          FLINK-5598 return filename after jar upload

          We use the Flink Web Backend to control Flink Jobs running in our Cluster. We would like to have more control in the API. This is the first change I propose, changing the output of the upload JAR Endpoint to something meaningful. To start a Flink Job you need to have the Jar Name, which gets created randomly during upload. The API now returns this.

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/drummerwolli/flink FLINK-5598_return_file_name

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/flink/pull/3469.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #3469


          commit c3cea2ab335cd6c884bec66c68f202751219b1c3
          Author: Fabian Wollert <darkwolli32@gmail.com>
          Date: 2017-03-03T16:40:02Z

          FLINK-5598 return filename after jar upload


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user drummerwolli opened a pull request: https://github.com/apache/flink/pull/3469 FLINK-5598 return filename after jar upload We use the Flink Web Backend to control Flink Jobs running in our Cluster. We would like to have more control in the API. This is the first change I propose, changing the output of the upload JAR Endpoint to something meaningful. To start a Flink Job you need to have the Jar Name, which gets created randomly during upload. The API now returns this. You can merge this pull request into a Git repository by running: $ git pull https://github.com/drummerwolli/flink FLINK-5598 _return_file_name Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/3469.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #3469 commit c3cea2ab335cd6c884bec66c68f202751219b1c3 Author: Fabian Wollert <darkwolli32@gmail.com> Date: 2017-03-03T16:40:02Z FLINK-5598 return filename after jar upload
          Hide
          rmetzger Robert Metzger added a comment -

          Thanks a lot for fixing this issue. I assigned the JIRA to you (you can now assign JIRAs yourself, since you have "Contributor" permissions now). Note that I gave your @zalando.com account the permissions.

          Show
          rmetzger Robert Metzger added a comment - Thanks a lot for fixing this issue. I assigned the JIRA to you (you can now assign JIRAs yourself, since you have "Contributor" permissions now). Note that I gave your @zalando.com account the permissions.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user rmetzger commented on the issue:

          https://github.com/apache/flink/pull/3469

          Good change. +1 to merge.

          Show
          githubbot ASF GitHub Bot added a comment - Github user rmetzger commented on the issue: https://github.com/apache/flink/pull/3469 Good change. +1 to merge.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user StephanEwen commented on the issue:

          https://github.com/apache/flink/pull/3469

          Merging this...

          Show
          githubbot ASF GitHub Bot added a comment - Github user StephanEwen commented on the issue: https://github.com/apache/flink/pull/3469 Merging this...
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/flink/pull/3469

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/flink/pull/3469
          Hide
          StephanEwen Stephan Ewen added a comment -

          Fixed via 84afd068ac229e4d598fffdf10075e9d356fbe07

          Show
          StephanEwen Stephan Ewen added a comment - Fixed via 84afd068ac229e4d598fffdf10075e9d356fbe07

            People

            • Assignee:
              fwollert Fabian Wollert
              Reporter:
              HungChang Sendoh
            • Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development