You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by cn...@apache.org on 2013/07/02 22:36:38 UTC
svn commit: r1499103 - in /hadoop/common/branches/branch-1-win:
CHANGES.branch-1-win.txt src/core/org/apache/hadoop/util/ProcessTree.java
Author: cnauroth
Date: Tue Jul 2 20:36:37 2013
New Revision: 1499103
URL: http://svn.apache.org/r1499103
Log:
MAPREDUCE-5330. JVM manager should not forcefully kill the process on Signal.TERM on Windows. Contributed by Xi Fang.
Modified:
hadoop/common/branches/branch-1-win/CHANGES.branch-1-win.txt
hadoop/common/branches/branch-1-win/src/core/org/apache/hadoop/util/ProcessTree.java
Modified: hadoop/common/branches/branch-1-win/CHANGES.branch-1-win.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1-win/CHANGES.branch-1-win.txt?rev=1499103&r1=1499102&r2=1499103&view=diff
==============================================================================
--- hadoop/common/branches/branch-1-win/CHANGES.branch-1-win.txt (original)
+++ hadoop/common/branches/branch-1-win/CHANGES.branch-1-win.txt Tue Jul 2 20:36:37 2013
@@ -285,6 +285,9 @@ Branch-hadoop-1-win (branched from branc
HADOOP-9677. TestSetupAndCleanupFailure#testWithDFS fails on Windows.
(Xi Fang via cnauroth)
+ MAPREDUCE-5330. JVM manager should not forcefully kill the process on
+ Signal.TERM on Windows. (Xi Fang via cnauroth)
+
Merged from branch-1
HDFS-385. Backport: Add support for an experimental API that allows a
Modified: hadoop/common/branches/branch-1-win/src/core/org/apache/hadoop/util/ProcessTree.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1-win/src/core/org/apache/hadoop/util/ProcessTree.java?rev=1499103&r1=1499102&r2=1499103&view=diff
==============================================================================
--- hadoop/common/branches/branch-1-win/src/core/org/apache/hadoop/util/ProcessTree.java (original)
+++ hadoop/common/branches/branch-1-win/src/core/org/apache/hadoop/util/ProcessTree.java Tue Jul 2 20:36:37 2013
@@ -170,6 +170,14 @@ public class ProcessTree {
return;
}
+ // If the OS is Windows and the signal is TERM
+ // then return immediately and let a delayed process killer actually
+ // kill this process group.
+ // This can give this process group a graceful time to clean up itself
+ if (Shell.WINDOWS && signal == Signal.TERM) {
+ return;
+ }
+
String[] args =
Shell.getSignalKillProcessGroupCommand(signal.getValue(), pgrpId);
ShellCommandExecutor shexec = new ShellCommandExecutor(args);