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

Fix resource leak due to Files.walk

    XMLWordPrintableJSON

Details

    • Reviewed

    Description

      Stream creates by File.walk should be closed, like jdk said:

      • <p> The returned stream encapsulates one or more {@link DirectoryStream}s.
      • If timely disposal of file system resources is required, the
      • {@code try}

        -with-resources construct should be used to ensure that the

      • stream's {@link Stream#close close} method is invoked after the stream
      • operations are completed. Operating on a closed stream will result in an
      • {@link java.lang.IllegalStateException}

        .

      Attachments

        Issue Links

          Activity

            People

              xiaoheipangzi lujie
              xiaoheipangzi lujie
              Votes:
              0 Vote for this issue
              Watchers:
              2 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 - 0.5h
                  0.5h