Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.3.3
    • Fix Version/s: 3.4.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed
    • Release Note:
      Adds an implementation of the leader election recipe

      Description

      Leader election recipe originally contributed to ZOOKEEPER-1080.

      1. ZK-1095-2.diff
        35 kB
        E. Sammer
      2. ZK-1095.diff
        35 kB
        E. Sammer

        Issue Links

          Activity

          Hide
          Hudson added a comment -

          Integrated in ZooKeeper-trunk #1237 (See https://builds.apache.org/job/ZooKeeper-trunk/1237/)
          ZOOKEEPER-1095. Simple leader election recipe (Eric Sammer via henry and phunt)

          phunt : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1144087
          Files :

          • /zookeeper/trunk/src/recipes/election/src/java
          • /zookeeper/trunk/src/recipes/election/test/org/apache
          • /zookeeper/trunk/src/recipes/election/test/org/apache/zookeeper/recipes/leader
          • /zookeeper/trunk/src/recipes/election/build.xml
          • /zookeeper/trunk/src/recipes/election/README.txt
          • /zookeeper/trunk/src/recipes/election/src/java/org/apache/zookeeper
          • /zookeeper/trunk/src/recipes/election/src/java/org/apache/zookeeper/recipes/leader/LeaderElectionAware.java
          • /zookeeper/trunk/src/recipes/election/test
          • /zookeeper/trunk/src/recipes/election/src/java/org/apache
          • /zookeeper/trunk/src/recipes/election/src/java/org/apache/zookeeper/recipes/leader/LeaderOffer.java
          • /zookeeper/trunk/src/recipes/election/src
          • /zookeeper/trunk/src/recipes/election/src/java/org/apache/zookeeper/recipes/leader/LeaderElectionSupport.java
          • /zookeeper/trunk/src/recipes/election/test/org/apache/zookeeper/recipes
          • /zookeeper/trunk/src/recipes/election/src/java/org
          • /zookeeper/trunk/CHANGES.txt
          • /zookeeper/trunk/src/recipes/election/src/java/org/apache/zookeeper/recipes
          • /zookeeper/trunk/src/recipes/election
          • /zookeeper/trunk/src/recipes/election/test/org
          • /zookeeper/trunk/src/recipes/election/test/org/apache/zookeeper/recipes/leader/LeaderElectionSupportTest.java
          • /zookeeper/trunk/src/recipes/election/src/java/org/apache/zookeeper/recipes/leader
          • /zookeeper/trunk/src/recipes/election/test/org/apache/zookeeper
          Show
          Hudson added a comment - Integrated in ZooKeeper-trunk #1237 (See https://builds.apache.org/job/ZooKeeper-trunk/1237/ ) ZOOKEEPER-1095 . Simple leader election recipe (Eric Sammer via henry and phunt) phunt : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1144087 Files : /zookeeper/trunk/src/recipes/election/src/java /zookeeper/trunk/src/recipes/election/test/org/apache /zookeeper/trunk/src/recipes/election/test/org/apache/zookeeper/recipes/leader /zookeeper/trunk/src/recipes/election/build.xml /zookeeper/trunk/src/recipes/election/README.txt /zookeeper/trunk/src/recipes/election/src/java/org/apache/zookeeper /zookeeper/trunk/src/recipes/election/src/java/org/apache/zookeeper/recipes/leader/LeaderElectionAware.java /zookeeper/trunk/src/recipes/election/test /zookeeper/trunk/src/recipes/election/src/java/org/apache /zookeeper/trunk/src/recipes/election/src/java/org/apache/zookeeper/recipes/leader/LeaderOffer.java /zookeeper/trunk/src/recipes/election/src /zookeeper/trunk/src/recipes/election/src/java/org/apache/zookeeper/recipes/leader/LeaderElectionSupport.java /zookeeper/trunk/src/recipes/election/test/org/apache/zookeeper/recipes /zookeeper/trunk/src/recipes/election/src/java/org /zookeeper/trunk/CHANGES.txt /zookeeper/trunk/src/recipes/election/src/java/org/apache/zookeeper/recipes /zookeeper/trunk/src/recipes/election /zookeeper/trunk/src/recipes/election/test/org /zookeeper/trunk/src/recipes/election/test/org/apache/zookeeper/recipes/leader/LeaderElectionSupportTest.java /zookeeper/trunk/src/recipes/election/src/java/org/apache/zookeeper/recipes/leader /zookeeper/trunk/src/recipes/election/test/org/apache/zookeeper
          Hide
          Patrick Hunt added a comment -

          Committed to trunk. Thanks Eric!

          Show
          Patrick Hunt added a comment - Committed to trunk. Thanks Eric!
          Hide
          Hadoop QA added a comment -

          +1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12485624/ZK-1095-2.diff
          against trunk revision 1143688.

          +1 @author. The patch does not contain any @author tags.

          +1 tests included. The patch appears to include 7 new or modified tests.

          +1 javadoc. The javadoc tool did not generate any warning messages.

          +1 javac. The applied patch does not increase the total number of javac compiler warnings.

          +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

          +1 release audit. The applied patch does not increase the total number of release audit warnings.

          +1 core tests. The patch passed core unit tests.

          +1 contrib tests. The patch passed contrib unit tests.

          Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/380//testReport/
          Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/380//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
          Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/380//console

          This message is automatically generated.

          Show
          Hadoop QA added a comment - +1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12485624/ZK-1095-2.diff against trunk revision 1143688. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 7 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/380//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/380//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/380//console This message is automatically generated.
          Hide
          E. Sammer added a comment -

          The core test failures appear to be unrelated to this patch. It's a connection loss issue.

          Error Message

          KeeperErrorCode = ConnectionLoss for /foo_q1

          Stacktrace

          org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /foo_q1
          at org.apache.zookeeper.KeeperException.create(KeeperException.java:99)
          at org.apache.zookeeper.KeeperException.create(KeeperException.java:51)
          at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:761)
          at org.apache.zookeeper.server.quorum.QuorumPeerMainTest.testBadPackets(QuorumPeerMainTest.java:428)
          at org.apache.zookeeper.JUnit4ZKTestRunner$LoggedInvokeMethod.evaluate(JUnit4ZKTestRunner.java:52)

          Show
          E. Sammer added a comment - The core test failures appear to be unrelated to this patch. It's a connection loss issue. Error Message KeeperErrorCode = ConnectionLoss for /foo_q1 Stacktrace org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /foo_q1 at org.apache.zookeeper.KeeperException.create(KeeperException.java:99) at org.apache.zookeeper.KeeperException.create(KeeperException.java:51) at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:761) at org.apache.zookeeper.server.quorum.QuorumPeerMainTest.testBadPackets(QuorumPeerMainTest.java:428) at org.apache.zookeeper.JUnit4ZKTestRunner$LoggedInvokeMethod.evaluate(JUnit4ZKTestRunner.java:52)
          Hide
          Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12485624/ZK-1095-2.diff
          against trunk revision 1143688.

          +1 @author. The patch does not contain any @author tags.

          +1 tests included. The patch appears to include 7 new or modified tests.

          +1 javadoc. The javadoc tool did not generate any warning messages.

          +1 javac. The applied patch does not increase the total number of javac compiler warnings.

          +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

          +1 release audit. The applied patch does not increase the total number of release audit warnings.

          -1 core tests. The patch failed core unit tests.

          +1 contrib tests. The patch passed contrib unit tests.

          Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/376//testReport/
          Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/376//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
          Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/376//console

          This message is automatically generated.

          Show
          Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12485624/ZK-1095-2.diff against trunk revision 1143688. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 7 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/376//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/376//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/376//console This message is automatically generated.
          Hide
          E. Sammer added a comment -

          Updated patch that uses ZK's ClientBase to configure a test server / client. Patch prefix is also fixed as to apply cleanly. Ran all tests (main and election) via the command line; everything passed.

          Show
          E. Sammer added a comment - Updated patch that uses ZK's ClientBase to configure a test server / client. Patch prefix is also fixed as to apply cleanly. Ran all tests (main and election) via the command line; everything passed.
          Hide
          Patrick Hunt added a comment -

          I see two issues that need to be addressed in this patch:

          1) if you use git use "--no-prefix", the current patch is rooted in "b" directory when applied

          2) most of the tests fail. See the lock recipe tests, the issue afaict is that the test server is not being started.

          "ant test" in the election directory should result in "SUCCESS"

          Show
          Patrick Hunt added a comment - I see two issues that need to be addressed in this patch: 1) if you use git use "--no-prefix", the current patch is rooted in "b" directory when applied 2) most of the tests fail. See the lock recipe tests, the issue afaict is that the test server is not being started. "ant test" in the election directory should result in "SUCCESS"
          Hide
          Hadoop QA added a comment -

          +1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12485530/ZK-1095.diff
          against trunk revision 1142377.

          +1 @author. The patch does not contain any @author tags.

          +1 tests included. The patch appears to include 7 new or modified tests.

          +1 javadoc. The javadoc tool did not generate any warning messages.

          +1 javac. The applied patch does not increase the total number of javac compiler warnings.

          +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

          +1 release audit. The applied patch does not increase the total number of release audit warnings.

          +1 core tests. The patch passed core unit tests.

          +1 contrib tests. The patch passed contrib unit tests.

          Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/370//testReport/
          Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/370//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
          Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/370//console

          This message is automatically generated.

          Show
          Hadoop QA added a comment - +1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12485530/ZK-1095.diff against trunk revision 1142377. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 7 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/370//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/370//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/370//console This message is automatically generated.
          Hide
          E. Sammer added a comment -

          Attached patch against ZK trunk.

          This patch includes many of the suggestions made by Henry Robinson in a previous review and adds a 'leader' directory under the recipes.

          Show
          E. Sammer added a comment - Attached patch against ZK trunk. This patch includes many of the suggestions made by Henry Robinson in a previous review and adds a 'leader' directory under the recipes.

            People

            • Assignee:
              E. Sammer
              Reporter:
              Henry Robinson
            • Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development