hadoop-zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ph...@apache.org
Subject svn commit: r803000 - in /hadoop/zookeeper/trunk: ./ src/c/include/ src/java/main/org/apache/zookeeper/jmx/ src/java/main/org/apache/zookeeper/server/ src/java/main/org/apache/zookeeper/server/quorum/ src/java/test/org/apache/zookeeper/test/
Date Tue, 11 Aug 2009 06:16:42 GMT
Author: phunt
Date: Tue Aug 11 06:16:41 2009
New Revision: 803000

URL: http://svn.apache.org/viewvc?rev=803000&view=rev
Log:
reverted: ZOOKEEPER-483. ZK fataled on me, and ugly

Modified:
    hadoop/zookeeper/trunk/CHANGES.txt
    hadoop/zookeeper/trunk/src/c/include/zookeeper_log.h   (props changed)
    hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/jmx/CommonNames.java   (props
changed)
    hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/jmx/MBeanRegistry.java   (props
changed)
    hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/jmx/ManagedUtil.java   (props
changed)
    hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/jmx/ZKMBeanInfo.java   (props
changed)
    hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/ConnectionBean.java 
 (props changed)
    hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/ConnectionMXBean.java
  (props changed)
    hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/DataTreeBean.java   (props
changed)
    hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/DataTreeMXBean.java 
 (props changed)
    hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/ZooKeeperServerBean.java
  (props changed)
    hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/ZooKeeperServerMXBean.java
  (props changed)
    hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/FollowerBean.java
  (props changed)
    hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/FollowerMXBean.java
  (props changed)
    hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/LeaderBean.java
  (props changed)
    hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/LeaderElectionBean.java
  (props changed)
    hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/LeaderElectionMXBean.java
  (props changed)
    hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/LeaderMXBean.java
  (props changed)
    hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/LocalPeerBean.java
  (props changed)
    hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/LocalPeerMXBean.java
  (props changed)
    hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumBean.java
  (props changed)
    hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumMXBean.java
  (props changed)
    hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/RemotePeerBean.java
  (props changed)
    hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/RemotePeerMXBean.java
  (props changed)
    hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/SendAckRequestProcessor.java
    hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/ServerBean.java
  (props changed)
    hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/ServerMXBean.java
  (props changed)
    hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/QuorumTest.java

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=803000&r1=802999&r2=803000&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Tue Aug 11 06:16:41 2009
@@ -57,12 +57,11 @@
 
   ZOOKEEPER-501. CnxManagerTest failed on hudson. (flavio via mahadev)
   
-  ZOOKEEPER-499. electionAlg should default to FLE (3) - regression
-  (phunt via mahadev) 
+  ZOOKEEPER-499. electionAlg should default to FLE (3) - regression (phunt via
+  mahadev) 
 
   ZOOKEEPER-477. zkCleanup.sh is flaky (fernando via mahadev)
 
-  ZOOKEEPER-483. ZK fataled on me, and ugly (breed via phunt)
 
 IMPROVEMENTS:
   ZOOKEEPER-473. cleanup junit tests to eliminate false positives due to

Propchange: hadoop/zookeeper/trunk/src/c/include/zookeeper_log.h
            ('svn:mergeinfo' removed)

Propchange: hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/jmx/CommonNames.java
            ('svn:mergeinfo' removed)

Propchange: hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/jmx/MBeanRegistry.java
            ('svn:mergeinfo' removed)

Propchange: hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/jmx/ManagedUtil.java
            ('svn:mergeinfo' removed)

Propchange: hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/jmx/ZKMBeanInfo.java
            ('svn:mergeinfo' removed)

Propchange: hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/ConnectionBean.java
            ('svn:mergeinfo' removed)

Propchange: hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/ConnectionMXBean.java
            ('svn:mergeinfo' removed)

Propchange: hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/DataTreeBean.java
            ('svn:mergeinfo' removed)

Propchange: hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/DataTreeMXBean.java
            ('svn:mergeinfo' removed)

Propchange: hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/ZooKeeperServerBean.java
            ('svn:mergeinfo' removed)

Propchange: hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/ZooKeeperServerMXBean.java
            ('svn:mergeinfo' removed)

Propchange: hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/FollowerBean.java
            ('svn:mergeinfo' removed)

Propchange: hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/FollowerMXBean.java
            ('svn:mergeinfo' removed)

Propchange: hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/LeaderBean.java
            ('svn:mergeinfo' removed)

Propchange: hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/LeaderElectionBean.java
            ('svn:mergeinfo' removed)

Propchange: hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/LeaderElectionMXBean.java
            ('svn:mergeinfo' removed)

Propchange: hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/LeaderMXBean.java
            ('svn:mergeinfo' removed)

Propchange: hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/LocalPeerBean.java
            ('svn:mergeinfo' removed)

