HDFS-8896. DataNode object isn't GCed when shutdown, because it has GC root in ShutdownHookManager. Contributed by Walter Su.
This commit is contained in:
parent
c992bcf9c1
commit
f44b599003
@ -187,4 +187,10 @@ public boolean isShutdownInProgress() {
|
||||
return shutdownInProgress.get();
|
||||
}
|
||||
|
||||
/**
|
||||
* clear all registered shutdownHooks.
|
||||
*/
|
||||
public void clearShutdownHooks() {
|
||||
hooks.clear();
|
||||
}
|
||||
}
|
||||
|
@ -841,6 +841,9 @@ Release 2.8.0 - UNRELEASED
|
||||
HDFS-8951. Move the shortcircuit package to hdfs-client.
|
||||
(Mingliang Liu via wheat9)
|
||||
|
||||
HDFS-8896. DataNode object isn't GCed when shutdown, because it has GC
|
||||
root in ShutdownHookManager. (Walter Su via jing9)
|
||||
|
||||
OPTIMIZATIONS
|
||||
|
||||
HDFS-8026. Trace FSOutputSummer#writeChecksumChunks rather than
|
||||
|
@ -119,6 +119,7 @@
|
||||
import org.apache.hadoop.security.authorize.ProxyUsers;
|
||||
import org.apache.hadoop.test.GenericTestUtils;
|
||||
import org.apache.hadoop.util.ExitUtil;
|
||||
import org.apache.hadoop.util.ShutdownHookManager;
|
||||
import org.apache.hadoop.util.StringUtils;
|
||||
import org.apache.hadoop.util.ToolRunner;
|
||||
|
||||
@ -1867,6 +1868,7 @@ public void shutdown(boolean deleteDfsDir, boolean closeFileSystem) {
|
||||
nameNode = null;
|
||||
}
|
||||
}
|
||||
ShutdownHookManager.get().clearShutdownHooks();
|
||||
if (base_dir != null) {
|
||||
if (deleteDfsDir) {
|
||||
base_dir.delete();
|
||||
|
Loading…
Reference in New Issue
Block a user