Author: llu Date: Mon Sep 30 17:01:51 2013 New Revision: 1527651 URL: http://svn.apache.org/r1527651 Log: HADOOP-9964. Fix deadlocks in TestHttpServer by synchronize ReflectionUtils.printThreadInfo. (Junping Du via llu)
Modified: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/ReflectionUtils.java Modified: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt?rev=1527651&r1=1527650&r2=1527651&view=diff ============================================================================== --- hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt (original) +++ hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt Mon Sep 30 17:01:51 2013 @@ -61,6 +61,9 @@ Release 2.3.0 - UNRELEASED BUG FIXES + HADOOP-9964. Fix deadlocks in TestHttpServer by synchronize + ReflectionUtils.printThreadInfo. (Junping Du via llu) + HADOOP-9582. Non-existent file to "hadoop fs -conf" doesn't throw error (Ashwin Shankar via jlowe) Modified: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/ReflectionUtils.java URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/ReflectionUtils.java?rev=1527651&r1=1527650&r2=1527651&view=diff ============================================================================== --- hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/ReflectionUtils.java (original) +++ hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/ReflectionUtils.java Mon Sep 30 17:01:51 2013 @@ -154,7 +154,7 @@ public class ReflectionUtils { * @param stream the stream to * @param title a string title for the stack trace */ - public static void printThreadInfo(PrintWriter stream, + public synchronized static void printThreadInfo(PrintWriter stream, String title) { final int STACK_DEPTH = 20; boolean contention = threadBean.isThreadContentionMonitoringEnabled();