Propchange: hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/LocalPeerMXBean.java
            ('svn:mergeinfo' removed)

Propchange: hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumBean.java
            ('svn:mergeinfo' removed)

Propchange: hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumMXBean.java
            ('svn:mergeinfo' removed)

Propchange: hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/RemotePeerBean.java
            ('svn:mergeinfo' removed)

Propchange: hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/RemotePeerMXBean.java
            ('svn:mergeinfo' removed)

Modified: hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/SendAckRequestProcessor.java
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/SendAckRequestProcessor.java?rev=803000&r1=802999&r2=803000&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/SendAckRequestProcessor.java
(original)
+++ hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/SendAckRequestProcessor.java
Tue Aug 11 06:16:41 2009
@@ -43,33 +43,13 @@
             try {
                 follower.writePacket(qp, false);
             } catch (IOException e) {
-                LOG.warn("Closing connection to leader, exception during packet send", e);
-                try {
-                    if (!follower.sock.isClosed()) {
-                        follower.sock.close();
-                    }
-                } catch (IOException e1) {
-                    // Nothing to do, we are shutting things down, so an exception here is
irrelevant
-                    LOG.debug("Ignoring error closing the connection", e1);
-                }
+                LOG.warn("Ignoring unexpected exception during packet send", e);
             }
         }
     }
     
     public void flush() throws IOException {
-        try {
-            follower.writePacket(null, true);
-        } catch(IOException e) {
-            LOG.warn("Closing connection to leader, exception during packet send", e);
-            try {
-                if (!follower.sock.isClosed()) {
-                    follower.sock.close();
-                }
-            } catch (IOException e1) {
-                    // Nothing to do, we are shutting things down, so an exception here is
irrelevant
-                    LOG.debug("Ignoring error closing the connection", e1);
-            }
-        }
+        follower.writePacket(null, true);
     }
 
     public void shutdown() {

Propchange: hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/ServerBean.java
            ('svn:mergeinfo' removed)

Propchange: hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/ServerMXBean.java
            ('svn:mergeinfo' removed)

Modified: hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/QuorumTest.java
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/QuorumTest.java?rev=803000&r1=802999&r2=803000&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/QuorumTest.java (original)
+++ hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/QuorumTest.java Tue Aug
11 06:16:41 2009
@@ -23,16 +23,12 @@
 import java.util.ArrayList;
 
 import org.apache.log4j.Logger;
-import org.apache.zookeeper.AsyncCallback;
 import org.apache.zookeeper.CreateMode;
 import org.apache.zookeeper.KeeperException;
 import org.apache.zookeeper.WatchedEvent;
 import org.apache.zookeeper.Watcher;
 import org.apache.zookeeper.ZooDefs;
 import org.apache.zookeeper.ZooKeeper;
-import org.apache.zookeeper.data.Stat;
-import org.apache.zookeeper.server.quorum.FollowerHandler;
-import org.apache.zookeeper.server.quorum.Leader;
 import org.apache.zookeeper.ZooDefs.Ids;
 import org.junit.Before;
 import org.junit.Test;
@@ -97,42 +93,6 @@
     {
         ct.testClientWithWatcherObj();
     }
-    volatile int counter = 0;
-    volatile int errors = 0;
-    @Test
-    public void testLeaderShutdown() throws IOException, InterruptedException, KeeperException
{
-        ZooKeeper zk = new DisconnectableZooKeeper(qb.hostPort, ClientBase.CONNECTION_TIMEOUT,
new Watcher() {
-            public void process(WatchedEvent event) {
-        }});
-        zk.create("/blah", new byte[0], ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
-        zk.create("/blah/blah", new byte[0], ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
-        Leader leader = qb.s1.leader;
-        if (leader == null) leader = qb.s2.leader;
-        if (leader == null) leader = qb.s3.leader;
-        if (leader == null) leader = qb.s4.leader;
-        if (leader == null) leader = qb.s5.leader;
-        assertNotNull(leader);
-        for(int i = 0; i < 10000; i++) {
-            zk.setData("/blah/blah", new byte[0], -1, new AsyncCallback.StatCallback() {
-                public void processResult(int rc, String path, Object ctx,
-                        Stat stat) {
-                    counter++;
-                    if (rc != 0) {
-                        errors++;
-                    }
-                }
-            }, null);
-        }
-        ArrayList<FollowerHandler> fhs = new ArrayList<FollowerHandler>(leader.forwardingFollowers);
-        for(FollowerHandler f: fhs) {
-            f.sock.shutdownInput();
-        }
-        while(counter + errors < 10000) {
-            Thread.sleep(200);
-        }
-        assertTrue("We should have had some errors", errors != 0);
-        zk.close();
-    }
     @Test
     public void testMultipleWatcherObjs() throws IOException,
             InterruptedException, KeeperException



Mime
View raw message