hadoop-zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maha...@apache.org
Subject svn commit: r888216 - in /hadoop/zookeeper/trunk: CHANGES.txt src/java/main/org/apache/zookeeper/server/NIOServerCnxn.java
Date Tue, 08 Dec 2009 01:20:43 GMT
Author: mahadev
Date: Tue Dec  8 01:20:42 2009
New Revision: 888216

URL: http://svn.apache.org/viewvc?rev=888216&view=rev
Log:
ZOOKEEPER-611. hudson build failure (take 2) (mahadev)

Modified:
    hadoop/zookeeper/trunk/CHANGES.txt
    hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/NIOServerCnxn.java

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=888216&r1=888215&r2=888216&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Tue Dec  8 01:20:42 2009
@@ -153,6 +153,8 @@
 
   ZOOKEEPER-611.  hudson build failiure (mahadev)
 
+  ZOOKEEPER-611. hudson build failure (take 2) (mahadev)
+
 IMPROVEMENTS:
   ZOOKEEPER-473. cleanup junit tests to eliminate false positives due to
   "socket reuse" and failure to close client (phunt via mahadev)

Modified: hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/NIOServerCnxn.java
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/NIOServerCnxn.java?rev=888216&r1=888215&r2=888216&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/NIOServerCnxn.java (original)
+++ hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/NIOServerCnxn.java Tue
Dec  8 01:20:42 2009
@@ -71,22 +71,25 @@
 
     private ConnectionBean jmxConnectionBean;
 
-    static {
-        Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
-            public void uncaughtException(Thread t, Throwable e) {
-                LOG.error("Thread " + t + " died", e);
+    static public class Factory extends Thread {
+        static {
+            Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler()
{
+                public void uncaughtException(Thread t, Throwable e) {
+                    LOG.error("Thread " + t + " died", e);
+                }
+            });
+            /**
+             * this is to avoid the jvm bug:
+             * NullPointerException in Selector.open()
+             * http://bugs.sun.com/view_bug.do?bug_id=6427854
+             */
+            try {
+                Selector.open().close();
+            } catch(IOException ie) {
+                LOG.error("Selector failed to open", ie);
             }
-        });
-        /**
-         * this is to avoid the jvm bug:
-         * NullPointerException in Selector.open()
-         * http://bugs.sun.com/view_bug.do?bug_id=6427854
-         */
-        System.setProperty("sun.nio.ch.bugLevel", 
-                System.getProperty("sun.nio.ch.bugLevel",""));
-    }
+        }
 
-    static public class Factory extends Thread {
         ZooKeeperServer zks;
 
         ServerSocketChannel ss;



Mime
View raw message