zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maha...@apache.org
Subject svn commit: r724607 - in /hadoop/zookeeper/trunk: CHANGES.txt src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java src/java/test/org/apache/zookeeper/test/QuorumTest.java
Date Tue, 09 Dec 2008 05:09:49 GMT
Author: mahadev
Date: Mon Dec  8 21:09:48 2008
New Revision: 724607

URL: http://svn.apache.org/viewvc?rev=724607&view=rev
Log:
ZOOKEEPER-249. QuorumPeer.getClientPort() always returns -1. (nitay joffe via mahadev)

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/QuorumTest.java

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=724607&r1=724606&r2=724607&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Mon Dec  8 21:09:48 2008
@@ -41,12 +41,14 @@
 
    ZOOKEEPER-232. fix apache licence header in TestableZookeeper (mahadev)
 
+   ZOOKEEPER-249. QuorumPeer.getClientPort() always returns -1. (nitay 
+joffe via mahadev)
+
 IMPROVEMENTS:
    
    ZOOKEEPER-64. Log system env information when initializing server and
 client (pat via mahadev)
 
-
 Release 3.0.0 - 2008-10-21
 
 Non-backward compatible changes:

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=724607&r1=724606&r2=724607&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
Mon Dec  8 21:09:48 2008
@@ -574,7 +574,7 @@
     }
 
     public int getClientPort() {
-        return -1;
+        return cnxnFactory.getLocalPort();
     }
 
     public void setClientPort(int clientPort) {

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=724607&r1=724606&r2=724607&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 Mon Dec
 8 21:09:48 2008
@@ -74,14 +74,19 @@
         
         LOG.info("creating QuorumPeer 1");
         s1 = new QuorumPeer(peers, s1dir, s1dir, 2181, 0, 1, tickTime, initLimit, syncLimit);
+        assertEquals(2181, s1.getClientPort());
         LOG.info("creating QuorumPeer 2");
         s2 = new QuorumPeer(peers, s2dir, s2dir, 2182, 0, 2, tickTime, initLimit, syncLimit);
+        assertEquals(2182, s2.getClientPort());
         LOG.info("creating QuorumPeer 3");
         s3 = new QuorumPeer(peers, s3dir, s3dir, 2183, 0, 3, tickTime, initLimit, syncLimit);
+        assertEquals(2183, s3.getClientPort());
         LOG.info("creating QuorumPeer 4");
         s4 = new QuorumPeer(peers, s4dir, s4dir, 2184, 0, 4, tickTime, initLimit, syncLimit);
+        assertEquals(2184, s4.getClientPort());
         LOG.info("creating QuorumPeer 5");
         s5 = new QuorumPeer(peers, s5dir, s5dir, 2185, 0, 5, tickTime, initLimit, syncLimit);
+        assertEquals(2185, s5.getClientPort());
         LOG.info("start QuorumPeer 1");
         s1.start();
         LOG.info("start QuorumPeer 2");



Mime
View raw message