You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-dev@hadoop.apache.org by "lujie (Jira)" <ji...@apache.org> on 2021/10/14 05:15:00 UTC

[jira] [Created] (YARN-10976) Resource Leak due to Files.walk

lujie created YARN-10976:
----------------------------

             Summary: Resource Leak due to Files.walk
                 Key: YARN-10976
                 URL: https://issues.apache.org/jira/browse/YARN-10976
             Project: Hadoop YARN
          Issue Type: Improvement
            Reporter: lujie


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}.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-dev-help@hadoop.apache.org