├── .gitignore ├── CHANGES.txt ├── LICENSE.txt ├── NOTICE.txt ├── README.txt ├── README_packaging.txt ├── bin ├── README.txt ├── zkCleanup.sh ├── zkCli.cmd ├── zkCli.sh ├── zkEnv.cmd ├── zkEnv.sh ├── zkServer.cmd └── zkServer.sh ├── build.xml ├── conf ├── configuration.xsl ├── log4j.properties └── zoo_sample.cfg ├── docs ├── api │ ├── allclasses-frame.html │ ├── allclasses-noframe.html │ ├── constant-values.html │ ├── deprecated-list.html │ ├── help-doc.html │ ├── index-all.html │ ├── index.html │ ├── org │ │ └── apache │ │ │ └── zookeeper │ │ │ ├── AsyncCallback.ACLCallback.html │ │ │ ├── AsyncCallback.Children2Callback.html │ │ │ ├── AsyncCallback.ChildrenCallback.html │ │ │ ├── AsyncCallback.DataCallback.html │ │ │ ├── AsyncCallback.StatCallback.html │ │ │ ├── AsyncCallback.StringCallback.html │ │ │ ├── AsyncCallback.VoidCallback.html │ │ │ ├── AsyncCallback.html │ │ │ ├── CreateMode.html │ │ │ ├── KeeperException.APIErrorException.html │ │ │ ├── KeeperException.AuthFailedException.html │ │ │ ├── KeeperException.BadArgumentsException.html │ │ │ ├── KeeperException.BadVersionException.html │ │ │ ├── KeeperException.Code.html │ │ │ ├── KeeperException.CodeDeprecated.html │ │ │ ├── KeeperException.ConnectionLossException.html │ │ │ ├── KeeperException.DataInconsistencyException.html │ │ │ ├── KeeperException.InvalidACLException.html │ │ │ ├── KeeperException.InvalidCallbackException.html │ │ │ ├── KeeperException.MarshallingErrorException.html │ │ │ ├── KeeperException.NoAuthException.html │ │ │ ├── KeeperException.NoChildrenForEphemeralsException.html │ │ │ ├── KeeperException.NoNodeException.html │ │ │ ├── KeeperException.NodeExistsException.html │ │ │ ├── KeeperException.NotEmptyException.html │ │ │ ├── KeeperException.NotReadOnlyException.html │ │ │ ├── KeeperException.OperationTimeoutException.html │ │ │ ├── KeeperException.RuntimeInconsistencyException.html │ │ │ ├── KeeperException.SessionExpiredException.html │ │ │ ├── KeeperException.SessionMovedException.html │ │ │ ├── KeeperException.SystemErrorException.html │ │ │ ├── KeeperException.UnimplementedException.html │ │ │ ├── KeeperException.html │ │ │ ├── ServerAdminClient.html │ │ │ ├── WatchedEvent.html │ │ │ ├── Watcher.Event.EventType.html │ │ │ ├── Watcher.Event.KeeperState.html │ │ │ ├── Watcher.Event.html │ │ │ ├── Watcher.html │ │ │ ├── ZooDefs.Ids.html │ │ │ ├── ZooDefs.OpCode.html │ │ │ ├── ZooDefs.Perms.html │ │ │ ├── ZooDefs.html │ │ │ ├── ZooKeeper.States.html │ │ │ ├── ZooKeeper.html │ │ │ ├── ZooKeeperMain.html │ │ │ ├── class-use │ │ │ ├── AsyncCallback.ACLCallback.html │ │ │ ├── AsyncCallback.Children2Callback.html │ │ │ ├── AsyncCallback.ChildrenCallback.html │ │ │ ├── AsyncCallback.DataCallback.html │ │ │ ├── AsyncCallback.StatCallback.html │ │ │ ├── AsyncCallback.StringCallback.html │ │ │ ├── AsyncCallback.VoidCallback.html │ │ │ ├── AsyncCallback.html │ │ │ ├── CreateMode.html │ │ │ ├── KeeperException.APIErrorException.html │ │ │ ├── KeeperException.AuthFailedException.html │ │ │ ├── KeeperException.BadArgumentsException.html │ │ │ ├── KeeperException.BadVersionException.html │ │ │ ├── KeeperException.Code.html │ │ │ ├── KeeperException.CodeDeprecated.html │ │ │ ├── KeeperException.ConnectionLossException.html │ │ │ ├── KeeperException.DataInconsistencyException.html │ │ │ ├── KeeperException.InvalidACLException.html │ │ │ ├── KeeperException.InvalidCallbackException.html │ │ │ ├── KeeperException.MarshallingErrorException.html │ │ │ ├── KeeperException.NoAuthException.html │ │ │ ├── KeeperException.NoChildrenForEphemeralsException.html │ │ │ ├── KeeperException.NoNodeException.html │ │ │ ├── KeeperException.NodeExistsException.html │ │ │ ├── KeeperException.NotEmptyException.html │ │ │ ├── KeeperException.NotReadOnlyException.html │ │ │ ├── KeeperException.OperationTimeoutException.html │ │ │ ├── KeeperException.RuntimeInconsistencyException.html │ │ │ ├── KeeperException.SessionExpiredException.html │ │ │ ├── KeeperException.SessionMovedException.html │ │ │ ├── KeeperException.SystemErrorException.html │ │ │ ├── KeeperException.UnimplementedException.html │ │ │ ├── KeeperException.html │ │ │ ├── ServerAdminClient.html │ │ │ ├── WatchedEvent.html │ │ │ ├── Watcher.Event.EventType.html │ │ │ ├── Watcher.Event.KeeperState.html │ │ │ ├── Watcher.Event.html │ │ │ ├── Watcher.html │ │ │ ├── ZooDefs.Ids.html │ │ │ ├── ZooDefs.OpCode.html │ │ │ ├── ZooDefs.Perms.html │ │ │ ├── ZooDefs.html │ │ │ ├── ZooKeeper.States.html │ │ │ ├── ZooKeeper.html │ │ │ └── ZooKeeperMain.html │ │ │ ├── client │ │ │ ├── FourLetterWordMain.html │ │ │ ├── class-use │ │ │ │ └── FourLetterWordMain.html │ │ │ ├── package-frame.html │ │ │ ├── package-summary.html │ │ │ ├── package-tree.html │ │ │ └── package-use.html │ │ │ ├── data │ │ │ ├── ACL.html │ │ │ ├── Id.html │ │ │ ├── Stat.html │ │ │ ├── StatPersisted.html │ │ │ ├── StatPersistedV1.html │ │ │ ├── class-use │ │ │ │ ├── ACL.html │ │ │ │ ├── Id.html │ │ │ │ ├── Stat.html │ │ │ │ ├── StatPersisted.html │ │ │ │ └── StatPersistedV1.html │ │ │ ├── package-frame.html │ │ │ ├── package-summary.html │ │ │ ├── package-tree.html │ │ │ └── package-use.html │ │ │ ├── package-frame.html │ │ │ ├── package-summary.html │ │ │ ├── package-tree.html │ │ │ ├── package-use.html │ │ │ └── server │ │ │ ├── LogFormatter.html │ │ │ ├── PurgeTxnLog.html │ │ │ ├── ZooKeeperServerMain.html │ │ │ ├── class-use │ │ │ ├── LogFormatter.html │ │ │ ├── PurgeTxnLog.html │ │ │ └── ZooKeeperServerMain.html │ │ │ ├── package-frame.html │ │ │ ├── package-summary.html │ │ │ ├── package-tree.html │ │ │ ├── package-use.html │ │ │ ├── quorum │ │ │ ├── QuorumPeerMain.html │ │ │ ├── class-use │ │ │ │ └── QuorumPeerMain.html │ │ │ ├── package-frame.html │ │ │ ├── package-summary.html │ │ │ ├── package-tree.html │ │ │ └── package-use.html │ │ │ └── upgrade │ │ │ ├── UpgradeMain.html │ │ │ ├── class-use │ │ │ └── UpgradeMain.html │ │ │ ├── package-frame.html │ │ │ ├── package-summary.html │ │ │ ├── package-tree.html │ │ │ └── package-use.html │ ├── overview-frame.html │ ├── overview-summary.html │ ├── overview-tree.html │ ├── package-list │ ├── resources │ │ └── inherit.gif │ ├── serialized-form.html │ └── stylesheet.css ├── bookkeeperConfig.html ├── bookkeeperConfig.pdf ├── bookkeeperOverview.html ├── bookkeeperOverview.pdf ├── bookkeeperProgrammer.html ├── bookkeeperProgrammer.pdf ├── bookkeeperStarted.html ├── bookkeeperStarted.pdf ├── bookkeeperStream.html ├── bookkeeperStream.pdf ├── broken-links.xml ├── images │ ├── 2pc.jpg │ ├── bk-overview.jpg │ ├── built-with-forrest-button.png │ ├── favicon.ico │ ├── hadoop-logo.jpg │ ├── instruction_arrow.png │ ├── state_dia.jpg │ ├── zkcomponents.jpg │ ├── zknamespace.jpg │ ├── zkperfRW-3.2.jpg │ ├── zkperfRW.jpg │ ├── zkperfreliability.jpg │ ├── zkservice.jpg │ └── zookeeper_small.gif ├── index.html ├── index.pdf ├── javaExample.html ├── javaExample.pdf ├── jdiff │ ├── changes.html │ ├── changes │ │ ├── alldiffs_index_additions.html │ │ ├── alldiffs_index_all.html │ │ ├── alldiffs_index_changes.html │ │ ├── alldiffs_index_removals.html │ │ ├── changes-summary.html │ │ ├── classes_index_additions.html │ │ ├── classes_index_all.html │ │ ├── classes_index_changes.html │ │ ├── classes_index_removals.html │ │ ├── constructors_index_additions.html │ │ ├── constructors_index_all.html │ │ ├── constructors_index_changes.html │ │ ├── constructors_index_removals.html │ │ ├── fields_index_additions.html │ │ ├── fields_index_all.html │ │ ├── fields_index_changes.html │ │ ├── fields_index_removals.html │ │ ├── jdiff_help.html │ │ ├── jdiff_statistics.html │ │ ├── jdiff_topleftframe.html │ │ ├── methods_index_additions.html │ │ ├── methods_index_all.html │ │ ├── methods_index_changes.html │ │ ├── methods_index_removals.html │ │ ├── org.apache.zookeeper.ClientCnxn.html │ │ ├── org.apache.zookeeper.Environment.html │ │ ├── org.apache.zookeeper.KeeperException.BadArgumentsException.html │ │ ├── org.apache.zookeeper.KeeperException.BadVersionException.html │ │ ├── org.apache.zookeeper.KeeperException.Code.html │ │ ├── org.apache.zookeeper.KeeperException.InvalidACLException.html │ │ ├── org.apache.zookeeper.KeeperException.NoChildrenForEphemeralsException.html │ │ ├── org.apache.zookeeper.KeeperException.NoNodeException.html │ │ ├── org.apache.zookeeper.KeeperException.NodeExistsException.html │ │ ├── org.apache.zookeeper.KeeperException.NotEmptyException.html │ │ ├── org.apache.zookeeper.KeeperException.html │ │ ├── org.apache.zookeeper.Watcher.Event.KeeperState.html │ │ ├── org.apache.zookeeper.ZooDefs.OpCode.html │ │ ├── org.apache.zookeeper.ZooKeeper.States.html │ │ ├── org.apache.zookeeper.ZooKeeper.html │ │ ├── org.apache.zookeeper.ZooKeeperMain.html │ │ ├── packages_index_additions.html │ │ ├── packages_index_all.html │ │ ├── packages_index_changes.html │ │ ├── packages_index_removals.html │ │ └── pkg_org.apache.zookeeper.html │ ├── missingSinces.txt │ ├── stylesheet-jdiff.css │ └── user_comments_for_zookeeper_3.1.1_to_zookeeper_3.4.3.xml ├── linkmap.html ├── linkmap.pdf ├── recipes.html ├── recipes.pdf ├── releasenotes.html ├── releasenotes.pdf ├── skin │ ├── CommonMessages_de.xml │ ├── CommonMessages_en_US.xml │ ├── CommonMessages_es.xml │ ├── CommonMessages_fr.xml │ ├── basic.css │ ├── breadcrumbs-optimized.js │ ├── breadcrumbs.js │ ├── fontsize.js │ ├── getBlank.js │ ├── getMenu.js │ ├── images │ │ ├── README.txt │ │ ├── add.jpg │ │ ├── built-with-forrest-button.png │ │ ├── chapter.gif │ │ ├── chapter_open.gif │ │ ├── current.gif │ │ ├── error.png │ │ ├── external-link.gif │ │ ├── fix.jpg │ │ ├── forrest-credit-logo.png │ │ ├── hack.jpg │ │ ├── header_white_line.gif │ │ ├── info.png │ │ ├── instruction_arrow.png │ │ ├── label.gif │ │ ├── page.gif │ │ ├── pdfdoc.gif │ │ ├── poddoc.png │ │ ├── printer.gif │ │ ├── rc-b-l-15-1body-2menu-3menu.png │ │ ├── rc-b-r-15-1body-2menu-3menu.png │ │ ├── rc-b-r-5-1header-2tab-selected-3tab-selected.png │ │ ├── rc-t-l-5-1header-2searchbox-3searchbox.png │ │ ├── rc-t-l-5-1header-2tab-selected-3tab-selected.png │ │ ├── rc-t-l-5-1header-2tab-unselected-3tab-unselected.png │ │ ├── rc-t-r-15-1body-2menu-3menu.png │ │ ├── rc-t-r-5-1header-2searchbox-3searchbox.png │ │ ├── rc-t-r-5-1header-2tab-selected-3tab-selected.png │ │ ├── rc-t-r-5-1header-2tab-unselected-3tab-unselected.png │ │ ├── remove.jpg │ │ ├── rss.png │ │ ├── spacer.gif │ │ ├── success.png │ │ ├── txtdoc.png │ │ ├── update.jpg │ │ ├── valid-html401.png │ │ ├── vcss.png │ │ ├── warning.png │ │ └── xmldoc.gif │ ├── menu.js │ ├── note.txt │ ├── print.css │ ├── profile.css │ ├── prototype.js │ └── screen.css ├── zookeeperAdmin.html ├── zookeeperAdmin.pdf ├── zookeeperHierarchicalQuorums.html ├── zookeeperHierarchicalQuorums.pdf ├── zookeeperInternals.html ├── zookeeperInternals.pdf ├── zookeeperJMX.html ├── zookeeperJMX.pdf ├── zookeeperObservers.html ├── zookeeperObservers.pdf ├── zookeeperOtherInfo.html ├── zookeeperOtherInfo.pdf ├── zookeeperOver.html ├── zookeeperOver.pdf ├── zookeeperProgrammers.html ├── zookeeperProgrammers.pdf ├── zookeeperQuotas.html ├── zookeeperQuotas.pdf ├── zookeeperStarted.html ├── zookeeperStarted.pdf ├── zookeeperTutorial.html └── zookeeperTutorial.pdf ├── ivy.xml ├── ivysettings.xml ├── lib ├── cobertura │ └── README.txt ├── jdiff │ ├── zookeeper_3.1.1.xml │ └── zookeeper_3.4.3.xml ├── jline-0.9.94.LICENSE.txt ├── jline-0.9.94.jar ├── log4j-1.2.15.LICENSE.txt ├── log4j-1.2.15.jar ├── netty-3.2.2.Final.jar ├── slf4j-api-1.6.1.jar └── slf4j-log4j12-1.6.1.jar └── src ├── c ├── ChangeLog ├── Cli.vcproj ├── INSTALL ├── LICENSE ├── Makefile.am ├── Makefile.in ├── NOTICE.txt ├── README ├── acinclude.m4 ├── aclocal.m4 ├── aminclude.am ├── autom4te.cache │ ├── output.0 │ ├── output.1 │ ├── requests │ ├── traces.0 │ └── traces.1 ├── c-doc.Doxyfile ├── compile ├── config.guess ├── config.h.in ├── config.sub ├── configure ├── configure.ac ├── depcomp ├── include │ ├── proto.h │ ├── recordio.h │ ├── winconfig.h │ ├── winstdint.h │ ├── zookeeper.h │ ├── zookeeper_log.h │ └── zookeeper_version.h ├── install-sh ├── ltmain.sh ├── missing ├── src │ ├── cli.c │ ├── hashtable │ │ ├── LICENSE.txt │ │ ├── hashtable.c │ │ ├── hashtable.h │ │ ├── hashtable_itr.c │ │ ├── hashtable_itr.h │ │ └── hashtable_private.h │ ├── load_gen.c │ ├── mt_adaptor.c │ ├── recordio.c │ ├── st_adaptor.c │ ├── winport.c │ ├── winport.h │ ├── zk_adaptor.h │ ├── zk_hashtable.c │ ├── zk_hashtable.h │ ├── zk_log.c │ └── zookeeper.c ├── tests │ ├── CollectionUtil.h │ ├── CppAssertHelper.h │ ├── LibCMocks.cc │ ├── LibCMocks.h │ ├── LibCSymTable.cc │ ├── LibCSymTable.h │ ├── MocksBase.cc │ ├── MocksBase.h │ ├── PthreadMocks.cc │ ├── PthreadMocks.h │ ├── TestClient.cc │ ├── TestClientRetry.cc │ ├── TestDriver.cc │ ├── TestMulti.cc │ ├── TestOperations.cc │ ├── TestWatchers.cc │ ├── TestZookeeperClose.cc │ ├── TestZookeeperInit.cc │ ├── ThreadingUtil.cc │ ├── ThreadingUtil.h │ ├── Util.cc │ ├── Util.h │ ├── Vector.h │ ├── ZKMocks.cc │ ├── ZKMocks.h │ ├── wrappers-mt.opt │ ├── wrappers.opt │ └── zkServer.sh ├── zookeeper.sln └── zookeeper.vcproj ├── contrib ├── build-contrib.xml ├── build.xml ├── fatjar │ ├── README.txt │ ├── build.xml │ ├── conf │ │ └── mainClasses │ └── src │ │ └── java │ │ └── org │ │ └── apache │ │ └── zookeeper │ │ └── util │ │ └── FatJarMain.java ├── huebrowser │ ├── README │ └── zkui │ │ ├── Makefile │ │ ├── setup.py │ │ └── src │ │ └── zkui │ │ ├── __init__.py │ │ ├── forms.py │ │ ├── models.py │ │ ├── rest.py │ │ ├── settings.py │ │ ├── static │ │ ├── art │ │ │ ├── line_icons.png │ │ │ └── zkui.png │ │ ├── bootstrap.js │ │ ├── css │ │ │ └── zkui.css │ │ ├── help │ │ │ └── index.html │ │ └── js │ │ │ ├── Source │ │ │ └── Zkui │ │ │ │ └── Zkui.js │ │ │ └── package.yml │ │ ├── stats.py │ │ ├── templates │ │ ├── clients.mako │ │ ├── create.mako │ │ ├── edit.mako │ │ ├── index.mako │ │ ├── shared_components.mako │ │ ├── tree.mako │ │ └── view.mako │ │ ├── urls.py │ │ ├── utils.py │ │ ├── views.py │ │ └── windmilltests.py ├── loggraph │ ├── README.txt │ ├── bin │ │ ├── loggraph-dev.sh │ │ └── loggraph.sh │ ├── build.xml │ ├── ivy.xml │ ├── src │ │ └── java │ │ │ └── org │ │ │ └── apache │ │ │ └── zookeeper │ │ │ └── graph │ │ │ ├── FilterException.java │ │ │ ├── FilterOp.java │ │ │ ├── FilterParser.java │ │ │ ├── JsonGenerator.java │ │ │ ├── Log4JEntry.java │ │ │ ├── Log4JSource.java │ │ │ ├── LogEntry.java │ │ │ ├── LogIterator.java │ │ │ ├── LogServer.java │ │ │ ├── LogSkipList.java │ │ │ ├── LogSource.java │ │ │ ├── MeasureThroughput.java │ │ │ ├── MergedLogSource.java │ │ │ ├── RandomAccessFileReader.java │ │ │ ├── TransactionEntry.java │ │ │ ├── TxnLogSource.java │ │ │ ├── filterops │ │ │ ├── AndOp.java │ │ │ ├── Arg.java │ │ │ ├── EqualsOp.java │ │ │ ├── GreaterThanOp.java │ │ │ ├── LessThanOp.java │ │ │ ├── NotOp.java │ │ │ ├── NumberArg.java │ │ │ ├── OrOp.java │ │ │ ├── StringArg.java │ │ │ ├── SymbolArg.java │ │ │ └── XorOp.java │ │ │ └── servlets │ │ │ ├── FileLoader.java │ │ │ ├── Fs.java │ │ │ ├── GraphData.java │ │ │ ├── JsonServlet.java │ │ │ ├── NumEvents.java │ │ │ ├── StaticContent.java │ │ │ └── Throughput.java │ └── web │ │ └── org │ │ └── apache │ │ └── zookeeper │ │ └── graph │ │ ├── log4j.properties │ │ └── resources │ │ ├── date.format.js │ │ ├── g.bar.js │ │ ├── g.dot.js │ │ ├── g.line.js │ │ ├── g.pie.js │ │ ├── g.raphael.js │ │ ├── load-big.gif │ │ ├── load.gif │ │ ├── loggraph.css │ │ ├── loggraph.js │ │ ├── loggraph.log.js │ │ ├── loggraph.server.js │ │ ├── loggraph.session.js │ │ ├── loggraph.stats.js │ │ ├── loggraph.ui.js │ │ ├── main.html │ │ ├── raphael.js │ │ └── yui-min.js ├── monitoring │ ├── JMX-RESOURCES │ ├── README │ ├── cacti │ │ └── README │ ├── check_zookeeper.py │ ├── ganglia │ │ ├── README │ │ ├── Screenshot.png │ │ ├── modpython.conf │ │ ├── zookeeper.pyconf │ │ └── zookeeper_ganglia.py │ ├── nagios │ │ ├── README.txt │ │ ├── Screenshot-1.png │ │ ├── Screenshot.png │ │ ├── hostgroups.cfg │ │ ├── services.cfg │ │ └── zookeeper.cfg │ └── test.py ├── rest │ ├── NOTICE.txt │ ├── README.txt │ ├── SPEC.txt │ ├── build.xml │ ├── conf │ │ ├── keys │ │ │ ├── README │ │ │ ├── rest.cer │ │ │ └── rest.jks │ │ ├── log4j.properties │ │ └── rest.properties │ ├── ivy.xml │ ├── rest.sh │ └── src │ │ ├── java │ │ └── org │ │ │ └── apache │ │ │ └── zookeeper │ │ │ └── server │ │ │ └── jersey │ │ │ ├── RestMain.java │ │ │ ├── ZooKeeperService.java │ │ │ ├── cfg │ │ │ ├── Credentials.java │ │ │ ├── Endpoint.java │ │ │ ├── HostPort.java │ │ │ ├── HostPortSet.java │ │ │ └── RestCfg.java │ │ │ ├── filters │ │ │ └── HTTPBasicAuth.java │ │ │ ├── jaxb │ │ │ ├── ZChildren.java │ │ │ ├── ZChildrenJSON.java │ │ │ ├── ZError.java │ │ │ ├── ZPath.java │ │ │ ├── ZSession.java │ │ │ └── ZStat.java │ │ │ └── resources │ │ │ ├── JAXBContextResolver.java │ │ │ ├── KeeperExceptionMapper.java │ │ │ ├── RuntimeExceptionMapper.java │ │ │ ├── SessionsResource.java │ │ │ ├── ZErrorWriter.java │ │ │ └── ZNodeResource.java │ │ ├── python │ │ ├── README.txt │ │ ├── demo_master_election.py │ │ ├── demo_queue.py │ │ ├── test.py │ │ ├── zk_dump_tree.py │ │ └── zkrest.py │ │ └── test │ │ ├── org │ │ └── apache │ │ │ └── zookeeper │ │ │ └── server │ │ │ └── jersey │ │ │ ├── Base.java │ │ │ ├── CreateTest.java │ │ │ ├── DeleteTest.java │ │ │ ├── ExistsTest.java │ │ │ ├── GetChildrenTest.java │ │ │ ├── GetTest.java │ │ │ ├── RestTestSuite.java │ │ │ ├── RootTest.java │ │ │ ├── SessionTest.java │ │ │ ├── SetTest.java │ │ │ └── WadlTest.java │ │ └── zkServer.sh ├── zkfuse │ ├── Makefile.am │ ├── README.txt │ ├── build.xml │ ├── configure.ac │ └── src │ │ ├── Makefile.am │ │ ├── blockingqueue.h │ │ ├── doxygen.cfg │ │ ├── event.cc │ │ ├── event.h │ │ ├── log.cc │ │ ├── log.h │ │ ├── log4cxx.properties │ │ ├── mutex.h │ │ ├── thread.cc │ │ ├── thread.h │ │ ├── zkadapter.cc │ │ ├── zkadapter.h │ │ └── zkfuse.cc ├── zkperl │ ├── Changes │ ├── LICENSE │ ├── MANIFEST │ ├── Makefile.PL │ ├── NOTICE │ ├── README │ ├── ZooKeeper.pm │ ├── ZooKeeper.xs │ ├── build.xml │ ├── build │ │ ├── check_zk_version.c │ │ └── check_zk_version.h │ ├── t │ │ ├── 10_invalid.t │ │ ├── 15_thread.t │ │ ├── 20_tie.t │ │ ├── 22_stat_tie.t │ │ ├── 24_watch_tie.t │ │ ├── 30_connect.t │ │ ├── 35_log.t │ │ ├── 40_basic.t │ │ ├── 45_class.t │ │ ├── 50_access.t │ │ ├── 60_watch.t │ │ └── util.pl │ └── typemap ├── zkpython │ ├── README │ ├── build.xml │ ├── ivy.xml │ └── src │ │ ├── c │ │ ├── pyzk_docstrings.h │ │ └── zookeeper.c │ │ ├── examples │ │ ├── README │ │ └── watch_znode_for_changes.py │ │ ├── packages │ │ ├── deb │ │ │ └── zkpython.control │ │ │ │ └── control │ │ └── rpm │ │ │ └── spec │ │ │ └── zkpython.spec │ │ ├── python │ │ ├── setup.py │ │ └── zk.py │ │ └── test │ │ ├── acl_test.py │ │ ├── async_test.py │ │ ├── callback_test.py │ │ ├── clientid_test.py │ │ ├── close_deadlock_test.py │ │ ├── connection_test.py │ │ ├── create_test.py │ │ ├── delete_test.py │ │ ├── exists_test.py │ │ ├── get_set_test.py │ │ ├── run_tests.sh │ │ ├── zkServer.sh │ │ └── zktestbase.py ├── zktreeutil │ ├── Makefile.am │ ├── README.txt │ ├── build.xml │ ├── configure.ac │ ├── src │ │ ├── Makefile.am │ │ ├── SimpleTree.h │ │ ├── ZkAdaptor.cc │ │ ├── ZkAdaptor.h │ │ ├── ZkTreeUtil.cc │ │ ├── ZkTreeUtil.h │ │ └── ZkTreeUtilMain.cc │ └── tests │ │ └── zk_sample.xml └── zooinspector │ ├── NOTICE.txt │ ├── README.txt │ ├── build.xml │ ├── config │ ├── defaultConnectionSettings.cfg │ └── defaultNodeVeiwers.cfg │ ├── icons │ ├── edtsrclkup_co.gif │ ├── file_obj.gif │ ├── fldr_obj.gif │ ├── info_obj.gif │ ├── jspdecl.gif │ ├── launch_run.gif │ ├── launch_stop.gif │ ├── new_con.gif │ ├── refresh.gif │ ├── save_edit.gif │ ├── search_next.gif │ ├── search_prev.gif │ └── trash.gif │ ├── ivy.xml │ ├── lib │ ├── jtoaster-1.0.4.jar │ └── log4j.properties │ ├── licences │ ├── Apache Software Licence v2.0.txt │ └── epl-v10.html │ ├── src │ └── java │ │ └── org │ │ └── apache │ │ └── zookeeper │ │ ├── inspector │ │ ├── ZooInspector.java │ │ ├── encryption │ │ │ ├── BasicDataEncryptionManager.java │ │ │ └── DataEncryptionManager.java │ │ ├── gui │ │ │ ├── NodeViewersChangeListener.java │ │ │ ├── ZooInspectorAboutDialog.java │ │ │ ├── ZooInspectorConnectionPropertiesDialog.java │ │ │ ├── ZooInspectorIconResources.java │ │ │ ├── ZooInspectorNodeViewersDialog.java │ │ │ ├── ZooInspectorNodeViewersPanel.java │ │ │ ├── ZooInspectorPanel.java │ │ │ ├── ZooInspectorTreeViewer.java │ │ │ ├── about.html │ │ │ └── nodeviewer │ │ │ │ ├── NodeViewerACL.java │ │ │ │ ├── NodeViewerData.java │ │ │ │ ├── NodeViewerMetaData.java │ │ │ │ └── ZooInspectorNodeViewer.java │ │ ├── logger │ │ │ └── LoggerFactory.java │ │ └── manager │ │ │ ├── NodeListener.java │ │ │ ├── Pair.java │ │ │ ├── ZooInspectorManager.java │ │ │ ├── ZooInspectorManagerImpl.java │ │ │ ├── ZooInspectorNodeManager.java │ │ │ ├── ZooInspectorNodeTreeManager.java │ │ │ └── ZooInspectorReadOnlyManager.java │ │ └── retry │ │ └── ZooKeeperRetry.java │ ├── zooInspector-dev.sh │ ├── zooInspector.cmd │ └── zooInspector.sh ├── docs ├── forrest.properties ├── src │ └── documentation │ │ ├── README.txt │ │ ├── TODO.txt │ │ ├── classes │ │ └── CatalogManager.properties │ │ ├── content │ │ └── xdocs │ │ │ ├── bookkeeperConfig.xml │ │ │ ├── bookkeeperOverview.xml │ │ │ ├── bookkeeperProgrammer.xml │ │ │ ├── bookkeeperStarted.xml │ │ │ ├── bookkeeperStream.xml │ │ │ ├── index.xml │ │ │ ├── javaExample.xml │ │ │ ├── recipes.xml │ │ │ ├── releasenotes.xml │ │ │ ├── site.xml │ │ │ ├── tabs.xml │ │ │ ├── zookeeperAdmin.xml │ │ │ ├── zookeeperHierarchicalQuorums.xml │ │ │ ├── zookeeperInternals.xml │ │ │ ├── zookeeperJMX.xml │ │ │ ├── zookeeperObservers.xml │ │ │ ├── zookeeperOtherInfo.xml │ │ │ ├── zookeeperOver.xml │ │ │ ├── zookeeperProgrammers.xml │ │ │ ├── zookeeperQuotas.xml │ │ │ ├── zookeeperStarted.xml │ │ │ └── zookeeperTutorial.xml │ │ ├── resources │ │ └── images │ │ │ ├── 2pc.jpg │ │ │ ├── bk-overview.jpg │ │ │ ├── favicon.ico │ │ │ ├── hadoop-logo.jpg │ │ │ ├── state_dia.dia │ │ │ ├── state_dia.jpg │ │ │ ├── zkarch.jpg │ │ │ ├── zkcomponents.jpg │ │ │ ├── zknamespace.jpg │ │ │ ├── zkperfRW-3.2.jpg │ │ │ ├── zkperfRW.jpg │ │ │ ├── zkperfreliability.jpg │ │ │ ├── zkservice.jpg │ │ │ └── zookeeper_small.gif │ │ └── skinconf.xml └── status.xml ├── dotnet ├── .gitignore ├── ZooKeeperKey.snk ├── ZooKeeperNet.Recipes.Tests │ ├── .gitignore │ ├── DistributedQueueTests.cs │ ├── LeaderElectionTests.cs │ ├── WriteLockTests.cs │ ├── ZNodeNameTests.cs │ └── ZooKeeperNet.Recipes.Tests.csproj ├── ZooKeeperNet.Recipes │ ├── .gitignore │ ├── DistributedQueue.cs │ ├── LeaderElection.cs │ ├── Locks │ │ ├── InterProcessLock.cs │ │ ├── InterProcessMutex.cs │ │ ├── LockInternals.cs │ │ └── LockInternalsDriver.cs │ ├── ProtocolSupport.cs │ ├── SortedSet.cs │ ├── WriteLock.cs │ ├── ZNodeName.cs │ └── ZooKeeperNet.Recipes.csproj ├── ZooKeeperNet.Tests │ ├── .gitignore │ ├── ACLRootTests.cs │ ├── AbstractZooKeeperTests.cs │ ├── AssemblyFixture.cs │ ├── ChrootTests.cs │ ├── ClientAsyncTests.cs │ ├── ClientTests.cs │ ├── CountDownLatch.cs │ ├── GetChildren2Tests.cs │ ├── NullDataTests.cs │ ├── RecoveryTest.cs │ ├── SaslTests.cs │ ├── SocketTests.cs │ ├── StatTests.cs │ ├── ZooKeeperEndpointTests.cs │ ├── ZooKeeperNet.Tests.csproj │ └── log4net.xml ├── ZooKeeperNet.sln ├── ZooKeeperNet │ ├── .gitignore │ ├── ClientConnection.cs │ ├── ClientConnectionEventConsumer.cs │ ├── ClientConnectionRequestProducer.cs │ ├── ClientWatchManager.cs │ ├── CreateMode.cs │ ├── DataTree.cs │ ├── EventType.cs │ ├── IClientConnection.cs │ ├── IO │ │ ├── BigEndianBitConverter.cs │ │ ├── EndianBinaryReader.cs │ │ ├── EndianBinaryWriter.cs │ │ ├── EndianBitConverter.cs │ │ ├── Endianness.cs │ │ └── LittleEndianBitConverter.cs │ ├── ISaslClient.cs │ ├── IStartable.cs │ ├── IWatcher.cs │ ├── IZooKeeper.cs │ ├── Ids.cs │ ├── Jute │ │ ├── BinaryInputArchive.cs │ │ ├── BinaryOutputArchive.cs │ │ ├── IIndex.cs │ │ ├── IInputArchive.cs │ │ ├── IOutputArchive.cs │ │ ├── IRecord.cs │ │ ├── JuteEx.cs │ │ ├── RecordReader.cs │ │ └── RecordWriter.cs │ ├── KeeperException.cs │ ├── KeeperState.cs │ ├── OpCode.cs │ ├── Packet.cs │ ├── PathUtils.cs │ ├── Perms.cs │ ├── Quotas.cs │ ├── RetryPolicy.cs │ ├── SafeThreadStart.cs │ ├── SessionExpiredException.cs │ ├── SessionTimeoutException.cs │ ├── WatchedEvent.cs │ ├── ZKPaths.cs │ ├── ZKWatchManager.cs │ ├── ZooKeeper.cs │ ├── ZooKeeperEndpoint.cs │ ├── ZooKeeperEndpoints.cs │ ├── ZooKeeperEx.cs │ └── ZooKeeperNet.csproj └── lib │ ├── S22.Sasl.dll │ └── S22.Sasl.pdb ├── java ├── OldChangeLog ├── lib │ ├── cobertura │ │ └── README.txt │ ├── jdiff │ │ └── zookeeper_3.1.1.xml │ ├── jline-0.9.94.LICENSE.txt │ └── log4j-1.2.15.LICENSE.txt ├── main │ ├── org │ │ └── apache │ │ │ ├── jute │ │ │ ├── BinaryInputArchive.java │ │ │ ├── BinaryOutputArchive.java │ │ │ ├── CsvInputArchive.java │ │ │ ├── CsvOutputArchive.java │ │ │ ├── Index.java │ │ │ ├── InputArchive.java │ │ │ ├── OutputArchive.java │ │ │ ├── Record.java │ │ │ ├── RecordReader.java │ │ │ ├── RecordWriter.java │ │ │ ├── Utils.java │ │ │ ├── XmlInputArchive.java │ │ │ ├── XmlOutputArchive.java │ │ │ ├── compiler │ │ │ │ ├── CGenerator.java │ │ │ │ ├── CSharpGenerator.java │ │ │ │ ├── CppGenerator.java │ │ │ │ ├── JBoolean.java │ │ │ │ ├── JBuffer.java │ │ │ │ ├── JByte.java │ │ │ │ ├── JCompType.java │ │ │ │ ├── JDouble.java │ │ │ │ ├── JField.java │ │ │ │ ├── JFile.java │ │ │ │ ├── JFloat.java │ │ │ │ ├── JInt.java │ │ │ │ ├── JLong.java │ │ │ │ ├── JMap.java │ │ │ │ ├── JRecord.java │ │ │ │ ├── JString.java │ │ │ │ ├── JType.java │ │ │ │ ├── JVector.java │ │ │ │ ├── JavaGenerator.java │ │ │ │ ├── generated │ │ │ │ │ ├── ParseException.java │ │ │ │ │ ├── Rcc.java │ │ │ │ │ ├── RccConstants.java │ │ │ │ │ ├── RccTokenManager.java │ │ │ │ │ ├── SimpleCharStream.java │ │ │ │ │ ├── Token.java │ │ │ │ │ ├── TokenMgrError.java │ │ │ │ │ ├── package.html │ │ │ │ │ └── rcc.jj │ │ │ │ └── package.html │ │ │ └── package.html │ │ │ └── zookeeper │ │ │ ├── AsyncCallback.java │ │ │ ├── ClientCnxn.java │ │ │ ├── ClientCnxnSocket.java │ │ │ ├── ClientCnxnSocketNIO.java │ │ │ ├── ClientWatchManager.java │ │ │ ├── CreateMode.java │ │ │ ├── Environment.java │ │ │ ├── JLineZNodeCompletor.java │ │ │ ├── KeeperException.java │ │ │ ├── Login.java │ │ │ ├── MultiResponse.java │ │ │ ├── MultiTransactionRecord.java │ │ │ ├── Op.java │ │ │ ├── OpResult.java │ │ │ ├── Quotas.java │ │ │ ├── ServerAdminClient.java │ │ │ ├── Shell.java │ │ │ ├── StatsTrack.java │ │ │ ├── Transaction.java │ │ │ ├── Version.java │ │ │ ├── WatchedEvent.java │ │ │ ├── Watcher.java │ │ │ ├── ZKUtil.java │ │ │ ├── ZooDefs.java │ │ │ ├── ZooKeeper.java │ │ │ ├── ZooKeeperMain.java │ │ │ ├── client │ │ │ ├── ConnectStringParser.java │ │ │ ├── FourLetterWordMain.java │ │ │ ├── HostProvider.java │ │ │ ├── StaticHostProvider.java │ │ │ └── ZooKeeperSaslClient.java │ │ │ ├── common │ │ │ ├── PathTrie.java │ │ │ └── PathUtils.java │ │ │ ├── jmx │ │ │ ├── CommonNames.java │ │ │ ├── MBeanRegistry.java │ │ │ ├── ManagedUtil.java │ │ │ └── ZKMBeanInfo.java │ │ │ ├── server │ │ │ ├── ByteBufferInputStream.java │ │ │ ├── ByteBufferOutputStream.java │ │ │ ├── ConnectionBean.java │ │ │ ├── ConnectionMXBean.java │ │ │ ├── DataNode.java │ │ │ ├── DataTree.java │ │ │ ├── DataTreeBean.java │ │ │ ├── DataTreeMXBean.java │ │ │ ├── DatadirCleanupManager.java │ │ │ ├── FinalRequestProcessor.java │ │ │ ├── LogFormatter.java │ │ │ ├── NIOServerCnxn.java │ │ │ ├── NIOServerCnxnFactory.java │ │ │ ├── NettyServerCnxn.java │ │ │ ├── NettyServerCnxnFactory.java │ │ │ ├── ObserverBean.java │ │ │ ├── PrepRequestProcessor.java │ │ │ ├── PurgeTxnLog.java │ │ │ ├── Request.java │ │ │ ├── RequestProcessor.java │ │ │ ├── ServerCnxn.java │ │ │ ├── ServerCnxnFactory.java │ │ │ ├── ServerConfig.java │ │ │ ├── ServerStats.java │ │ │ ├── SessionTracker.java │ │ │ ├── SessionTrackerImpl.java │ │ │ ├── Stats.java │ │ │ ├── SyncRequestProcessor.java │ │ │ ├── TraceFormatter.java │ │ │ ├── WatchManager.java │ │ │ ├── ZKDatabase.java │ │ │ ├── ZooKeeperSaslServer.java │ │ │ ├── ZooKeeperServer.java │ │ │ ├── ZooKeeperServerBean.java │ │ │ ├── ZooKeeperServerMXBean.java │ │ │ ├── ZooKeeperServerMain.java │ │ │ ├── ZooTrace.java │ │ │ ├── auth │ │ │ │ ├── AuthenticationProvider.java │ │ │ │ ├── DigestAuthenticationProvider.java │ │ │ │ ├── DigestLoginModule.java │ │ │ │ ├── IPAuthenticationProvider.java │ │ │ │ ├── KerberosName.java │ │ │ │ ├── ProviderRegistry.java │ │ │ │ ├── SASLAuthenticationProvider.java │ │ │ │ └── SaslServerCallbackHandler.java │ │ │ ├── package.html │ │ │ ├── persistence │ │ │ │ ├── FileSnap.java │ │ │ │ ├── FileTxnLog.java │ │ │ │ ├── FileTxnSnapLog.java │ │ │ │ ├── SnapShot.java │ │ │ │ ├── TxnLog.java │ │ │ │ └── Util.java │ │ │ ├── quorum │ │ │ │ ├── AckRequestProcessor.java │ │ │ │ ├── AuthFastLeaderElection.java │ │ │ │ ├── CommitProcessor.java │ │ │ │ ├── Election.java │ │ │ │ ├── FastLeaderElection.java │ │ │ │ ├── Follower.java │ │ │ │ ├── FollowerBean.java │ │ │ │ ├── FollowerMXBean.java │ │ │ │ ├── FollowerRequestProcessor.java │ │ │ │ ├── FollowerZooKeeperServer.java │ │ │ │ ├── Leader.java │ │ │ │ ├── LeaderBean.java │ │ │ │ ├── LeaderElection.java │ │ │ │ ├── LeaderElectionBean.java │ │ │ │ ├── LeaderElectionMXBean.java │ │ │ │ ├── LeaderMXBean.java │ │ │ │ ├── LeaderZooKeeperServer.java │ │ │ │ ├── Learner.java │ │ │ │ ├── LearnerHandler.java │ │ │ │ ├── LearnerSessionTracker.java │ │ │ │ ├── LearnerSyncRequest.java │ │ │ │ ├── LearnerZooKeeperServer.java │ │ │ │ ├── LocalPeerBean.java │ │ │ │ ├── LocalPeerMXBean.java │ │ │ │ ├── Observer.java │ │ │ │ ├── ObserverMXBean.java │ │ │ │ ├── ObserverRequestProcessor.java │ │ │ │ ├── ObserverZooKeeperServer.java │ │ │ │ ├── ProposalRequestProcessor.java │ │ │ │ ├── QuorumBean.java │ │ │ │ ├── QuorumCnxManager.java │ │ │ │ ├── QuorumMXBean.java │ │ │ │ ├── QuorumPeer.java │ │ │ │ ├── QuorumPeerConfig.java │ │ │ │ ├── QuorumPeerMain.java │ │ │ │ ├── QuorumStats.java │ │ │ │ ├── QuorumZooKeeperServer.java │ │ │ │ ├── ReadOnlyBean.java │ │ │ │ ├── ReadOnlyRequestProcessor.java │ │ │ │ ├── ReadOnlyZooKeeperServer.java │ │ │ │ ├── RemotePeerBean.java │ │ │ │ ├── RemotePeerMXBean.java │ │ │ │ ├── SendAckRequestProcessor.java │ │ │ │ ├── ServerBean.java │ │ │ │ ├── ServerMXBean.java │ │ │ │ ├── StateSummary.java │ │ │ │ ├── Vote.java │ │ │ │ └── flexible │ │ │ │ │ ├── QuorumHierarchical.java │ │ │ │ │ ├── QuorumMaj.java │ │ │ │ │ └── QuorumVerifier.java │ │ │ ├── upgrade │ │ │ │ ├── DataNodeV1.java │ │ │ │ ├── DataTreeV1.java │ │ │ │ ├── UpgradeMain.java │ │ │ │ ├── UpgradeSnapShot.java │ │ │ │ └── UpgradeSnapShotV1.java │ │ │ └── util │ │ │ │ ├── Profiler.java │ │ │ │ ├── SerializeUtils.java │ │ │ │ └── ZxidUtils.java │ │ │ └── version │ │ │ └── util │ │ │ └── VerGen.java │ └── overview.html ├── systest │ ├── README.txt │ └── org │ │ └── apache │ │ └── zookeeper │ │ └── test │ │ └── system │ │ ├── BaseSysTest.java │ │ ├── DuplicateNameException.java │ │ ├── GenerateLoad.java │ │ ├── Instance.java │ │ ├── InstanceContainer.java │ │ ├── InstanceManager.java │ │ ├── NoAssignmentException.java │ │ ├── NoAvailableContainers.java │ │ ├── QuorumPeerInstance.java │ │ ├── SimpleClient.java │ │ └── SimpleSysTest.java └── test │ ├── bin │ ├── test-patch.properties │ └── test-patch.sh │ ├── checkstyle-noframes-sorted.xsl │ ├── checkstyle.xml │ ├── config │ └── findbugsExcludeFile.xml │ ├── data │ ├── invalidsnap │ │ └── version-2 │ │ │ ├── log.1 │ │ │ ├── log.274 │ │ │ ├── log.63b │ │ │ ├── snapshot.0 │ │ │ ├── snapshot.272 │ │ │ ├── snapshot.639 │ │ │ └── snapshot.83f │ └── upgrade │ │ ├── log.100000001 │ │ ├── log.100001bf0 │ │ ├── snapshot.100000000 │ │ └── snapshot.100001bec │ └── org │ └── apache │ └── zookeeper │ ├── ClientReconnectTest.java │ ├── JUnit4ZKTestRunner.java │ ├── MultiResponseTest.java │ ├── MultiTransactionRecordTest.java │ ├── PortAssignment.java │ ├── TestableZooKeeper.java │ ├── VerGenTest.java │ ├── ZKTestCase.java │ ├── ZooKeeperTest.java │ ├── server │ ├── CRCTest.java │ ├── DataTreeUnitTest.java │ ├── DatadirCleanupManagerTest.java │ ├── DeserializationPerfTest.java │ ├── InvalidSnapshotTest.java │ ├── PrepRequestProcessorTest.java │ ├── SerializationPerfTest.java │ ├── ServerCnxnFactoryAccessor.java │ ├── ToStringTest.java │ ├── ZooKeeperServerMainTest.java │ ├── ZooKeeperServerTest.java │ └── quorum │ │ ├── LearnerTest.java │ │ ├── QuorumPeerMainTest.java │ │ ├── QuorumPeerTestBase.java │ │ └── Zab1_0Test.java │ └── test │ ├── ACLCountTest.java │ ├── ACLRootTest.java │ ├── ACLTest.java │ ├── AsyncHammerTest.java │ ├── AsyncOps.java │ ├── AsyncOpsTest.java │ ├── AsyncTest.java │ ├── AuthTest.java │ ├── ChrootAsyncTest.java │ ├── ChrootClientTest.java │ ├── ChrootTest.java │ ├── ClientBase.java │ ├── ClientHammerTest.java │ ├── ClientPortBindTest.java │ ├── ClientRetry.java │ ├── ClientTest.java │ ├── CnxManagerTest.java │ ├── ConnectStringParserTest.java │ ├── CreateModeTest.java │ ├── DataTreeTest.java │ ├── DisconnectableZooKeeper.java │ ├── DisconnectedWatcherTest.java │ ├── EventTypeTest.java │ ├── FLELostMessageTest.java │ ├── FLENewEpochTest.java │ ├── FLERestartTest.java │ ├── FLETest.java │ ├── FLEZeroWeightTest.java │ ├── FollowerResyncConcurrencyTest.java │ ├── FourLetterWordsQuorumTest.java │ ├── FourLetterWordsTest.java │ ├── GetChildren2Test.java │ ├── HierarchicalQuorumTest.java │ ├── IntegrityCheck.java │ ├── InvalidSnapshotTest.java │ ├── JMXEnv.java │ ├── KeeperStateTest.java │ ├── LENonTerminateTest.java │ ├── LETest.java │ ├── LoadFromLogTest.java │ ├── MaxCnxnsTest.java │ ├── MultiTransactionTest.java │ ├── NioNettySuiteBase.java │ ├── NioNettySuiteHammerTest.java │ ├── NioNettySuiteTest.java │ ├── NullDataTest.java │ ├── OOMTest.java │ ├── ObserverHierarchicalQuorumTest.java │ ├── ObserverQuorumHammerTest.java │ ├── ObserverTest.java │ ├── PurgeTxnTest.java │ ├── QuorumBase.java │ ├── QuorumHammerTest.java │ ├── QuorumQuotaTest.java │ ├── QuorumTest.java │ ├── QuorumUtil.java │ ├── QuorumZxidSyncTest.java │ ├── ReadOnlyModeTest.java │ ├── RecoveryTest.java │ ├── RepeatStartupTest.java │ ├── RestoreCommittedLogTest.java │ ├── SaslAuthDesignatedClientTest.java │ ├── SaslAuthFailDesignatedClientTest.java │ ├── SaslAuthFailTest.java │ ├── SaslAuthMissingClientConfigTest.java │ ├── SaslAuthTest.java │ ├── SessionInvalidationTest.java │ ├── SessionTest.java │ ├── SledgeHammer.java │ ├── StandaloneTest.java │ ├── StatTest.java │ ├── StaticHostProviderTest.java │ ├── SyncCallTest.java │ ├── TestHammer.java │ ├── TruncateTest.java │ ├── UpgradeTest.java │ ├── WatchedEventTest.java │ ├── WatcherFuncTest.java │ ├── WatcherTest.java │ ├── ZkDatabaseCorruptionTest.java │ ├── ZooKeeperQuotaTest.java │ └── ZooKeeperTestClient.java ├── lastRevision.bat ├── lastRevision.sh ├── packages ├── deb │ ├── init.d │ │ └── zookeeper │ └── zookeeper.control │ │ ├── conffile │ │ ├── control │ │ ├── postinst │ │ ├── postrm │ │ ├── preinst │ │ └── prerm ├── rpm │ ├── init.d │ │ └── zookeeper │ └── spec │ │ └── zookeeper.spec ├── templates │ └── conf │ │ └── zookeeper-env.sh └── update-zookeeper-env.sh ├── recipes ├── README.txt ├── build-recipes.xml ├── build.xml ├── election │ ├── README.txt │ ├── build.xml │ ├── src │ │ └── java │ │ │ └── org │ │ │ └── apache │ │ │ └── zookeeper │ │ │ └── recipes │ │ │ └── leader │ │ │ ├── LeaderElectionAware.java │ │ │ ├── LeaderElectionSupport.java │ │ │ └── LeaderOffer.java │ └── test │ │ └── org │ │ └── apache │ │ └── zookeeper │ │ └── recipes │ │ └── leader │ │ └── LeaderElectionSupportTest.java ├── lock │ ├── README.txt │ ├── build.xml │ ├── src │ │ ├── c │ │ │ ├── INSTALL │ │ │ ├── LICENSE │ │ │ ├── Makefile.am │ │ │ ├── README.txt │ │ │ ├── acinclude.m4 │ │ │ ├── aminclude.am │ │ │ ├── c-doc.Doxyfile │ │ │ ├── configure.ac │ │ │ ├── include │ │ │ │ └── zoo_lock.h │ │ │ ├── src │ │ │ │ └── zoo_lock.c │ │ │ └── tests │ │ │ │ ├── TestClient.cc │ │ │ │ ├── TestDriver.cc │ │ │ │ ├── Util.cc │ │ │ │ ├── Util.h │ │ │ │ └── zkServer.sh │ │ └── java │ │ │ └── org │ │ │ └── apache │ │ │ └── zookeeper │ │ │ └── recipes │ │ │ └── lock │ │ │ ├── LockListener.java │ │ │ ├── ProtocolSupport.java │ │ │ ├── WriteLock.java │ │ │ ├── ZNodeName.java │ │ │ └── ZooKeeperOperation.java │ └── test │ │ └── org │ │ └── apache │ │ └── zookeeper │ │ └── recipes │ │ └── lock │ │ ├── WriteLockTest.java │ │ └── ZNodeNameTest.java └── queue │ ├── README.txt │ ├── build.xml │ ├── src │ ├── c │ │ ├── INSTALL │ │ ├── LICENSE │ │ ├── Makefile.am │ │ ├── README.txt │ │ ├── acinclude.m4 │ │ ├── aminclude.am │ │ ├── c-doc.Doxyfile │ │ ├── configure.ac │ │ ├── include │ │ │ └── zoo_queue.h │ │ ├── src │ │ │ └── zoo_queue.c │ │ └── tests │ │ │ ├── TestClient.cc │ │ │ ├── TestDriver.cc │ │ │ ├── Util.cc │ │ │ ├── Util.h │ │ │ └── zkServer.sh │ └── java │ │ └── org │ │ └── apache │ │ └── zookeeper │ │ └── recipes │ │ └── queue │ │ └── DistributedQueue.java │ └── test │ └── org │ └── apache │ └── zookeeper │ └── recipes │ └── queue │ └── DistributedQueueTest.java └── zookeeper.jute /.gitignore: -------------------------------------------------------------------------------- 1 | *.user 2 | build 3 | out 4 | .idea 5 | .revision 6 | src/c/generated 7 | src/java/.idea 8 | src/java/out 9 | src/java/generated 10 | src/java/*.iml 11 | src/java/lib/ivy-*.jar 12 | src/dotnet/generated 13 | src/dotnet/ZooKeeperNet/Generated/*.cs 14 | src/dotnet/ZooKeeperNet/_Reshaper 15 | src/dotnet/ZooKeeperNet/bin 16 | src/dotnet/ZooKeeperNet/obj 17 | /src/dotnet/packages 18 | .vs 19 | -------------------------------------------------------------------------------- /NOTICE.txt: -------------------------------------------------------------------------------- 1 | Apache ZooKeeper 2 | Copyright 2009-2011 The Apache Software Foundation 3 | 4 | This product includes software developed at 5 | The Apache Software Foundation (http://www.apache.org/). 6 | -------------------------------------------------------------------------------- /bin/README.txt: -------------------------------------------------------------------------------- 1 | This directory contain scripts that allow easy access (classpath in particular) 2 | to the ZooKeeper server and command line client. 3 | 4 | Files ending in .sh are unix and cygwin compatible 5 | 6 | Files ending in .cmd are msdos/windows compatible 7 | -------------------------------------------------------------------------------- /bin/zkCli.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | REM Licensed to the Apache Software Foundation (ASF) under one or more 3 | REM contributor license agreements. See the NOTICE file distributed with 4 | REM this work for additional information regarding copyright ownership. 5 | REM The ASF licenses this file to You under the Apache License, Version 2.0 6 | REM (the "License"); you may not use this file except in compliance with 7 | REM the License. You may obtain a copy of the License at 8 | REM 9 | REM http://www.apache.org/licenses/LICENSE-2.0 10 | REM 11 | REM Unless required by applicable law or agreed to in writing, software 12 | REM distributed under the License is distributed on an "AS IS" BASIS, 13 | REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | REM See the License for the specific language governing permissions and 15 | REM limitations under the License. 16 | 17 | setlocal 18 | call "%~dp0zkEnv.cmd" 19 | 20 | set ZOOMAIN=org.apache.zookeeper.ZooKeeperMain 21 | java "-Dzookeeper.log.dir=%ZOO_LOG_DIR%" "-Dzookeeper.root.logger=%ZOO_LOG4J_PROP%" -cp "%CLASSPATH%" %ZOOMAIN% %* 22 | 23 | endlocal 24 | 25 | -------------------------------------------------------------------------------- /bin/zkEnv.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | REM Licensed to the Apache Software Foundation (ASF) under one or more 3 | REM contributor license agreements. See the NOTICE file distributed with 4 | REM this work for additional information regarding copyright ownership. 5 | REM The ASF licenses this file to You under the Apache License, Version 2.0 6 | REM (the "License"); you may not use this file except in compliance with 7 | REM the License. You may obtain a copy of the License at 8 | REM 9 | REM http://www.apache.org/licenses/LICENSE-2.0 10 | REM 11 | REM Unless required by applicable law or agreed to in writing, software 12 | REM distributed under the License is distributed on an "AS IS" BASIS, 13 | REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | REM See the License for the specific language governing permissions and 15 | REM limitations under the License. 16 | 17 | set ZOOCFGDIR=%~dp0%..\conf 18 | set ZOO_LOG_DIR=%~dp0%.. 19 | set ZOO_LOG4J_PROP=INFO,CONSOLE 20 | 21 | REM for sanity sake assume Java 1.6 22 | REM see: http://java.sun.com/javase/6/docs/technotes/tools/windows/java.html 23 | 24 | REM add the zoocfg dir to classpath 25 | set CLASSPATH=%ZOOCFGDIR% 26 | 27 | REM make it work in the release 28 | SET CLASSPATH=%~dp0..\*;%~dp0..\lib\*;%CLASSPATH% 29 | 30 | REM make it work for developers 31 | SET CLASSPATH=%~dp0..\build\classes;%~dp0..\build\lib\*;%CLASSPATH% 32 | 33 | set ZOOCFG=%ZOOCFGDIR%\zoo.cfg 34 | 35 | -------------------------------------------------------------------------------- /bin/zkServer.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | REM Licensed to the Apache Software Foundation (ASF) under one or more 3 | REM contributor license agreements. See the NOTICE file distributed with 4 | REM this work for additional information regarding copyright ownership. 5 | REM The ASF licenses this file to You under the Apache License, Version 2.0 6 | REM (the "License"); you may not use this file except in compliance with 7 | REM the License. You may obtain a copy of the License at 8 | REM 9 | REM http://www.apache.org/licenses/LICENSE-2.0 10 | REM 11 | REM Unless required by applicable law or agreed to in writing, software 12 | REM distributed under the License is distributed on an "AS IS" BASIS, 13 | REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | REM See the License for the specific language governing permissions and 15 | REM limitations under the License. 16 | 17 | setlocal 18 | call "%~dp0zkEnv.cmd" 19 | 20 | set ZOOMAIN=org.apache.zookeeper.server.quorum.QuorumPeerMain 21 | echo on 22 | java "-Dzookeeper.log.dir=%ZOO_LOG_DIR%" "-Dzookeeper.root.logger=%ZOO_LOG4J_PROP%" -cp "%CLASSPATH%" %ZOOMAIN% "%ZOOCFG%" %* 23 | 24 | endlocal 25 | 26 | -------------------------------------------------------------------------------- /conf/configuration.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
namevaluedescription
21 | 22 | 23 |
24 |
25 | -------------------------------------------------------------------------------- /conf/zoo_sample.cfg: -------------------------------------------------------------------------------- 1 | # The number of milliseconds of each tick 2 | tickTime=2000 3 | # The number of ticks that the initial 4 | # synchronization phase can take 5 | initLimit=10 6 | # The number of ticks that can pass between 7 | # sending a request and getting an acknowledgement 8 | syncLimit=5 9 | # the directory where the snapshot is stored. 10 | # do not use /tmp for storage, /tmp here is just 11 | # example sakes. 12 | dataDir=/tmp/zookeeper 13 | # the port at which the clients will connect 14 | clientPort=2181 15 | # 16 | # Be sure to read the maintenance section of the 17 | # administrator guide before turning on autopurge. 18 | # 19 | # http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance 20 | # 21 | # The number of snapshots to retain in dataDir 22 | #autopurge.snapRetainCount=3 23 | # Purge task interval in hours 24 | # Set to "0" to disable auto purge feature 25 | #autopurge.purgeInterval=1 26 | -------------------------------------------------------------------------------- /docs/api/org/apache/zookeeper/client/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | org.apache.zookeeper.client (ZooKeeper 3.4.3 API) 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | org.apache.zookeeper.client 20 | 21 | 22 | 27 | 28 |
23 | Classes  24 | 25 |
26 | FourLetterWordMain
29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /docs/api/org/apache/zookeeper/server/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | org.apache.zookeeper.server (ZooKeeper 3.4.3 API) 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | org.apache.zookeeper.server 20 | 21 | 22 | 31 | 32 |
23 | Classes  24 | 25 |
26 | LogFormatter 27 |
28 | PurgeTxnLog 29 |
30 | ZooKeeperServerMain
33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /docs/api/org/apache/zookeeper/server/quorum/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | org.apache.zookeeper.server.quorum (ZooKeeper 3.4.3 API) 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | org.apache.zookeeper.server.quorum 20 | 21 | 22 | 27 | 28 |
23 | Classes  24 | 25 |
26 | QuorumPeerMain
29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /docs/api/org/apache/zookeeper/server/upgrade/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | org.apache.zookeeper.server.upgrade (ZooKeeper 3.4.3 API) 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | org.apache.zookeeper.server.upgrade 20 | 21 | 22 | 27 | 28 |
23 | Classes  24 | 25 |
26 | UpgradeMain
29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /docs/api/package-list: -------------------------------------------------------------------------------- 1 | org.apache.zookeeper 2 | org.apache.zookeeper.client 3 | org.apache.zookeeper.data 4 | org.apache.zookeeper.server 5 | org.apache.zookeeper.server.quorum 6 | org.apache.zookeeper.server.upgrade 7 | -------------------------------------------------------------------------------- /docs/api/resources/inherit.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/api/resources/inherit.gif -------------------------------------------------------------------------------- /docs/api/stylesheet.css: -------------------------------------------------------------------------------- 1 | /* Javadoc style sheet */ 2 | 3 | /* Define colors, fonts and other style attributes here to override the defaults */ 4 | 5 | /* Page background color */ 6 | body { background-color: #FFFFFF; color:#000000 } 7 | 8 | /* Headings */ 9 | h1 { font-size: 145% } 10 | 11 | /* Table colors */ 12 | .TableHeadingColor { background: #CCCCFF; color:#000000 } /* Dark mauve */ 13 | .TableSubHeadingColor { background: #EEEEFF; color:#000000 } /* Light mauve */ 14 | .TableRowColor { background: #FFFFFF; color:#000000 } /* White */ 15 | 16 | /* Font used in left-hand frame lists */ 17 | .FrameTitleFont { font-size: 100%; font-family: Helvetica, Arial, sans-serif; color:#000000 } 18 | .FrameHeadingFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif; color:#000000 } 19 | .FrameItemFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif; color:#000000 } 20 | 21 | /* Navigation bar fonts and colors */ 22 | .NavBarCell1 { background-color:#EEEEFF; color:#000000} /* Light mauve */ 23 | .NavBarCell1Rev { background-color:#00008B; color:#FFFFFF} /* Dark Blue */ 24 | .NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;color:#000000;} 25 | .NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;color:#FFFFFF;} 26 | 27 | .NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000} 28 | .NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000} 29 | 30 | -------------------------------------------------------------------------------- /docs/bookkeeperConfig.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/bookkeeperConfig.pdf -------------------------------------------------------------------------------- /docs/bookkeeperOverview.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/bookkeeperOverview.pdf -------------------------------------------------------------------------------- /docs/bookkeeperProgrammer.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/bookkeeperProgrammer.pdf -------------------------------------------------------------------------------- /docs/bookkeeperStarted.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/bookkeeperStarted.pdf -------------------------------------------------------------------------------- /docs/bookkeeperStream.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/bookkeeperStream.pdf -------------------------------------------------------------------------------- /docs/broken-links.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /docs/images/2pc.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/images/2pc.jpg -------------------------------------------------------------------------------- /docs/images/bk-overview.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/images/bk-overview.jpg -------------------------------------------------------------------------------- /docs/images/built-with-forrest-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/images/built-with-forrest-button.png -------------------------------------------------------------------------------- /docs/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/images/favicon.ico -------------------------------------------------------------------------------- /docs/images/hadoop-logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/images/hadoop-logo.jpg -------------------------------------------------------------------------------- /docs/images/instruction_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/images/instruction_arrow.png -------------------------------------------------------------------------------- /docs/images/state_dia.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/images/state_dia.jpg -------------------------------------------------------------------------------- /docs/images/zkcomponents.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/images/zkcomponents.jpg -------------------------------------------------------------------------------- /docs/images/zknamespace.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/images/zknamespace.jpg -------------------------------------------------------------------------------- /docs/images/zkperfRW-3.2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/images/zkperfRW-3.2.jpg -------------------------------------------------------------------------------- /docs/images/zkperfRW.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/images/zkperfRW.jpg -------------------------------------------------------------------------------- /docs/images/zkperfreliability.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/images/zkperfreliability.jpg -------------------------------------------------------------------------------- /docs/images/zkservice.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/images/zkservice.jpg -------------------------------------------------------------------------------- /docs/images/zookeeper_small.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/images/zookeeper_small.gif -------------------------------------------------------------------------------- /docs/index.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/index.pdf -------------------------------------------------------------------------------- /docs/javaExample.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/javaExample.pdf -------------------------------------------------------------------------------- /docs/linkmap.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/linkmap.pdf -------------------------------------------------------------------------------- /docs/recipes.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/recipes.pdf -------------------------------------------------------------------------------- /docs/releasenotes.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/releasenotes.pdf -------------------------------------------------------------------------------- /docs/skin/CommonMessages_de.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/CommonMessages_de.xml -------------------------------------------------------------------------------- /docs/skin/CommonMessages_en_US.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | Font size: 20 | Last Published: 21 | Search 22 | Search site with 23 | 24 | -------------------------------------------------------------------------------- /docs/skin/CommonMessages_es.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/CommonMessages_es.xml -------------------------------------------------------------------------------- /docs/skin/CommonMessages_fr.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/CommonMessages_fr.xml -------------------------------------------------------------------------------- /docs/skin/images/README.txt: -------------------------------------------------------------------------------- 1 | The images in this directory are used if the current skin lacks them. 2 | -------------------------------------------------------------------------------- /docs/skin/images/add.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/add.jpg -------------------------------------------------------------------------------- /docs/skin/images/built-with-forrest-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/built-with-forrest-button.png -------------------------------------------------------------------------------- /docs/skin/images/chapter.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/chapter.gif -------------------------------------------------------------------------------- /docs/skin/images/chapter_open.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/chapter_open.gif -------------------------------------------------------------------------------- /docs/skin/images/current.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/current.gif -------------------------------------------------------------------------------- /docs/skin/images/error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/error.png -------------------------------------------------------------------------------- /docs/skin/images/external-link.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/external-link.gif -------------------------------------------------------------------------------- /docs/skin/images/fix.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/fix.jpg -------------------------------------------------------------------------------- /docs/skin/images/forrest-credit-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/forrest-credit-logo.png -------------------------------------------------------------------------------- /docs/skin/images/hack.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/hack.jpg -------------------------------------------------------------------------------- /docs/skin/images/header_white_line.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/header_white_line.gif -------------------------------------------------------------------------------- /docs/skin/images/info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/info.png -------------------------------------------------------------------------------- /docs/skin/images/instruction_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/instruction_arrow.png -------------------------------------------------------------------------------- /docs/skin/images/label.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/label.gif -------------------------------------------------------------------------------- /docs/skin/images/page.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/page.gif -------------------------------------------------------------------------------- /docs/skin/images/pdfdoc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/pdfdoc.gif -------------------------------------------------------------------------------- /docs/skin/images/poddoc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/poddoc.png -------------------------------------------------------------------------------- /docs/skin/images/printer.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/printer.gif -------------------------------------------------------------------------------- /docs/skin/images/rc-b-l-15-1body-2menu-3menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/rc-b-l-15-1body-2menu-3menu.png -------------------------------------------------------------------------------- /docs/skin/images/rc-b-r-15-1body-2menu-3menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/rc-b-r-15-1body-2menu-3menu.png -------------------------------------------------------------------------------- /docs/skin/images/rc-b-r-5-1header-2tab-selected-3tab-selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/rc-b-r-5-1header-2tab-selected-3tab-selected.png -------------------------------------------------------------------------------- /docs/skin/images/rc-t-l-5-1header-2searchbox-3searchbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/rc-t-l-5-1header-2searchbox-3searchbox.png -------------------------------------------------------------------------------- /docs/skin/images/rc-t-l-5-1header-2tab-selected-3tab-selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/rc-t-l-5-1header-2tab-selected-3tab-selected.png -------------------------------------------------------------------------------- /docs/skin/images/rc-t-l-5-1header-2tab-unselected-3tab-unselected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/rc-t-l-5-1header-2tab-unselected-3tab-unselected.png -------------------------------------------------------------------------------- /docs/skin/images/rc-t-r-15-1body-2menu-3menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/rc-t-r-15-1body-2menu-3menu.png -------------------------------------------------------------------------------- /docs/skin/images/rc-t-r-5-1header-2searchbox-3searchbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/rc-t-r-5-1header-2searchbox-3searchbox.png -------------------------------------------------------------------------------- /docs/skin/images/rc-t-r-5-1header-2tab-selected-3tab-selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/rc-t-r-5-1header-2tab-selected-3tab-selected.png -------------------------------------------------------------------------------- /docs/skin/images/rc-t-r-5-1header-2tab-unselected-3tab-unselected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/rc-t-r-5-1header-2tab-unselected-3tab-unselected.png -------------------------------------------------------------------------------- /docs/skin/images/remove.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/remove.jpg -------------------------------------------------------------------------------- /docs/skin/images/rss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/rss.png -------------------------------------------------------------------------------- /docs/skin/images/spacer.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/spacer.gif -------------------------------------------------------------------------------- /docs/skin/images/success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/success.png -------------------------------------------------------------------------------- /docs/skin/images/txtdoc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/txtdoc.png -------------------------------------------------------------------------------- /docs/skin/images/update.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/update.jpg -------------------------------------------------------------------------------- /docs/skin/images/valid-html401.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/valid-html401.png -------------------------------------------------------------------------------- /docs/skin/images/vcss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/vcss.png -------------------------------------------------------------------------------- /docs/skin/images/warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/warning.png -------------------------------------------------------------------------------- /docs/skin/images/xmldoc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/xmldoc.gif -------------------------------------------------------------------------------- /docs/skin/print.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | body { 18 | font-family: Georgia, Palatino, serif; 19 | font-size: 12pt; 20 | background: white; 21 | } 22 | 23 | #tabs, 24 | #menu, 25 | #content .toc { 26 | display: none; 27 | } 28 | 29 | #content { 30 | width: auto; 31 | padding: 0; 32 | float: none !important; 33 | color: black; 34 | background: inherit; 35 | } 36 | 37 | a:link, a:visited { 38 | color: #336699; 39 | background: inherit; 40 | text-decoration: underline; 41 | } 42 | 43 | #top .logo { 44 | padding: 0; 45 | margin: 0 0 2em 0; 46 | } 47 | 48 | #footer { 49 | margin-top: 4em; 50 | } 51 | 52 | acronym { 53 | border: 0; 54 | } -------------------------------------------------------------------------------- /docs/zookeeperAdmin.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/zookeeperAdmin.pdf -------------------------------------------------------------------------------- /docs/zookeeperHierarchicalQuorums.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/zookeeperHierarchicalQuorums.pdf -------------------------------------------------------------------------------- /docs/zookeeperInternals.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/zookeeperInternals.pdf -------------------------------------------------------------------------------- /docs/zookeeperJMX.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/zookeeperJMX.pdf -------------------------------------------------------------------------------- /docs/zookeeperObservers.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/zookeeperObservers.pdf -------------------------------------------------------------------------------- /docs/zookeeperOtherInfo.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/zookeeperOtherInfo.pdf -------------------------------------------------------------------------------- /docs/zookeeperOver.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/zookeeperOver.pdf -------------------------------------------------------------------------------- /docs/zookeeperProgrammers.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/zookeeperProgrammers.pdf -------------------------------------------------------------------------------- /docs/zookeeperQuotas.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/zookeeperQuotas.pdf -------------------------------------------------------------------------------- /docs/zookeeperStarted.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/zookeeperStarted.pdf -------------------------------------------------------------------------------- /docs/zookeeperTutorial.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/zookeeperTutorial.pdf -------------------------------------------------------------------------------- /lib/cobertura/README.txt: -------------------------------------------------------------------------------- 1 | Download the cobertura binary from the following location and unpack it into this directory. Run "cobertura-report" target from build.xml to generate coverage report. 2 | 3 | http://cobertura.sourceforge.net/download.html 4 | -------------------------------------------------------------------------------- /lib/jline-0.9.94.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/lib/jline-0.9.94.jar -------------------------------------------------------------------------------- /lib/log4j-1.2.15.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/lib/log4j-1.2.15.jar -------------------------------------------------------------------------------- /lib/netty-3.2.2.Final.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/lib/netty-3.2.2.Final.jar -------------------------------------------------------------------------------- /lib/slf4j-api-1.6.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/lib/slf4j-api-1.6.1.jar -------------------------------------------------------------------------------- /lib/slf4j-log4j12-1.6.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/lib/slf4j-log4j12-1.6.1.jar -------------------------------------------------------------------------------- /src/c/ChangeLog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/c/ChangeLog -------------------------------------------------------------------------------- /src/c/include/zookeeper_version.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | #ifndef ZOOKEEPER_VERSION_H_ 19 | #define ZOOKEEPER_VERSION_H_ 20 | 21 | #ifdef __cplusplus 22 | extern "C" { 23 | #endif 24 | 25 | #define ZOO_MAJOR_VERSION 3 26 | #define ZOO_MINOR_VERSION 4 27 | #define ZOO_PATCH_VERSION 3 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | 33 | #endif /* ZOOKEEPER_VERSION_H_ */ 34 | -------------------------------------------------------------------------------- /src/c/tests/MocksBase.cc: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | #include 20 | #include 21 | 22 | #include "MocksBase.h" 23 | #include "LibCSymTable.h" 24 | 25 | // ***************************************************************************** 26 | // Mock base 27 | void* Mock::operator new(std::size_t s){ 28 | void* p=malloc(s); 29 | if(!p) 30 | throw std::bad_alloc(); 31 | return p; 32 | } 33 | 34 | void Mock::operator delete(void* p){ 35 | LIBC_SYMBOLS.free(p); 36 | } 37 | -------------------------------------------------------------------------------- /src/c/tests/MocksBase.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | #ifndef MOCKSBASE_H_ 20 | #define MOCKSBASE_H_ 21 | 22 | #include 23 | 24 | // ***************************************************************************** 25 | // Mock base 26 | 27 | class Mock 28 | { 29 | public: 30 | virtual ~Mock(){} 31 | 32 | static void* operator new(std::size_t s); 33 | static void operator delete(void* p); 34 | }; 35 | 36 | #endif /*MOCKSBASE_H_*/ 37 | -------------------------------------------------------------------------------- /src/c/tests/Vector.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | #ifndef _VECTOR_UTIL_H 19 | #define _VECTOR_UTIL_H 20 | 21 | #include 22 | 23 | // function to conveniently stream vectors 24 | template 25 | std::ostream& operator<<(std::ostream& os,const std::vector& c){ 26 | typedef std::vector V; 27 | os<<"["; 28 | if(c.size()>0){ 29 | for(typename V::const_iterator it=c.begin();it!=c.end();++it) 30 | os<<*it<<","; 31 | os.seekp(-1,std::ios::cur); 32 | } 33 | os<<"]"; 34 | return os; 35 | } 36 | 37 | #endif // _VECTOR_UTIL_H 38 | -------------------------------------------------------------------------------- /src/c/tests/wrappers-mt.opt: -------------------------------------------------------------------------------- 1 | -Wl,--wrap -Wl,pthread_mutex_lock 2 | -Wl,--wrap -Wl,pthread_mutex_trylock 3 | -Wl,--wrap -Wl,pthread_mutex_unlock 4 | -------------------------------------------------------------------------------- /src/c/tests/wrappers.opt: -------------------------------------------------------------------------------- 1 | -Wl,--wrap -Wl,calloc 2 | -Wl,--wrap -Wl,free 3 | -Wl,--wrap -Wl,flush_send_queue 4 | -Wl,--wrap -Wl,get_xid 5 | -Wl,--wrap -Wl,deliverWatchers 6 | -Wl,--wrap -Wl,activateWatcher 7 | -------------------------------------------------------------------------------- /src/contrib/fatjar/README.txt: -------------------------------------------------------------------------------- 1 | This package contains build to create a fat zookeeper jar. You need to run ant to create the fat jar. 2 | To run the fatjar you can use. java -jar zoookeeper-*fatjar.jar 3 | -------------------------------------------------------------------------------- /src/contrib/fatjar/conf/mainClasses: -------------------------------------------------------------------------------- 1 | ::Client Commands 2 | client:org.apache.zookeeper.ZooKeeperMain:Client shell to ZooKeeper 3 | ::Server Commands 4 | server:org.apache.zookeeper.server.quorum.QuorumPeerMain:Start ZooKeeper server 5 | ::Test Commands 6 | generateLoad:org.apache.zookeeper.test.system.GenerateLoad:A distributed load generator for testing 7 | quorumBench:org.apache.zookeeper.server.QuorumBenchmark:A benchmark of just the quorum protocol 8 | abBench:org.apache.zookeeper.server.quorum.AtomicBroadcastBenchmark:A benchmark of just the atomic broadcast 9 | ic:org.apache.zookeeper.test.system.InstanceContainer:A container that will instantiate classes as directed by an instance manager 10 | systest:org.apache.zookeeper.test.system.BaseSysTest:Start system test 11 | -------------------------------------------------------------------------------- /src/contrib/huebrowser/zkui/Makefile: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | ifeq ($(ROOT),) 18 | $(error "Error: Expect the environment variable $$ROOT to point to the Desktop installation") 19 | endif 20 | 21 | include $(ROOT)/Makefile.sdk 22 | -------------------------------------------------------------------------------- /src/contrib/huebrowser/zkui/src/zkui/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | -------------------------------------------------------------------------------- /src/contrib/huebrowser/zkui/src/zkui/forms.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | from django import forms 18 | from django.forms.widgets import Textarea, HiddenInput 19 | 20 | class CreateZNodeForm(forms.Form): 21 | name = forms.CharField(max_length=64) 22 | data = forms.CharField(required=False, widget=Textarea) 23 | sequence = forms.BooleanField(required=False) 24 | 25 | class EditZNodeForm(forms.Form): 26 | data = forms.CharField(required=False, widget=Textarea) 27 | version = forms.IntegerField(required=False, widget=HiddenInput) 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/contrib/huebrowser/zkui/src/zkui/models.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/contrib/huebrowser/zkui/src/zkui/settings.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | DJANGO_APPS = [ "zkui" ] 18 | NICE_NAME = "ZooKeeper Browser" 19 | REQUIRES_HADOOP = False 20 | 21 | CLUSTERS = [{ 22 | 'nice_name': 'Default', 23 | 'hostport': 'localhost:2181,localhost:2182,localhost:2183', 24 | 'rest_gateway': 'http://localhost:9998' 25 | } 26 | ] 27 | 28 | DEPENDER_PACKAGE_YMLS = [ 29 | "src/zkui/static/js/package.yml", 30 | ] 31 | -------------------------------------------------------------------------------- /src/contrib/huebrowser/zkui/src/zkui/static/art/line_icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/contrib/huebrowser/zkui/src/zkui/static/art/line_icons.png -------------------------------------------------------------------------------- /src/contrib/huebrowser/zkui/src/zkui/static/art/zkui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/contrib/huebrowser/zkui/src/zkui/static/art/zkui.png -------------------------------------------------------------------------------- /src/contrib/huebrowser/zkui/src/zkui/static/bootstrap.js: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | CCS.Desktop.register({ 17 | Zkui : { 18 | name : 'ZooKeeper Browser', 19 | css : '/zkui/static/css/zkui.css', 20 | require: [ 'Zkui' ], 21 | launch: function(path, options){ 22 | return new Zkui(path || '/zkui/', options); 23 | }, 24 | menu: { 25 | id: 'ccs-zkui-menu', 26 | img: { 27 | src: '/zkui/static/art/zkui.png' 28 | } 29 | }, 30 | help: '/help/zkui/' 31 | } 32 | }); 33 | -------------------------------------------------------------------------------- /src/contrib/huebrowser/zkui/src/zkui/static/help/index.html: -------------------------------------------------------------------------------- 1 | 17 | 18 |

ZooKeeper Browser

19 | 20 | 21 |

ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services

22 | 23 |

About

24 | 25 |

The ZooKeeper Browser application allows you to see how the cluster nodes are working and also allows you to do CRUD operations on the znode hierarchy.

26 | 27 | -------------------------------------------------------------------------------- /src/contrib/huebrowser/zkui/src/zkui/static/js/Source/Zkui/Zkui.js: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | /* 18 | --- 19 | 20 | script: Zkui.js 21 | 22 | description: Defines Zkui; a Hue application that extends CCS.JBrowser. 23 | 24 | authors: 25 | - Unknown 26 | 27 | requires: 28 | - ccs-shared/CCS.JBrowser 29 | 30 | provides: [Zkui] 31 | 32 | ... 33 | */ 34 | ART.Sheet.define('window.art.browser.zkui', { 35 | 'min-width': 620 36 | }); 37 | 38 | var Zkui = new Class({ 39 | 40 | Extends: CCS.JBrowser, 41 | 42 | options: { 43 | className: 'art browser logo_header zkui' 44 | }, 45 | 46 | initialize: function(path, options){ 47 | this.parent(path || '/zkui/', options); 48 | } 49 | 50 | }); 51 | -------------------------------------------------------------------------------- /src/contrib/huebrowser/zkui/src/zkui/static/js/package.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | copyright: Apache License v2.0 16 | version: 0.1 17 | description: ZooKeeper Browser 18 | name: ZooKeeper Browser 19 | sources: [Source/Zkui/Zkui.js] 20 | -------------------------------------------------------------------------------- /src/contrib/huebrowser/zkui/src/zkui/templates/create.mako: -------------------------------------------------------------------------------- 1 | <%! 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | %> 18 | <%namespace name="shared" file="shared_components.mako" /> 19 | 20 | ${shared.header("ZooKeeper Browser > Create Znode")} 21 | 22 |

Create New Znode :: ${path}

23 |

24 | 25 |
26 | 27 | ${form.as_table()|n} 28 | 31 |
29 | 30 |
32 |
33 | 34 | ${shared.footer()} 35 | -------------------------------------------------------------------------------- /src/contrib/huebrowser/zkui/src/zkui/templates/edit.mako: -------------------------------------------------------------------------------- 1 | <%! 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | %> 18 | <%namespace name="shared" file="shared_components.mako" /> 19 | 20 | ${shared.header("ZooKeeper Browser > Edit Znode > %s" % path)} 21 | 22 |

Edit Znode Data :: ${path}

23 |

24 | 25 |
26 | 27 | ${form.as_table()|n} 28 | 31 |
29 | 30 |
32 |
33 | 34 | ${shared.footer()} 35 | -------------------------------------------------------------------------------- /src/contrib/huebrowser/zkui/src/zkui/urls.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | from django.conf.urls.defaults import patterns, url 18 | 19 | urlpatterns = patterns('zkui', 20 | url(r'^$', 'views.index'), 21 | url(r'view/(?P\d+)$', 'views.view'), 22 | url(r'clients/(?P.+)$', 'views.clients'), 23 | url(r'tree/(?P\d+)(?P.+)$', 'views.tree'), 24 | url(r'create/(?P\d+)(?P.*)$', 'views.create'), 25 | url(r'delete/(?P\d+)(?P.*)$', 'views.delete'), 26 | url(r'edit/base64/(?P\d+)(?P.*)$', 'views.edit_as_base64'), 27 | url(r'edit/text/(?P\d+)(?P.*)$', 'views.edit_as_text') 28 | ) 29 | -------------------------------------------------------------------------------- /src/contrib/huebrowser/zkui/src/zkui/utils.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | from zkui import settings 18 | 19 | from django.http import Http404 20 | 21 | def get_cluster_or_404(id): 22 | try: 23 | id = int(id) 24 | if not (0 <= id < len(settings.CLUSTERS)): 25 | raise ValueError, 'Undefined cluster id.' 26 | except (TypeError, ValueError): 27 | raise Http404() 28 | 29 | cluster = settings.CLUSTERS[id] 30 | cluster['id'] = id 31 | 32 | return cluster 33 | 34 | -------------------------------------------------------------------------------- /src/contrib/huebrowser/zkui/src/zkui/windmilltests.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | from desktop.lib.windmill_util import logged_in_client 18 | 19 | def test_zkui(): 20 | """ launches the default view for zkui """ 21 | client = logged_in_client() 22 | client.click(id='ccs-zkui-menu') 23 | client.waits.forElement(classname='CCS-ZKUI', timeout='2000') 24 | -------------------------------------------------------------------------------- /src/contrib/loggraph/src/java/org/apache/zookeeper/graph/FilterException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.apache.zookeeper.graph; 19 | 20 | public class FilterException extends Exception { 21 | public FilterException(String s) { super(s); } 22 | }; 23 | -------------------------------------------------------------------------------- /src/contrib/loggraph/src/java/org/apache/zookeeper/graph/LogIterator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.apache.zookeeper.graph; 19 | 20 | import java.io.Closeable; 21 | import java.util.Iterator; 22 | import java.io.IOException; 23 | 24 | public interface LogIterator extends Iterator, Closeable { 25 | long size() throws IOException;; 26 | }; 27 | -------------------------------------------------------------------------------- /src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/AndOp.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.apache.zookeeper.graph.filterops; 19 | 20 | import org.apache.zookeeper.graph.LogEntry; 21 | import org.apache.zookeeper.graph.FilterOp; 22 | import org.apache.zookeeper.graph.FilterException; 23 | 24 | public class AndOp extends FilterOp { 25 | public boolean matches(LogEntry entry) throws FilterException { 26 | for (FilterOp f : subOps) { 27 | if (!f.matches(entry)) { 28 | return false; 29 | } 30 | } 31 | return true; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/Arg.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.apache.zookeeper.graph.filterops; 19 | 20 | import org.apache.zookeeper.graph.FilterOp.*; 21 | 22 | public class Arg { 23 | private ArgType type; 24 | protected T value; 25 | 26 | protected Arg(ArgType type) { 27 | this.type = type; 28 | } 29 | 30 | public ArgType getType() { return type; } 31 | public T getValue() { return value; } 32 | 33 | public String toString() { 34 | return "[" + type + ":" + value + "]"; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/NotOp.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.apache.zookeeper.graph.filterops; 19 | 20 | import org.apache.zookeeper.graph.LogEntry; 21 | import org.apache.zookeeper.graph.FilterOp; 22 | import org.apache.zookeeper.graph.FilterException; 23 | 24 | public class NotOp extends FilterOp { 25 | public boolean matches(LogEntry entry) throws FilterException { 26 | if (subOps.size() != 1) { 27 | throw new FilterException("Not operation can only take one argument"); 28 | } 29 | return !subOps.get(0).matches(entry); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/NumberArg.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.apache.zookeeper.graph.filterops; 19 | 20 | import org.apache.zookeeper.graph.FilterOp.*; 21 | 22 | public class NumberArg extends Arg { 23 | public NumberArg(Long value) { 24 | super(ArgType.NUMBER); 25 | this.value = value; 26 | } 27 | }; 28 | 29 | -------------------------------------------------------------------------------- /src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/OrOp.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.apache.zookeeper.graph.filterops; 19 | 20 | import org.apache.zookeeper.graph.LogEntry; 21 | import org.apache.zookeeper.graph.FilterOp; 22 | import org.apache.zookeeper.graph.FilterException; 23 | 24 | public class OrOp extends FilterOp { 25 | public boolean matches(LogEntry entry) throws FilterException { 26 | for (FilterOp f : subOps) { 27 | if (f.matches(entry)) { 28 | return true; 29 | } 30 | } 31 | return false; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/StringArg.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.apache.zookeeper.graph.filterops; 19 | 20 | import org.apache.zookeeper.graph.FilterOp.*; 21 | 22 | public class StringArg extends Arg { 23 | public StringArg(String value) { 24 | super(ArgType.STRING); 25 | this.value = value; 26 | } 27 | }; 28 | 29 | -------------------------------------------------------------------------------- /src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/SymbolArg.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.apache.zookeeper.graph.filterops; 19 | 20 | import org.apache.zookeeper.graph.FilterOp.*; 21 | 22 | public class SymbolArg extends Arg { 23 | public SymbolArg(String value) { 24 | super(ArgType.SYMBOL); 25 | this.value = value; 26 | } 27 | }; 28 | -------------------------------------------------------------------------------- /src/contrib/loggraph/web/org/apache/zookeeper/graph/log4j.properties: -------------------------------------------------------------------------------- 1 | log4j.rootLogger=TRACE, CONSOLE 2 | 3 | # Print the date in ISO 8601 format 4 | log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender 5 | log4j.appender.CONSOLE.Threshold=TRACE 6 | log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout 7 | log4j.appender.CONSOLE.layout.ConversionPattern=%d{ISO8601} - %-5p [%t:%C{1}@%L] - %m%n 8 | 9 | log4j.logger.org.apache.zookeeper.graph.LogSkipList=off 10 | log4j.logger.org.apache.zookeeper.graph.RandomAccessFileReader=off 11 | #log4j.logger.org.apache.zookeeper.graph.Log4JSource=off -------------------------------------------------------------------------------- /src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/load-big.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/load-big.gif -------------------------------------------------------------------------------- /src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/load.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/load.gif -------------------------------------------------------------------------------- /src/contrib/monitoring/JMX-RESOURCES: -------------------------------------------------------------------------------- 1 | 2 | Resources for monitoring ZooKeeper using JMX 3 | -------------------------------------------- 4 | 5 | JMX/REST Bridge 6 | --------------- 7 | 8 | http://code.google.com/p/polarrose-jmx-rest-bridge/ 9 | 10 | "Simple Java Web Application that exposes JMX servers through HTTP. This was written so that external tools can easily query JMX attributes of Java applications. More specifically, this was written to allow Cacti to generate fancy graphs of ActiveMQ instances." 11 | 12 | JMXetric 13 | -------- 14 | 15 | http://code.google.com/p/jmxetric/ 16 | 17 | "JMXetric is a 100% java, configurable JVM agent that periodically polls MBean attributes and reports their values to Ganglia." 18 | 19 | jmxquery 20 | -------- 21 | 22 | http://code.google.com/p/jmxquery/ 23 | 24 | "a plugin for nagios to check jmx" 25 | 26 | check_jmx 27 | --------- 28 | 29 | http://exchange.nagios.org/directory/Plugins/Java-Applications-and-Servers/check_jmx/details 30 | 31 | 32 | jmx2snmp 33 | -------- 34 | 35 | http://github.com/tcurdt/jmx2snmp 36 | 37 | Expose application JMX properties via SNMP 38 | 39 | -------------------------------------------------------------------------------- /src/contrib/monitoring/ganglia/Screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/contrib/monitoring/ganglia/Screenshot.png -------------------------------------------------------------------------------- /src/contrib/monitoring/ganglia/modpython.conf: -------------------------------------------------------------------------------- 1 | /* Licensed to the Apache Software Foundation (ASF) under one 2 | or more contributor license agreements. See the NOTICE file 3 | distributed with this work for additional information 4 | regarding copyright ownership. The ASF licenses this file 5 | to you under the Apache License, Version 2.0 (the 6 | "License"); you may not use this file except in compliance 7 | with the License. You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. */ 16 | 17 | /* Update gmond.conf */ 18 | 19 | modules { 20 | module { 21 | name = "python_module" 22 | path = "/usr/lib/ganglia/modpython.so" 23 | params = "/usr/lib/ganglia/python_modules" 24 | } 25 | } 26 | 27 | include ('/etc/ganglia/conf.d/*.pyconf') 28 | 29 | -------------------------------------------------------------------------------- /src/contrib/monitoring/nagios/Screenshot-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/contrib/monitoring/nagios/Screenshot-1.png -------------------------------------------------------------------------------- /src/contrib/monitoring/nagios/Screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/contrib/monitoring/nagios/Screenshot.png -------------------------------------------------------------------------------- /src/contrib/monitoring/nagios/hostgroups.cfg: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # A group containing all the ZooKeeper nodes 18 | 19 | define hostgroup { 20 | hostgroup_name zookeeper-servers 21 | alias ZooKeeper Servers 22 | members localhost 23 | } 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/contrib/rest/NOTICE.txt: -------------------------------------------------------------------------------- 1 | This contrib module includes software developed under the 2 | COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 3 | 4 | This contrib depends on binary only jar libraries developed at: 5 | 6 | https://jersey.dev.java.net/ 7 | https://grizzly.dev.java.net/ 8 | -------------------------------------------------------------------------------- /src/contrib/rest/conf/keys/README: -------------------------------------------------------------------------------- 1 | 2 | In order to generate .jks (java keystore files) you need to use keytool. 3 | 4 | The password for the existing .jks is "123456" (without quotes). 5 | 6 | Some tutorials: 7 | - http://www.mobilefish.com/tutorials/java/java_quickguide_keytool.html 8 | 9 | -------------------------------------------------------------------------------- /src/contrib/rest/conf/keys/rest.cer: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/contrib/rest/conf/keys/rest.cer -------------------------------------------------------------------------------- /src/contrib/rest/conf/keys/rest.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/contrib/rest/conf/keys/rest.jks -------------------------------------------------------------------------------- /src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/jaxb/ZError.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package org.apache.zookeeper.server.jersey.jaxb; 20 | 21 | import javax.xml.bind.annotation.XmlRootElement; 22 | 23 | 24 | /** 25 | * Represents an ERROR using JAXB. 26 | */ 27 | @XmlRootElement(name="error") 28 | public class ZError { 29 | public String request; 30 | public String message; 31 | 32 | public ZError(){ 33 | // needed by jersey 34 | } 35 | 36 | public ZError(String request, String message) { 37 | this.request = request; 38 | this.message = message; 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /src/contrib/rest/src/python/README.txt: -------------------------------------------------------------------------------- 1 | Some basic python scripts which use the REST interface: 2 | 3 | zkrest.py -- basic REST ZooKeeper client 4 | demo_master_election.py -- shows how to implement master election 5 | demo_queue.py -- basic queue 6 | zk_dump_tree.py -- dumps the nodes & data of a znode hierarchy 7 | 8 | Generally these scripts require: 9 | * simplejson 10 | -------------------------------------------------------------------------------- /src/contrib/zkfuse/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | 3 | SUBDIRS = src 4 | 5 | -------------------------------------------------------------------------------- /src/contrib/zkfuse/src/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CXXFLAGS = -I${ZOOKEEPER_PATH}/include -I${ZOOKEEPER_PATH}/generated \ 2 | -I$(top_srcdir)/include -I/usr/include -D_FILE_OFFSET_BITS=64 -D_REENTRANT 3 | 4 | noinst_PROGRAMS = zkfuse 5 | 6 | zkfuse_SOURCES = zkfuse.cc zkadapter.cc thread.cc log.cc 7 | zkfuse_LDADD = ${ZOOKEEPER_LD} -------------------------------------------------------------------------------- /src/contrib/zkfuse/src/event.cc: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | #include "event.h" 20 | 21 | #define LOG_LEVEL LOG_FATAL 22 | #define MODULE_NAME "Event" 23 | 24 | using namespace std; 25 | 26 | namespace zkfuse { 27 | 28 | } /* end of 'namespace zkfuse' */ 29 | 30 | -------------------------------------------------------------------------------- /src/contrib/zkfuse/src/log.cc: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | #include 20 | 21 | #include "log.h" 22 | 23 | using namespace std; 24 | 25 | /** 26 | * \brief This class encapsulates a log4cxx configuration. 27 | */ 28 | class LogConfiguration { 29 | public: 30 | LogConfiguration(const string &file) { 31 | PropertyConfigurator::configureAndWatch( file, 5000 ); 32 | } 33 | }; 34 | 35 | //enforces the configuration to be initialized 36 | static LogConfiguration logConfig( "log4cxx.properties" ); 37 | -------------------------------------------------------------------------------- /src/contrib/zkfuse/src/log4cxx.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # Set root logger level to DEBUG and its only appender to A1. 18 | log4j.rootLogger=TRACE, A1 19 | 20 | # A1 is set to be a ConsoleAppender. 21 | log4j.appender.A1=org.apache.log4cxx.ConsoleAppender 22 | 23 | # A1 uses PatternLayout. 24 | log4j.appender.A1.layout=org.apache.log4cxx.PatternLayout 25 | log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n 26 | 27 | log4j.category.zkfuse=TRACE 28 | 29 | -------------------------------------------------------------------------------- /src/contrib/zkfuse/src/thread.cc: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | #include 20 | 21 | #include "thread.h" 22 | 23 | DEFINE_LOGGER( LOG, "Thread" ) 24 | 25 | START_ZKFUSE_NAMESPACE 26 | 27 | void Thread::Create(void* ctx, ThreadFunc func) 28 | { 29 | pthread_attr_t attr; 30 | pthread_attr_init(&attr); 31 | pthread_attr_setstacksize(&attr, _stackSize); 32 | int ret = pthread_create(&mThread, &attr, func, ctx); 33 | if(ret != 0) { 34 | LOG_FATAL( LOG, "pthread_create failed: %s", strerror(errno) ); 35 | } 36 | // pthread_attr_destroy(&attr); 37 | _ctx = ctx; 38 | _func = func; 39 | } 40 | 41 | END_ZKFUSE_NAMESPACE 42 | -------------------------------------------------------------------------------- /src/contrib/zkperl/MANIFEST: -------------------------------------------------------------------------------- 1 | Changes 2 | LICENSE 3 | Makefile.PL 4 | MANIFEST 5 | NOTICE 6 | README 7 | typemap 8 | ZooKeeper.pm 9 | ZooKeeper.xs 10 | build/check_zk_version.c 11 | build/check_zk_version.h 12 | t/10_invalid.t 13 | t/15_thread.t 14 | t/20_tie.t 15 | t/22_stat_tie.t 16 | t/24_watch_tie.t 17 | t/30_connect.t 18 | t/35_log.t 19 | t/40_basic.t 20 | t/45_class.t 21 | t/50_access.t 22 | t/60_watch.t 23 | t/util.pl 24 | -------------------------------------------------------------------------------- /src/contrib/zkperl/NOTICE: -------------------------------------------------------------------------------- 1 | Net::ZooKeeper - Perl extension for Apache ZooKeeper 2 | Copyright 2009 The Apache Software Foundation 3 | 4 | This product includes software developed at 5 | The Apache Software Foundation (http://www.apache.org/). 6 | 7 | -------------------------------------------------------------------------------- /src/contrib/zkperl/build/check_zk_version.c: -------------------------------------------------------------------------------- 1 | /* Net::ZooKeeper - Perl extension for Apache ZooKeeper 2 | * 3 | * Licensed to the Apache Software Foundation (ASF) under one 4 | * or more contributor license agreements. See the NOTICE file 5 | * distributed with this work for additional information 6 | * regarding copyright ownership. The ASF licenses this file 7 | * to you under the Apache License, Version 2.0 (the 8 | * "License"); you may not use this file except in compliance 9 | * with the License. You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | #include 21 | #include 22 | 23 | #include "check_zk_version.h" 24 | 25 | int main() { 26 | printf("%d.%d.%d\n", ZOO_MAJOR_VERSION, ZOO_MINOR_VERSION, ZOO_PATCH_VERSION); 27 | return 0; 28 | } 29 | 30 | -------------------------------------------------------------------------------- /src/contrib/zkperl/build/check_zk_version.h: -------------------------------------------------------------------------------- 1 | /* Net::ZooKeeper - Perl extension for Apache ZooKeeper 2 | * 3 | * Licensed to the Apache Software Foundation (ASF) under one 4 | * or more contributor license agreements. See the NOTICE file 5 | * distributed with this work for additional information 6 | * regarding copyright ownership. The ASF licenses this file 7 | * to you under the Apache License, Version 2.0 (the 8 | * "License"); you may not use this file except in compliance 9 | * with the License. You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | /* keep in sync with Makefile.PL */ 21 | #if !defined(ZOO_MAJOR_VERSION) || ZOO_MAJOR_VERSION != 3 || \ 22 | !defined(ZOO_MINOR_VERSION) || ZOO_MINOR_VERSION < 1 || \ 23 | !defined(ZOO_PATCH_VERSION) || \ 24 | (ZOO_MINOR_VERSION == 1 && ZOO_PATCH_VERSION < 1) 25 | #error "Net::ZooKeeper requires at least ZooKeeper version 3.1.1" 26 | #endif 27 | 28 | -------------------------------------------------------------------------------- /src/contrib/zkperl/typemap: -------------------------------------------------------------------------------- 1 | # Net::ZooKeeper - Perl extension for Apache ZooKeeper 2 | # 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | 19 | TYPEMAP 20 | Net::ZooKeeper T_ZK_HANDLE 21 | Net::ZooKeeper::Stat T_ZK_HANDLE 22 | Net::ZooKeeper::Watch T_ZK_HANDLE 23 | 24 | INPUT 25 | T_ZK_HANDLE 26 | if (SvROK($arg) && SvTYPE(SvRV($arg)) == SVt_PVHV && 27 | sv_derived_from($arg, \"${ntype}\")) { 28 | $var = (HV*) SvRV($arg); 29 | } 30 | else { 31 | Perl_croak(aTHX_ 32 | \"$var is not a hash reference of type ${ntype}\"); 33 | } 34 | 35 | OUTPUT 36 | T_ZK_HANDLE 37 | NOT_IMPLEMENTED 38 | 39 | -------------------------------------------------------------------------------- /src/contrib/zkpython/src/examples/README: -------------------------------------------------------------------------------- 1 | 2 | This folder contains sample showing how you can use ZooKeeper from Python. 3 | 4 | You should also check the following projects: 5 | 6 | * http://github.com/phunt/zk-smoketest 7 | * http://github.com/henryr/pyzk-recipes 8 | 9 | -------------------------------------------------------------------------------- /src/contrib/zkpython/src/packages/deb/zkpython.control/control: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | Package: zkpython 16 | Version: @version@ 17 | Section: misc 18 | Priority: optional 19 | Architecture: all 20 | Depends: python 21 | Maintainer: Apache Software Foundation 22 | Description: ZooKeeper python binding library 23 | Distribution: development 24 | -------------------------------------------------------------------------------- /src/contrib/zkpython/src/test/async_test.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | 19 | import zookeeper, zktestbase, unittest, threading 20 | 21 | class AsyncTest(zktestbase.TestBase): 22 | """Test whether async works""" 23 | # to do: startup and teardown via scripts? 24 | def setUp( self ): 25 | zktestbase.TestBase.setUp(self) 26 | 27 | def test_async(self): 28 | self.assertEqual(self.connected, True) 29 | ret = zookeeper.async(self.handle, "/") 30 | self.assertEqual(ret, zookeeper.OK, "async failed") 31 | 32 | if __name__ == '__main__': 33 | unittest.main() 34 | -------------------------------------------------------------------------------- /src/contrib/zktreeutil/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | 3 | SUBDIRS = src 4 | 5 | -------------------------------------------------------------------------------- /src/contrib/zktreeutil/src/Makefile.am: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | AM_CXXFLAGS = -I${ZOOKEEPER_PATH}/include -I${ZOOKEEPER_PATH}/generated \ 18 | -I$(top_srcdir)/include -I${LOG4CXX_INCLUDE} -I/usr/include \ 19 | -I${XML2_INCLUDE} 20 | 21 | bin_PROGRAMS = zktreeutil 22 | 23 | zktreeutil_SOURCES = ZkAdaptor.cc ZkTreeUtil.cc ZkTreeUtilMain.cc 24 | zktreeutil_LDADD = ${ZOOKEEPER} ${XML_LIBS} ${LOG4CXX} 25 | -------------------------------------------------------------------------------- /src/contrib/zooinspector/NOTICE.txt: -------------------------------------------------------------------------------- 1 | This contrib module includes icons available under the Eclipse Public Licence Version 1.0 2 | . from the Eclipse Java Devlopment Platform. 3 | The lib sub-directory includes a binary only jar library developed at http://sourceforge.net/projects/jtoaster/ -------------------------------------------------------------------------------- /src/contrib/zooinspector/config/defaultConnectionSettings.cfg: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | #Default connection for ZooInspector 17 | #Sun Feb 28 14:46:55 GMT 2010 18 | hosts=localhost\:2181 19 | encryptionManager=org.apache.zookeeper.inspector.encryption.BasicDataEncryptionManager 20 | timeout=5000 21 | -------------------------------------------------------------------------------- /src/contrib/zooinspector/config/defaultNodeVeiwers.cfg: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | org.apache.zookeeper.inspector.gui.nodeviewer.NodeViewerData 16 | org.apache.zookeeper.inspector.gui.nodeviewer.NodeViewerMetaData 17 | org.apache.zookeeper.inspector.gui.nodeviewer.NodeViewerACL 18 | -------------------------------------------------------------------------------- /src/contrib/zooinspector/icons/edtsrclkup_co.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/contrib/zooinspector/icons/edtsrclkup_co.gif -------------------------------------------------------------------------------- /src/contrib/zooinspector/icons/file_obj.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/contrib/zooinspector/icons/file_obj.gif -------------------------------------------------------------------------------- /src/contrib/zooinspector/icons/fldr_obj.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/contrib/zooinspector/icons/fldr_obj.gif -------------------------------------------------------------------------------- /src/contrib/zooinspector/icons/info_obj.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/contrib/zooinspector/icons/info_obj.gif -------------------------------------------------------------------------------- /src/contrib/zooinspector/icons/jspdecl.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/contrib/zooinspector/icons/jspdecl.gif -------------------------------------------------------------------------------- /src/contrib/zooinspector/icons/launch_run.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/contrib/zooinspector/icons/launch_run.gif -------------------------------------------------------------------------------- /src/contrib/zooinspector/icons/launch_stop.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/contrib/zooinspector/icons/launch_stop.gif -------------------------------------------------------------------------------- /src/contrib/zooinspector/icons/new_con.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/contrib/zooinspector/icons/new_con.gif -------------------------------------------------------------------------------- /src/contrib/zooinspector/icons/refresh.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/contrib/zooinspector/icons/refresh.gif -------------------------------------------------------------------------------- /src/contrib/zooinspector/icons/save_edit.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/contrib/zooinspector/icons/save_edit.gif -------------------------------------------------------------------------------- /src/contrib/zooinspector/icons/search_next.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/contrib/zooinspector/icons/search_next.gif -------------------------------------------------------------------------------- /src/contrib/zooinspector/icons/search_prev.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/contrib/zooinspector/icons/search_prev.gif -------------------------------------------------------------------------------- /src/contrib/zooinspector/icons/trash.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/contrib/zooinspector/icons/trash.gif -------------------------------------------------------------------------------- /src/contrib/zooinspector/lib/jtoaster-1.0.4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/contrib/zooinspector/lib/jtoaster-1.0.4.jar -------------------------------------------------------------------------------- /src/contrib/zooinspector/lib/log4j.properties: -------------------------------------------------------------------------------- 1 | # ***** Set root logger level to INFO and it appender to stdout. 2 | log4j.rootLogger=info, stdout 3 | 4 | # ***** stdout is set to be a ConsoleAppender. 5 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 6 | # ***** stdout uses PatternLayout. 7 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 8 | # ***** Pattern to output the caller's file name and line number. 9 | log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n -------------------------------------------------------------------------------- /src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/about.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ZooInspector v0.1 6 | 7 | 8 |

ZooInspector was developed by Colin Goodheart-Smithe and is 9 | available under the Apache Software Licence v2.0.

10 |

The Icons used were sourced from the Eclipse project (http://www.eclipse.org) and licensed 12 | under the Eclipse Public Licence v1.0. [http://www.eclipse.org/org/documents/epl-v10.php] 14 |

15 |

ZooKeeper is available from http://zookeeper.apache.org/ 17 | and is licensed under an Apache Software Licence v2.0

18 |

The ApacheSoftware Licence v2.0 can be found at http://www.apache.org/licenses/LICENSE-2.0

20 | 21 | 22 | -------------------------------------------------------------------------------- /src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/logger/LoggerFactory.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.apache.zookeeper.inspector.logger; 19 | 20 | /** 21 | * Provides a {@link Logger} for use across the entire application 22 | * 23 | */ 24 | public class LoggerFactory 25 | { 26 | private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger("org.apache.zookeeper.inspector"); //$NON-NLS-1$ 27 | 28 | /** 29 | * @return {@link Logger} for ZooInspector 30 | */ 31 | public static org.slf4j.Logger getLogger() 32 | { 33 | return logger; 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /src/contrib/zooinspector/zooInspector-dev.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Licensed to the Apache Software Foundation (ASF) under one or more 4 | # contributor license agreements. See the NOTICE file distributed with 5 | # this work for additional information regarding copyright ownership. 6 | # The ASF licenses this file to You under the Apache License, Version 2.0 7 | # (the "License"); you may not use this file except in compliance with 8 | # the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | 18 | java -cp ../../../build/contrib/ZooInspector/zookeeper-dev-ZooInspector.jar:../../../build/lib/log4j-1.2.15.jar:lib/zookeeper-3.3.0.jar:lib/jtoaster-1.0.4.jar:lib org.apache.zookeeper.inspector.ZooInspector -------------------------------------------------------------------------------- /src/contrib/zooinspector/zooInspector.cmd: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Licensed to the Apache Software Foundation (ASF) under one or more 4 | # contributor license agreements. See the NOTICE file distributed with 5 | # this work for additional information regarding copyright ownership. 6 | # The ASF licenses this file to You under the Apache License, Version 2.0 7 | # (the "License"); you may not use this file except in compliance with 8 | # the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | 18 | java -cp zookeeper-dev-ZooInspector.jar;lib/log4j-1.2.15.jar;lib/zookeeper-3.3.0.jar;lib/jToaster-1.0.4.jar;lib org.apache.zookeeper.inspector.ZooInspector -------------------------------------------------------------------------------- /src/contrib/zooinspector/zooInspector.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Licensed to the Apache Software Foundation (ASF) under one or more 4 | # contributor license agreements. See the NOTICE file distributed with 5 | # this work for additional information regarding copyright ownership. 6 | # The ASF licenses this file to You under the Apache License, Version 2.0 7 | # (the "License"); you may not use this file except in compliance with 8 | # the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | 18 | java -cp lib/New.jar:zookeeper-dev-ZooInspector.jar:lib/log4j-1.2.15.jar:;lib/zookeeper-3.3.0.jar:lib/jToaster-1.0.4.jar:lib org.apache.zookeeper.inspector.ZooInspector 19 | -------------------------------------------------------------------------------- /src/docs/src/documentation/README.txt: -------------------------------------------------------------------------------- 1 | This is the base documentation directory. 2 | 3 | skinconf.xml # This file customizes Forrest for your project. In it, you 4 | # tell forrest the project name, logo, copyright info, etc 5 | 6 | sitemap.xmap # Optional. This sitemap is consulted before all core sitemaps. 7 | # See http://forrest.apache.org/docs/project-sitemap.html 8 | -------------------------------------------------------------------------------- /src/docs/src/documentation/resources/images/2pc.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/docs/src/documentation/resources/images/2pc.jpg -------------------------------------------------------------------------------- /src/docs/src/documentation/resources/images/bk-overview.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/docs/src/documentation/resources/images/bk-overview.jpg -------------------------------------------------------------------------------- /src/docs/src/documentation/resources/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/docs/src/documentation/resources/images/favicon.ico -------------------------------------------------------------------------------- /src/docs/src/documentation/resources/images/hadoop-logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/docs/src/documentation/resources/images/hadoop-logo.jpg -------------------------------------------------------------------------------- /src/docs/src/documentation/resources/images/state_dia.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/docs/src/documentation/resources/images/state_dia.dia -------------------------------------------------------------------------------- /src/docs/src/documentation/resources/images/state_dia.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/docs/src/documentation/resources/images/state_dia.jpg -------------------------------------------------------------------------------- /src/docs/src/documentation/resources/images/zkarch.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/docs/src/documentation/resources/images/zkarch.jpg -------------------------------------------------------------------------------- /src/docs/src/documentation/resources/images/zkcomponents.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/docs/src/documentation/resources/images/zkcomponents.jpg -------------------------------------------------------------------------------- /src/docs/src/documentation/resources/images/zknamespace.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/docs/src/documentation/resources/images/zknamespace.jpg -------------------------------------------------------------------------------- /src/docs/src/documentation/resources/images/zkperfRW-3.2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/docs/src/documentation/resources/images/zkperfRW-3.2.jpg -------------------------------------------------------------------------------- /src/docs/src/documentation/resources/images/zkperfRW.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/docs/src/documentation/resources/images/zkperfRW.jpg -------------------------------------------------------------------------------- /src/docs/src/documentation/resources/images/zkperfreliability.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/docs/src/documentation/resources/images/zkperfreliability.jpg -------------------------------------------------------------------------------- /src/docs/src/documentation/resources/images/zkservice.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/docs/src/documentation/resources/images/zkservice.jpg -------------------------------------------------------------------------------- /src/docs/src/documentation/resources/images/zookeeper_small.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/docs/src/documentation/resources/images/zookeeper_small.gif -------------------------------------------------------------------------------- /src/dotnet/.gitignore: -------------------------------------------------------------------------------- 1 | _ReSharper* 2 | *ReSharper* 3 | *.suo 4 | TestResults 5 | *.testsettings 6 | *.vsmdi 7 | ZooKeeperNet/bin 8 | ZooKeeperNet/obj 9 | ZooKeeperNet.Recipes/bin 10 | ZooKeeperNet.Recipes/obj 11 | ZooKeeperNet.MsTests/bin 12 | ZooKeeperNet.MsTests/obj 13 | ZooKeeperNet.Tests/bin 14 | ZooKeeperNet.Tests/obj 15 | ZooKeeperNet.Recipes.Tests/bin 16 | ZooKeeperNet.Recipes.Tests/obj 17 | ZooKeeper.Profiled/obj 18 | ZooKeeper.Profiled/bin 19 | *.vsp 20 | *.7z -------------------------------------------------------------------------------- /src/dotnet/ZooKeeperKey.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/dotnet/ZooKeeperKey.snk -------------------------------------------------------------------------------- /src/dotnet/ZooKeeperNet.Recipes.Tests/.gitignore: -------------------------------------------------------------------------------- 1 | bin 2 | obj 3 | *.*~ 4 | -------------------------------------------------------------------------------- /src/dotnet/ZooKeeperNet.Recipes.Tests/ZooKeeperNet.Recipes.Tests.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.1 5 | 6 | ZooKeeper Client for .NET http://zookeeper.apache.org 7 | Copyright 2007-2012 ewhauser, omwok. - All rights reserved. 8 | 3.4.6.3 9 | 10 | false 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/dotnet/ZooKeeperNet.Recipes/.gitignore: -------------------------------------------------------------------------------- 1 | bin 2 | obj 3 | *.*~ 4 | -------------------------------------------------------------------------------- /src/dotnet/ZooKeeperNet.Recipes/Locks/InterProcessLock.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ZooKeeperNet.Recipes.Locks 4 | { 5 | /// 6 | /// Roughly following the pattern from curator-recipes 7 | /// See: http://curator.incubator.apache.org/curator-recipes/index.html 8 | /// 9 | public interface IInterProcessLock 10 | { 11 | /// 12 | /// Acquire the mutex, blocking until it's available or the timeout passes. Each call 13 | /// to Acquire() must be balanced by a call to Release. 14 | /// 15 | /// NOTE: The same thread can call acquire re-entrantly. 16 | /// 17 | /// time to wait or null to wait indefinitely 18 | /// true if the mutex was acquired, false otherwise. 19 | bool Acquire(TimeSpan? timeout = null); 20 | 21 | /// 22 | /// Perform a single release of the mutex. If the thread had made multiple calls 23 | /// to acquire, the mutex will continue to be held until all such calls are balanced 24 | /// with corresponding Release() calls. 25 | /// 26 | void Release(); 27 | 28 | /// 29 | /// Returns true if the mutex is acquired by a thread in this process. 30 | /// 31 | /// 32 | bool IsAcquiredInThisProcess(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/dotnet/ZooKeeperNet.Recipes/ZooKeeperNet.Recipes.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | 6 | ZooKeeper Client for .NET http://zookeeper.apache.org 7 | Copyright 2007-2012 ewhauser, omwok. - All rights reserved. 8 | 3.4.6.3 9 | true 10 | ..\ZooKeeperKey.snk 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/dotnet/ZooKeeperNet.Tests/.gitignore: -------------------------------------------------------------------------------- 1 | bin 2 | obj 3 | -------------------------------------------------------------------------------- /src/dotnet/ZooKeeperNet.Tests/CountDownLatch.cs: -------------------------------------------------------------------------------- 1 | namespace ZooKeeperNet.Tests 2 | { 3 | using System; 4 | using System.Threading; 5 | 6 | public class CountDownLatch 7 | { 8 | private readonly ManualResetEvent reset; 9 | private readonly int occurences; 10 | private int count; 11 | private DateTime start; 12 | private TimeSpan remaining; 13 | 14 | public CountDownLatch(int occurences) 15 | { 16 | this.occurences = occurences; 17 | reset = new ManualResetEvent(false); 18 | } 19 | 20 | public bool Await(TimeSpan wait) 21 | { 22 | start = DateTime.UtcNow; 23 | remaining = wait; 24 | while (count < occurences) 25 | { 26 | if (!reset.WaitOne(remaining)) 27 | return false; 28 | } 29 | return true; 30 | } 31 | 32 | public void CountDown() 33 | { 34 | remaining = DateTime.UtcNow - start; 35 | Interlocked.Increment(ref count); 36 | reset.Set(); 37 | } 38 | 39 | public int Count 40 | { 41 | get 42 | { 43 | return count; 44 | } 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /src/dotnet/ZooKeeperNet.Tests/SocketTests.cs: -------------------------------------------------------------------------------- 1 | namespace ZooKeeperNet.Tests 2 | { 3 | using System; 4 | using System.Linq; 5 | using NUnit.Framework; 6 | 7 | [TestFixture] 8 | public class SocketTests : AbstractZooKeeperTests 9 | { 10 | [Test] 11 | public void CanReadAndWriteOverASingleFrame() 12 | { 13 | SendBigByteArray(10000); 14 | } 15 | 16 | [Test] 17 | public void CanReadAndWriteOverTwoFrames() 18 | { 19 | SendBigByteArray(20000); 20 | } 21 | 22 | [Test] 23 | public void CanReadAndWriteOverManyFrames() 24 | { 25 | SendBigByteArray(100000); 26 | } 27 | 28 | private void SendBigByteArray(int bytes) 29 | { 30 | var b = new byte[bytes]; 31 | foreach (var i in Enumerable.Range(0, bytes)) 32 | { 33 | b[i] = Convert.ToByte(i % 255); 34 | } 35 | 36 | using (var client = CreateClient()) 37 | { 38 | var node = "/" + Guid.NewGuid(); 39 | client.Create(node, b, Ids.OPEN_ACL_UNSAFE, CreateMode.Persistent); 40 | 41 | var received = client.GetData(node, false, null); 42 | CollectionAssert.AreEqual(b, received); 43 | } 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/dotnet/ZooKeeperNet.Tests/ZooKeeperNet.Tests.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.1 5 | 6 | ZooKeeper Client for .NET http://zookeeper.apache.org 7 | Copyright 2007-2012 ewhauser, omwok. - All rights reserved. 8 | 3.4.6.3 9 | 10 | false 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | PreserveNewest 20 | 21 | 22 | 23 | 24 | 25 | ..\lib\S22.Sasl.dll 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/dotnet/ZooKeeperNet.Tests/log4net.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/dotnet/ZooKeeperNet/.gitignore: -------------------------------------------------------------------------------- 1 | bin 2 | obj 3 | _ReSharper* 4 | *ReSharper* 5 | *.suo 6 | Generated -------------------------------------------------------------------------------- /src/dotnet/ZooKeeperNet/EventType.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | */ 18 | namespace ZooKeeperNet 19 | { 20 | public enum EventType 21 | { 22 | None = -1, 23 | NodeCreated = 1, 24 | NodeDeleted = 2, 25 | NodeDataChanged = 3, 26 | NodeChildrenChanged = 4 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/dotnet/ZooKeeperNet/IO/Endianness.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | * Copyright (c) 2004-2008 Jon Skeet and Marc Gravell. 18 | * All rights reserved. 19 | */ 20 | namespace ZooKeeperNet.IO 21 | { 22 | /// 23 | /// Endianness of a converter 24 | /// 25 | public enum Endianness 26 | { 27 | /// 28 | /// Little endian - least significant byte first 29 | /// 30 | LittleEndian, 31 | /// 32 | /// Big endian - most significant byte first 33 | /// 34 | BigEndian 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/dotnet/ZooKeeperNet/IStartable.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | */ 18 | namespace ZooKeeperNet 19 | { 20 | public interface IStartable 21 | { 22 | void Start(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/dotnet/ZooKeeperNet/IWatcher.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | */ 18 | namespace ZooKeeperNet 19 | { 20 | public interface IWatcher 21 | { 22 | void Process(WatchedEvent @event); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/dotnet/ZooKeeperNet/Jute/IIndex.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | */ 18 | namespace Org.Apache.Jute 19 | { 20 | public interface IIndex 21 | { 22 | bool Done(); 23 | void Incr(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/dotnet/ZooKeeperNet/Jute/IRecord.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | */ 18 | namespace Org.Apache.Jute 19 | { 20 | public interface IRecord 21 | { 22 | void Serialize(IOutputArchive archive, string tag); 23 | void Deserialize(IInputArchive archive, string tag); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/dotnet/ZooKeeperNet/Jute/RecordReader.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | */ 18 | using ZooKeeperNet.IO; 19 | 20 | namespace Org.Apache.Jute 21 | { 22 | public class RecordReader 23 | { 24 | private readonly IInputArchive archive; 25 | 26 | public RecordReader(EndianBinaryReader reader, string format) 27 | { 28 | archive = new BinaryInputArchive(reader); 29 | } 30 | 31 | public void Read(IRecord r) 32 | { 33 | r.Deserialize(archive, ""); 34 | } 35 | 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/dotnet/ZooKeeperNet/Jute/RecordWriter.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | */ 18 | using ZooKeeperNet.IO; 19 | 20 | namespace Org.Apache.Jute 21 | { 22 | public class RecordWriter 23 | { 24 | private readonly BinaryOutputArchive archive; 25 | 26 | public RecordWriter(EndianBinaryWriter writer, string format) 27 | { 28 | archive = new BinaryOutputArchive(writer); 29 | } 30 | 31 | public void Write(IRecord r) 32 | { 33 | r.Serialize(archive, ""); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/dotnet/ZooKeeperNet/KeeperState.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | */ 18 | namespace ZooKeeperNet 19 | { 20 | public enum KeeperState 21 | { 22 | Unknown = -1, 23 | Disconnected = 0, 24 | NoSyncConnected = 1, 25 | SyncConnected = 3, 26 | AuthFailed = 4, 27 | SaslAuthenticated = 6, 28 | Expired = -112 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/dotnet/ZooKeeperNet/OpCode.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | */ 18 | namespace ZooKeeperNet 19 | { 20 | public enum OpCode 21 | { 22 | Notification = 0, 23 | Create = 1, 24 | Delete = 2, 25 | Exists = 3, 26 | GetData = 4, 27 | SetData = 5, 28 | GetACL = 6, 29 | SetACL = 7, 30 | GetChildren = 8, 31 | Sync = 9, 32 | Ping = 11, 33 | GetChildren2 = 12, 34 | Auth = 100, 35 | SetWatches = 101, 36 | SASL = 102, 37 | CreateSession = -10, 38 | CloseSession = -11, 39 | Error = -1, 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/dotnet/ZooKeeperNet/Perms.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | */ 18 | namespace ZooKeeperNet 19 | { 20 | public sealed class Perms 21 | { 22 | private Perms() { } 23 | public const int READ = 1 << 0; 24 | public const int WRITE = 1 << 1; 25 | public const int CREATE = 1 << 2; 26 | public const int DELETE = 1 << 3; 27 | public const int ADMIN = 1 << 4; 28 | public const int ALL = READ | WRITE | CREATE | DELETE | ADMIN; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/dotnet/ZooKeeperNet/SessionExpiredException.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | */ 18 | namespace ZooKeeperNet 19 | { 20 | using System.IO; 21 | using System; 22 | [Serializable] 23 | internal class SessionExpiredException : IOException 24 | { 25 | public SessionExpiredException(string msg) : base(msg) 26 | { 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/dotnet/ZooKeeperNet/SessionTimeoutException.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | */ 18 | namespace ZooKeeperNet 19 | { 20 | using System.IO; 21 | using System; 22 | 23 | [Serializable] 24 | internal class SessionTimeoutException : IOException 25 | { 26 | public SessionTimeoutException(string msg) : base(msg) 27 | { 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/dotnet/ZooKeeperNet/ZooKeeperNet.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | ZooKeeper Client for .NET http://zookeeper.apache.org 6 | Copyright 2007-2012 ewhauser, omwok. - All rights reserved. 7 | 3.4.6.3 8 | true 9 | ..\ZooKeeperKey.snk 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/dotnet/lib/S22.Sasl.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/dotnet/lib/S22.Sasl.dll -------------------------------------------------------------------------------- /src/dotnet/lib/S22.Sasl.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/dotnet/lib/S22.Sasl.pdb -------------------------------------------------------------------------------- /src/java/OldChangeLog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/java/OldChangeLog -------------------------------------------------------------------------------- /src/java/lib/cobertura/README.txt: -------------------------------------------------------------------------------- 1 | Download the cobertura binary from the following location and unpack it into this directory. Run "cobertura-report" target from build.xml to generate coverage report. 2 | 3 | http://cobertura.sourceforge.net/download.html 4 | -------------------------------------------------------------------------------- /src/java/main/org/apache/jute/Index.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package org.apache.jute; 20 | 21 | /** 22 | * Interface that acts as an iterator for deserializing maps. 23 | * The deserializer returns an instance that the record uses to 24 | * read vectors and maps. An example of usage is as follows: 25 | * 26 | * 27 | * Index idx = startVector(...); 28 | * while (!idx.done()) { 29 | * .... // read element of a vector 30 | * idx.incr(); 31 | * } 32 | * 33 | * 34 | */ 35 | public interface Index { 36 | public boolean done(); 37 | public void incr(); 38 | } 39 | -------------------------------------------------------------------------------- /src/java/main/org/apache/jute/Record.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package org.apache.jute; 20 | 21 | import java.io.IOException; 22 | 23 | /** 24 | * Interface that is implemented by generated classes. 25 | * 26 | */ 27 | public interface Record { 28 | public void serialize(OutputArchive archive, String tag) 29 | throws IOException; 30 | public void deserialize(InputArchive archive, String tag) 31 | throws IOException; 32 | } 33 | -------------------------------------------------------------------------------- /src/java/main/org/apache/jute/compiler/JByte.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package org.apache.jute.compiler; 20 | 21 | /** 22 | * 23 | */ 24 | public class JByte extends JType { 25 | 26 | /** Creates a new instance of JByte */ 27 | public JByte() { 28 | super("char", "int8_t", "byte", "byte", "Byte", "Byte", "byte", "toByte"); 29 | } 30 | 31 | public String getSignature() { 32 | return "b"; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/java/main/org/apache/jute/compiler/JFloat.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package org.apache.jute.compiler; 20 | 21 | /** 22 | * 23 | */ 24 | public class JFloat extends JType { 25 | 26 | /** Creates a new instance of JFloat */ 27 | public JFloat() { 28 | super("float", "float", "float", "float", "Float", "Float", "float", "toFloat"); 29 | } 30 | 31 | public String getSignature() { 32 | return "f"; 33 | } 34 | 35 | public String genJavaHashCode(String fname) { 36 | return " ret = Float.floatToIntBits("+fname+");\n"; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/java/main/org/apache/jute/compiler/JInt.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package org.apache.jute.compiler; 20 | 21 | /** 22 | * 23 | */ 24 | public class JInt extends JType { 25 | 26 | /** Creates a new instance of JInt */ 27 | public JInt() { 28 | super("int32_t", "int32_t", "int", "int", "Int", "Integer", "int", "toInt"); 29 | } 30 | 31 | public String getSignature() { 32 | return "i"; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/java/main/org/apache/jute/compiler/JLong.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package org.apache.jute.compiler; 20 | 21 | /** 22 | * 23 | */ 24 | public class JLong extends JType { 25 | 26 | /** Creates a new instance of JLong */ 27 | public JLong() { 28 | super("int64_t", "int64_t", "long", "long", "Long", "Long", "long", "toLong"); 29 | } 30 | 31 | public String getSignature() { 32 | return "l"; 33 | } 34 | 35 | public String genJavaHashCode(String fname) { 36 | return " ret = (int) ("+fname+"^("+fname+">>>32));\n"; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/java/main/org/apache/jute/compiler/generated/package.html: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | Hadoop Record Compiler: Parser 22 | 23 | 24 | This package contains code generated by JavaCC from the 25 | Hadoop record syntax file rcc.jj. For details about the 26 | record file syntax please @see org.apache.hadoop.record. 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/java/main/org/apache/jute/compiler/package.html: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | Hadoop Record Compiler 22 | 23 | 24 | This package contains classes needed for code generation 25 | from the hadoop record compiler. CppGenerator and JavaGenerator 26 | are the main entry points from the parser. There are classes 27 | corrsponding to every primitive type and compound type 28 | included in Hadoop record I/O syntax. 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/java/main/org/apache/zookeeper/jmx/CommonNames.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package org.apache.zookeeper.jmx; 20 | 21 | /** 22 | * A bunch of constants. 23 | * TODO: will get rid of it eventually. 24 | */ 25 | public class CommonNames { 26 | public static final String DOMAIN="org.apache.ZooKeeperService"; 27 | public static final String DATA_TREE_KEY="DataTree"; 28 | public static final String STANDALONE_SERVER_KEY="StandaloneServer"; 29 | } 30 | -------------------------------------------------------------------------------- /src/java/main/org/apache/zookeeper/jmx/ZKMBeanInfo.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package org.apache.zookeeper.jmx; 20 | 21 | /** 22 | * Zookeeper MBean info interface. MBeanRegistry uses the interface to generate 23 | * JMX object name. 24 | */ 25 | public interface ZKMBeanInfo { 26 | /** 27 | * @return a string identifying the MBean 28 | */ 29 | public String getName(); 30 | /** 31 | * If isHidden returns true, the MBean won't be registered with MBean server, 32 | * and thus won't be available for management tools. Used for grouping MBeans. 33 | * @return true if the MBean is hidden. 34 | */ 35 | public boolean isHidden(); 36 | } 37 | -------------------------------------------------------------------------------- /src/java/main/org/apache/zookeeper/server/quorum/Election.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package org.apache.zookeeper.server.quorum; 20 | 21 | 22 | import org.apache.zookeeper.server.quorum.Vote; 23 | 24 | public interface Election { 25 | public Vote lookForLeader() throws InterruptedException; 26 | public void shutdown(); 27 | } 28 | -------------------------------------------------------------------------------- /src/java/main/org/apache/zookeeper/server/quorum/FollowerMXBean.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package org.apache.zookeeper.server.quorum; 20 | 21 | import org.apache.zookeeper.server.ZooKeeperServerMXBean; 22 | 23 | /** 24 | * Follower MBean 25 | */ 26 | public interface FollowerMXBean extends ZooKeeperServerMXBean { 27 | /** 28 | * @return socket address 29 | */ 30 | public String getQuorumAddress(); 31 | 32 | /** 33 | * @return last queued zxid 34 | */ 35 | public String getLastQueuedZxid(); 36 | 37 | /** 38 | * @return count of pending revalidations 39 | */ 40 | public int getPendingRevalidationCount(); 41 | } 42 | -------------------------------------------------------------------------------- /src/java/main/org/apache/zookeeper/server/quorum/LeaderElectionMXBean.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package org.apache.zookeeper.server.quorum; 20 | 21 | 22 | /** 23 | * Leader election protocol MBean. 24 | */ 25 | public interface LeaderElectionMXBean { 26 | /** 27 | * 28 | * @return the time when the leader election started 29 | */ 30 | public String getStartTime(); 31 | } 32 | -------------------------------------------------------------------------------- /src/java/main/org/apache/zookeeper/server/quorum/LeaderMXBean.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package org.apache.zookeeper.server.quorum; 20 | 21 | import org.apache.zookeeper.server.ZooKeeperServerMXBean; 22 | 23 | /** 24 | * Leader MBean. 25 | */ 26 | public interface LeaderMXBean extends ZooKeeperServerMXBean { 27 | /** 28 | * Current zxid of cluster. 29 | */ 30 | public String getCurrentZxid(); 31 | 32 | /** 33 | * @return information on current followers 34 | */ 35 | public String followerInfo(); 36 | } 37 | -------------------------------------------------------------------------------- /src/java/main/org/apache/zookeeper/server/quorum/LearnerSyncRequest.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package org.apache.zookeeper.server.quorum; 20 | 21 | import java.nio.ByteBuffer; 22 | import java.util.List; 23 | 24 | import org.apache.zookeeper.data.Id; 25 | import org.apache.zookeeper.server.Request; 26 | 27 | public class LearnerSyncRequest extends Request { 28 | LearnerHandler fh; 29 | public LearnerSyncRequest(LearnerHandler fh, long sessionId, int xid, int type, 30 | ByteBuffer bb, List authInfo) { 31 | super(null, sessionId, xid, type, bb, authInfo); 32 | this.fh = fh; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/java/main/org/apache/zookeeper/server/quorum/ObserverMXBean.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package org.apache.zookeeper.server.quorum; 20 | 21 | import org.apache.zookeeper.server.ZooKeeperServerMXBean; 22 | 23 | /** 24 | * Observer MX Bean interface, implemented by ObserverBean 25 | * 26 | */ 27 | public interface ObserverMXBean extends ZooKeeperServerMXBean { 28 | /** 29 | * @return count of pending revalidations 30 | */ 31 | public int getPendingRevalidationCount(); 32 | 33 | /** 34 | * @return socket address 35 | */ 36 | public String getQuorumAddress(); 37 | } 38 | -------------------------------------------------------------------------------- /src/java/main/org/apache/zookeeper/server/quorum/QuorumMXBean.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package org.apache.zookeeper.server.quorum; 20 | 21 | /** 22 | * An MBean representing a zookeeper cluster nodes (aka quorum peers) 23 | */ 24 | public interface QuorumMXBean { 25 | /** 26 | * @return the name of the quorum 27 | */ 28 | public String getName(); 29 | 30 | /** 31 | * @return configured number of peers in the quorum 32 | */ 33 | public int getQuorumSize(); 34 | } 35 | -------------------------------------------------------------------------------- /src/java/main/org/apache/zookeeper/server/quorum/ReadOnlyBean.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package org.apache.zookeeper.server.quorum; 20 | 21 | import org.apache.zookeeper.server.ZooKeeperServer; 22 | import org.apache.zookeeper.server.ZooKeeperServerBean; 23 | 24 | /** 25 | * ReadOnly MX Bean interface, implemented by ReadOnlyBean 26 | * 27 | */ 28 | public class ReadOnlyBean extends ZooKeeperServerBean { 29 | 30 | public ReadOnlyBean(ZooKeeperServer zks) { 31 | super(zks); 32 | } 33 | 34 | public String getName() { 35 | return "ReadOnlyServer"; 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/java/main/org/apache/zookeeper/server/quorum/RemotePeerMXBean.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package org.apache.zookeeper.server.quorum; 20 | 21 | /** 22 | * A proxy for a remote quorum peer. 23 | */ 24 | public interface RemotePeerMXBean { 25 | /** 26 | * @return name of the peer 27 | */ 28 | public String getName(); 29 | /** 30 | * @return IP address of the quorum peer 31 | */ 32 | public String getQuorumAddress(); 33 | } 34 | -------------------------------------------------------------------------------- /src/java/main/org/apache/zookeeper/server/quorum/ServerBean.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package org.apache.zookeeper.server.quorum; 20 | 21 | import java.util.Date; 22 | 23 | import org.apache.zookeeper.jmx.ZKMBeanInfo; 24 | 25 | /** 26 | * An abstract base class for the leader and follower MBeans. 27 | */ 28 | public abstract class ServerBean implements ServerMXBean, ZKMBeanInfo { 29 | private final Date startTime=new Date(); 30 | 31 | public boolean isHidden() { 32 | return false; 33 | } 34 | 35 | public String getStartTime() { 36 | return startTime.toString(); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/java/main/org/apache/zookeeper/server/quorum/ServerMXBean.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package org.apache.zookeeper.server.quorum; 20 | 21 | /** 22 | * A quorum server MBean. 23 | */ 24 | public interface ServerMXBean { 25 | /** 26 | * @return name of the server MBean 27 | */ 28 | public String getName(); 29 | /** 30 | * @return the start time the server 31 | */ 32 | public String getStartTime(); 33 | } 34 | -------------------------------------------------------------------------------- /src/java/main/org/apache/zookeeper/server/quorum/flexible/QuorumVerifier.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package org.apache.zookeeper.server.quorum.flexible; 20 | 21 | import java.util.HashSet; 22 | 23 | /** 24 | * All quorum validators have to implement a method called 25 | * containsQuorum, which verifies if a HashSet of server 26 | * identifiers constitutes a quorum. 27 | * 28 | */ 29 | 30 | public interface QuorumVerifier { 31 | long getWeight(long id); 32 | boolean containsQuorum(HashSet set); 33 | } 34 | -------------------------------------------------------------------------------- /src/java/main/org/apache/zookeeper/server/upgrade/UpgradeSnapShot.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package org.apache.zookeeper.server.upgrade; 20 | 21 | import java.io.IOException; 22 | import java.util.concurrent.ConcurrentHashMap; 23 | 24 | import org.apache.zookeeper.server.DataTree; 25 | 26 | /** 27 | * interface for snapshot conversion. 28 | * 29 | */ 30 | public interface UpgradeSnapShot { 31 | public DataTree getNewDataTree() throws IOException; 32 | public ConcurrentHashMap getSessionWithTimeOuts(); 33 | } 34 | -------------------------------------------------------------------------------- /src/java/main/org/apache/zookeeper/server/util/ZxidUtils.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package org.apache.zookeeper.server.util; 20 | 21 | public class ZxidUtils { 22 | static public long getEpochFromZxid(long zxid) { 23 | return zxid >> 32L; 24 | } 25 | static public long getCounterFromZxid(long zxid) { 26 | return zxid & 0xffffffffL; 27 | } 28 | static public long makeZxid(long epoch, long counter) { 29 | return (epoch << 32L) | (counter & 0xffffffffL); 30 | } 31 | static public String zxidToString(long zxid) { 32 | return Long.toHexString(zxid); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/java/main/overview.html: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | ZooKeeper 22 | 23 | 24 | ZooKeeper is a service for coordinating processes of distributed applications. 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/java/systest/org/apache/zookeeper/test/system/DuplicateNameException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package org.apache.zookeeper.test.system; 20 | 21 | public class DuplicateNameException extends Exception { 22 | private static final long serialVersionUID = 1L; 23 | public DuplicateNameException(String mess) { 24 | super(mess); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/java/systest/org/apache/zookeeper/test/system/NoAssignmentException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package org.apache.zookeeper.test.system; 20 | 21 | public class NoAssignmentException extends Exception { 22 | private static final long serialVersionUID = 1L; 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/java/systest/org/apache/zookeeper/test/system/NoAvailableContainers.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package org.apache.zookeeper.test.system; 20 | 21 | public class NoAvailableContainers extends Exception { 22 | public NoAvailableContainers(String string) { 23 | super(string); 24 | } 25 | 26 | private static final long serialVersionUID = 1L; 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/java/test/bin/test-patch.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | OK_RELEASEAUDIT_WARNINGS=24 17 | OK_FINDBUGS_WARNINGS=0 18 | OK_JAVADOC_WARNINGS=0 19 | -------------------------------------------------------------------------------- /src/java/test/data/invalidsnap/version-2/log.1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/java/test/data/invalidsnap/version-2/log.1 -------------------------------------------------------------------------------- /src/java/test/data/invalidsnap/version-2/log.274: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/java/test/data/invalidsnap/version-2/log.274 -------------------------------------------------------------------------------- /src/java/test/data/invalidsnap/version-2/log.63b: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/java/test/data/invalidsnap/version-2/log.63b -------------------------------------------------------------------------------- /src/java/test/data/invalidsnap/version-2/snapshot.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/java/test/data/invalidsnap/version-2/snapshot.0 -------------------------------------------------------------------------------- /src/java/test/data/invalidsnap/version-2/snapshot.272: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/java/test/data/invalidsnap/version-2/snapshot.272 -------------------------------------------------------------------------------- /src/java/test/data/invalidsnap/version-2/snapshot.639: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/java/test/data/invalidsnap/version-2/snapshot.639 -------------------------------------------------------------------------------- /src/java/test/data/invalidsnap/version-2/snapshot.83f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/java/test/data/invalidsnap/version-2/snapshot.83f -------------------------------------------------------------------------------- /src/java/test/data/upgrade/log.100000001: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/java/test/data/upgrade/log.100000001 -------------------------------------------------------------------------------- /src/java/test/data/upgrade/log.100001bf0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/java/test/data/upgrade/log.100001bf0 -------------------------------------------------------------------------------- /src/java/test/data/upgrade/snapshot.100000000: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/java/test/data/upgrade/snapshot.100000000 -------------------------------------------------------------------------------- /src/java/test/data/upgrade/snapshot.100001bec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/java/test/data/upgrade/snapshot.100001bec -------------------------------------------------------------------------------- /src/java/test/org/apache/zookeeper/PortAssignment.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package org.apache.zookeeper; 20 | 21 | import org.slf4j.Logger; 22 | import org.slf4j.LoggerFactory; 23 | 24 | /** Assign ports to tests */ 25 | public class PortAssignment { 26 | private static final Logger LOG = LoggerFactory.getLogger(PortAssignment.class); 27 | 28 | private static int nextPort = 11221; 29 | 30 | /** Assign a new, unique port to the test */ 31 | public synchronized static int unique() { 32 | LOG.info("assigning port " + nextPort); 33 | return nextPort++; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/java/test/org/apache/zookeeper/server/ServerCnxnFactoryAccessor.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.apache.zookeeper.server; 19 | 20 | public class ServerCnxnFactoryAccessor { 21 | public static ZooKeeperServer getZkServer(ServerCnxnFactory fac) { 22 | return fac.zkServer; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/java/test/org/apache/zookeeper/test/NioNettySuiteHammerTest.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package org.apache.zookeeper.test; 20 | 21 | import org.junit.runners.Suite; 22 | 23 | /** 24 | * Run tests with: Nio Client against Netty server 25 | */ 26 | @Suite.SuiteClasses({ 27 | AsyncHammerTest.class 28 | }) 29 | public class NioNettySuiteHammerTest extends NioNettySuiteBase { 30 | } 31 | -------------------------------------------------------------------------------- /src/java/test/org/apache/zookeeper/test/NioNettySuiteTest.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package org.apache.zookeeper.test; 20 | 21 | import org.junit.runners.Suite; 22 | 23 | /** 24 | * Run tests with: Nio Client against Netty server 25 | */ 26 | @Suite.SuiteClasses({ 27 | ACLTest.class, 28 | AsyncOpsTest.class, 29 | ChrootClientTest.class, 30 | ClientTest.class, 31 | FourLetterWordsTest.class, 32 | NullDataTest.class, 33 | SessionTest.class, 34 | WatcherTest.class 35 | }) 36 | public class NioNettySuiteTest extends NioNettySuiteBase { 37 | } 38 | -------------------------------------------------------------------------------- /src/lastRevision.bat: -------------------------------------------------------------------------------- 1 | echo off 2 | rem Licensed to the Apache Software Foundation (ASF) under one 3 | rem or more contributor license agreements. See the NOTICE file 4 | rem distributed with this work for additional information 5 | rem regarding copyright ownership. The ASF licenses this file 6 | rem to you under the Apache License, Version 2.0 (the 7 | rem "License"); you may not use this file except in compliance 8 | rem with the License. You may obtain a copy of the License at 9 | rem 10 | rem http://www.apache.org/licenses/LICENSE-2.0 11 | rem 12 | rem Unless required by applicable law or agreed to in writing, software 13 | rem distributed under the License is distributed on an "AS IS" BASIS, 14 | rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | rem See the License for the specific language governing permissions and 16 | rem limitations under the License. 17 | 18 | rem Find the current revision, store it in a file, for DOS 19 | svn info | findstr Revision > %1 20 | 21 | For /F "tokens=1,2 delims= " %%a In (%1) Do ( 22 | echo lastRevision=%%b> %1 23 | ) 24 | -------------------------------------------------------------------------------- /src/lastRevision.sh: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # Find the current revision, store it in a file 18 | FILE=$1 19 | LASTREV=`svn info | grep '^Revision' | sed -e 's/Revision: *//'` 20 | 21 | echo "lastRevision=${LASTREV}" > $FILE 22 | -------------------------------------------------------------------------------- /src/packages/deb/zookeeper.control/conffile: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | /etc/zookeeper 16 | -------------------------------------------------------------------------------- /src/packages/deb/zookeeper.control/control: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | Package: zookeeper 16 | Version: @version@ 17 | Section: misc 18 | Priority: optional 19 | Architecture: all 20 | Depends: sun-java6-jre 21 | Maintainer: Apache Software Foundation 22 | Description: ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services. 23 | Distribution: development 24 | -------------------------------------------------------------------------------- /src/packages/deb/zookeeper.control/postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Licensed to the Apache Software Foundation (ASF) under one or more 4 | # contributor license agreements. See the NOTICE file distributed with 5 | # this work for additional information regarding copyright ownership. 6 | # The ASF licenses this file to You under the Apache License, Version 2.0 7 | # (the "License"); you may not use this file except in compliance with 8 | # the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | 18 | bash /usr/sbin/update-zookeeper-env.sh \ 19 | --prefix=/usr \ 20 | --conf-dir=/etc/zookeeper \ 21 | --log-dir=/var/log/zookeeper \ 22 | --pid-dir=/var/run/zookeeper \ 23 | --var-dir=/var/lib/zookeeper 24 | -------------------------------------------------------------------------------- /src/packages/deb/zookeeper.control/postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Licensed to the Apache Software Foundation (ASF) under one or more 4 | # contributor license agreements. See the NOTICE file distributed with 5 | # this work for additional information regarding copyright ownership. 6 | # The ASF licenses this file to You under the Apache License, Version 2.0 7 | # (the "License"); you may not use this file except in compliance with 8 | # the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | 18 | /usr/sbin/userdel zookeeper 2> /dev/null >/dev/null 19 | exit 0 20 | -------------------------------------------------------------------------------- /src/packages/deb/zookeeper.control/preinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Licensed to the Apache Software Foundation (ASF) under one or more 4 | # contributor license agreements. See the NOTICE file distributed with 5 | # this work for additional information regarding copyright ownership. 6 | # The ASF licenses this file to You under the Apache License, Version 2.0 7 | # (the "License"); you may not use this file except in compliance with 8 | # the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | 18 | getent group hadoop 2>/dev/null >/dev/null || /usr/sbin/groupadd -r hadoop 19 | 20 | /usr/sbin/useradd --comment "ZooKeeper" --shell /bin/bash -M -r --groups hadoop --home /usr/share/zookeeper zookeeper 2> /dev/null || : 21 | -------------------------------------------------------------------------------- /src/packages/deb/zookeeper.control/prerm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Licensed to the Apache Software Foundation (ASF) under one or more 4 | # contributor license agreements. See the NOTICE file distributed with 5 | # this work for additional information regarding copyright ownership. 6 | # The ASF licenses this file to You under the Apache License, Version 2.0 7 | # (the "License"); you may not use this file except in compliance with 8 | # the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | 18 | /etc/init.d/zookeeper stop 2>/dev/null >/dev/null 19 | bash /usr/sbin/update-zookeeper-env.sh \ 20 | --prefix=/usr \ 21 | --conf-dir=/etc/zookeeper \ 22 | --log-dir=/var/log/zookeeper \ 23 | --pid-dir=/var/run/zookeeper \ 24 | --uninstal 25 | -------------------------------------------------------------------------------- /src/packages/templates/conf/zookeeper-env.sh: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | export JAVA_HOME=${JAVA_HOME} 16 | export ZOO_LOG_DIR=${LOG_DIR} 17 | -------------------------------------------------------------------------------- /src/recipes/README.txt: -------------------------------------------------------------------------------- 1 | 1) This source directory contains various Zookeeper recipe implementations. 2 | 3 | 2) The recipe directory name should specify the name of the recipe you are implementing - eg. lock/. 4 | 5 | 3) It would be great if you can provide both the java and c recipes for the zookeeper recipes. 6 | The c recipes go in to recipe-name/src/c and the java implementation goes into recipe-name/src/java. 7 | 8 | 4) The recipes hold high standards like our zookeeper c/java libraries, so make sure that you include 9 | some unit testing with both the c and java recipe code. 10 | 11 | 5) Also, please name your c client public methods as 12 | zkr_recipe-name_methodname 13 | (eg. zkr_lock_lock in lock/src/c) 14 | 15 | 6) The various recipes are in ../../docs/recipes.html or 16 | ../../docs/reciped.pdf. Also, this is not an exhaustive list by any chance. 17 | Zookeeper is used (and can be used) for more than what we have listed in the docs. 18 | 19 | 7) To run the c tests in all the recipes, 20 | - make sure the main zookeeper c libraries in 21 | {top}/src/c/ are compiled. Run autoreconf -if;./configure; make. The libaries 22 | will be installed in {top}/src/c/.libs. 23 | - run autoreconf if;./configure;make run-check 24 | in src/recipes/$recipename/src/c 25 | 26 | -------------------------------------------------------------------------------- /src/recipes/election/README.txt: -------------------------------------------------------------------------------- 1 | 17 | 18 | 1) This election interface recipe implements the leader election recipe 19 | mentioned in ../../../docs/recipes.[html,pdf]. 20 | 21 | 2) To compile the leader election java recipe you can just run ant jar from 22 | this directory. 23 | Please report any bugs on the jira 24 | 25 | http://issues.apache.org/jira/browse/ZOOKEEPER 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/recipes/lock/README.txt: -------------------------------------------------------------------------------- 1 | 17 | 18 | 1) This lock interface recipe implements the lock recipe 19 | mentioned in ../../../docs/recipes.[html,pdf]. 20 | 21 | 2) To compile the lock java recipe you can just run ant jar from 22 | this directory. For compiling the c libarary go to src/c and read 23 | the INSTALLATION instructions. 24 | Please report any bugs on the jira 25 | 26 | http://issues.apache.org/jira/browse/ZOOKEEPER 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/recipes/lock/src/c/README.txt: -------------------------------------------------------------------------------- 1 | Zookeeper C lock client library 2 | 3 | 4 | INSTALLATION 5 | 6 | If you're building the client from a source checkout you need to 7 | follow the steps outlined below. If you're building from a release 8 | tar downloaded from Apache please skip to step 2. 9 | 10 | 1) make sure that you compile the main zookeeper c client library. 11 | 12 | 2) change directory to src/recipes/lock/src/c 13 | and do a "autoreconf -if" to bootstrap 14 | autoconf, automake and libtool. Please make sure you have autoconf 15 | version 2.59 or greater installed. 16 | 3) do a "./configure [OPTIONS]" to generate the makefile. See INSTALL 17 | for general information about running configure. 18 | 19 | 4) do a "make" or "make install" to build the libraries and install them. 20 | Alternatively, you can also build and run a unit test suite (and 21 | you probably should). Please make sure you have cppunit-1.10.x or 22 | higher installed before you execute step 4. Once ./configure has 23 | finished, do a "make run-check". It will build the libraries, build 24 | the tests and run them. 25 | 5) to generate doxygen documentation do a "make doxygen-doc". All 26 | documentations will be placed to a new subfolder named docs. By 27 | default only HTML documentation is generated. For information on 28 | other document formats please use "./configure --help" 29 | -------------------------------------------------------------------------------- /src/recipes/lock/src/c/tests/Util.cc: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | #include "Util.h" 20 | 21 | const std::string EMPTY_STRING; 22 | 23 | TestConfig globalTestConfig; 24 | 25 | void millisleep(int ms){ 26 | timespec ts; 27 | ts.tv_sec=ms/1000; 28 | ts.tv_nsec=(ms%1000)*1000000; // to nanoseconds 29 | nanosleep(&ts,0); 30 | } 31 | -------------------------------------------------------------------------------- /src/recipes/lock/src/java/org/apache/zookeeper/recipes/lock/LockListener.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Licensed to the Apache Software Foundation (ASF) under one or more 4 | * contributor license agreements. See the NOTICE file distributed with 5 | * this work for additional information regarding copyright ownership. 6 | * The ASF licenses this file to You under the Apache License, Version 2.0 7 | * (the "License"); you may not use this file except in compliance with 8 | * the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.apache.zookeeper.recipes.lock; 19 | 20 | /** 21 | * This class has two methods which are call 22 | * back methods when a lock is acquired and 23 | * when the lock is released. 24 | * 25 | */ 26 | public interface LockListener { 27 | /** 28 | * call back called when the lock 29 | * is acquired 30 | */ 31 | public void lockAcquired(); 32 | 33 | /** 34 | * call back called when the lock is 35 | * released. 36 | */ 37 | public void lockReleased(); 38 | } 39 | -------------------------------------------------------------------------------- /src/recipes/queue/src/c/tests/Util.cc: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | #include "Util.h" 20 | 21 | const std::string EMPTY_STRING; 22 | 23 | TestConfig globalTestConfig; 24 | 25 | void millisleep(int ms){ 26 | timespec ts; 27 | ts.tv_sec=ms/1000; 28 | ts.tv_nsec=(ms%1000)*1000000; // to nanoseconds 29 | nanosleep(&ts,0); 30 | } 31 | --------------------------------------------------------------------------------