hadoop-zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maha...@apache.org
Subject svn commit: r889829 - in /hadoop/zookeeper/trunk: CHANGES.txt src/c/src/zookeeper.c src/java/main/org/apache/zookeeper/ClientCnxn.java src/java/main/org/apache/zookeeper/server/NIOServerCnxn.java
Date Fri, 11 Dec 2009 21:46:15 GMT
Author: mahadev
Date: Fri Dec 11 21:46:06 2009
New Revision: 889829

URL: http://svn.apache.org/viewvc?rev=889829&view=rev
Log:
ZOOKEEPER-587.  client should log timeout negotiated with server (phunt via mahadev)

Modified:
    hadoop/zookeeper/trunk/CHANGES.txt
    hadoop/zookeeper/trunk/src/c/src/zookeeper.c
    hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/ClientCnxn.java
    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=889829&r1=889828&r2=889829&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Fri Dec 11 21:46:06 2009
@@ -157,7 +157,11 @@
 
   ZOOKEEPER-615. wrong javadoc for create with a sequence flag (mahadev via breed)
 
-  ZOOKEEPER-588. remove unnecessary/annoying log of tostring error in Request.toString()
(phunt via breed)
+  ZOOKEEPER-588. remove unnecessary/annoying log of tostring error in 
+  Request.toString() (phunt via breed)
+
+  ZOOKEEPER-587.  client should log timeout negotiated with server (phunt via
+  mahadev)
 
 IMPROVEMENTS:
   ZOOKEEPER-473. cleanup junit tests to eliminate false positives due to

Modified: hadoop/zookeeper/trunk/src/c/src/zookeeper.c
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/c/src/zookeeper.c?rev=889829&r1=889828&r2=889829&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/src/c/src/zookeeper.c (original)
+++ hadoop/zookeeper/trunk/src/c/src/zookeeper.c Fri Dec 11 21:46:06 2009
@@ -1502,10 +1502,12 @@
                     zh->recv_timeout = zh->primer_storage.timeOut;
                     zh->client_id.client_id = newid;
                  
-                    memcpy(zh->client_id.passwd, &zh->primer_storage.passwd, sizeof(zh->client_id.passwd));
+                    memcpy(zh->client_id.passwd, &zh->primer_storage.passwd,
+                           sizeof(zh->client_id.passwd));
                     zh->state = ZOO_CONNECTED_STATE;
-                    LOG_INFO(("connected to server [%s] with sessionId=%#llx",
-                            format_endpoint_info(&zh->addrs[zh->connect_index]),newid));
+                    LOG_INFO(("session establishment complete on server [%s], sessionId=%#llx,
negotiated timeout=%d",
+                              format_endpoint_info(&zh->addrs[zh->connect_index]),
+                              newid, zh->recv_timeout));
                     /* we want the auth to be sent for, but since both call push to front
                        we need to call send_watch_set first */
                     send_set_watches(zh);

Modified: hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/ClientCnxn.java
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/ClientCnxn.java?rev=889829&r1=889828&r2=889829&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/ClientCnxn.java (original)
+++ hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/ClientCnxn.java Fri Dec 11 21:46:06
2009
@@ -637,8 +637,12 @@
             sessionId = conRsp.getSessionId();
             sessionPasswd = conRsp.getPasswd();
             zooKeeper.state = States.CONNECTED;
-            LOG.info("Session establishment complete, sessionid = 0x"
-                    + Long.toHexString(sessionId));
+            LOG.info("Session establishment complete on server "
+                    + ((SocketChannel)sockKey.channel())
+                        .socket().getRemoteSocketAddress()
+                    + ", sessionid = 0x"
+                    + Long.toHexString(sessionId)
+                    + ", negotiated timeout = " + sessionTimeout);
             eventThread.queueEvent(new WatchedEvent(Watcher.Event.EventType.None,
                     Watcher.Event.KeeperState.SyncConnected, null));
         }

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=889829&r1=889828&r2=889829&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 Fri
Dec 11 21:46:06 2009
@@ -1141,6 +1141,7 @@
             } else {
                 LOG.info("Established session 0x"
                         + Long.toHexString(sessionId)
+                        + " with negotiated timeout " + sessionTimeout
                         + " for client "
                         + sock.socket().getRemoteSocketAddress());
             }



Mime
View raw message