Author: breed Date: Tue Mar 16 22:25:58 2010 New Revision: 924027 URL: http://svn.apache.org/viewvc?rev=924027&view=rev Log: ZOOKEEPER-121. SyncRequestProcessor is not closing log stream during shutdown
Modified: hadoop/zookeeper/trunk/CHANGES.txt hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/QuorumQuotaTest.java hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/QuorumZxidSyncTest.java hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/ZkDatabaseCorruptionTest.java hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/ZooKeeperQuotaTest.java Modified: hadoop/zookeeper/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=924027&r1=924026&r2=924027&view=diff ============================================================================== --- hadoop/zookeeper/trunk/CHANGES.txt (original) +++ hadoop/zookeeper/trunk/CHANGES.txt Tue Mar 16 22:25:58 2010 @@ -285,6 +285,9 @@ BUGFIXES: ZOOKEEPER-121_3. SyncRequestProcessor is not closing log stream during shutdown (mahadev via phunt) + ZOOKEEPER-121_4. SyncRequestProcessor is not closing log stream during + shutdown (mahadev via breed) + 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/quorum/QuorumPeer.java URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java?rev=924027&r1=924026&r2=924027&view=diff ============================================================================== --- hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java (original) +++ hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java Tue Mar 16 22:25:58 2010 @@ -672,11 +672,6 @@ public class QuorumPeer extends Thread i public void shutdown() { running = false; - try { - zkDb.close(); - } catch (IOException ie) { - LOG.warn("Error closing logs ", ie); - } if (leader != null) { leader.shutdown("quorum Peer shutdown"); } @@ -691,6 +686,11 @@ public class QuorumPeer extends Thread i if(getElectionAlg() != null){ getElectionAlg().shutdown(); } + try { + zkDb.close(); + } catch (IOException ie) { + LOG.warn("Error closing logs ", ie); + } } /** Modified: hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/QuorumQuotaTest.java URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/QuorumQuotaTest.java?rev=924027&r1=924026&r2=924027&view=diff ============================================================================== --- hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/QuorumQuotaTest.java (original) +++ hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/QuorumQuotaTest.java Tue Mar 16 22:25:58 2010 @@ -40,11 +40,13 @@ public class QuorumQuotaTest extends Quo @Override protected void setUp() throws Exception { super.setUp(); + LOG.info("STARTING " + getClass().getName()); } @Override protected void tearDown() throws Exception { super.tearDown(); + LOG.info("STOPPING " + getClass().getName()); } public void testQuotaWithQuorum() throws Exception { Modified: hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/QuorumZxidSyncTest.java URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/QuorumZxidSyncTest.java?rev=924027&r1=924026&r2=924027&view=diff ============================================================================== --- hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/QuorumZxidSyncTest.java (original) +++ hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/QuorumZxidSyncTest.java Tue Mar 16 22:25:58 2010 @@ -41,7 +41,7 @@ public class QuorumZxidSyncTest extends @Before @Override protected void setUp() throws Exception { - qb.setUp(); + qb.setUp(); } @Test Modified: hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/ZkDatabaseCorruptionTest.java URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/ZkDatabaseCorruptionTest.java?rev=924027&r1=924026&r2=924027&view=diff ============================================================================== --- hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/ZkDatabaseCorruptionTest.java (original) +++ hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/ZkDatabaseCorruptionTest.java Tue Mar 16 22:25:58 2010 @@ -44,10 +44,12 @@ public class ZkDatabaseCorruptionTest ex @Before @Override protected void setUp() throws Exception { + LOG.info("STARTING " + getClass().getName()); qb.setUp(); } protected void tearDown() throws Exception { + LOG.info("STOPPING " + getClass().getName()); } private void corruptFile(File f) throws IOException { Modified: hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/ZooKeeperQuotaTest.java URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/ZooKeeperQuotaTest.java?rev=924027&r1=924026&r2=924027&view=diff ============================================================================== --- hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/ZooKeeperQuotaTest.java (original) +++ hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/ZooKeeperQuotaTest.java Tue Mar 16 22:25:58 2010 @@ -42,11 +42,13 @@ public class ZooKeeperQuotaTest extends @Override protected void setUp() throws Exception { super.setUp(); + LOG.info("STARTING " + getClass().getName()); } @Override protected void tearDown() throws Exception { super.tearDown(); + LOG.info("STOPPING " + getClass().getName()); } public void testQuota() throws IOException,