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

input should be closed in finally block in YarnFlinkApplicationMasterRunner#loadJobGraph()

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3.0
    • Component/s: None
    • Labels:
      None

      Description

              FileInputStream input = new FileInputStream(fp);
              ObjectInputStream obInput = new ObjectInputStream(input);
              jg = (JobGraph) obInput.readObject();
              input.close();
      

      If readObject() throws exception, input would be left unclosed.

      Similar issue is in AbstractYarnClusterDescriptor#startAppMaster() around line 726.

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user MayerRoman opened a pull request:

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

          FLINK-5390 [yarn] Fix for proper closing input and output streams, in case of errors

          FLINK-5390 input should be closed in finally block in YarnFlinkApplicationMasterRunner#loadJobGraph()

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

          $ git pull https://github.com/MayerRoman/flink FLINK-5390

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

          https://github.com/apache/flink/pull/3045.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 #3045


          commit 3e71b439908a2f89bac9542e249312036c652a4b
          Author: Roman Maier <roman_maier@epam.com>
          Date: 2016-12-26T13:24:11Z

          FLINK-5390 [yarn] Fix for proper closing input and output streams, in case of errors


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user MayerRoman opened a pull request: https://github.com/apache/flink/pull/3045 FLINK-5390 [yarn] Fix for proper closing input and output streams, in case of errors FLINK-5390 input should be closed in finally block in YarnFlinkApplicationMasterRunner#loadJobGraph() You can merge this pull request into a Git repository by running: $ git pull https://github.com/MayerRoman/flink FLINK-5390 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/3045.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 #3045 commit 3e71b439908a2f89bac9542e249312036c652a4b Author: Roman Maier <roman_maier@epam.com> Date: 2016-12-26T13:24:11Z FLINK-5390 [yarn] Fix for proper closing input and output streams, in case of errors
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user StephanEwen commented on the issue:

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

          I think this is good, merging this...

          Show
          githubbot ASF GitHub Bot added a comment - Github user StephanEwen commented on the issue: https://github.com/apache/flink/pull/3045 I think this is good, merging this...
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

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

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

          Fixed via 9f7ad84abf7f1c33c4ee40be1eb0297a28a30f57

          Thank you for the contribution!

          Show
          StephanEwen Stephan Ewen added a comment - Fixed via 9f7ad84abf7f1c33c4ee40be1eb0297a28a30f57 Thank you for the contribution!

            People

            • Assignee:
              roman_maier Roman Maier
              Reporter:
              yuzhihong@gmail.com Ted Yu
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development