HDFS-4768. File handle leak in datanode when a block pool is removed. Contributed by Chris Nauroth.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1476579 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Suresh Srinivas 2013-04-27 14:08:34 +00:00
parent fc45cbf8df
commit 4e21c347d2
2 changed files with 7 additions and 1 deletions

View File

@ -582,6 +582,9 @@ Release 2.0.5-beta - UNRELEASED
HDFS-4745. TestDataTransferKeepalive#testSlowReader has race condition that
causes sporadic failure. (Chris Nauroth via suresh)
HDFS-4768. File handle leak in datanode when a block pool is removed.
(Chris Nauroth via suresh)
Release 2.0.4-alpha - UNRELEASED
INCOMPATIBLE CHANGES

View File

@ -267,7 +267,10 @@ public class DataBlockScanner implements Runnable {
}
public synchronized void removeBlockPool(String blockPoolId) {
blockPoolScannerMap.remove(blockPoolId);
BlockPoolSliceScanner bpss = blockPoolScannerMap.remove(blockPoolId);
if (bpss != null) {
bpss.shutdown();
}
LOG.info("Removed bpid="+blockPoolId+" from blockPoolScannerMap");
}