[ https://issues.apache.org/jira/browse/HADOOP-8852?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Karthik Kambatla updated HADOOP-8852: ------------------------------------- Attachment: hadoop-8852-v1.patch Here is a preliminary patch that makes {{DelegationTokenRenewer}} a singleton: # Dropped the generic part of it # capture the requirement to extend {{FileSystem}} by augmenting the API - {{public <T extends FileSystem & Renewable> void addRenewAction(final T fs)}} # {{WebHdfsFileSystem}} and {{HftpFileSystem}} de-register from {{DelegationTokenRenewer}} in {{close()}} Removing a FileSystem from the queue currently is linear in queue-size. I thought it might be okay, given that the queue should be small. Alternatively, we can maintain a list of removed FileSystems; {{run()}} could remove {{RenewAction}} (from {{queue.take()}}) if it were present in the remove-list. This patch doesn't shutdown {{DelegationTokenRenewer}} when it can't renew tokens. Shutting down the thread alone can lead to interesting scenarios when new {{RenewAction}}s are added. Nullifying the {{INSTANCE}} after interrupting the thread will lead to {{FileSystem}}'s trying to use the stale reference? Not sure what the best way to handle this would be. Thoughts? > DelegationTokenRenewer thread is not stopped when its filesystem is closed > -------------------------------------------------------------------------- > > Key: HADOOP-8852 > URL: https://issues.apache.org/jira/browse/HADOOP-8852 > Project: Hadoop Common > Issue Type: Bug > Affects Versions: 2.0.0-alpha > Reporter: Tom White > Assignee: Karthik Kambatla > Attachments: hadoop-8852.patch, hadoop-8852.patch, > hadoop-8852-v1.patch > > > HftpFileSystem and WebHdfsFileSystem should stop the DelegationTokenRenewer > thread when they are closed. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira