Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-2988

Graph#save() may leak file descriptors

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 2.7.0
    • None
    • None
    • Reviewed

    Description

      In hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/state/Graph.java :

        public void save(String filepath) throws IOException {
          OutputStreamWriter fout = new OutputStreamWriter(
              new FileOutputStream(filepath), Charset.forName("UTF-8"));
          fout.write(generateGraphViz());
          fout.close();
      

      The close of fout should be enclosed in finally clause.

      Attachments

        1. YARN-2988-001.patch
          0.9 kB
          Ted Yu
        2. YARN-2988-002.patch
          1.0 kB
          Ted Yu

        Activity

          People

            yuzhihong@gmail.com Ted Yu
            yuzhihong@gmail.com Ted Yu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: