Repository: hadoop Updated Branches: refs/heads/trunk edd693833 -> 4f3ca0396
YARN-6510. Fix profs stat file warning caused by process names that includes parenthesis. (Wilfred Spiegelenburg via Haibo Chen) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/4f3ca039 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/4f3ca039 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/4f3ca039 Branch: refs/heads/trunk Commit: 4f3ca0396a810f54f7fd0489a224c1bb13143aa4 Parents: edd6938 Author: Haibo Chen <haiboc...@cloudera.com> Authored: Wed Apr 26 11:43:27 2017 -0700 Committer: Haibo Chen <haiboc...@cloudera.com> Committed: Wed Apr 26 11:46:55 2017 -0700 ---------------------------------------------------------------------- .../org/apache/hadoop/yarn/util/ProcfsBasedProcessTree.java | 2 +- .../apache/hadoop/yarn/util/TestProcfsBasedProcessTree.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/4f3ca039/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/ProcfsBasedProcessTree.java ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/ProcfsBasedProcessTree.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/ProcfsBasedProcessTree.java index a08b90e..d54611e 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/ProcfsBasedProcessTree.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/ProcfsBasedProcessTree.java @@ -58,7 +58,7 @@ public class ProcfsBasedProcessTree extends ResourceCalculatorProcessTree { private static final String PROCFS = "/proc/"; private static final Pattern PROCFS_STAT_FILE_FORMAT = Pattern.compile( - "^([\\d-]+)\\s\\(([^)]+)\\)\\s[^\\s]\\s([\\d-]+)\\s([\\d-]+)\\s" + + "^([\\d-]+)\\s\\((.*)\\)\\s[^\\s]\\s([\\d-]+)\\s([\\d-]+)\\s" + "([\\d-]+)\\s([\\d-]+\\s){7}(\\d+)\\s(\\d+)\\s([\\d-]+\\s){7}(\\d+)\\s" + "(\\d+)(\\s[\\d-]+){15}"); http://git-wip-us.apache.org/repos/asf/hadoop/blob/4f3ca039/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/TestProcfsBasedProcessTree.java ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/TestProcfsBasedProcessTree.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/TestProcfsBasedProcessTree.java index c5fd40c..aad513a 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/TestProcfsBasedProcessTree.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/TestProcfsBasedProcessTree.java @@ -419,7 +419,7 @@ public class TestProcfsBasedProcessTree { new ProcessStatInfo(new String[]{"200", "process two", "100", "100", "100", "200000", "200", "2000", "400"}); procInfos[2] = - new ProcessStatInfo(new String[]{"300", "proc3", "200", "100", + new ProcessStatInfo(new String[]{"300", "proc(3)", "200", "100", "100", "300000", "300", "3000", "600"}); procInfos[3] = new ProcessStatInfo(new String[]{"400", "proc4", "1", "400", "400", @@ -555,7 +555,7 @@ public class TestProcfsBasedProcessTree { new ProcessStatInfo(new String[]{"200", "process two", "100", "100", "100", "200000", "200"}); procInfos[2] = - new ProcessStatInfo(new String[]{"300", "proc3", "1", "300", "300", + new ProcessStatInfo(new String[]{"300", "proc(3)", "1", "300", "300", "300000", "300"}); procInfos[3] = new ProcessStatInfo(new String[]{"400", "proc4", "100", "100", @@ -748,7 +748,7 @@ public class TestProcfsBasedProcessTree { new ProcessStatInfo(new String[]{"200", "process two", "100", "100", "100", "200000", "200", "2000", "400"}); procInfos[2] = - new ProcessStatInfo(new String[]{"300", "proc3", "200", "100", + new ProcessStatInfo(new String[]{"300", "proc(3)", "200", "100", "100", "300000", "300", "3000", "600"}); procInfos[3] = new ProcessStatInfo(new String[]{"400", "proc4", "200", "100", @@ -771,7 +771,7 @@ public class TestProcfsBasedProcessTree { String[] cmdLines = new String[numProcesses]; cmdLines[0] = "proc1 arg1 arg2"; cmdLines[1] = "process two arg3 arg4"; - cmdLines[2] = "proc3 arg5 arg6"; + cmdLines[2] = "proc(3) arg5 arg6"; cmdLines[3] = "proc4 arg7 arg8"; cmdLines[4] = "proc5 arg9 arg10"; cmdLines[5] = "proc6 arg11 arg12"; --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org