[
https://issues.apache.org/jira/browse/YARN-5811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15643881#comment-15643881
]
Denis Bolshakov commented on YARN-5811:
---------------------------------------
[~templedf] I've just cancelled patch, and now how a bunch of doubts, I would
like to hear your opinion about them before closing the issue.
1. I changed my mind because implementing Closeable interface will advise API
users to fire `close` method on ConfigurationProvider.
2. Firing close method for FileSystemBasedConfigurationProvider is dangerous,
because it calls close method of static object (FileSystem.close) and that can
effect the whole JVM
3. I would insist to remove fs.close() from
FileSystemBasedConfigurationProvider, because this class is not responsible for
creating FileSystem object, so it's not clear why it releases its resources.
4. And just a question, what problem does `inner method pattern` solve?
> ConfigurationProvider must implement Closeable interface
> --------------------------------------------------------
>
> Key: YARN-5811
> URL: https://issues.apache.org/jira/browse/YARN-5811
> Project: Hadoop YARN
> Issue Type: Improvement
> Components: yarn
> Reporter: Denis Bolshakov
> Priority: Minor
> Labels: newbie
> Attachments: YARN-5811.1.patch, YARN-5811.3.patch, YARN-5811.5.patch,
> YARN-5811.6.patch
>
>
> ConfigurationProvider declares close method, it would be so nice if the class
> implements Closeable interface allowing to use `try with resources`
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]