hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Weiwei Yang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-5939) Disabling the cache of FileSystem leads to case that never close the FileSystem
Date Wed, 30 Nov 2016 10:12:59 GMT

    [ https://issues.apache.org/jira/browse/YARN-5939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15708143#comment-15708143
] 

Weiwei Yang commented on YARN-5939:
-----------------------------------

Submitting a patch to fix this. It is found that in {{FSDownload}} class, there are quite
of some places leaks FileSystem resources. I improved {{TestFSDownload}} and added {{verifyFileSystemClosed}}
at the end of each test to verify file system is properly closed. Without the patch, I saw

{noformat}
TestFSDownload.testDirDownload:743->verifyFileSystemClosed:784 FileSystem was not closed
expected:<0> but was:<16>
TestFSDownload.testUniqueDestinationPath:780->verifyFileSystemClosed:784 FileSystem was
not closed expected:<0> but was:<3>
TestFSDownload.testDownloadArchiveZipWithTurkishLocale:617->verifyFileSystemClosed:784
FileSystem was not closed expected:<0> but was:<3>
TestFSDownload.testDownloadPatternJar:592->verifyFileSystemClosed:784 FileSystem was not
closed expected:<0> but was:<3>
TestFSDownload.testDownloadArchive:584->verifyFileSystemClosed:784 FileSystem was not closed
expected:<0> but was:<3>
TestFSDownload.testDownloadArchiveTgz:625->verifyFileSystemClosed:784 FileSystem was not
closed expected:<0> but was:<3>
TestFSDownload.testDownloadArchiveZip:600->verifyFileSystemClosed:784 FileSystem was not
closed expected:<0> but was:<3>
TestFSDownload.testDownloadBadPublic:340->verifyFileSystemClosed:784 FileSystem was not
closed expected:<0> but was:<1>
TestFSDownload.testDownloadPublicWithStatCache:423->verifyFileSystemClosed:784 FileSystem
was not closed expected:<0> but was:<10>
TestFSDownload.testDownload:500->verifyFileSystemClosed:784 FileSystem was not closed expected:<0>
but was:<30>
{noformat}

after applied the patch, these issues are fixed. Hi [~lxw668899], could you please check if
the fix would resolve the problem ?

> Disabling the cache of FileSystem leads to case that never close the FileSystem
> -------------------------------------------------------------------------------
>
>                 Key: YARN-5939
>                 URL: https://issues.apache.org/jira/browse/YARN-5939
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: nodemanager
>    Affects Versions: 2.5.1, 2.7.3
>            Reporter: liuxiangwei
>            Assignee: Weiwei Yang
>         Attachments: YARN-5939.01.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Background
> To use our self-defined FileSystem class, the item of configuration "fs.%s.impl.disable.cache"
should set to true.
> In YARN's source code, the class named "org.apache.hadoop.yarn.util.FSDownload" use getFileSystem
but never close, which leading to file descriptor leak because our self-defined FileSystem
class close the file descriptor when the close function is invoked.
> My Question below:
> 1. whether invoking "getFileSystem" but never close is YARN's expected behavior 
> 2. what should we do in our self-defined FileSystem resolve it.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message