[ https://issues.apache.org/jira/browse/TWILL-227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15946000#comment-15946000 ]
ASF GitHub Bot commented on TWILL-227: -------------------------------------- Github user chtyim commented on a diff in the pull request: https://github.com/apache/twill/pull/46#discussion_r108542463 --- Diff: twill-yarn/src/main/java/org/apache/twill/internal/yarn/YarnUtils.java --- @@ -159,19 +159,19 @@ public static ApplicationId createApplicationId(long timestamp, int id) { return ImmutableList.of(); } - FileSystem fileSystem = getFileSystem(locationFactory, config); - - if (fileSystem == null) { - LOG.warn("Unexpected: LocationFactory is not backed by FileContextLocationFactory"); - return ImmutableList.of(); - } + try (FileSystem fileSystem = getFileSystem(locationFactory)) { + if (fileSystem == null) { + LOG.warn("Unexpected: LocationFactory is not backed by FileContextLocationFactory"); --- End diff -- Updated > Possible leakage of FileSystem object when YarnUtils.addDelegationTokens is > called with different user > ------------------------------------------------------------------------------------------------------ > > Key: TWILL-227 > URL: https://issues.apache.org/jira/browse/TWILL-227 > Project: Apache Twill > Issue Type: Bug > Affects Versions: 0.11.0 > Reporter: Terence Yim > Assignee: Terence Yim > Fix For: 0.11.0 > > > The {{FileSystem.get}} caches instance for different UGI by default and the > cache will never cleanup until process shutdown. -- This message was sent by Atlassian JIRA (v6.3.15#6346)