hadoop-zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maha...@apache.org
Subject svn commit: r740486 - in /hadoop/zookeeper/trunk: CHANGES.txt src/java/main/org/apache/zookeeper/server/NIOServerCnxn.java
Date Tue, 03 Feb 2009 22:19:40 GMT
Author: mahadev
Date: Tue Feb  3 22:19:40 2009
New Revision: 740486

URL: http://svn.apache.org/viewvc?rev=740486&view=rev
Log:
ZOOKEEPER-289. add debug messages to nioserver select loop. (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=740486&r1=740485&r2=740486&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Tue Feb  3 22:19:40 2009
@@ -150,6 +150,8 @@
 
    ZOOKEEPER-220. programming guide watches section should clarify
    server/clientlib role in data/child watch maint. (breed via phunt)
+ 
+   ZOOKEEPER-289. add debug messages to nioserver select loop. (mahadev)
 
 NEW FEATURES:
 

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=740486&r1=740485&r2=740486&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
Feb  3 22:19:40 2009
@@ -160,6 +160,11 @@
                         } else if ((k.readyOps() & (SelectionKey.OP_READ | SelectionKey.OP_WRITE))
!= 0) {
                             NIOServerCnxn c = (NIOServerCnxn) k.attachment();
                             c.doIO(k);
+                        } else {
+                            if (LOG.isDebugEnabled()) {
+                                LOG.debug("Unexpected ops in select "
+                                          + k.readyOps());
+                            }
                         }
                     }
                     selected.clear();
@@ -279,6 +284,9 @@
     void doIO(SelectionKey k) throws InterruptedException {
         try {
             if (sock == null) {
+                LOG.warn("trying to do i/o on a null socket for session:0x"
+                         + Long.toHexString(sessionId));
+
                 return;
             }
             if (k.isReadable()) {
@@ -434,7 +442,7 @@
                             != KeeperException.Code.OK)) {
                 if (ap == null) {
                     LOG.warn("No authentication provider for scheme: "
-                            + scheme + " has " 
+                            + scheme + " has "
                             + ProviderRegistry.listProviders());
                 } else {
                     LOG.warn("Authentication failed for scheme: " + scheme);
@@ -502,7 +510,7 @@
                 + Long.toHexString(connReq.getLastZxidSeen())
                 + " our last zxid is 0x"
                 + Long.toHexString(zk.dataTree.lastProcessedZxid);
-            
+
             LOG.error(msg);
             throw new IOException(msg);
         }
@@ -885,7 +893,7 @@
             close();
         }
     }
-    
+
     /*
      * (non-Javadoc)
      *



Mime
View raw message