svn merge -c 1373090 FIXES: HDFS-3718. Datanode won't shutdown because of runaway DataBlockScanner thread (Kihwal Lee via daryn)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1373095 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Daryn Sharp 2012-08-14 21:01:34 +00:00
parent d0e5d7e971
commit 2964cc0f59
2 changed files with 4 additions and 1 deletions

View File

@ -1348,6 +1348,9 @@ Release 0.23.3 - UNRELEASED
HDFS-3553. Hftp proxy tokens are broken (daryn) HDFS-3553. Hftp proxy tokens are broken (daryn)
HDFS-3718. Datanode won't shutdown because of runaway DataBlockScanner
thread (Kihwal Lee via daryn)
Release 0.23.2 - UNRELEASED Release 0.23.2 - UNRELEASED
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -1065,6 +1065,7 @@ public class DataNode extends Configured
} }
} }
this.shouldRun = false;
shutdownPeriodicScanners(); shutdownPeriodicScanners();
if (infoServer != null) { if (infoServer != null) {
@ -1078,7 +1079,6 @@ public class DataNode extends Configured
ipcServer.stop(); ipcServer.stop();
} }
this.shouldRun = false;
if (dataXceiverServer != null) { if (dataXceiverServer != null) {
((DataXceiverServer) this.dataXceiverServer.getRunnable()).kill(); ((DataXceiverServer) this.dataXceiverServer.getRunnable()).kill();
this.dataXceiverServer.interrupt(); this.dataXceiverServer.interrupt();