Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Zookeeper, mail # dev - Review Request: ZOOKEEPER-1346: Handle 4lws and monitoring on separate port (creating jetty server)


Copy link to this message
-
Re: Review Request: ZOOKEEPER-1346: Handle 4lws and monitoring on separate port (creating jetty server)
Skye Wanderman-Milne 2013-01-04, 02:17

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/8094/
-----------------------------------------------------------

(Updated Jan. 4, 2013, 2:17 a.m.)
Review request for zookeeper, Patrick Hunt, Camille Fournier, and Henry Robinson.
Changes
-------

Rebased on trunk again (Unfortunately this required some pretty large changes, making the diff between this patch and the previous one hard to read.)

Made it possible to disable the AdminServer either by setting the zookeeper.admin.enableAdminServer system property to false or by removing jetty from the classpath (in case users don't want to depend on Jetty). I implemented this by extracting AdminServer into an interface with two subclasses, JettyAdminServer (the original implementation) and DummyAdminServer (which does nothing and is used when the server is disabled). AdminServerFactory is then responsible for creating the appropriate server. I updated the documentation to reflect this.

Using the system property, I disabled the AdminServer during tests as it was causing some tests to hang when they tried to start multiple AdminServers on the same port. I also added some more comments and renamed some functions to make them clearer.
Description
-------

See my comment in ZOOKEEPER-1346.
This addresses bug ZOOKEEPER-1346.
    https://issues.apache.org/jira/browse/ZOOKEEPER-1346
Diffs (updated)
-----

  ivy.xml fadf4f4
  src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml 47190a8
  src/java/main/org/apache/zookeeper/server/DataTree.java d6c7773
  src/java/main/org/apache/zookeeper/server/ExpiryQueue.java 130c58e
  src/java/main/org/apache/zookeeper/server/NIOServerCnxnFactory.java 9422538
  src/java/main/org/apache/zookeeper/server/NettyServerCnxnFactory.java eec2f2a
  src/java/main/org/apache/zookeeper/server/ServerCnxn.java 35ea301
  src/java/main/org/apache/zookeeper/server/ServerCnxnFactory.java 267dbdf
  src/java/main/org/apache/zookeeper/server/ServerStats.java aa0d93f
  src/java/main/org/apache/zookeeper/server/SessionTracker.java 3535e1b
  src/java/main/org/apache/zookeeper/server/SessionTrackerImpl.java 137862e
  src/java/main/org/apache/zookeeper/server/WatchManager.java 0e7c815
  src/java/main/org/apache/zookeeper/server/ZKDatabase.java d6c0c05
  src/java/main/org/apache/zookeeper/server/ZooKeeperServer.java 14e754b
  src/java/main/org/apache/zookeeper/server/ZooKeeperServerMain.java 369e621
  src/java/main/org/apache/zookeeper/server/ZooTrace.java ac14fe2
  src/java/main/org/apache/zookeeper/server/admin/AdminServer.java PRE-CREATION
  src/java/main/org/apache/zookeeper/server/admin/AdminServerFactory.java PRE-CREATION
  src/java/main/org/apache/zookeeper/server/admin/Command.java PRE-CREATION
  src/java/main/org/apache/zookeeper/server/admin/CommandBase.java PRE-CREATION
  src/java/main/org/apache/zookeeper/server/admin/CommandOutputter.java PRE-CREATION
  src/java/main/org/apache/zookeeper/server/admin/Commands.java PRE-CREATION
  src/java/main/org/apache/zookeeper/server/admin/DummyAdminServer.java PRE-CREATION
  src/java/main/org/apache/zookeeper/server/admin/JettyAdminServer.java PRE-CREATION
  src/java/main/org/apache/zookeeper/server/admin/JsonOutputter.java PRE-CREATION
  src/java/main/org/apache/zookeeper/server/quorum/Leader.java 8a432ff
  src/java/main/org/apache/zookeeper/server/quorum/Learner.java e8d548b
  src/java/main/org/apache/zookeeper/server/quorum/LearnerSessionTracker.java 3182419
  src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java 9c17f5e
  src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerMain.java deae926
  src/java/main/org/apache/zookeeper/server/quorum/ReadOnlyZooKeeperServer.java d3f1492
  src/java/test/org/apache/zookeeper/ZKTestCase.java 6ecfe8f
  src/java/test/org/apache/zookeeper/server/PrepRequestProcessorTest.java 8665bac
  src/java/test/org/apache/zookeeper/server/admin/CommandsTest.java PRE-CREATION
  src/java/test/org/apache/zookeeper/server/quorum/Zab1_0Test.java 370e7bb

Diff: https://reviews.apache.org/r/8094/diff/
Testing

unit tests

Ran in standalone mode (only option right now) and manually tried out all the commands/links
Thanks,

Skye Wanderman-Milne