From e0adf009afac7b2a25ffb161802b0ea7fd0e3405 Mon Sep 17 00:00:00 2001 From: lihanghang Date: Thu, 7 Mar 2019 22:40:41 +0800 Subject: [PATCH] =?UTF-8?q?[summary]=20fork=20zookeeper-3.4.13=E6=BA=90?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitattributes | 19 + .gitignore | 81 + LICENSE.txt | 202 + NOTICE.txt | 5 + README_packaging.txt | 65 + bin/README.txt | 6 + bin/zkCleanup.sh | 51 + bin/zkCli.cmd | 24 + bin/zkCli.sh | 41 + bin/zkEnv.cmd | 52 + bin/zkEnv.sh | 115 + bin/zkServer.cmd | 24 + bin/zkServer.sh | 225 + bin/zkTxnLogToolkit.cmd | 24 + bin/zkTxnLogToolkit.sh | 38 + build.xml | 1993 ++++++++ conf/configuration.xsl | 24 + conf/log4j.properties | 58 + conf/zoo.cfg | 28 + conf/zoo_sample.cfg | 28 + docs/bookkeeperConfig.html | 384 ++ docs/bookkeeperConfig.pdf | Bin 0 -> 13793 bytes docs/bookkeeperOverview.html | 694 +++ docs/bookkeeperOverview.pdf | Bin 0 -> 147554 bytes docs/bookkeeperProgrammer.html | 1083 ++++ docs/bookkeeperProgrammer.pdf | Bin 0 -> 24945 bytes docs/bookkeeperStarted.html | 448 ++ docs/bookkeeperStarted.pdf | Bin 0 -> 17103 bytes docs/bookkeeperStream.html | 612 +++ docs/bookkeeperStream.pdf | Bin 0 -> 13188 bytes docs/broken-links.xml | 2 + docs/images/2pc.jpg | Bin 0 -> 15174 bytes docs/images/bk-overview.jpg | Bin 0 -> 124211 bytes docs/images/built-with-forrest-button.png | Bin 0 -> 1936 bytes docs/images/favicon.ico | Bin 0 -> 766 bytes docs/images/hadoop-logo.jpg | Bin 0 -> 9443 bytes docs/images/instruction_arrow.png | Bin 0 -> 285 bytes docs/images/state_dia.jpg | Bin 0 -> 51364 bytes docs/images/zkcomponents.jpg | Bin 0 -> 30831 bytes docs/images/zknamespace.jpg | Bin 0 -> 35414 bytes docs/images/zkperfRW-3.2.jpg | Bin 0 -> 41948 bytes docs/images/zkperfRW.jpg | Bin 0 -> 161542 bytes docs/images/zkperfreliability.jpg | Bin 0 -> 69825 bytes docs/images/zkservice.jpg | Bin 0 -> 86790 bytes docs/images/zookeeper_small.gif | Bin 0 -> 4847 bytes docs/index.html | 391 ++ docs/index.pdf | Bin 0 -> 13511 bytes docs/javaExample.html | 908 ++++ docs/javaExample.pdf | Bin 0 -> 33763 bytes docs/linkmap.html | 434 ++ docs/linkmap.pdf | Bin 0 -> 12455 bytes docs/recipes.html | 974 ++++ docs/recipes.pdf | Bin 0 -> 31017 bytes docs/releasenotes.html | 1822 +++++++ docs/skin/CommonMessages_de.xml | 23 + docs/skin/CommonMessages_en_US.xml | 23 + docs/skin/CommonMessages_es.xml | 23 + docs/skin/CommonMessages_fr.xml | 23 + docs/skin/basic.css | 167 + docs/skin/breadcrumbs-optimized.js | 90 + docs/skin/breadcrumbs.js | 237 + docs/skin/fontsize.js | 166 + docs/skin/getBlank.js | 40 + docs/skin/getMenu.js | 45 + docs/skin/images/README.txt | 1 + docs/skin/images/add.jpg | Bin 0 -> 1142 bytes docs/skin/images/apache-thanks.png | Bin 0 -> 4840 bytes docs/skin/images/built-with-cocoon.gif | Bin 0 -> 2252 bytes .../skin/images/built-with-forrest-button.png | Bin 0 -> 1936 bytes docs/skin/images/chapter.gif | Bin 0 -> 49 bytes docs/skin/images/chapter_open.gif | Bin 0 -> 49 bytes docs/skin/images/current.gif | Bin 0 -> 54 bytes docs/skin/images/error.png | Bin 0 -> 1709 bytes docs/skin/images/external-link.gif | Bin 0 -> 71 bytes docs/skin/images/fix.jpg | Bin 0 -> 932 bytes docs/skin/images/forrest-credit-logo.png | Bin 0 -> 4633 bytes docs/skin/images/hack.jpg | Bin 0 -> 743 bytes docs/skin/images/header_white_line.gif | Bin 0 -> 37 bytes docs/skin/images/info.png | Bin 0 -> 1320 bytes docs/skin/images/instruction_arrow.png | Bin 0 -> 285 bytes docs/skin/images/label.gif | Bin 0 -> 54 bytes docs/skin/images/page.gif | Bin 0 -> 79 bytes docs/skin/images/pdfdoc.gif | Bin 0 -> 1008 bytes docs/skin/images/poddoc.png | Bin 0 -> 856 bytes docs/skin/images/printer.gif | Bin 0 -> 603 bytes .../images/rc-b-l-15-1body-2menu-3menu.png | Bin 0 -> 348 bytes .../images/rc-b-r-15-1body-2menu-3menu.png | Bin 0 -> 319 bytes ...-5-1header-2tab-selected-3tab-selected.png | Bin 0 -> 200 bytes ...rc-t-l-5-1header-2searchbox-3searchbox.png | Bin 0 -> 199 bytes ...-5-1header-2tab-selected-3tab-selected.png | Bin 0 -> 209 bytes ...header-2tab-unselected-3tab-unselected.png | Bin 0 -> 199 bytes .../images/rc-t-r-15-1body-2menu-3menu.png | Bin 0 -> 390 bytes ...rc-t-r-5-1header-2searchbox-3searchbox.png | Bin 0 -> 214 bytes ...-5-1header-2tab-selected-3tab-selected.png | Bin 0 -> 215 bytes ...header-2tab-unselected-3tab-unselected.png | Bin 0 -> 214 bytes docs/skin/images/remove.jpg | Bin 0 -> 1251 bytes docs/skin/images/rss.png | Bin 0 -> 360 bytes docs/skin/images/spacer.gif | Bin 0 -> 43 bytes docs/skin/images/success.png | Bin 0 -> 1291 bytes docs/skin/images/txtdoc.png | Bin 0 -> 784 bytes docs/skin/images/update.jpg | Bin 0 -> 990 bytes docs/skin/images/valid-html401.png | Bin 0 -> 2948 bytes docs/skin/images/vcss.png | Bin 0 -> 1134 bytes docs/skin/images/warning.png | Bin 0 -> 1215 bytes docs/skin/images/xmldoc.gif | Bin 0 -> 992 bytes docs/skin/menu.js | 48 + docs/skin/note.txt | 50 + docs/skin/print.css | 54 + docs/skin/profile.css | 168 + docs/skin/prototype.js | 1257 +++++ docs/skin/screen.css | 587 +++ docs/zookeeperAdmin.html | 2231 ++++++++ docs/zookeeperAdmin.pdf | Bin 0 -> 86044 bytes docs/zookeeperHierarchicalQuorums.html | 276 + docs/zookeeperHierarchicalQuorums.pdf | Bin 0 -> 6650 bytes docs/zookeeperInternals.html | 805 +++ docs/zookeeperInternals.pdf | Bin 0 -> 48806 bytes docs/zookeeperJMX.html | 479 ++ docs/zookeeperJMX.pdf | Bin 0 -> 16471 bytes docs/zookeeperObservers.html | 366 ++ docs/zookeeperObservers.pdf | Bin 0 -> 12867 bytes docs/zookeeperOtherInfo.html | 230 + docs/zookeeperOtherInfo.pdf | Bin 0 -> 2947 bytes docs/zookeeperOver.html | 704 +++ docs/zookeeperOver.pdf | Bin 0 -> 302479 bytes docs/zookeeperProgrammers.html | 2285 +++++++++ docs/zookeeperProgrammers.pdf | Bin 0 -> 134096 bytes docs/zookeeperQuotas.html | 290 ++ docs/zookeeperQuotas.pdf | Bin 0 -> 11180 bytes docs/zookeeperReconfig.pdf | Bin 0 -> 62192 bytes docs/zookeeperStarted.html | 629 +++ docs/zookeeperStarted.pdf | Bin 0 -> 28069 bytes docs/zookeeperTutorial.html | 937 ++++ docs/zookeeperTutorial.pdf | Bin 0 -> 34208 bytes ivy.xml | 155 + ivysettings.xml | 41 + src/LICENSE.txt | 216 + src/NOTICE.txt | 100 + src/c/CMakeLists.txt | 237 + src/c/ChangeLog | 116 + src/c/INSTALL | 234 + src/c/LICENSE | 202 + src/c/Makefile.am | 128 + src/c/NOTICE.txt | 41 + src/c/README | 156 + src/c/acinclude.m4 | 312 ++ src/c/aminclude.am | 186 + src/c/c-doc.Doxyfile | 1252 +++++ src/c/cmake_config.h.in | 154 + src/c/configure.ac | 165 + src/c/include/proto.h | 47 + src/c/include/recordio.h | 83 + src/c/include/winconfig.h | 15 + src/c/include/zookeeper.h | 1589 ++++++ src/c/include/zookeeper_log.h | 51 + src/c/include/zookeeper_version.h | 33 + src/c/src/cli.c | 697 +++ src/c/src/hashtable/LICENSE.txt | 30 + src/c/src/hashtable/hashtable.c | 274 + src/c/src/hashtable/hashtable.h | 209 + src/c/src/hashtable/hashtable_itr.c | 176 + src/c/src/hashtable/hashtable_itr.h | 119 + src/c/src/hashtable/hashtable_private.h | 85 + src/c/src/load_gen.c | 282 ++ src/c/src/mt_adaptor.c | 519 ++ src/c/src/recordio.c | 366 ++ src/c/src/st_adaptor.c | 113 + src/c/src/winport.c | 302 ++ src/c/src/winport.h | 138 + src/c/src/zk_adaptor.h | 276 + src/c/src/zk_hashtable.c | 337 ++ src/c/src/zk_hashtable.h | 69 + src/c/src/zk_log.c | 180 + src/c/src/zookeeper.c | 3767 ++++++++++++++ src/c/tests/CollectionUtil.h | 195 + src/c/tests/CppAssertHelper.h | 37 + src/c/tests/LibCMocks.cc | 333 ++ src/c/tests/LibCMocks.h | 408 ++ src/c/tests/LibCSymTable.cc | 83 + src/c/tests/LibCSymTable.h | 107 + src/c/tests/MocksBase.cc | 36 + src/c/tests/MocksBase.h | 36 + src/c/tests/PthreadMocks.cc | 106 + src/c/tests/PthreadMocks.h | 449 ++ src/c/tests/TestClient.cc | 1135 +++++ src/c/tests/TestClientRetry.cc | 273 + src/c/tests/TestDriver.cc | 173 + src/c/tests/TestMulti.cc | 703 +++ src/c/tests/TestOperations.cc | 710 +++ src/c/tests/TestWatchers.cc | 773 +++ src/c/tests/TestZookeeperClose.cc | 472 ++ src/c/tests/TestZookeeperInit.cc | 301 ++ src/c/tests/ThreadingUtil.cc | 87 + src/c/tests/ThreadingUtil.h | 261 + src/c/tests/Util.cc | 51 + src/c/tests/Util.h | 137 + src/c/tests/Vector.h | 37 + src/c/tests/ZKMocks.cc | 519 ++ src/c/tests/ZKMocks.h | 509 ++ src/c/tests/wrappers-mt.opt | 3 + src/c/tests/wrappers.opt | 7 + src/c/tests/zkServer.sh | 161 + src/contrib/build-contrib.xml | 248 + src/contrib/build.xml | 88 + src/contrib/fatjar/README.txt | 2 + src/contrib/fatjar/build.xml | 74 + src/contrib/fatjar/conf/mainClasses | 10 + .../org/apache/zookeeper/util/FatJarMain.java | 126 + src/contrib/huebrowser/README | 62 + src/contrib/huebrowser/zkui/Makefile | 21 + src/contrib/huebrowser/zkui/setup.py | 46 + .../huebrowser/zkui/src/zkui/__init__.py | 16 + src/contrib/huebrowser/zkui/src/zkui/forms.py | 29 + .../huebrowser/zkui/src/zkui/models.py | 17 + src/contrib/huebrowser/zkui/src/zkui/rest.py | 230 + .../huebrowser/zkui/src/zkui/settings.py | 30 + .../zkui/src/zkui/static/art/line_icons.png | Bin 0 -> 7499 bytes .../zkui/src/zkui/static/art/zkui.png | Bin 0 -> 4430 bytes .../zkui/src/zkui/static/bootstrap.js | 32 + .../zkui/src/zkui/static/css/zkui.css | 56 + .../zkui/src/zkui/static/help/index.html | 26 + .../src/zkui/static/js/Source/Zkui/Zkui.js | 50 + .../zkui/src/zkui/static/js/package.yml | 19 + src/contrib/huebrowser/zkui/src/zkui/stats.py | 170 + .../zkui/src/zkui/templates/clients.mako | 51 + .../zkui/src/zkui/templates/create.mako | 34 + .../zkui/src/zkui/templates/edit.mako | 34 + .../zkui/src/zkui/templates/index.mako | 54 + .../src/zkui/templates/shared_components.mako | 66 + .../zkui/src/zkui/templates/tree.mako | 75 + .../zkui/src/zkui/templates/view.mako | 128 + src/contrib/huebrowser/zkui/src/zkui/urls.py | 28 + src/contrib/huebrowser/zkui/src/zkui/utils.py | 33 + src/contrib/huebrowser/zkui/src/zkui/views.py | 165 + .../huebrowser/zkui/src/zkui/windmilltests.py | 23 + src/contrib/loggraph/README.txt | 69 + src/contrib/loggraph/bin/loggraph-dev.sh | 43 + src/contrib/loggraph/bin/loggraph.sh | 48 + src/contrib/loggraph/build.xml | 70 + src/contrib/loggraph/ivy.xml | 44 + .../zookeeper/graph/FilterException.java | 22 + .../org/apache/zookeeper/graph/FilterOp.java | 75 + .../apache/zookeeper/graph/FilterParser.java | 131 + .../apache/zookeeper/graph/JsonGenerator.java | 223 + .../apache/zookeeper/graph/Log4JEntry.java | 40 + .../apache/zookeeper/graph/Log4JSource.java | 391 ++ .../org/apache/zookeeper/graph/LogEntry.java | 46 + .../apache/zookeeper/graph/LogIterator.java | 26 + .../org/apache/zookeeper/graph/LogServer.java | 66 + .../apache/zookeeper/graph/LogSkipList.java | 95 + .../org/apache/zookeeper/graph/LogSource.java | 33 + .../zookeeper/graph/MeasureThroughput.java | 103 + .../zookeeper/graph/MergedLogSource.java | 219 + .../graph/RandomAccessFileReader.java | 329 ++ .../zookeeper/graph/TransactionEntry.java | 59 + .../apache/zookeeper/graph/TxnLogSource.java | 376 ++ .../zookeeper/graph/filterops/AndOp.java | 33 + .../apache/zookeeper/graph/filterops/Arg.java | 36 + .../zookeeper/graph/filterops/EqualsOp.java | 44 + .../graph/filterops/GreaterThanOp.java | 70 + .../zookeeper/graph/filterops/LessThanOp.java | 69 + .../zookeeper/graph/filterops/NotOp.java | 31 + .../zookeeper/graph/filterops/NumberArg.java | 28 + .../zookeeper/graph/filterops/OrOp.java | 33 + .../zookeeper/graph/filterops/StringArg.java | 28 + .../zookeeper/graph/filterops/SymbolArg.java | 27 + .../zookeeper/graph/filterops/XorOp.java | 40 + .../zookeeper/graph/servlets/FileLoader.java | 60 + .../apache/zookeeper/graph/servlets/Fs.java | 69 + .../zookeeper/graph/servlets/GraphData.java | 85 + .../zookeeper/graph/servlets/JsonServlet.java | 85 + .../zookeeper/graph/servlets/NumEvents.java | 88 + .../graph/servlets/StaticContent.java | 53 + .../zookeeper/graph/servlets/Throughput.java | 125 + .../apache/zookeeper/graph/log4j.properties | 11 + .../zookeeper/graph/resources/date.format.js | 126 + .../apache/zookeeper/graph/resources/g.bar.js | 385 ++ .../apache/zookeeper/graph/resources/g.dot.js | 110 + .../zookeeper/graph/resources/g.line.js | 230 + .../apache/zookeeper/graph/resources/g.pie.js | 205 + .../zookeeper/graph/resources/g.raphael.js | 481 ++ .../zookeeper/graph/resources/load-big.gif | Bin 0 -> 1924 bytes .../apache/zookeeper/graph/resources/load.gif | Bin 0 -> 673 bytes .../zookeeper/graph/resources/loggraph.css | 54 + .../zookeeper/graph/resources/loggraph.js | 262 + .../zookeeper/graph/resources/loggraph.log.js | 57 + .../graph/resources/loggraph.server.js | 329 ++ .../graph/resources/loggraph.session.js | 202 + .../graph/resources/loggraph.stats.js | 44 + .../zookeeper/graph/resources/loggraph.ui.js | 377 ++ .../zookeeper/graph/resources/main.html | 60 + .../zookeeper/graph/resources/raphael.js | 3296 ++++++++++++ .../zookeeper/graph/resources/yui-min.js | 12 + src/contrib/monitoring/JMX-RESOURCES | 38 + src/contrib/monitoring/README | 85 + src/contrib/monitoring/cacti/README | 56 + src/contrib/monitoring/check_zookeeper.py | 395 ++ src/contrib/monitoring/ganglia/README | 48 + src/contrib/monitoring/ganglia/Screenshot.png | Bin 0 -> 111055 bytes src/contrib/monitoring/ganglia/modpython.conf | 28 + .../monitoring/ganglia/zookeeper.pyconf | 50 + .../monitoring/ganglia/zookeeper_ganglia.py | 210 + src/contrib/monitoring/nagios/README.txt | 86 + .../monitoring/nagios/Screenshot-1.png | Bin 0 -> 196668 bytes src/contrib/monitoring/nagios/Screenshot.png | Bin 0 -> 163646 bytes src/contrib/monitoring/nagios/hostgroups.cfg | 25 + src/contrib/monitoring/nagios/services.cfg | 67 + src/contrib/monitoring/nagios/zookeeper.cfg | 30 + src/contrib/monitoring/test.py | 282 ++ src/contrib/rest/NOTICE.txt | 7 + src/contrib/rest/README.txt | 72 + src/contrib/rest/SPEC.txt | 355 ++ src/contrib/rest/build.xml | 183 + src/contrib/rest/conf/keys/README | 8 + src/contrib/rest/conf/keys/rest.cer | Bin 0 -> 595 bytes src/contrib/rest/conf/keys/rest.jks | Bin 0 -> 1363 bytes src/contrib/rest/conf/log4j.properties | 68 + src/contrib/rest/conf/rest.properties | 70 + src/contrib/rest/ivy.xml | 48 + src/contrib/rest/rest.sh | 90 + .../zookeeper/server/jersey/RestMain.java | 151 + .../server/jersey/ZooKeeperService.java | 242 + .../server/jersey/cfg/Credentials.java | 47 + .../zookeeper/server/jersey/cfg/Endpoint.java | 72 + .../zookeeper/server/jersey/cfg/HostPort.java | 51 + .../server/jersey/cfg/HostPortSet.java | 51 + .../zookeeper/server/jersey/cfg/RestCfg.java | 110 + .../server/jersey/filters/HTTPBasicAuth.java | 87 + .../server/jersey/jaxb/ZChildren.java | 80 + .../server/jersey/jaxb/ZChildrenJSON.java | 76 + .../zookeeper/server/jersey/jaxb/ZError.java | 41 + .../zookeeper/server/jersey/jaxb/ZPath.java | 63 + .../server/jersey/jaxb/ZSession.java | 55 + .../zookeeper/server/jersey/jaxb/ZStat.java | 106 + .../jersey/resources/JAXBContextResolver.java | 72 + .../resources/KeeperExceptionMapper.java | 86 + .../resources/RuntimeExceptionMapper.java | 55 + .../jersey/resources/SessionsResource.java | 135 + .../server/jersey/resources/ZErrorWriter.java | 63 + .../jersey/resources/ZNodeResource.java | 412 ++ src/contrib/rest/src/python/README.txt | 9 + .../rest/src/python/demo_master_election.py | 90 + src/contrib/rest/src/python/demo_queue.py | 99 + src/contrib/rest/src/python/test.py | 163 + src/contrib/rest/src/python/zk_dump_tree.py | 108 + src/contrib/rest/src/python/zkrest.py | 218 + .../apache/zookeeper/server/jersey/Base.java | 94 + .../zookeeper/server/jersey/CreateTest.java | 163 + .../zookeeper/server/jersey/DeleteTest.java | 95 + .../zookeeper/server/jersey/ExistsTest.java | 80 + .../server/jersey/GetChildrenTest.java | 139 + .../zookeeper/server/jersey/GetTest.java | 123 + .../server/jersey/RestTestSuite.java | 42 + .../zookeeper/server/jersey/RootTest.java | 68 + .../zookeeper/server/jersey/SessionTest.java | 134 + .../zookeeper/server/jersey/SetTest.java | 155 + .../zookeeper/server/jersey/WadlTest.java | 44 + src/contrib/rest/src/test/zkServer.sh | 91 + src/contrib/zkfuse/Makefile.am | 4 + src/contrib/zkfuse/README.txt | 63 + src/contrib/zkfuse/build.xml | 61 + src/contrib/zkfuse/configure.ac | 72 + src/contrib/zkfuse/src/Makefile.am | 7 + src/contrib/zkfuse/src/blockingqueue.h | 154 + src/contrib/zkfuse/src/doxygen.cfg | 1242 +++++ src/contrib/zkfuse/src/event.cc | 29 + src/contrib/zkfuse/src/event.h | 553 ++ src/contrib/zkfuse/src/log.cc | 36 + src/contrib/zkfuse/src/log.h | 116 + src/contrib/zkfuse/src/log4cxx.properties | 28 + src/contrib/zkfuse/src/mutex.h | 169 + src/contrib/zkfuse/src/thread.cc | 41 + src/contrib/zkfuse/src/thread.h | 99 + src/contrib/zkfuse/src/zkadapter.cc | 884 ++++ src/contrib/zkfuse/src/zkadapter.h | 718 +++ src/contrib/zkfuse/src/zkfuse.cc | 4492 +++++++++++++++++ src/contrib/zkperl/Changes | 65 + src/contrib/zkperl/LICENSE | 202 + src/contrib/zkperl/MANIFEST | 23 + src/contrib/zkperl/Makefile.PL | 73 + src/contrib/zkperl/NOTICE | 6 + src/contrib/zkperl/README | 86 + src/contrib/zkperl/ZooKeeper.pm | 1257 +++++ src/contrib/zkperl/ZooKeeper.xs | 2664 ++++++++++ src/contrib/zkperl/build.xml | 61 + src/contrib/zkperl/t/10_invalid.t | 773 +++ src/contrib/zkperl/t/15_thread.t | 121 + src/contrib/zkperl/t/20_tie.t | 353 ++ src/contrib/zkperl/t/22_stat_tie.t | 438 ++ src/contrib/zkperl/t/24_watch_tie.t | 292 ++ src/contrib/zkperl/t/30_connect.t | 202 + src/contrib/zkperl/t/35_log.t | 88 + src/contrib/zkperl/t/40_basic.t | 277 + src/contrib/zkperl/t/45_class.t | 408 ++ src/contrib/zkperl/t/50_access.t | 356 ++ src/contrib/zkperl/t/60_watch.t | 304 ++ src/contrib/zkperl/t/util.pl | 62 + src/contrib/zkperl/typemap | 38 + src/contrib/zkpython/README | 109 + src/contrib/zkpython/build.xml | 198 + src/contrib/zkpython/ivy.xml | 43 + src/contrib/zkpython/src/c/pyzk_docstrings.h | 594 +++ src/contrib/zkpython/src/c/zookeeper.c | 1664 ++++++ src/contrib/zkpython/src/examples/README | 8 + .../src/examples/watch_znode_for_changes.py | 202 + .../src/packages/deb/zkpython.control/control | 23 + .../src/packages/rpm/spec/zkpython.spec | 81 + src/contrib/zkpython/src/python/setup.py | 36 + src/contrib/zkpython/src/python/zk.py | 76 + src/contrib/zkpython/src/test/acl_test.py | 109 + src/contrib/zkpython/src/test/async_test.py | 33 + .../zkpython/src/test/callback_test.py | 155 + .../zkpython/src/test/clientid_test.py | 48 + .../zkpython/src/test/close_deadlock_test.py | 50 + .../zkpython/src/test/connection_test.py | 131 + src/contrib/zkpython/src/test/create_test.py | 104 + src/contrib/zkpython/src/test/delete_test.py | 68 + src/contrib/zkpython/src/test/exists_test.py | 64 + src/contrib/zkpython/src/test/get_set_test.py | 211 + src/contrib/zkpython/src/test/run_tests.sh | 40 + src/contrib/zkpython/src/test/zkServer.sh | 77 + src/contrib/zkpython/src/test/zktestbase.py | 101 + src/contrib/zktreeutil/Makefile.am | 4 + src/contrib/zktreeutil/README.txt | 74 + src/contrib/zktreeutil/build.xml | 61 + src/contrib/zktreeutil/configure.ac | 66 + src/contrib/zktreeutil/src/Makefile.am | 24 + src/contrib/zktreeutil/src/SimpleTree.h | 150 + src/contrib/zktreeutil/src/ZkAdaptor.cc | 513 ++ src/contrib/zktreeutil/src/ZkAdaptor.h | 327 ++ src/contrib/zktreeutil/src/ZkTreeUtil.cc | 705 +++ src/contrib/zktreeutil/src/ZkTreeUtil.h | 262 + src/contrib/zktreeutil/src/ZkTreeUtilMain.cc | 247 + src/contrib/zktreeutil/tests/zk_sample.xml | 44 + src/contrib/zooinspector/NOTICE.txt | 3 + src/contrib/zooinspector/README.txt | 94 + src/contrib/zooinspector/build.xml | 152 + .../config/defaultConnectionSettings.cfg | 21 + .../config/defaultNodeVeiwers.cfg | 17 + .../zooinspector/icons/edtsrclkup_co.gif | Bin 0 -> 204 bytes src/contrib/zooinspector/icons/file_obj.gif | Bin 0 -> 354 bytes src/contrib/zooinspector/icons/fldr_obj.gif | Bin 0 -> 216 bytes src/contrib/zooinspector/icons/info_obj.gif | Bin 0 -> 121 bytes src/contrib/zooinspector/icons/jspdecl.gif | Bin 0 -> 190 bytes src/contrib/zooinspector/icons/launch_run.gif | Bin 0 -> 379 bytes .../zooinspector/icons/launch_stop.gif | Bin 0 -> 916 bytes src/contrib/zooinspector/icons/new_con.gif | Bin 0 -> 353 bytes src/contrib/zooinspector/icons/refresh.gif | Bin 0 -> 327 bytes src/contrib/zooinspector/icons/save_edit.gif | Bin 0 -> 639 bytes .../zooinspector/icons/search_next.gif | Bin 0 -> 332 bytes .../zooinspector/icons/search_prev.gif | Bin 0 -> 323 bytes src/contrib/zooinspector/icons/trash.gif | Bin 0 -> 132 bytes src/contrib/zooinspector/ivy.xml | 48 + .../zooinspector/lib/jtoaster-1.0.4.jar | Bin 0 -> 14975 bytes src/contrib/zooinspector/lib/log4j.properties | 9 + .../licences/Apache Software Licence v2.0.txt | 202 + .../zooinspector/licences/epl-v10.html | 261 + .../zookeeper/inspector/ZooInspector.java | 66 + .../BasicDataEncryptionManager.java | 50 + .../encryption/DataEncryptionManager.java | 39 + .../gui/NodeViewersChangeListener.java | 37 + .../gui/ZooInspectorAboutDialog.java | 80 + ...ooInspectorConnectionPropertiesDialog.java | 321 ++ .../gui/ZooInspectorIconResources.java | 118 + .../gui/ZooInspectorNodeViewersDialog.java | 605 +++ .../gui/ZooInspectorNodeViewersPanel.java | 140 + .../inspector/gui/ZooInspectorPanel.java | 361 ++ .../inspector/gui/ZooInspectorTreeViewer.java | 362 ++ .../apache/zookeeper/inspector/gui/about.html | 21 + .../gui/nodeviewer/NodeViewerACL.java | 187 + .../gui/nodeviewer/NodeViewerData.java | 146 + .../gui/nodeviewer/NodeViewerMetaData.java | 186 + .../nodeviewer/ZooInspectorNodeViewer.java | 138 + .../inspector/logger/LoggerFactory.java | 36 + .../inspector/manager/NodeListener.java | 37 + .../zookeeper/inspector/manager/Pair.java | 120 + .../manager/ZooInspectorManager.java | 139 + .../manager/ZooInspectorManagerImpl.java | 884 ++++ .../manager/ZooInspectorNodeManager.java | 33 + .../manager/ZooInspectorNodeTreeManager.java | 43 + .../manager/ZooInspectorReadOnlyManager.java | 99 + .../zookeeper/retry/ZooKeeperRetry.java | 288 ++ src/contrib/zooinspector/zooInspector-dev.sh | 18 + src/contrib/zooinspector/zooInspector.cmd | 18 + src/contrib/zooinspector/zooInspector.sh | 18 + src/docs/forrest.properties | 109 + src/docs/src/documentation/README.txt | 7 + src/docs/src/documentation/TODO.txt | 227 + .../classes/CatalogManager.properties | 37 + src/docs/src/documentation/conf/cli.xconf | 328 ++ .../content/xdocs/bookkeeperConfig.xml | 156 + .../content/xdocs/bookkeeperOverview.xml | 419 ++ .../content/xdocs/bookkeeperProgrammer.xml | 678 +++ .../content/xdocs/bookkeeperStarted.xml | 208 + .../content/xdocs/bookkeeperStream.xml | 331 ++ .../src/documentation/content/xdocs/index.xml | 98 + .../content/xdocs/javaExample.xml | 663 +++ .../documentation/content/xdocs/recipes.xml | 637 +++ .../src/documentation/content/xdocs/site.xml | 103 + .../src/documentation/content/xdocs/tabs.xml | 36 + .../content/xdocs/zookeeperAdmin.xml | 1861 +++++++ .../xdocs/zookeeperHierarchicalQuorums.xml | 75 + .../content/xdocs/zookeeperInternals.xml | 487 ++ .../content/xdocs/zookeeperJMX.xml | 236 + .../content/xdocs/zookeeperObservers.xml | 145 + .../content/xdocs/zookeeperOtherInfo.xml | 46 + .../content/xdocs/zookeeperOver.xml | 464 ++ .../content/xdocs/zookeeperProgrammers.xml | 1640 ++++++ .../content/xdocs/zookeeperQuotas.xml | 71 + .../content/xdocs/zookeeperStarted.xml | 418 ++ .../content/xdocs/zookeeperTutorial.xml | 712 +++ .../documentation/resources/images/2pc.jpg | Bin 0 -> 15174 bytes .../resources/images/bk-overview.jpg | Bin 0 -> 124211 bytes .../resources/images/favicon.ico | Bin 0 -> 766 bytes .../resources/images/hadoop-logo.jpg | Bin 0 -> 9443 bytes .../resources/images/state_dia.dia | Bin 0 -> 2597 bytes .../resources/images/state_dia.jpg | Bin 0 -> 51364 bytes .../documentation/resources/images/zkarch.jpg | Bin 0 -> 24535 bytes .../resources/images/zkcomponents.jpg | Bin 0 -> 30831 bytes .../resources/images/zknamespace.jpg | Bin 0 -> 35414 bytes .../resources/images/zkperfRW-3.2.jpg | Bin 0 -> 41948 bytes .../resources/images/zkperfRW.jpg | Bin 0 -> 161542 bytes .../resources/images/zkperfreliability.jpg | Bin 0 -> 69825 bytes .../resources/images/zkservice.jpg | Bin 0 -> 86790 bytes .../resources/images/zookeeper_small.gif | Bin 0 -> 4847 bytes src/docs/src/documentation/skinconf.xml | 360 ++ src/docs/status.xml | 74 + src/java/OldChangeLog | 0 .../lhh/corator/CoratorSessionExample.java | 37 + .../com/lhh/corator/LeaderLatchExample.java | 42 + .../lhh/corator/LeaderSelectorExample.java | 58 + .../lhh/com/lhh/corator/ZkCoratorTest.java | 41 + .../native1/client/ZookeeperClientTest.java | 27 + .../lhh/com/lhh/zkclient/WatchClient.java | 17 + src/java/lhh/com/lhh/zkclient/client.java | 30 + src/java/lib/cobertura/README.txt | 3 + src/java/lib/curator/curator-client-4.0.1.jar | Bin 0 -> 2657457 bytes .../lib/curator/curator-framework-4.0.1.jar | Bin 0 -> 307645 bytes .../lib/curator/curator-recipes-4.0.1.jar | Bin 0 -> 294593 bytes src/java/lib/curator/curator-test-4.0.1.jar | Bin 0 -> 2661037 bytes src/java/lib/jdiff/zookeeper_3.1.1.xml | 2717 ++++++++++ src/java/lib/jline-0.9.94.LICENSE.txt | 33 + src/java/lib/log4j-1.2.17.LICENSE.txt | 202 + src/java/lib/slf4j-1.7.25.LICENSE.txt | 24 + src/java/lib/zkclient-0.3.jar | Bin 0 -> 64009 bytes src/java/main/log4j.properties | 58 + .../org/apache/jute/BinaryInputArchive.java | 130 + .../org/apache/jute/BinaryOutputArchive.java | 146 + .../main/org/apache/jute/CsvInputArchive.java | 208 + .../org/apache/jute/CsvOutputArchive.java | 150 + src/java/main/org/apache/jute/Index.java | 38 + .../main/org/apache/jute/InputArchive.java | 43 + .../main/org/apache/jute/OutputArchive.java | 47 + src/java/main/org/apache/jute/Record.java | 35 + .../main/org/apache/jute/RecordReader.java | 93 + .../main/org/apache/jute/RecordWriter.java | 113 + src/java/main/org/apache/jute/Utils.java | 282 ++ .../main/org/apache/jute/XmlInputArchive.java | 251 + .../org/apache/jute/XmlOutputArchive.java | 251 + .../org/apache/jute/compiler/CGenerator.java | 142 + .../apache/jute/compiler/CSharpGenerator.java | 53 + .../apache/jute/compiler/CppGenerator.java | 136 + .../org/apache/jute/compiler/JBoolean.java | 50 + .../org/apache/jute/compiler/JBuffer.java | 106 + .../main/org/apache/jute/compiler/JByte.java | 34 + .../org/apache/jute/compiler/JCompType.java | 66 + .../org/apache/jute/compiler/JDouble.java | 40 + .../main/org/apache/jute/compiler/JField.java | 140 + .../main/org/apache/jute/compiler/JFile.java | 84 + .../main/org/apache/jute/compiler/JFloat.java | 39 + .../main/org/apache/jute/compiler/JInt.java | 34 + .../main/org/apache/jute/compiler/JLong.java | 38 + .../main/org/apache/jute/compiler/JMap.java | 149 + .../org/apache/jute/compiler/JRecord.java | 776 +++ .../org/apache/jute/compiler/JString.java | 46 + .../main/org/apache/jute/compiler/JType.java | 204 + .../org/apache/jute/compiler/JVector.java | 153 + .../apache/jute/compiler/JavaGenerator.java | 57 + .../compiler/generated/ParseException.java | 210 + .../apache/jute/compiler/generated/Rcc.java | 525 ++ .../jute/compiler/generated/RccConstants.java | 88 + .../compiler/generated/RccTokenManager.java | 833 +++ .../compiler/generated/SimpleCharStream.java | 457 ++ .../apache/jute/compiler/generated/Token.java | 99 + .../compiler/generated/TokenMgrError.java | 151 + .../jute/compiler/generated/package.html | 28 + .../org/apache/jute/compiler/generated/rcc.jj | 374 ++ .../org/apache/jute/compiler/package.html | 30 + src/java/main/org/apache/jute/package.html | 801 +++ .../org/apache/zookeeper/AsyncCallback.java | 309 ++ .../main/org/apache/zookeeper/ClientCnxn.java | 1481 ++++++ .../apache/zookeeper/ClientCnxnSocket.java | 175 + .../apache/zookeeper/ClientCnxnSocketNIO.java | 431 ++ .../apache/zookeeper/ClientWatchManager.java | 40 + .../main/org/apache/zookeeper/CreateMode.java | 94 + .../org/apache/zookeeper/Environment.java | 103 + .../apache/zookeeper/JLineZNodeCompletor.java | 84 + .../org/apache/zookeeper/KeeperException.java | 728 +++ src/java/main/org/apache/zookeeper/Login.java | 407 ++ .../org/apache/zookeeper/MultiResponse.java | 166 + .../zookeeper/MultiTransactionRecord.java | 160 + src/java/main/org/apache/zookeeper/Op.java | 351 ++ .../main/org/apache/zookeeper/OpResult.java | 185 + .../main/org/apache/zookeeper/Quotas.java | 68 + .../zookeeper/SaslClientCallbackHandler.java | 104 + .../apache/zookeeper/ServerAdminClient.java | 316 ++ src/java/main/org/apache/zookeeper/Shell.java | 477 ++ .../main/org/apache/zookeeper/StatsTrack.java | 101 + .../main/org/apache/zookeeper/Testable.java | 29 + .../org/apache/zookeeper/Transaction.java | 70 + .../main/org/apache/zookeeper/Version.java | 90 + .../org/apache/zookeeper/WatchedEvent.java | 81 + .../main/org/apache/zookeeper/Watcher.java | 156 + .../main/org/apache/zookeeper/ZKUtil.java | 124 + .../main/org/apache/zookeeper/ZooDefs.java | 125 + .../main/org/apache/zookeeper/ZooKeeper.java | 1857 +++++++ .../org/apache/zookeeper/ZooKeeperMain.java | 871 ++++ .../apache/zookeeper/ZooKeeperTestable.java | 47 + .../zookeeper/client/ConnectStringParser.java | 87 + .../zookeeper/client/FourLetterWordMain.java | 107 + .../apache/zookeeper/client/HostProvider.java | 66 + .../zookeeper/client/StaticHostProvider.java | 179 + .../zookeeper/client/ZooKeeperSaslClient.java | 439 ++ .../common/AtomicFileOutputStream.java | 126 + .../org/apache/zookeeper/common/IOUtils.java | 123 + .../org/apache/zookeeper/common/PathTrie.java | 293 ++ .../apache/zookeeper/common/PathUtils.java | 103 + .../org/apache/zookeeper/common/Time.java | 52 + .../org/apache/zookeeper/jmx/CommonNames.java | 29 + .../apache/zookeeper/jmx/MBeanRegistry.java | 219 + .../org/apache/zookeeper/jmx/ManagedUtil.java | 72 + .../org/apache/zookeeper/jmx/ZKMBeanInfo.java | 36 + .../server/ByteBufferInputStream.java | 82 + .../server/ByteBufferOutputStream.java | 52 + .../zookeeper/server/ConnectionBean.java | 173 + .../zookeeper/server/ConnectionMXBean.java | 98 + .../org/apache/zookeeper/server/DataNode.java | 180 + .../org/apache/zookeeper/server/DataTree.java | 1237 +++++ .../apache/zookeeper/server/DataTreeBean.java | 61 + .../zookeeper/server/DataTreeMXBean.java | 47 + .../server/DatadirCleanupManager.java | 192 + .../org/apache/zookeeper/server/ExitCode.java | 27 + .../server/FinalRequestProcessor.java | 406 ++ .../apache/zookeeper/server/LogFormatter.java | 108 + .../zookeeper/server/NIOServerCnxn.java | 1218 +++++ .../server/NIOServerCnxnFactory.java | 320 ++ .../zookeeper/server/NettyServerCnxn.java | 897 ++++ .../server/NettyServerCnxnFactory.java | 422 ++ .../apache/zookeeper/server/ObserverBean.java | 49 + .../server/PrepRequestProcessor.java | 774 +++ .../apache/zookeeper/server/PurgeTxnLog.java | 236 + .../server/ReferenceCountedACLCache.java | 226 + .../org/apache/zookeeper/server/Request.java | 254 + .../zookeeper/server/RequestProcessor.java | 44 + .../apache/zookeeper/server/ServerCnxn.java | 548 ++ .../zookeeper/server/ServerCnxnFactory.java | 226 + .../apache/zookeeper/server/ServerConfig.java | 112 + .../apache/zookeeper/server/ServerStats.java | 158 + .../zookeeper/server/SessionTracker.java | 81 + .../zookeeper/server/SessionTrackerImpl.java | 280 + .../zookeeper/server/SnapshotFormatter.java | 128 + .../org/apache/zookeeper/server/Stats.java | 68 + .../server/SyncRequestProcessor.java | 234 + .../zookeeper/server/TraceFormatter.java | 123 + .../server/UnimplementedRequestProcessor.java | 48 + .../apache/zookeeper/server/WatchManager.java | 171 + .../apache/zookeeper/server/ZKDatabase.java | 499 ++ .../server/ZooKeeperCriticalThread.java | 52 + .../zookeeper/server/ZooKeeperSaslServer.java | 65 + .../zookeeper/server/ZooKeeperServer.java | 1104 ++++ .../zookeeper/server/ZooKeeperServerBean.java | 162 + .../server/ZooKeeperServerListener.java | 35 + .../server/ZooKeeperServerListenerImpl.java | 45 + .../server/ZooKeeperServerMXBean.java | 126 + .../zookeeper/server/ZooKeeperServerMain.java | 155 + .../ZooKeeperServerShutdownHandler.java | 46 + .../zookeeper/server/ZooKeeperThread.java | 62 + .../org/apache/zookeeper/server/ZooTrace.java | 91 + .../server/auth/AuthenticationProvider.java | 82 + .../auth/DigestAuthenticationProvider.java | 139 + .../server/auth/DigestLoginModule.java | 61 + .../server/auth/IPAuthenticationProvider.java | 117 + .../zookeeper/server/auth/KerberosName.java | 418 ++ .../server/auth/ProviderRegistry.java | 77 + .../auth/SASLAuthenticationProvider.java | 70 + .../auth/SaslServerCallbackHandler.java | 154 + .../org/apache/zookeeper/server/package.html | 101 + .../server/persistence/FilePadding.java | 112 + .../server/persistence/FileSnap.java | 255 + .../server/persistence/FileTxnLog.java | 691 +++ .../server/persistence/FileTxnSnapLog.java | 428 ++ .../server/persistence/SnapShot.java | 66 + .../zookeeper/server/persistence/TxnLog.java | 128 + .../server/persistence/TxnLogToolkit.java | 273 + .../persistence/TxnLogToolkitCliParser.java | 101 + .../zookeeper/server/persistence/Util.java | 321 ++ .../server/quorum/AckRequestProcessor.java | 54 + .../server/quorum/AuthFastLeaderElection.java | 980 ++++ .../server/quorum/CommitProcessor.java | 195 + .../zookeeper/server/quorum/Election.java | 27 + .../server/quorum/FastLeaderElection.java | 1015 ++++ .../zookeeper/server/quorum/Follower.java | 172 + .../zookeeper/server/quorum/FollowerBean.java | 55 + .../server/quorum/FollowerMXBean.java | 46 + .../quorum/FollowerRequestProcessor.java | 114 + .../quorum/FollowerZooKeeperServer.java | 165 + .../zookeeper/server/quorum/Leader.java | 1083 ++++ .../zookeeper/server/quorum/LeaderBean.java | 77 + .../server/quorum/LeaderElection.java | 295 ++ .../server/quorum/LeaderElectionBean.java | 42 + .../server/quorum/LeaderElectionMXBean.java | 31 + .../zookeeper/server/quorum/LeaderMXBean.java | 61 + .../server/quorum/LeaderZooKeeperServer.java | 182 + .../zookeeper/server/quorum/Learner.java | 570 +++ .../server/quorum/LearnerHandler.java | 715 +++ .../server/quorum/LearnerSessionTracker.java | 98 + .../server/quorum/LearnerSyncRequest.java | 34 + .../server/quorum/LearnerZooKeeperServer.java | 146 + .../server/quorum/LocalPeerBean.java | 79 + .../server/quorum/LocalPeerMXBean.java | 77 + .../zookeeper/server/quorum/Observer.java | 141 + .../server/quorum/ObserverMXBean.java | 37 + .../quorum/ObserverRequestProcessor.java | 128 + .../quorum/ObserverZooKeeperServer.java | 152 + .../quorum/ProposalRequestProcessor.java | 93 + .../server/quorum/ProposalStats.java | 71 + .../zookeeper/server/quorum/QuorumBean.java | 44 + .../server/quorum/QuorumCnxManager.java | 1152 +++++ .../zookeeper/server/quorum/QuorumMXBean.java | 34 + .../zookeeper/server/quorum/QuorumPeer.java | 1544 ++++++ .../server/quorum/QuorumPeerConfig.java | 483 ++ .../server/quorum/QuorumPeerMain.java | 182 + .../zookeeper/server/quorum/QuorumStats.java | 68 + .../server/quorum/QuorumZooKeeperServer.java | 65 + .../zookeeper/server/quorum/ReadOnlyBean.java | 38 + .../quorum/ReadOnlyRequestProcessor.java | 129 + .../quorum/ReadOnlyZooKeeperServer.java | 155 + .../server/quorum/RemotePeerBean.java | 45 + .../server/quorum/RemotePeerMXBean.java | 33 + .../quorum/SendAckRequestProcessor.java | 80 + .../zookeeper/server/quorum/ServerBean.java | 38 + .../zookeeper/server/quorum/ServerMXBean.java | 33 + .../zookeeper/server/quorum/StateSummary.java | 57 + .../apache/zookeeper/server/quorum/Vote.java | 169 + .../quorum/auth/NullQuorumAuthLearner.java | 33 + .../quorum/auth/NullQuorumAuthServer.java | 34 + .../server/quorum/auth/QuorumAuth.java | 96 + .../server/quorum/auth/QuorumAuthLearner.java | 40 + .../server/quorum/auth/QuorumAuthServer.java | 41 + .../quorum/auth/SaslQuorumAuthLearner.java | 225 + .../quorum/auth/SaslQuorumAuthServer.java | 180 + .../auth/SaslQuorumServerCallbackHandler.java | 148 + .../quorum/flexible/QuorumHierarchical.java | 275 + .../server/quorum/flexible/QuorumMaj.java | 63 + .../quorum/flexible/QuorumVerifier.java | 33 + .../zookeeper/server/upgrade/DataNodeV1.java | 129 + .../zookeeper/server/upgrade/DataTreeV1.java | 567 +++ .../zookeeper/server/upgrade/UpgradeMain.java | 185 + .../server/upgrade/UpgradeSnapShot.java | 33 + .../server/upgrade/UpgradeSnapShotV1.java | 332 ++ .../zookeeper/server/util/KerberosUtil.java | 44 + .../zookeeper/server/util/OSMXBean.java | 181 + .../zookeeper/server/util/Profiler.java | 41 + .../zookeeper/server/util/SerializeUtils.java | 159 + .../zookeeper/server/util/ZxidUtils.java | 34 + .../apache/zookeeper/util/SecurityUtils.java | 298 ++ .../apache/zookeeper/version/util/VerGen.java | 178 + src/java/main/overview.html | 26 + src/java/systest/README.txt | 62 + .../zookeeper/test/system/BaseSysTest.java | 280 + .../test/system/DuplicateNameException.java | 26 + .../zookeeper/test/system/GenerateLoad.java | 720 +++ .../zookeeper/test/system/Instance.java | 59 + .../test/system/InstanceContainer.java | 310 ++ .../test/system/InstanceManager.java | 357 ++ .../test/system/NoAssignmentException.java | 24 + .../test/system/NoAvailableContainers.java | 28 + .../test/system/QuorumPeerInstance.java | 284 ++ .../zookeeper/test/system/SimpleClient.java | 118 + .../zookeeper/test/system/SimpleSysTest.java | 171 + src/java/test/bin/check_compatibility.py | 204 + src/java/test/bin/test-github-pr.sh | 616 +++ src/java/test/bin/test-patch.properties | 18 + src/java/test/bin/test-patch.sh | 637 +++ src/java/test/checkstyle-noframes-sorted.xsl | 178 + src/java/test/checkstyle.xml | 187 + src/java/test/config/findbugsExcludeFile.xml | 166 + .../data/buffersize/create/version-2/log.1 | Bin 0 -> 51216 bytes .../buffersize/create/version-2/snapshot.0 | Bin 0 -> 296 bytes .../test/data/buffersize/set/version-2/log.1 | Bin 0 -> 51216 bytes .../data/buffersize/set/version-2/snapshot.0 | Bin 0 -> 296 bytes .../data/buffersize/snapshot/version-2/log.1 | Bin 0 -> 51216 bytes .../buffersize/snapshot/version-2/snapshot.0 | Bin 0 -> 296 bytes .../buffersize/snapshot/version-2/snapshot.2 | Bin 0 -> 5429 bytes .../test/data/invalidsnap/version-2/log.1 | Bin 0 -> 59360 bytes .../test/data/invalidsnap/version-2/log.274 | Bin 0 -> 91616 bytes .../test/data/invalidsnap/version-2/log.42 | Bin 0 -> 184 bytes .../test/data/invalidsnap/version-2/log.63b | Bin 0 -> 49008 bytes .../data/invalidsnap/version-2/snapshot.0 | Bin 0 -> 296 bytes .../data/invalidsnap/version-2/snapshot.272 | Bin 0 -> 56408 bytes .../data/invalidsnap/version-2/snapshot.273 | Bin 0 -> 56521 bytes .../data/invalidsnap/version-2/snapshot.639 | Bin 0 -> 143163 bytes .../data/invalidsnap/version-2/snapshot.83f | Bin 0 -> 4824 bytes src/java/test/data/kerberos/minikdc-krb5.conf | 30 + src/java/test/data/kerberos/minikdc.ldiff | 52 + src/java/test/data/upgrade/log.100000001 | Bin 0 -> 2458624 bytes src/java/test/data/upgrade/log.100001bf0 | Bin 0 -> 1025024 bytes src/java/test/data/upgrade/snapshot.100000000 | Bin 0 -> 73 bytes src/java/test/data/upgrade/snapshot.100001bec | Bin 0 -> 2567595 bytes .../apache/jute/BinaryInputArchiveTest.java | 43 + .../apache/zookeeper/ClientReconnectTest.java | 78 + .../apache/zookeeper/JUnit4ZKTestRunner.java | 86 + .../apache/zookeeper/JaasConfiguration.java | 75 + .../test/org/apache/zookeeper/MockPacket.java | 46 + .../apache/zookeeper/MultiResponseTest.java | 72 + .../zookeeper/MultiTransactionRecordTest.java | 68 + .../org/apache/zookeeper/PortAssignment.java | 35 + .../org/apache/zookeeper/SaslAuthTest.java | 213 + .../apache/zookeeper/ServerConfigTest.java | 74 + .../apache/zookeeper/TestableZooKeeper.java | 133 + .../test/org/apache/zookeeper/VerGenTest.java | 78 + .../test/org/apache/zookeeper/ZKTestCase.java | 88 + .../org/apache/zookeeper/ZooKeeperTest.java | 281 ++ .../org/apache/zookeeper/common/TimeTest.java | 109 + .../org/apache/zookeeper/server/CRCTest.java | 190 + .../apache/zookeeper/server/DataNodeTest.java | 65 + .../apache/zookeeper/server/DataTreeTest.java | 235 + .../zookeeper/server/DataTreeUnitTest.java | 60 + .../server/DatadirCleanupManagerTest.java | 91 + .../server/DeserializationPerfTest.java | 119 + .../server/InvalidSnapCountTest.java | 126 + .../zookeeper/server/InvalidSnapshotTest.java | 84 + .../zookeeper/server/MockNIOServerCnxn.java | 45 + .../zookeeper/server/NIOServerCnxnTest.java | 106 + .../zookeeper/server/NettyServerCnxnTest.java | 103 + .../server/PrepRequestProcessorTest.java | 262 + .../apache/zookeeper/server/PurgeTxnTest.java | 604 +++ .../server/ReferenceCountedACLCacheTest.java | 287 ++ .../server/SerializationPerfTest.java | 125 + .../server/ServerCnxnFactoryAccessor.java | 24 + .../zookeeper/server/ServerStatsTest.java | 145 + .../zookeeper/server/SessionTrackerTest.java | 156 + .../apache/zookeeper/server/ToStringTest.java | 38 + .../server/ZooKeeperServerMainTest.java | 615 +++ .../server/ZooKeeperServerStartupTest.java | 302 ++ .../zookeeper/server/ZooKeeperServerTest.java | 137 + .../zookeeper/server/ZooKeeperThreadTest.java | 84 + .../zookeeper/server/ZxidRolloverTest.java | 444 ++ .../server/persistence/FileTxnLogTest.java | 139 + .../persistence/FileTxnSnapLogTest.java | 148 + .../TxnLogToolkitCliParserTest.java | 110 + .../server/persistence/TxnLogToolkitTest.java | 155 + .../server/quorum/CnxManagerTest.java | 463 ++ .../quorum/EphemeralNodeDeletionTest.java | 219 + .../quorum/FLEBackwardElectionRoundTest.java | 159 + .../server/quorum/FLECompatibilityTest.java | 350 ++ .../server/quorum/FLEDontCareTest.java | 262 + .../server/quorum/FLELostMessageTest.java | 113 + .../zookeeper/server/quorum/FLETestUtils.java | 86 + .../server/quorum/LeaderBeanTest.java | 151 + .../server/quorum/LeaderWithObserverTest.java | 177 + .../zookeeper/server/quorum/LearnerTest.java | 135 + .../server/quorum/ProposalStatsTest.java | 58 + .../server/quorum/QuorumCnxManagerTest.java | 967 ++++ .../server/quorum/QuorumPeerMainTest.java | 1361 +++++ .../server/quorum/QuorumPeerTestBase.java | 225 + .../server/quorum/WatchLeakTest.java | 306 ++ .../zookeeper/server/quorum/Zab1_0Test.java | 1376 +++++ .../zookeeper/server/quorum/ZabUtils.java | 142 + .../quorum/auth/KerberosSecurityTestcase.java | 120 + .../server/quorum/auth/KerberosTestUtils.java | 76 + .../zookeeper/server/quorum/auth/MiniKdc.java | 574 +++ .../server/quorum/auth/MiniKdcTest.java | 185 + .../quorum/auth/QuorumAuthTestBase.java | 248 + .../quorum/auth/QuorumAuthUpgradeTest.java | 239 + .../quorum/auth/QuorumDigestAuthTest.java | 380 ++ .../quorum/auth/QuorumKerberosAuthTest.java | 115 + .../auth/QuorumKerberosHostBasedAuthTest.java | 192 + .../zookeeper/server/util/PortForwarder.java | 256 + .../server/util/SerializeUtilsTest.java | 128 + .../apache/zookeeper/test/ACLCountTest.java | 136 + .../apache/zookeeper/test/ACLRootTest.java | 98 + .../org/apache/zookeeper/test/ACLTest.java | 186 + .../zookeeper/test/AsyncHammerTest.java | 245 + .../org/apache/zookeeper/test/AsyncOps.java | 655 +++ .../apache/zookeeper/test/AsyncOpsTest.java | 227 + .../org/apache/zookeeper/test/AsyncTest.java | 172 + .../test/AtomicFileOutputStreamTest.java | 200 + .../org/apache/zookeeper/test/AuthTest.java | 174 + .../apache/zookeeper/test/BufferSizeTest.java | 132 + .../zookeeper/test/ChrootAsyncTest.java | 47 + .../zookeeper/test/ChrootClientTest.java | 54 + .../org/apache/zookeeper/test/ChrootTest.java | 136 + .../org/apache/zookeeper/test/ClientBase.java | 757 +++ .../zookeeper/test/ClientHammerTest.java | 246 + .../zookeeper/test/ClientPortBindTest.java | 127 + .../apache/zookeeper/test/ClientRetry.java | 72 + .../org/apache/zookeeper/test/ClientTest.java | 805 +++ .../test/ConnectStringParserTest.java | 68 + .../apache/zookeeper/test/CreateModeTest.java | 81 + .../test/DisconnectableZooKeeper.java | 58 + .../test/DisconnectedWatcherTest.java | 258 + .../apache/zookeeper/test/EventTypeTest.java | 50 + .../zookeeper/test/FLENewEpochTest.java | 192 + .../zookeeper/test/FLEPredicateTest.java | 104 + .../apache/zookeeper/test/FLERestartTest.java | 203 + .../org/apache/zookeeper/test/FLETest.java | 473 ++ .../zookeeper/test/FLEZeroWeightTest.java | 181 + .../test/FollowerResyncConcurrencyTest.java | 607 +++ .../apache/zookeeper/test/FollowerTest.java | 140 + .../test/FourLetterWordsQuorumTest.java | 113 + .../zookeeper/test/FourLetterWordsTest.java | 238 + .../test/FourLetterWordsWhiteListTest.java | 253 + .../zookeeper/test/GetChildren2Test.java | 136 + .../test/HierarchicalQuorumTest.java | 309 ++ .../apache/zookeeper/test/IntegrityCheck.java | 232 + .../zookeeper/test/InvalidSnapshotTest.java | 125 + .../org/apache/zookeeper/test/JMXEnv.java | 325 ++ .../zookeeper/test/KeeperStateTest.java | 76 + .../zookeeper/test/LENonTerminateTest.java | 378 ++ .../org/apache/zookeeper/test/LETest.java | 137 + .../test/LoadFromLogNoServerTest.java | 175 + .../zookeeper/test/LoadFromLogTest.java | 223 + .../apache/zookeeper/test/MaxCnxnsTest.java | 139 + .../zookeeper/test/MultiTransactionTest.java | 805 +++ .../zookeeper/test/NioNettySuiteBase.java | 43 + .../test/NioNettySuiteHammerTest.java | 30 + .../zookeeper/test/NioNettySuiteTest.java | 37 + .../test/NonRecoverableErrorTest.java | 183 + .../apache/zookeeper/test/NullDataTest.java | 75 + .../org/apache/zookeeper/test/OOMTest.java | 161 + .../apache/zookeeper/test/OSMXBeanTest.java | 70 + .../test/ObserverHierarchicalQuorumTest.java | 43 + .../apache/zookeeper/test/ObserverLETest.java | 76 + .../test/ObserverQuorumHammerTest.java | 39 + .../apache/zookeeper/test/ObserverTest.java | 233 + .../org/apache/zookeeper/test/QuorumBase.java | 341 ++ .../zookeeper/test/QuorumHammerTest.java | 51 + .../zookeeper/test/QuorumQuotaTest.java | 63 + .../org/apache/zookeeper/test/QuorumTest.java | 296 ++ .../org/apache/zookeeper/test/QuorumUtil.java | 261 + .../zookeeper/test/QuorumZxidSyncTest.java | 171 + .../zookeeper/test/ReadOnlyModeTest.java | 291 ++ .../apache/zookeeper/test/RecoveryTest.java | 209 + .../zookeeper/test/RepeatStartupTest.java | 69 + .../test/RestoreCommittedLogTest.java | 91 + .../test/SaslAuthDesignatedClientTest.java | 104 + .../test/SaslAuthDesignatedServerTest.java | 104 + .../SaslAuthFailDesignatedClientTest.java | 108 + .../test/SaslAuthFailNotifyTest.java | 98 + .../zookeeper/test/SaslAuthFailTest.java | 76 + .../test/SaslAuthMissingClientConfigTest.java | 97 + .../apache/zookeeper/test/SaslClientTest.java | 62 + .../test/SessionInvalidationTest.java | 105 + .../apache/zookeeper/test/SessionTest.java | 394 ++ .../zookeeper/test/SessionTimeoutTest.java | 129 + .../apache/zookeeper/test/SledgeHammer.java | 115 + .../apache/zookeeper/test/StandaloneTest.java | 65 + .../org/apache/zookeeper/test/StatTest.java | 205 + .../test/StaticHostProviderTest.java | 362 ++ .../apache/zookeeper/test/SyncCallTest.java | 108 + .../org/apache/zookeeper/test/TestHammer.java | 63 + .../org/apache/zookeeper/test/TestUtils.java | 60 + .../apache/zookeeper/test/TruncateTest.java | 256 + .../apache/zookeeper/test/UpgradeTest.java | 105 + .../test/WatchEventWhenAutoReset.java | 212 + .../zookeeper/test/WatchedEventTest.java | 95 + .../zookeeper/test/WatcherFuncTest.java | 478 ++ .../apache/zookeeper/test/WatcherTest.java | 408 ++ .../test/ZkDatabaseCorruptionTest.java | 161 + .../zookeeper/test/ZooKeeperQuotaTest.java | 85 + .../zookeeper/test/ZooKeeperTestClient.java | 422 ++ src/lastRevision.bat | 22 + src/lastRevision.sh | 21 + src/packages/deb/init.d/zookeeper | 140 + src/packages/deb/zookeeper.control/conffile | 15 + src/packages/deb/zookeeper.control/control | 23 + src/packages/deb/zookeeper.control/postinst | 23 + src/packages/deb/zookeeper.control/postrm | 19 + src/packages/deb/zookeeper.control/preinst | 20 + src/packages/deb/zookeeper.control/prerm | 24 + src/packages/rpm/init.d/zookeeper | 84 + src/packages/rpm/spec/zookeeper.spec | 166 + src/packages/templates/conf/zookeeper-env.sh | 16 + src/packages/update-zookeeper-env.sh | 163 + src/pom.template | 41 + src/recipes/README.txt | 25 + src/recipes/build-recipes.xml | 177 + src/recipes/build.xml | 79 + src/recipes/election/README.txt | 27 + src/recipes/election/build.xml | 128 + .../recipes/leader/LeaderElectionAware.java | 37 + .../recipes/leader/LeaderElectionSupport.java | 461 ++ .../zookeeper/recipes/leader/LeaderOffer.java | 84 + .../leader/LeaderElectionSupportTest.java | 249 + src/recipes/lock/README.txt | 28 + src/recipes/lock/build.xml | 128 + src/recipes/lock/src/c/INSTALL | 234 + src/recipes/lock/src/c/LICENSE | 202 + src/recipes/lock/src/c/Makefile.am | 46 + src/recipes/lock/src/c/README.txt | 28 + src/recipes/lock/src/c/acinclude.m4 | 312 ++ src/recipes/lock/src/c/aminclude.am | 186 + src/recipes/lock/src/c/c-doc.Doxyfile | 1252 +++++ src/recipes/lock/src/c/configure.ac | 82 + src/recipes/lock/src/c/include/zoo_lock.h | 168 + src/recipes/lock/src/c/src/zoo_lock.c | 396 ++ src/recipes/lock/src/c/tests/TestClient.cc | 201 + src/recipes/lock/src/c/tests/TestDriver.cc | 114 + src/recipes/lock/src/c/tests/Util.cc | 30 + src/recipes/lock/src/c/tests/Util.h | 134 + src/recipes/lock/src/c/tests/zkServer.sh | 75 + .../zookeeper/recipes/lock/LockListener.java | 38 + .../recipes/lock/ProtocolSupport.java | 193 + .../zookeeper/recipes/lock/WriteLock.java | 296 ++ .../zookeeper/recipes/lock/ZNodeName.java | 112 + .../recipes/lock/ZooKeeperOperation.java | 38 + .../zookeeper/recipes/lock/WriteLockTest.java | 156 + .../zookeeper/recipes/lock/ZNodeNameTest.java | 71 + src/recipes/queue/README.txt | 30 + src/recipes/queue/build.xml | 128 + src/recipes/queue/src/c/INSTALL | 234 + src/recipes/queue/src/c/LICENSE | 202 + src/recipes/queue/src/c/Makefile.am | 46 + src/recipes/queue/src/c/README.txt | 30 + src/recipes/queue/src/c/acinclude.m4 | 312 ++ src/recipes/queue/src/c/aminclude.am | 186 + src/recipes/queue/src/c/c-doc.Doxyfile | 1252 +++++ src/recipes/queue/src/c/configure.ac | 82 + src/recipes/queue/src/c/include/zoo_queue.h | 118 + src/recipes/queue/src/c/src/zoo_queue.c | 442 ++ src/recipes/queue/src/c/tests/TestClient.cc | 452 ++ src/recipes/queue/src/c/tests/TestDriver.cc | 114 + src/recipes/queue/src/c/tests/Util.cc | 30 + src/recipes/queue/src/c/tests/Util.h | 134 + src/recipes/queue/src/c/tests/zkServer.sh | 75 + .../recipes/queue/DistributedQueue.java | 313 ++ .../recipes/queue/DistributedQueueTest.java | 286 ++ src/zookeeper.jute | 293 ++ 1039 files changed, 203756 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 LICENSE.txt create mode 100644 NOTICE.txt create mode 100644 README_packaging.txt create mode 100644 bin/README.txt create mode 100644 bin/zkCleanup.sh create mode 100644 bin/zkCli.cmd create mode 100644 bin/zkCli.sh create mode 100644 bin/zkEnv.cmd create mode 100644 bin/zkEnv.sh create mode 100644 bin/zkServer.cmd create mode 100644 bin/zkServer.sh create mode 100644 bin/zkTxnLogToolkit.cmd create mode 100644 bin/zkTxnLogToolkit.sh create mode 100644 build.xml create mode 100644 conf/configuration.xsl create mode 100644 conf/log4j.properties create mode 100644 conf/zoo.cfg create mode 100644 conf/zoo_sample.cfg create mode 100644 docs/bookkeeperConfig.html create mode 100644 docs/bookkeeperConfig.pdf create mode 100644 docs/bookkeeperOverview.html create mode 100644 docs/bookkeeperOverview.pdf create mode 100644 docs/bookkeeperProgrammer.html create mode 100644 docs/bookkeeperProgrammer.pdf create mode 100644 docs/bookkeeperStarted.html create mode 100644 docs/bookkeeperStarted.pdf create mode 100644 docs/bookkeeperStream.html create mode 100644 docs/bookkeeperStream.pdf create mode 100644 docs/broken-links.xml create mode 100644 docs/images/2pc.jpg create mode 100644 docs/images/bk-overview.jpg create mode 100644 docs/images/built-with-forrest-button.png create mode 100644 docs/images/favicon.ico create mode 100644 docs/images/hadoop-logo.jpg create mode 100644 docs/images/instruction_arrow.png create mode 100644 docs/images/state_dia.jpg create mode 100644 docs/images/zkcomponents.jpg create mode 100644 docs/images/zknamespace.jpg create mode 100644 docs/images/zkperfRW-3.2.jpg create mode 100644 docs/images/zkperfRW.jpg create mode 100644 docs/images/zkperfreliability.jpg create mode 100644 docs/images/zkservice.jpg create mode 100644 docs/images/zookeeper_small.gif create mode 100644 docs/index.html create mode 100644 docs/index.pdf create mode 100644 docs/javaExample.html create mode 100644 docs/javaExample.pdf create mode 100644 docs/linkmap.html create mode 100644 docs/linkmap.pdf create mode 100644 docs/recipes.html create mode 100644 docs/recipes.pdf create mode 100644 docs/releasenotes.html create mode 100644 docs/skin/CommonMessages_de.xml create mode 100644 docs/skin/CommonMessages_en_US.xml create mode 100644 docs/skin/CommonMessages_es.xml create mode 100644 docs/skin/CommonMessages_fr.xml create mode 100644 docs/skin/basic.css create mode 100644 docs/skin/breadcrumbs-optimized.js create mode 100644 docs/skin/breadcrumbs.js create mode 100644 docs/skin/fontsize.js create mode 100644 docs/skin/getBlank.js create mode 100644 docs/skin/getMenu.js create mode 100644 docs/skin/images/README.txt create mode 100644 docs/skin/images/add.jpg create mode 100644 docs/skin/images/apache-thanks.png create mode 100644 docs/skin/images/built-with-cocoon.gif create mode 100644 docs/skin/images/built-with-forrest-button.png create mode 100644 docs/skin/images/chapter.gif create mode 100644 docs/skin/images/chapter_open.gif create mode 100644 docs/skin/images/current.gif create mode 100644 docs/skin/images/error.png create mode 100644 docs/skin/images/external-link.gif create mode 100644 docs/skin/images/fix.jpg create mode 100644 docs/skin/images/forrest-credit-logo.png create mode 100644 docs/skin/images/hack.jpg create mode 100644 docs/skin/images/header_white_line.gif create mode 100644 docs/skin/images/info.png create mode 100644 docs/skin/images/instruction_arrow.png create mode 100644 docs/skin/images/label.gif create mode 100644 docs/skin/images/page.gif create mode 100644 docs/skin/images/pdfdoc.gif create mode 100644 docs/skin/images/poddoc.png create mode 100644 docs/skin/images/printer.gif create mode 100644 docs/skin/images/rc-b-l-15-1body-2menu-3menu.png create mode 100644 docs/skin/images/rc-b-r-15-1body-2menu-3menu.png create mode 100644 docs/skin/images/rc-b-r-5-1header-2tab-selected-3tab-selected.png create mode 100644 docs/skin/images/rc-t-l-5-1header-2searchbox-3searchbox.png create mode 100644 docs/skin/images/rc-t-l-5-1header-2tab-selected-3tab-selected.png create mode 100644 docs/skin/images/rc-t-l-5-1header-2tab-unselected-3tab-unselected.png create mode 100644 docs/skin/images/rc-t-r-15-1body-2menu-3menu.png create mode 100644 docs/skin/images/rc-t-r-5-1header-2searchbox-3searchbox.png create mode 100644 docs/skin/images/rc-t-r-5-1header-2tab-selected-3tab-selected.png create mode 100644 docs/skin/images/rc-t-r-5-1header-2tab-unselected-3tab-unselected.png create mode 100644 docs/skin/images/remove.jpg create mode 100644 docs/skin/images/rss.png create mode 100644 docs/skin/images/spacer.gif create mode 100644 docs/skin/images/success.png create mode 100644 docs/skin/images/txtdoc.png create mode 100644 docs/skin/images/update.jpg create mode 100644 docs/skin/images/valid-html401.png create mode 100644 docs/skin/images/vcss.png create mode 100644 docs/skin/images/warning.png create mode 100644 docs/skin/images/xmldoc.gif create mode 100644 docs/skin/menu.js create mode 100644 docs/skin/note.txt create mode 100644 docs/skin/print.css create mode 100644 docs/skin/profile.css create mode 100644 docs/skin/prototype.js create mode 100644 docs/skin/screen.css create mode 100644 docs/zookeeperAdmin.html create mode 100644 docs/zookeeperAdmin.pdf create mode 100644 docs/zookeeperHierarchicalQuorums.html create mode 100644 docs/zookeeperHierarchicalQuorums.pdf create mode 100644 docs/zookeeperInternals.html create mode 100644 docs/zookeeperInternals.pdf create mode 100644 docs/zookeeperJMX.html create mode 100644 docs/zookeeperJMX.pdf create mode 100644 docs/zookeeperObservers.html create mode 100644 docs/zookeeperObservers.pdf create mode 100644 docs/zookeeperOtherInfo.html create mode 100644 docs/zookeeperOtherInfo.pdf create mode 100644 docs/zookeeperOver.html create mode 100644 docs/zookeeperOver.pdf create mode 100644 docs/zookeeperProgrammers.html create mode 100644 docs/zookeeperProgrammers.pdf create mode 100644 docs/zookeeperQuotas.html create mode 100644 docs/zookeeperQuotas.pdf create mode 100644 docs/zookeeperReconfig.pdf create mode 100644 docs/zookeeperStarted.html create mode 100644 docs/zookeeperStarted.pdf create mode 100644 docs/zookeeperTutorial.html create mode 100644 docs/zookeeperTutorial.pdf create mode 100644 ivy.xml create mode 100644 ivysettings.xml create mode 100644 src/LICENSE.txt create mode 100644 src/NOTICE.txt create mode 100644 src/c/CMakeLists.txt create mode 100644 src/c/ChangeLog create mode 100644 src/c/INSTALL create mode 100644 src/c/LICENSE create mode 100644 src/c/Makefile.am create mode 100644 src/c/NOTICE.txt create mode 100644 src/c/README create mode 100644 src/c/acinclude.m4 create mode 100644 src/c/aminclude.am create mode 100644 src/c/c-doc.Doxyfile create mode 100644 src/c/cmake_config.h.in create mode 100644 src/c/configure.ac create mode 100644 src/c/include/proto.h create mode 100644 src/c/include/recordio.h create mode 100644 src/c/include/winconfig.h create mode 100644 src/c/include/zookeeper.h create mode 100644 src/c/include/zookeeper_log.h create mode 100644 src/c/include/zookeeper_version.h create mode 100644 src/c/src/cli.c create mode 100644 src/c/src/hashtable/LICENSE.txt create mode 100644 src/c/src/hashtable/hashtable.c create mode 100644 src/c/src/hashtable/hashtable.h create mode 100644 src/c/src/hashtable/hashtable_itr.c create mode 100644 src/c/src/hashtable/hashtable_itr.h create mode 100644 src/c/src/hashtable/hashtable_private.h create mode 100644 src/c/src/load_gen.c create mode 100644 src/c/src/mt_adaptor.c create mode 100644 src/c/src/recordio.c create mode 100644 src/c/src/st_adaptor.c create mode 100644 src/c/src/winport.c create mode 100644 src/c/src/winport.h create mode 100644 src/c/src/zk_adaptor.h create mode 100644 src/c/src/zk_hashtable.c create mode 100644 src/c/src/zk_hashtable.h create mode 100644 src/c/src/zk_log.c create mode 100644 src/c/src/zookeeper.c create mode 100644 src/c/tests/CollectionUtil.h create mode 100644 src/c/tests/CppAssertHelper.h create mode 100644 src/c/tests/LibCMocks.cc create mode 100644 src/c/tests/LibCMocks.h create mode 100644 src/c/tests/LibCSymTable.cc create mode 100644 src/c/tests/LibCSymTable.h create mode 100644 src/c/tests/MocksBase.cc create mode 100644 src/c/tests/MocksBase.h create mode 100644 src/c/tests/PthreadMocks.cc create mode 100644 src/c/tests/PthreadMocks.h create mode 100644 src/c/tests/TestClient.cc create mode 100644 src/c/tests/TestClientRetry.cc create mode 100644 src/c/tests/TestDriver.cc create mode 100644 src/c/tests/TestMulti.cc create mode 100644 src/c/tests/TestOperations.cc create mode 100644 src/c/tests/TestWatchers.cc create mode 100644 src/c/tests/TestZookeeperClose.cc create mode 100644 src/c/tests/TestZookeeperInit.cc create mode 100644 src/c/tests/ThreadingUtil.cc create mode 100644 src/c/tests/ThreadingUtil.h create mode 100644 src/c/tests/Util.cc create mode 100644 src/c/tests/Util.h create mode 100644 src/c/tests/Vector.h create mode 100644 src/c/tests/ZKMocks.cc create mode 100644 src/c/tests/ZKMocks.h create mode 100644 src/c/tests/wrappers-mt.opt create mode 100644 src/c/tests/wrappers.opt create mode 100644 src/c/tests/zkServer.sh create mode 100644 src/contrib/build-contrib.xml create mode 100644 src/contrib/build.xml create mode 100644 src/contrib/fatjar/README.txt create mode 100644 src/contrib/fatjar/build.xml create mode 100644 src/contrib/fatjar/conf/mainClasses create mode 100644 src/contrib/fatjar/src/java/org/apache/zookeeper/util/FatJarMain.java create mode 100644 src/contrib/huebrowser/README create mode 100644 src/contrib/huebrowser/zkui/Makefile create mode 100644 src/contrib/huebrowser/zkui/setup.py create mode 100644 src/contrib/huebrowser/zkui/src/zkui/__init__.py create mode 100644 src/contrib/huebrowser/zkui/src/zkui/forms.py create mode 100644 src/contrib/huebrowser/zkui/src/zkui/models.py create mode 100644 src/contrib/huebrowser/zkui/src/zkui/rest.py create mode 100644 src/contrib/huebrowser/zkui/src/zkui/settings.py create mode 100644 src/contrib/huebrowser/zkui/src/zkui/static/art/line_icons.png create mode 100644 src/contrib/huebrowser/zkui/src/zkui/static/art/zkui.png create mode 100644 src/contrib/huebrowser/zkui/src/zkui/static/bootstrap.js create mode 100644 src/contrib/huebrowser/zkui/src/zkui/static/css/zkui.css create mode 100644 src/contrib/huebrowser/zkui/src/zkui/static/help/index.html create mode 100644 src/contrib/huebrowser/zkui/src/zkui/static/js/Source/Zkui/Zkui.js create mode 100644 src/contrib/huebrowser/zkui/src/zkui/static/js/package.yml create mode 100644 src/contrib/huebrowser/zkui/src/zkui/stats.py create mode 100644 src/contrib/huebrowser/zkui/src/zkui/templates/clients.mako create mode 100644 src/contrib/huebrowser/zkui/src/zkui/templates/create.mako create mode 100644 src/contrib/huebrowser/zkui/src/zkui/templates/edit.mako create mode 100644 src/contrib/huebrowser/zkui/src/zkui/templates/index.mako create mode 100644 src/contrib/huebrowser/zkui/src/zkui/templates/shared_components.mako create mode 100644 src/contrib/huebrowser/zkui/src/zkui/templates/tree.mako create mode 100644 src/contrib/huebrowser/zkui/src/zkui/templates/view.mako create mode 100644 src/contrib/huebrowser/zkui/src/zkui/urls.py create mode 100644 src/contrib/huebrowser/zkui/src/zkui/utils.py create mode 100644 src/contrib/huebrowser/zkui/src/zkui/views.py create mode 100644 src/contrib/huebrowser/zkui/src/zkui/windmilltests.py create mode 100644 src/contrib/loggraph/README.txt create mode 100644 src/contrib/loggraph/bin/loggraph-dev.sh create mode 100644 src/contrib/loggraph/bin/loggraph.sh create mode 100644 src/contrib/loggraph/build.xml create mode 100644 src/contrib/loggraph/ivy.xml create mode 100644 src/contrib/loggraph/src/java/org/apache/zookeeper/graph/FilterException.java create mode 100644 src/contrib/loggraph/src/java/org/apache/zookeeper/graph/FilterOp.java create mode 100644 src/contrib/loggraph/src/java/org/apache/zookeeper/graph/FilterParser.java create mode 100644 src/contrib/loggraph/src/java/org/apache/zookeeper/graph/JsonGenerator.java create mode 100644 src/contrib/loggraph/src/java/org/apache/zookeeper/graph/Log4JEntry.java create mode 100644 src/contrib/loggraph/src/java/org/apache/zookeeper/graph/Log4JSource.java create mode 100644 src/contrib/loggraph/src/java/org/apache/zookeeper/graph/LogEntry.java create mode 100644 src/contrib/loggraph/src/java/org/apache/zookeeper/graph/LogIterator.java create mode 100644 src/contrib/loggraph/src/java/org/apache/zookeeper/graph/LogServer.java create mode 100644 src/contrib/loggraph/src/java/org/apache/zookeeper/graph/LogSkipList.java create mode 100644 src/contrib/loggraph/src/java/org/apache/zookeeper/graph/LogSource.java create mode 100644 src/contrib/loggraph/src/java/org/apache/zookeeper/graph/MeasureThroughput.java create mode 100644 src/contrib/loggraph/src/java/org/apache/zookeeper/graph/MergedLogSource.java create mode 100644 src/contrib/loggraph/src/java/org/apache/zookeeper/graph/RandomAccessFileReader.java create mode 100644 src/contrib/loggraph/src/java/org/apache/zookeeper/graph/TransactionEntry.java create mode 100644 src/contrib/loggraph/src/java/org/apache/zookeeper/graph/TxnLogSource.java create mode 100644 src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/AndOp.java create mode 100644 src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/Arg.java create mode 100644 src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/EqualsOp.java create mode 100644 src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/GreaterThanOp.java create mode 100644 src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/LessThanOp.java create mode 100644 src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/NotOp.java create mode 100644 src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/NumberArg.java create mode 100644 src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/OrOp.java create mode 100644 src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/StringArg.java create mode 100644 src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/SymbolArg.java create mode 100644 src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/XorOp.java create mode 100644 src/contrib/loggraph/src/java/org/apache/zookeeper/graph/servlets/FileLoader.java create mode 100644 src/contrib/loggraph/src/java/org/apache/zookeeper/graph/servlets/Fs.java create mode 100644 src/contrib/loggraph/src/java/org/apache/zookeeper/graph/servlets/GraphData.java create mode 100644 src/contrib/loggraph/src/java/org/apache/zookeeper/graph/servlets/JsonServlet.java create mode 100644 src/contrib/loggraph/src/java/org/apache/zookeeper/graph/servlets/NumEvents.java create mode 100644 src/contrib/loggraph/src/java/org/apache/zookeeper/graph/servlets/StaticContent.java create mode 100644 src/contrib/loggraph/src/java/org/apache/zookeeper/graph/servlets/Throughput.java create mode 100644 src/contrib/loggraph/web/org/apache/zookeeper/graph/log4j.properties create mode 100644 src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/date.format.js create mode 100644 src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/g.bar.js create mode 100644 src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/g.dot.js create mode 100644 src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/g.line.js create mode 100644 src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/g.pie.js create mode 100644 src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/g.raphael.js create mode 100644 src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/load-big.gif create mode 100644 src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/load.gif create mode 100644 src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/loggraph.css create mode 100644 src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/loggraph.js create mode 100644 src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/loggraph.log.js create mode 100644 src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/loggraph.server.js create mode 100644 src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/loggraph.session.js create mode 100644 src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/loggraph.stats.js create mode 100644 src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/loggraph.ui.js create mode 100644 src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/main.html create mode 100644 src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/raphael.js create mode 100644 src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/yui-min.js create mode 100644 src/contrib/monitoring/JMX-RESOURCES create mode 100644 src/contrib/monitoring/README create mode 100644 src/contrib/monitoring/cacti/README create mode 100644 src/contrib/monitoring/check_zookeeper.py create mode 100644 src/contrib/monitoring/ganglia/README create mode 100644 src/contrib/monitoring/ganglia/Screenshot.png create mode 100644 src/contrib/monitoring/ganglia/modpython.conf create mode 100644 src/contrib/monitoring/ganglia/zookeeper.pyconf create mode 100644 src/contrib/monitoring/ganglia/zookeeper_ganglia.py create mode 100644 src/contrib/monitoring/nagios/README.txt create mode 100644 src/contrib/monitoring/nagios/Screenshot-1.png create mode 100644 src/contrib/monitoring/nagios/Screenshot.png create mode 100644 src/contrib/monitoring/nagios/hostgroups.cfg create mode 100644 src/contrib/monitoring/nagios/services.cfg create mode 100644 src/contrib/monitoring/nagios/zookeeper.cfg create mode 100644 src/contrib/monitoring/test.py create mode 100644 src/contrib/rest/NOTICE.txt create mode 100644 src/contrib/rest/README.txt create mode 100644 src/contrib/rest/SPEC.txt create mode 100644 src/contrib/rest/build.xml create mode 100644 src/contrib/rest/conf/keys/README create mode 100644 src/contrib/rest/conf/keys/rest.cer create mode 100644 src/contrib/rest/conf/keys/rest.jks create mode 100644 src/contrib/rest/conf/log4j.properties create mode 100644 src/contrib/rest/conf/rest.properties create mode 100644 src/contrib/rest/ivy.xml create mode 100644 src/contrib/rest/rest.sh create mode 100644 src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/RestMain.java create mode 100644 src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/ZooKeeperService.java create mode 100644 src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/cfg/Credentials.java create mode 100644 src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/cfg/Endpoint.java create mode 100644 src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/cfg/HostPort.java create mode 100644 src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/cfg/HostPortSet.java create mode 100644 src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/cfg/RestCfg.java create mode 100644 src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/filters/HTTPBasicAuth.java create mode 100644 src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/jaxb/ZChildren.java create mode 100644 src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/jaxb/ZChildrenJSON.java create mode 100644 src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/jaxb/ZError.java create mode 100644 src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/jaxb/ZPath.java create mode 100644 src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/jaxb/ZSession.java create mode 100644 src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/jaxb/ZStat.java create mode 100644 src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/resources/JAXBContextResolver.java create mode 100644 src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/resources/KeeperExceptionMapper.java create mode 100644 src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/resources/RuntimeExceptionMapper.java create mode 100644 src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/resources/SessionsResource.java create mode 100644 src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/resources/ZErrorWriter.java create mode 100644 src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/resources/ZNodeResource.java create mode 100644 src/contrib/rest/src/python/README.txt create mode 100644 src/contrib/rest/src/python/demo_master_election.py create mode 100644 src/contrib/rest/src/python/demo_queue.py create mode 100644 src/contrib/rest/src/python/test.py create mode 100644 src/contrib/rest/src/python/zk_dump_tree.py create mode 100644 src/contrib/rest/src/python/zkrest.py create mode 100644 src/contrib/rest/src/test/org/apache/zookeeper/server/jersey/Base.java create mode 100644 src/contrib/rest/src/test/org/apache/zookeeper/server/jersey/CreateTest.java create mode 100644 src/contrib/rest/src/test/org/apache/zookeeper/server/jersey/DeleteTest.java create mode 100644 src/contrib/rest/src/test/org/apache/zookeeper/server/jersey/ExistsTest.java create mode 100644 src/contrib/rest/src/test/org/apache/zookeeper/server/jersey/GetChildrenTest.java create mode 100644 src/contrib/rest/src/test/org/apache/zookeeper/server/jersey/GetTest.java create mode 100644 src/contrib/rest/src/test/org/apache/zookeeper/server/jersey/RestTestSuite.java create mode 100644 src/contrib/rest/src/test/org/apache/zookeeper/server/jersey/RootTest.java create mode 100644 src/contrib/rest/src/test/org/apache/zookeeper/server/jersey/SessionTest.java create mode 100644 src/contrib/rest/src/test/org/apache/zookeeper/server/jersey/SetTest.java create mode 100644 src/contrib/rest/src/test/org/apache/zookeeper/server/jersey/WadlTest.java create mode 100644 src/contrib/rest/src/test/zkServer.sh create mode 100644 src/contrib/zkfuse/Makefile.am create mode 100644 src/contrib/zkfuse/README.txt create mode 100644 src/contrib/zkfuse/build.xml create mode 100644 src/contrib/zkfuse/configure.ac create mode 100644 src/contrib/zkfuse/src/Makefile.am create mode 100644 src/contrib/zkfuse/src/blockingqueue.h create mode 100644 src/contrib/zkfuse/src/doxygen.cfg create mode 100644 src/contrib/zkfuse/src/event.cc create mode 100644 src/contrib/zkfuse/src/event.h create mode 100644 src/contrib/zkfuse/src/log.cc create mode 100644 src/contrib/zkfuse/src/log.h create mode 100644 src/contrib/zkfuse/src/log4cxx.properties create mode 100644 src/contrib/zkfuse/src/mutex.h create mode 100644 src/contrib/zkfuse/src/thread.cc create mode 100644 src/contrib/zkfuse/src/thread.h create mode 100644 src/contrib/zkfuse/src/zkadapter.cc create mode 100644 src/contrib/zkfuse/src/zkadapter.h create mode 100644 src/contrib/zkfuse/src/zkfuse.cc create mode 100644 src/contrib/zkperl/Changes create mode 100644 src/contrib/zkperl/LICENSE create mode 100644 src/contrib/zkperl/MANIFEST create mode 100644 src/contrib/zkperl/Makefile.PL create mode 100644 src/contrib/zkperl/NOTICE create mode 100644 src/contrib/zkperl/README create mode 100644 src/contrib/zkperl/ZooKeeper.pm create mode 100644 src/contrib/zkperl/ZooKeeper.xs create mode 100644 src/contrib/zkperl/build.xml create mode 100644 src/contrib/zkperl/t/10_invalid.t create mode 100644 src/contrib/zkperl/t/15_thread.t create mode 100644 src/contrib/zkperl/t/20_tie.t create mode 100644 src/contrib/zkperl/t/22_stat_tie.t create mode 100644 src/contrib/zkperl/t/24_watch_tie.t create mode 100644 src/contrib/zkperl/t/30_connect.t create mode 100644 src/contrib/zkperl/t/35_log.t create mode 100644 src/contrib/zkperl/t/40_basic.t create mode 100644 src/contrib/zkperl/t/45_class.t create mode 100644 src/contrib/zkperl/t/50_access.t create mode 100644 src/contrib/zkperl/t/60_watch.t create mode 100644 src/contrib/zkperl/t/util.pl create mode 100644 src/contrib/zkperl/typemap create mode 100644 src/contrib/zkpython/README create mode 100644 src/contrib/zkpython/build.xml create mode 100644 src/contrib/zkpython/ivy.xml create mode 100644 src/contrib/zkpython/src/c/pyzk_docstrings.h create mode 100644 src/contrib/zkpython/src/c/zookeeper.c create mode 100644 src/contrib/zkpython/src/examples/README create mode 100644 src/contrib/zkpython/src/examples/watch_znode_for_changes.py create mode 100644 src/contrib/zkpython/src/packages/deb/zkpython.control/control create mode 100644 src/contrib/zkpython/src/packages/rpm/spec/zkpython.spec create mode 100644 src/contrib/zkpython/src/python/setup.py create mode 100644 src/contrib/zkpython/src/python/zk.py create mode 100644 src/contrib/zkpython/src/test/acl_test.py create mode 100644 src/contrib/zkpython/src/test/async_test.py create mode 100644 src/contrib/zkpython/src/test/callback_test.py create mode 100644 src/contrib/zkpython/src/test/clientid_test.py create mode 100644 src/contrib/zkpython/src/test/close_deadlock_test.py create mode 100644 src/contrib/zkpython/src/test/connection_test.py create mode 100644 src/contrib/zkpython/src/test/create_test.py create mode 100644 src/contrib/zkpython/src/test/delete_test.py create mode 100644 src/contrib/zkpython/src/test/exists_test.py create mode 100644 src/contrib/zkpython/src/test/get_set_test.py create mode 100644 src/contrib/zkpython/src/test/run_tests.sh create mode 100644 src/contrib/zkpython/src/test/zkServer.sh create mode 100644 src/contrib/zkpython/src/test/zktestbase.py create mode 100644 src/contrib/zktreeutil/Makefile.am create mode 100644 src/contrib/zktreeutil/README.txt create mode 100644 src/contrib/zktreeutil/build.xml create mode 100644 src/contrib/zktreeutil/configure.ac create mode 100644 src/contrib/zktreeutil/src/Makefile.am create mode 100644 src/contrib/zktreeutil/src/SimpleTree.h create mode 100644 src/contrib/zktreeutil/src/ZkAdaptor.cc create mode 100644 src/contrib/zktreeutil/src/ZkAdaptor.h create mode 100644 src/contrib/zktreeutil/src/ZkTreeUtil.cc create mode 100644 src/contrib/zktreeutil/src/ZkTreeUtil.h create mode 100644 src/contrib/zktreeutil/src/ZkTreeUtilMain.cc create mode 100644 src/contrib/zktreeutil/tests/zk_sample.xml create mode 100644 src/contrib/zooinspector/NOTICE.txt create mode 100644 src/contrib/zooinspector/README.txt create mode 100644 src/contrib/zooinspector/build.xml create mode 100644 src/contrib/zooinspector/config/defaultConnectionSettings.cfg create mode 100644 src/contrib/zooinspector/config/defaultNodeVeiwers.cfg create mode 100644 src/contrib/zooinspector/icons/edtsrclkup_co.gif create mode 100644 src/contrib/zooinspector/icons/file_obj.gif create mode 100644 src/contrib/zooinspector/icons/fldr_obj.gif create mode 100644 src/contrib/zooinspector/icons/info_obj.gif create mode 100644 src/contrib/zooinspector/icons/jspdecl.gif create mode 100644 src/contrib/zooinspector/icons/launch_run.gif create mode 100644 src/contrib/zooinspector/icons/launch_stop.gif create mode 100644 src/contrib/zooinspector/icons/new_con.gif create mode 100644 src/contrib/zooinspector/icons/refresh.gif create mode 100644 src/contrib/zooinspector/icons/save_edit.gif create mode 100644 src/contrib/zooinspector/icons/search_next.gif create mode 100644 src/contrib/zooinspector/icons/search_prev.gif create mode 100644 src/contrib/zooinspector/icons/trash.gif create mode 100644 src/contrib/zooinspector/ivy.xml create mode 100644 src/contrib/zooinspector/lib/jtoaster-1.0.4.jar create mode 100644 src/contrib/zooinspector/lib/log4j.properties create mode 100644 src/contrib/zooinspector/licences/Apache Software Licence v2.0.txt create mode 100644 src/contrib/zooinspector/licences/epl-v10.html create mode 100644 src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/ZooInspector.java create mode 100644 src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/encryption/BasicDataEncryptionManager.java create mode 100644 src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/encryption/DataEncryptionManager.java create mode 100644 src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/NodeViewersChangeListener.java create mode 100644 src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/ZooInspectorAboutDialog.java create mode 100644 src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/ZooInspectorConnectionPropertiesDialog.java create mode 100644 src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/ZooInspectorIconResources.java create mode 100644 src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/ZooInspectorNodeViewersDialog.java create mode 100644 src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/ZooInspectorNodeViewersPanel.java create mode 100644 src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/ZooInspectorPanel.java create mode 100644 src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/ZooInspectorTreeViewer.java create mode 100644 src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/about.html create mode 100644 src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/nodeviewer/NodeViewerACL.java create mode 100644 src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/nodeviewer/NodeViewerData.java create mode 100644 src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/nodeviewer/NodeViewerMetaData.java create mode 100644 src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/nodeviewer/ZooInspectorNodeViewer.java create mode 100644 src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/logger/LoggerFactory.java create mode 100644 src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/manager/NodeListener.java create mode 100644 src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/manager/Pair.java create mode 100644 src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/manager/ZooInspectorManager.java create mode 100644 src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/manager/ZooInspectorManagerImpl.java create mode 100644 src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/manager/ZooInspectorNodeManager.java create mode 100644 src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/manager/ZooInspectorNodeTreeManager.java create mode 100644 src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/manager/ZooInspectorReadOnlyManager.java create mode 100644 src/contrib/zooinspector/src/java/org/apache/zookeeper/retry/ZooKeeperRetry.java create mode 100644 src/contrib/zooinspector/zooInspector-dev.sh create mode 100644 src/contrib/zooinspector/zooInspector.cmd create mode 100644 src/contrib/zooinspector/zooInspector.sh create mode 100644 src/docs/forrest.properties create mode 100644 src/docs/src/documentation/README.txt create mode 100644 src/docs/src/documentation/TODO.txt create mode 100644 src/docs/src/documentation/classes/CatalogManager.properties create mode 100644 src/docs/src/documentation/conf/cli.xconf create mode 100644 src/docs/src/documentation/content/xdocs/bookkeeperConfig.xml create mode 100644 src/docs/src/documentation/content/xdocs/bookkeeperOverview.xml create mode 100644 src/docs/src/documentation/content/xdocs/bookkeeperProgrammer.xml create mode 100644 src/docs/src/documentation/content/xdocs/bookkeeperStarted.xml create mode 100644 src/docs/src/documentation/content/xdocs/bookkeeperStream.xml create mode 100644 src/docs/src/documentation/content/xdocs/index.xml create mode 100644 src/docs/src/documentation/content/xdocs/javaExample.xml create mode 100644 src/docs/src/documentation/content/xdocs/recipes.xml create mode 100644 src/docs/src/documentation/content/xdocs/site.xml create mode 100644 src/docs/src/documentation/content/xdocs/tabs.xml create mode 100644 src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml create mode 100644 src/docs/src/documentation/content/xdocs/zookeeperHierarchicalQuorums.xml create mode 100644 src/docs/src/documentation/content/xdocs/zookeeperInternals.xml create mode 100644 src/docs/src/documentation/content/xdocs/zookeeperJMX.xml create mode 100644 src/docs/src/documentation/content/xdocs/zookeeperObservers.xml create mode 100644 src/docs/src/documentation/content/xdocs/zookeeperOtherInfo.xml create mode 100644 src/docs/src/documentation/content/xdocs/zookeeperOver.xml create mode 100644 src/docs/src/documentation/content/xdocs/zookeeperProgrammers.xml create mode 100644 src/docs/src/documentation/content/xdocs/zookeeperQuotas.xml create mode 100644 src/docs/src/documentation/content/xdocs/zookeeperStarted.xml create mode 100644 src/docs/src/documentation/content/xdocs/zookeeperTutorial.xml create mode 100644 src/docs/src/documentation/resources/images/2pc.jpg create mode 100644 src/docs/src/documentation/resources/images/bk-overview.jpg create mode 100644 src/docs/src/documentation/resources/images/favicon.ico create mode 100644 src/docs/src/documentation/resources/images/hadoop-logo.jpg create mode 100644 src/docs/src/documentation/resources/images/state_dia.dia create mode 100644 src/docs/src/documentation/resources/images/state_dia.jpg create mode 100644 src/docs/src/documentation/resources/images/zkarch.jpg create mode 100644 src/docs/src/documentation/resources/images/zkcomponents.jpg create mode 100644 src/docs/src/documentation/resources/images/zknamespace.jpg create mode 100644 src/docs/src/documentation/resources/images/zkperfRW-3.2.jpg create mode 100644 src/docs/src/documentation/resources/images/zkperfRW.jpg create mode 100644 src/docs/src/documentation/resources/images/zkperfreliability.jpg create mode 100644 src/docs/src/documentation/resources/images/zkservice.jpg create mode 100644 src/docs/src/documentation/resources/images/zookeeper_small.gif create mode 100644 src/docs/src/documentation/skinconf.xml create mode 100644 src/docs/status.xml create mode 100644 src/java/OldChangeLog create mode 100644 src/java/lhh/com/lhh/corator/CoratorSessionExample.java create mode 100644 src/java/lhh/com/lhh/corator/LeaderLatchExample.java create mode 100644 src/java/lhh/com/lhh/corator/LeaderSelectorExample.java create mode 100644 src/java/lhh/com/lhh/corator/ZkCoratorTest.java create mode 100644 src/java/lhh/com/lhh/native1/client/ZookeeperClientTest.java create mode 100644 src/java/lhh/com/lhh/zkclient/WatchClient.java create mode 100644 src/java/lhh/com/lhh/zkclient/client.java create mode 100644 src/java/lib/cobertura/README.txt create mode 100644 src/java/lib/curator/curator-client-4.0.1.jar create mode 100644 src/java/lib/curator/curator-framework-4.0.1.jar create mode 100644 src/java/lib/curator/curator-recipes-4.0.1.jar create mode 100644 src/java/lib/curator/curator-test-4.0.1.jar create mode 100644 src/java/lib/jdiff/zookeeper_3.1.1.xml create mode 100644 src/java/lib/jline-0.9.94.LICENSE.txt create mode 100644 src/java/lib/log4j-1.2.17.LICENSE.txt create mode 100644 src/java/lib/slf4j-1.7.25.LICENSE.txt create mode 100644 src/java/lib/zkclient-0.3.jar create mode 100644 src/java/main/log4j.properties create mode 100644 src/java/main/org/apache/jute/BinaryInputArchive.java create mode 100644 src/java/main/org/apache/jute/BinaryOutputArchive.java create mode 100644 src/java/main/org/apache/jute/CsvInputArchive.java create mode 100644 src/java/main/org/apache/jute/CsvOutputArchive.java create mode 100644 src/java/main/org/apache/jute/Index.java create mode 100644 src/java/main/org/apache/jute/InputArchive.java create mode 100644 src/java/main/org/apache/jute/OutputArchive.java create mode 100644 src/java/main/org/apache/jute/Record.java create mode 100644 src/java/main/org/apache/jute/RecordReader.java create mode 100644 src/java/main/org/apache/jute/RecordWriter.java create mode 100644 src/java/main/org/apache/jute/Utils.java create mode 100644 src/java/main/org/apache/jute/XmlInputArchive.java create mode 100644 src/java/main/org/apache/jute/XmlOutputArchive.java create mode 100644 src/java/main/org/apache/jute/compiler/CGenerator.java create mode 100644 src/java/main/org/apache/jute/compiler/CSharpGenerator.java create mode 100644 src/java/main/org/apache/jute/compiler/CppGenerator.java create mode 100644 src/java/main/org/apache/jute/compiler/JBoolean.java create mode 100644 src/java/main/org/apache/jute/compiler/JBuffer.java create mode 100644 src/java/main/org/apache/jute/compiler/JByte.java create mode 100644 src/java/main/org/apache/jute/compiler/JCompType.java create mode 100644 src/java/main/org/apache/jute/compiler/JDouble.java create mode 100644 src/java/main/org/apache/jute/compiler/JField.java create mode 100644 src/java/main/org/apache/jute/compiler/JFile.java create mode 100644 src/java/main/org/apache/jute/compiler/JFloat.java create mode 100644 src/java/main/org/apache/jute/compiler/JInt.java create mode 100644 src/java/main/org/apache/jute/compiler/JLong.java create mode 100644 src/java/main/org/apache/jute/compiler/JMap.java create mode 100644 src/java/main/org/apache/jute/compiler/JRecord.java create mode 100644 src/java/main/org/apache/jute/compiler/JString.java create mode 100644 src/java/main/org/apache/jute/compiler/JType.java create mode 100644 src/java/main/org/apache/jute/compiler/JVector.java create mode 100644 src/java/main/org/apache/jute/compiler/JavaGenerator.java create mode 100644 src/java/main/org/apache/jute/compiler/generated/ParseException.java create mode 100644 src/java/main/org/apache/jute/compiler/generated/Rcc.java create mode 100644 src/java/main/org/apache/jute/compiler/generated/RccConstants.java create mode 100644 src/java/main/org/apache/jute/compiler/generated/RccTokenManager.java create mode 100644 src/java/main/org/apache/jute/compiler/generated/SimpleCharStream.java create mode 100644 src/java/main/org/apache/jute/compiler/generated/Token.java create mode 100644 src/java/main/org/apache/jute/compiler/generated/TokenMgrError.java create mode 100644 src/java/main/org/apache/jute/compiler/generated/package.html create mode 100644 src/java/main/org/apache/jute/compiler/generated/rcc.jj create mode 100644 src/java/main/org/apache/jute/compiler/package.html create mode 100644 src/java/main/org/apache/jute/package.html create mode 100644 src/java/main/org/apache/zookeeper/AsyncCallback.java create mode 100644 src/java/main/org/apache/zookeeper/ClientCnxn.java create mode 100644 src/java/main/org/apache/zookeeper/ClientCnxnSocket.java create mode 100644 src/java/main/org/apache/zookeeper/ClientCnxnSocketNIO.java create mode 100644 src/java/main/org/apache/zookeeper/ClientWatchManager.java create mode 100644 src/java/main/org/apache/zookeeper/CreateMode.java create mode 100644 src/java/main/org/apache/zookeeper/Environment.java create mode 100644 src/java/main/org/apache/zookeeper/JLineZNodeCompletor.java create mode 100644 src/java/main/org/apache/zookeeper/KeeperException.java create mode 100644 src/java/main/org/apache/zookeeper/Login.java create mode 100644 src/java/main/org/apache/zookeeper/MultiResponse.java create mode 100644 src/java/main/org/apache/zookeeper/MultiTransactionRecord.java create mode 100644 src/java/main/org/apache/zookeeper/Op.java create mode 100644 src/java/main/org/apache/zookeeper/OpResult.java create mode 100644 src/java/main/org/apache/zookeeper/Quotas.java create mode 100644 src/java/main/org/apache/zookeeper/SaslClientCallbackHandler.java create mode 100644 src/java/main/org/apache/zookeeper/ServerAdminClient.java create mode 100644 src/java/main/org/apache/zookeeper/Shell.java create mode 100644 src/java/main/org/apache/zookeeper/StatsTrack.java create mode 100644 src/java/main/org/apache/zookeeper/Testable.java create mode 100644 src/java/main/org/apache/zookeeper/Transaction.java create mode 100644 src/java/main/org/apache/zookeeper/Version.java create mode 100644 src/java/main/org/apache/zookeeper/WatchedEvent.java create mode 100644 src/java/main/org/apache/zookeeper/Watcher.java create mode 100644 src/java/main/org/apache/zookeeper/ZKUtil.java create mode 100644 src/java/main/org/apache/zookeeper/ZooDefs.java create mode 100644 src/java/main/org/apache/zookeeper/ZooKeeper.java create mode 100644 src/java/main/org/apache/zookeeper/ZooKeeperMain.java create mode 100644 src/java/main/org/apache/zookeeper/ZooKeeperTestable.java create mode 100644 src/java/main/org/apache/zookeeper/client/ConnectStringParser.java create mode 100644 src/java/main/org/apache/zookeeper/client/FourLetterWordMain.java create mode 100644 src/java/main/org/apache/zookeeper/client/HostProvider.java create mode 100644 src/java/main/org/apache/zookeeper/client/StaticHostProvider.java create mode 100644 src/java/main/org/apache/zookeeper/client/ZooKeeperSaslClient.java create mode 100644 src/java/main/org/apache/zookeeper/common/AtomicFileOutputStream.java create mode 100644 src/java/main/org/apache/zookeeper/common/IOUtils.java create mode 100644 src/java/main/org/apache/zookeeper/common/PathTrie.java create mode 100644 src/java/main/org/apache/zookeeper/common/PathUtils.java create mode 100644 src/java/main/org/apache/zookeeper/common/Time.java create mode 100644 src/java/main/org/apache/zookeeper/jmx/CommonNames.java create mode 100644 src/java/main/org/apache/zookeeper/jmx/MBeanRegistry.java create mode 100644 src/java/main/org/apache/zookeeper/jmx/ManagedUtil.java create mode 100644 src/java/main/org/apache/zookeeper/jmx/ZKMBeanInfo.java create mode 100644 src/java/main/org/apache/zookeeper/server/ByteBufferInputStream.java create mode 100644 src/java/main/org/apache/zookeeper/server/ByteBufferOutputStream.java create mode 100644 src/java/main/org/apache/zookeeper/server/ConnectionBean.java create mode 100644 src/java/main/org/apache/zookeeper/server/ConnectionMXBean.java create mode 100644 src/java/main/org/apache/zookeeper/server/DataNode.java create mode 100644 src/java/main/org/apache/zookeeper/server/DataTree.java create mode 100644 src/java/main/org/apache/zookeeper/server/DataTreeBean.java create mode 100644 src/java/main/org/apache/zookeeper/server/DataTreeMXBean.java create mode 100644 src/java/main/org/apache/zookeeper/server/DatadirCleanupManager.java create mode 100644 src/java/main/org/apache/zookeeper/server/ExitCode.java create mode 100644 src/java/main/org/apache/zookeeper/server/FinalRequestProcessor.java create mode 100644 src/java/main/org/apache/zookeeper/server/LogFormatter.java create mode 100644 src/java/main/org/apache/zookeeper/server/NIOServerCnxn.java create mode 100644 src/java/main/org/apache/zookeeper/server/NIOServerCnxnFactory.java create mode 100644 src/java/main/org/apache/zookeeper/server/NettyServerCnxn.java create mode 100644 src/java/main/org/apache/zookeeper/server/NettyServerCnxnFactory.java create mode 100644 src/java/main/org/apache/zookeeper/server/ObserverBean.java create mode 100644 src/java/main/org/apache/zookeeper/server/PrepRequestProcessor.java create mode 100644 src/java/main/org/apache/zookeeper/server/PurgeTxnLog.java create mode 100644 src/java/main/org/apache/zookeeper/server/ReferenceCountedACLCache.java create mode 100644 src/java/main/org/apache/zookeeper/server/Request.java create mode 100644 src/java/main/org/apache/zookeeper/server/RequestProcessor.java create mode 100644 src/java/main/org/apache/zookeeper/server/ServerCnxn.java create mode 100644 src/java/main/org/apache/zookeeper/server/ServerCnxnFactory.java create mode 100644 src/java/main/org/apache/zookeeper/server/ServerConfig.java create mode 100644 src/java/main/org/apache/zookeeper/server/ServerStats.java create mode 100644 src/java/main/org/apache/zookeeper/server/SessionTracker.java create mode 100644 src/java/main/org/apache/zookeeper/server/SessionTrackerImpl.java create mode 100644 src/java/main/org/apache/zookeeper/server/SnapshotFormatter.java create mode 100644 src/java/main/org/apache/zookeeper/server/Stats.java create mode 100644 src/java/main/org/apache/zookeeper/server/SyncRequestProcessor.java create mode 100644 src/java/main/org/apache/zookeeper/server/TraceFormatter.java create mode 100644 src/java/main/org/apache/zookeeper/server/UnimplementedRequestProcessor.java create mode 100644 src/java/main/org/apache/zookeeper/server/WatchManager.java create mode 100644 src/java/main/org/apache/zookeeper/server/ZKDatabase.java create mode 100644 src/java/main/org/apache/zookeeper/server/ZooKeeperCriticalThread.java create mode 100644 src/java/main/org/apache/zookeeper/server/ZooKeeperSaslServer.java create mode 100644 src/java/main/org/apache/zookeeper/server/ZooKeeperServer.java create mode 100644 src/java/main/org/apache/zookeeper/server/ZooKeeperServerBean.java create mode 100644 src/java/main/org/apache/zookeeper/server/ZooKeeperServerListener.java create mode 100644 src/java/main/org/apache/zookeeper/server/ZooKeeperServerListenerImpl.java create mode 100644 src/java/main/org/apache/zookeeper/server/ZooKeeperServerMXBean.java create mode 100644 src/java/main/org/apache/zookeeper/server/ZooKeeperServerMain.java create mode 100644 src/java/main/org/apache/zookeeper/server/ZooKeeperServerShutdownHandler.java create mode 100644 src/java/main/org/apache/zookeeper/server/ZooKeeperThread.java create mode 100644 src/java/main/org/apache/zookeeper/server/ZooTrace.java create mode 100644 src/java/main/org/apache/zookeeper/server/auth/AuthenticationProvider.java create mode 100644 src/java/main/org/apache/zookeeper/server/auth/DigestAuthenticationProvider.java create mode 100644 src/java/main/org/apache/zookeeper/server/auth/DigestLoginModule.java create mode 100644 src/java/main/org/apache/zookeeper/server/auth/IPAuthenticationProvider.java create mode 100644 src/java/main/org/apache/zookeeper/server/auth/KerberosName.java create mode 100644 src/java/main/org/apache/zookeeper/server/auth/ProviderRegistry.java create mode 100644 src/java/main/org/apache/zookeeper/server/auth/SASLAuthenticationProvider.java create mode 100644 src/java/main/org/apache/zookeeper/server/auth/SaslServerCallbackHandler.java create mode 100644 src/java/main/org/apache/zookeeper/server/package.html create mode 100644 src/java/main/org/apache/zookeeper/server/persistence/FilePadding.java create mode 100644 src/java/main/org/apache/zookeeper/server/persistence/FileSnap.java create mode 100644 src/java/main/org/apache/zookeeper/server/persistence/FileTxnLog.java create mode 100644 src/java/main/org/apache/zookeeper/server/persistence/FileTxnSnapLog.java create mode 100644 src/java/main/org/apache/zookeeper/server/persistence/SnapShot.java create mode 100644 src/java/main/org/apache/zookeeper/server/persistence/TxnLog.java create mode 100644 src/java/main/org/apache/zookeeper/server/persistence/TxnLogToolkit.java create mode 100644 src/java/main/org/apache/zookeeper/server/persistence/TxnLogToolkitCliParser.java create mode 100644 src/java/main/org/apache/zookeeper/server/persistence/Util.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/AckRequestProcessor.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/AuthFastLeaderElection.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/CommitProcessor.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/Election.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/FastLeaderElection.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/Follower.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/FollowerBean.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/FollowerMXBean.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/FollowerRequestProcessor.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/FollowerZooKeeperServer.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/Leader.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/LeaderBean.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/LeaderElection.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/LeaderElectionBean.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/LeaderElectionMXBean.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/LeaderMXBean.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/LeaderZooKeeperServer.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/Learner.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/LearnerHandler.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/LearnerSessionTracker.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/LearnerSyncRequest.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/LearnerZooKeeperServer.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/LocalPeerBean.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/LocalPeerMXBean.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/Observer.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/ObserverMXBean.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/ObserverRequestProcessor.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/ObserverZooKeeperServer.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/ProposalRequestProcessor.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/ProposalStats.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/QuorumBean.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/QuorumCnxManager.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/QuorumMXBean.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerMain.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/QuorumStats.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/QuorumZooKeeperServer.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/ReadOnlyBean.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/ReadOnlyRequestProcessor.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/ReadOnlyZooKeeperServer.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/RemotePeerBean.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/RemotePeerMXBean.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/SendAckRequestProcessor.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/ServerBean.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/ServerMXBean.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/StateSummary.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/Vote.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/auth/NullQuorumAuthLearner.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/auth/NullQuorumAuthServer.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/auth/QuorumAuth.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/auth/QuorumAuthLearner.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/auth/QuorumAuthServer.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/auth/SaslQuorumAuthLearner.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/auth/SaslQuorumAuthServer.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/auth/SaslQuorumServerCallbackHandler.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/flexible/QuorumHierarchical.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/flexible/QuorumMaj.java create mode 100644 src/java/main/org/apache/zookeeper/server/quorum/flexible/QuorumVerifier.java create mode 100644 src/java/main/org/apache/zookeeper/server/upgrade/DataNodeV1.java create mode 100644 src/java/main/org/apache/zookeeper/server/upgrade/DataTreeV1.java create mode 100644 src/java/main/org/apache/zookeeper/server/upgrade/UpgradeMain.java create mode 100644 src/java/main/org/apache/zookeeper/server/upgrade/UpgradeSnapShot.java create mode 100644 src/java/main/org/apache/zookeeper/server/upgrade/UpgradeSnapShotV1.java create mode 100644 src/java/main/org/apache/zookeeper/server/util/KerberosUtil.java create mode 100644 src/java/main/org/apache/zookeeper/server/util/OSMXBean.java create mode 100644 src/java/main/org/apache/zookeeper/server/util/Profiler.java create mode 100644 src/java/main/org/apache/zookeeper/server/util/SerializeUtils.java create mode 100644 src/java/main/org/apache/zookeeper/server/util/ZxidUtils.java create mode 100644 src/java/main/org/apache/zookeeper/util/SecurityUtils.java create mode 100644 src/java/main/org/apache/zookeeper/version/util/VerGen.java create mode 100644 src/java/main/overview.html create mode 100644 src/java/systest/README.txt create mode 100644 src/java/systest/org/apache/zookeeper/test/system/BaseSysTest.java create mode 100644 src/java/systest/org/apache/zookeeper/test/system/DuplicateNameException.java create mode 100644 src/java/systest/org/apache/zookeeper/test/system/GenerateLoad.java create mode 100644 src/java/systest/org/apache/zookeeper/test/system/Instance.java create mode 100644 src/java/systest/org/apache/zookeeper/test/system/InstanceContainer.java create mode 100644 src/java/systest/org/apache/zookeeper/test/system/InstanceManager.java create mode 100644 src/java/systest/org/apache/zookeeper/test/system/NoAssignmentException.java create mode 100644 src/java/systest/org/apache/zookeeper/test/system/NoAvailableContainers.java create mode 100644 src/java/systest/org/apache/zookeeper/test/system/QuorumPeerInstance.java create mode 100644 src/java/systest/org/apache/zookeeper/test/system/SimpleClient.java create mode 100644 src/java/systest/org/apache/zookeeper/test/system/SimpleSysTest.java create mode 100644 src/java/test/bin/check_compatibility.py create mode 100644 src/java/test/bin/test-github-pr.sh create mode 100644 src/java/test/bin/test-patch.properties create mode 100644 src/java/test/bin/test-patch.sh create mode 100644 src/java/test/checkstyle-noframes-sorted.xsl create mode 100644 src/java/test/checkstyle.xml create mode 100644 src/java/test/config/findbugsExcludeFile.xml create mode 100644 src/java/test/data/buffersize/create/version-2/log.1 create mode 100644 src/java/test/data/buffersize/create/version-2/snapshot.0 create mode 100644 src/java/test/data/buffersize/set/version-2/log.1 create mode 100644 src/java/test/data/buffersize/set/version-2/snapshot.0 create mode 100644 src/java/test/data/buffersize/snapshot/version-2/log.1 create mode 100644 src/java/test/data/buffersize/snapshot/version-2/snapshot.0 create mode 100644 src/java/test/data/buffersize/snapshot/version-2/snapshot.2 create mode 100644 src/java/test/data/invalidsnap/version-2/log.1 create mode 100644 src/java/test/data/invalidsnap/version-2/log.274 create mode 100644 src/java/test/data/invalidsnap/version-2/log.42 create mode 100644 src/java/test/data/invalidsnap/version-2/log.63b create mode 100644 src/java/test/data/invalidsnap/version-2/snapshot.0 create mode 100644 src/java/test/data/invalidsnap/version-2/snapshot.272 create mode 100644 src/java/test/data/invalidsnap/version-2/snapshot.273 create mode 100644 src/java/test/data/invalidsnap/version-2/snapshot.639 create mode 100644 src/java/test/data/invalidsnap/version-2/snapshot.83f create mode 100644 src/java/test/data/kerberos/minikdc-krb5.conf create mode 100644 src/java/test/data/kerberos/minikdc.ldiff create mode 100644 src/java/test/data/upgrade/log.100000001 create mode 100644 src/java/test/data/upgrade/log.100001bf0 create mode 100644 src/java/test/data/upgrade/snapshot.100000000 create mode 100644 src/java/test/data/upgrade/snapshot.100001bec create mode 100644 src/java/test/org/apache/jute/BinaryInputArchiveTest.java create mode 100644 src/java/test/org/apache/zookeeper/ClientReconnectTest.java create mode 100644 src/java/test/org/apache/zookeeper/JUnit4ZKTestRunner.java create mode 100644 src/java/test/org/apache/zookeeper/JaasConfiguration.java create mode 100644 src/java/test/org/apache/zookeeper/MockPacket.java create mode 100644 src/java/test/org/apache/zookeeper/MultiResponseTest.java create mode 100644 src/java/test/org/apache/zookeeper/MultiTransactionRecordTest.java create mode 100644 src/java/test/org/apache/zookeeper/PortAssignment.java create mode 100644 src/java/test/org/apache/zookeeper/SaslAuthTest.java create mode 100644 src/java/test/org/apache/zookeeper/ServerConfigTest.java create mode 100644 src/java/test/org/apache/zookeeper/TestableZooKeeper.java create mode 100644 src/java/test/org/apache/zookeeper/VerGenTest.java create mode 100644 src/java/test/org/apache/zookeeper/ZKTestCase.java create mode 100644 src/java/test/org/apache/zookeeper/ZooKeeperTest.java create mode 100644 src/java/test/org/apache/zookeeper/common/TimeTest.java create mode 100644 src/java/test/org/apache/zookeeper/server/CRCTest.java create mode 100644 src/java/test/org/apache/zookeeper/server/DataNodeTest.java create mode 100644 src/java/test/org/apache/zookeeper/server/DataTreeTest.java create mode 100644 src/java/test/org/apache/zookeeper/server/DataTreeUnitTest.java create mode 100644 src/java/test/org/apache/zookeeper/server/DatadirCleanupManagerTest.java create mode 100644 src/java/test/org/apache/zookeeper/server/DeserializationPerfTest.java create mode 100644 src/java/test/org/apache/zookeeper/server/InvalidSnapCountTest.java create mode 100644 src/java/test/org/apache/zookeeper/server/InvalidSnapshotTest.java create mode 100644 src/java/test/org/apache/zookeeper/server/MockNIOServerCnxn.java create mode 100644 src/java/test/org/apache/zookeeper/server/NIOServerCnxnTest.java create mode 100644 src/java/test/org/apache/zookeeper/server/NettyServerCnxnTest.java create mode 100644 src/java/test/org/apache/zookeeper/server/PrepRequestProcessorTest.java create mode 100644 src/java/test/org/apache/zookeeper/server/PurgeTxnTest.java create mode 100644 src/java/test/org/apache/zookeeper/server/ReferenceCountedACLCacheTest.java create mode 100644 src/java/test/org/apache/zookeeper/server/SerializationPerfTest.java create mode 100644 src/java/test/org/apache/zookeeper/server/ServerCnxnFactoryAccessor.java create mode 100644 src/java/test/org/apache/zookeeper/server/ServerStatsTest.java create mode 100644 src/java/test/org/apache/zookeeper/server/SessionTrackerTest.java create mode 100644 src/java/test/org/apache/zookeeper/server/ToStringTest.java create mode 100644 src/java/test/org/apache/zookeeper/server/ZooKeeperServerMainTest.java create mode 100644 src/java/test/org/apache/zookeeper/server/ZooKeeperServerStartupTest.java create mode 100644 src/java/test/org/apache/zookeeper/server/ZooKeeperServerTest.java create mode 100644 src/java/test/org/apache/zookeeper/server/ZooKeeperThreadTest.java create mode 100644 src/java/test/org/apache/zookeeper/server/ZxidRolloverTest.java create mode 100644 src/java/test/org/apache/zookeeper/server/persistence/FileTxnLogTest.java create mode 100644 src/java/test/org/apache/zookeeper/server/persistence/FileTxnSnapLogTest.java create mode 100644 src/java/test/org/apache/zookeeper/server/persistence/TxnLogToolkitCliParserTest.java create mode 100644 src/java/test/org/apache/zookeeper/server/persistence/TxnLogToolkitTest.java create mode 100644 src/java/test/org/apache/zookeeper/server/quorum/CnxManagerTest.java create mode 100644 src/java/test/org/apache/zookeeper/server/quorum/EphemeralNodeDeletionTest.java create mode 100644 src/java/test/org/apache/zookeeper/server/quorum/FLEBackwardElectionRoundTest.java create mode 100644 src/java/test/org/apache/zookeeper/server/quorum/FLECompatibilityTest.java create mode 100644 src/java/test/org/apache/zookeeper/server/quorum/FLEDontCareTest.java create mode 100644 src/java/test/org/apache/zookeeper/server/quorum/FLELostMessageTest.java create mode 100644 src/java/test/org/apache/zookeeper/server/quorum/FLETestUtils.java create mode 100644 src/java/test/org/apache/zookeeper/server/quorum/LeaderBeanTest.java create mode 100644 src/java/test/org/apache/zookeeper/server/quorum/LeaderWithObserverTest.java create mode 100644 src/java/test/org/apache/zookeeper/server/quorum/LearnerTest.java create mode 100644 src/java/test/org/apache/zookeeper/server/quorum/ProposalStatsTest.java create mode 100644 src/java/test/org/apache/zookeeper/server/quorum/QuorumCnxManagerTest.java create mode 100644 src/java/test/org/apache/zookeeper/server/quorum/QuorumPeerMainTest.java create mode 100644 src/java/test/org/apache/zookeeper/server/quorum/QuorumPeerTestBase.java create mode 100644 src/java/test/org/apache/zookeeper/server/quorum/WatchLeakTest.java create mode 100644 src/java/test/org/apache/zookeeper/server/quorum/Zab1_0Test.java create mode 100644 src/java/test/org/apache/zookeeper/server/quorum/ZabUtils.java create mode 100644 src/java/test/org/apache/zookeeper/server/quorum/auth/KerberosSecurityTestcase.java create mode 100644 src/java/test/org/apache/zookeeper/server/quorum/auth/KerberosTestUtils.java create mode 100644 src/java/test/org/apache/zookeeper/server/quorum/auth/MiniKdc.java create mode 100644 src/java/test/org/apache/zookeeper/server/quorum/auth/MiniKdcTest.java create mode 100644 src/java/test/org/apache/zookeeper/server/quorum/auth/QuorumAuthTestBase.java create mode 100644 src/java/test/org/apache/zookeeper/server/quorum/auth/QuorumAuthUpgradeTest.java create mode 100644 src/java/test/org/apache/zookeeper/server/quorum/auth/QuorumDigestAuthTest.java create mode 100644 src/java/test/org/apache/zookeeper/server/quorum/auth/QuorumKerberosAuthTest.java create mode 100644 src/java/test/org/apache/zookeeper/server/quorum/auth/QuorumKerberosHostBasedAuthTest.java create mode 100644 src/java/test/org/apache/zookeeper/server/util/PortForwarder.java create mode 100644 src/java/test/org/apache/zookeeper/server/util/SerializeUtilsTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/ACLCountTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/ACLRootTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/ACLTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/AsyncHammerTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/AsyncOps.java create mode 100644 src/java/test/org/apache/zookeeper/test/AsyncOpsTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/AsyncTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/AtomicFileOutputStreamTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/AuthTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/BufferSizeTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/ChrootAsyncTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/ChrootClientTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/ChrootTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/ClientBase.java create mode 100644 src/java/test/org/apache/zookeeper/test/ClientHammerTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/ClientPortBindTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/ClientRetry.java create mode 100644 src/java/test/org/apache/zookeeper/test/ClientTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/ConnectStringParserTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/CreateModeTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/DisconnectableZooKeeper.java create mode 100644 src/java/test/org/apache/zookeeper/test/DisconnectedWatcherTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/EventTypeTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/FLENewEpochTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/FLEPredicateTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/FLERestartTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/FLETest.java create mode 100644 src/java/test/org/apache/zookeeper/test/FLEZeroWeightTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/FollowerResyncConcurrencyTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/FollowerTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/FourLetterWordsQuorumTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/FourLetterWordsTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/FourLetterWordsWhiteListTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/GetChildren2Test.java create mode 100644 src/java/test/org/apache/zookeeper/test/HierarchicalQuorumTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/IntegrityCheck.java create mode 100644 src/java/test/org/apache/zookeeper/test/InvalidSnapshotTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/JMXEnv.java create mode 100644 src/java/test/org/apache/zookeeper/test/KeeperStateTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/LENonTerminateTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/LETest.java create mode 100644 src/java/test/org/apache/zookeeper/test/LoadFromLogNoServerTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/LoadFromLogTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/MaxCnxnsTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/MultiTransactionTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/NioNettySuiteBase.java create mode 100644 src/java/test/org/apache/zookeeper/test/NioNettySuiteHammerTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/NioNettySuiteTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/NonRecoverableErrorTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/NullDataTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/OOMTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/OSMXBeanTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/ObserverHierarchicalQuorumTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/ObserverLETest.java create mode 100644 src/java/test/org/apache/zookeeper/test/ObserverQuorumHammerTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/ObserverTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/QuorumBase.java create mode 100644 src/java/test/org/apache/zookeeper/test/QuorumHammerTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/QuorumQuotaTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/QuorumTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/QuorumUtil.java create mode 100644 src/java/test/org/apache/zookeeper/test/QuorumZxidSyncTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/ReadOnlyModeTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/RecoveryTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/RepeatStartupTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/RestoreCommittedLogTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/SaslAuthDesignatedClientTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/SaslAuthDesignatedServerTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/SaslAuthFailDesignatedClientTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/SaslAuthFailNotifyTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/SaslAuthFailTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/SaslAuthMissingClientConfigTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/SaslClientTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/SessionInvalidationTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/SessionTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/SessionTimeoutTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/SledgeHammer.java create mode 100644 src/java/test/org/apache/zookeeper/test/StandaloneTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/StatTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/StaticHostProviderTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/SyncCallTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/TestHammer.java create mode 100644 src/java/test/org/apache/zookeeper/test/TestUtils.java create mode 100644 src/java/test/org/apache/zookeeper/test/TruncateTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/UpgradeTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/WatchEventWhenAutoReset.java create mode 100644 src/java/test/org/apache/zookeeper/test/WatchedEventTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/WatcherFuncTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/WatcherTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/ZkDatabaseCorruptionTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/ZooKeeperQuotaTest.java create mode 100644 src/java/test/org/apache/zookeeper/test/ZooKeeperTestClient.java create mode 100644 src/lastRevision.bat create mode 100644 src/lastRevision.sh create mode 100644 src/packages/deb/init.d/zookeeper create mode 100644 src/packages/deb/zookeeper.control/conffile create mode 100644 src/packages/deb/zookeeper.control/control create mode 100644 src/packages/deb/zookeeper.control/postinst create mode 100644 src/packages/deb/zookeeper.control/postrm create mode 100644 src/packages/deb/zookeeper.control/preinst create mode 100644 src/packages/deb/zookeeper.control/prerm create mode 100644 src/packages/rpm/init.d/zookeeper create mode 100644 src/packages/rpm/spec/zookeeper.spec create mode 100644 src/packages/templates/conf/zookeeper-env.sh create mode 100644 src/packages/update-zookeeper-env.sh create mode 100644 src/pom.template create mode 100644 src/recipes/README.txt create mode 100644 src/recipes/build-recipes.xml create mode 100644 src/recipes/build.xml create mode 100644 src/recipes/election/README.txt create mode 100644 src/recipes/election/build.xml create mode 100644 src/recipes/election/src/java/org/apache/zookeeper/recipes/leader/LeaderElectionAware.java create mode 100644 src/recipes/election/src/java/org/apache/zookeeper/recipes/leader/LeaderElectionSupport.java create mode 100644 src/recipes/election/src/java/org/apache/zookeeper/recipes/leader/LeaderOffer.java create mode 100644 src/recipes/election/test/org/apache/zookeeper/recipes/leader/LeaderElectionSupportTest.java create mode 100644 src/recipes/lock/README.txt create mode 100644 src/recipes/lock/build.xml create mode 100644 src/recipes/lock/src/c/INSTALL create mode 100644 src/recipes/lock/src/c/LICENSE create mode 100644 src/recipes/lock/src/c/Makefile.am create mode 100644 src/recipes/lock/src/c/README.txt create mode 100644 src/recipes/lock/src/c/acinclude.m4 create mode 100644 src/recipes/lock/src/c/aminclude.am create mode 100644 src/recipes/lock/src/c/c-doc.Doxyfile create mode 100644 src/recipes/lock/src/c/configure.ac create mode 100644 src/recipes/lock/src/c/include/zoo_lock.h create mode 100644 src/recipes/lock/src/c/src/zoo_lock.c create mode 100644 src/recipes/lock/src/c/tests/TestClient.cc create mode 100644 src/recipes/lock/src/c/tests/TestDriver.cc create mode 100644 src/recipes/lock/src/c/tests/Util.cc create mode 100644 src/recipes/lock/src/c/tests/Util.h create mode 100644 src/recipes/lock/src/c/tests/zkServer.sh create mode 100644 src/recipes/lock/src/java/org/apache/zookeeper/recipes/lock/LockListener.java create mode 100644 src/recipes/lock/src/java/org/apache/zookeeper/recipes/lock/ProtocolSupport.java create mode 100644 src/recipes/lock/src/java/org/apache/zookeeper/recipes/lock/WriteLock.java create mode 100644 src/recipes/lock/src/java/org/apache/zookeeper/recipes/lock/ZNodeName.java create mode 100644 src/recipes/lock/src/java/org/apache/zookeeper/recipes/lock/ZooKeeperOperation.java create mode 100644 src/recipes/lock/test/org/apache/zookeeper/recipes/lock/WriteLockTest.java create mode 100644 src/recipes/lock/test/org/apache/zookeeper/recipes/lock/ZNodeNameTest.java create mode 100644 src/recipes/queue/README.txt create mode 100644 src/recipes/queue/build.xml create mode 100644 src/recipes/queue/src/c/INSTALL create mode 100644 src/recipes/queue/src/c/LICENSE create mode 100644 src/recipes/queue/src/c/Makefile.am create mode 100644 src/recipes/queue/src/c/README.txt create mode 100644 src/recipes/queue/src/c/acinclude.m4 create mode 100644 src/recipes/queue/src/c/aminclude.am create mode 100644 src/recipes/queue/src/c/c-doc.Doxyfile create mode 100644 src/recipes/queue/src/c/configure.ac create mode 100644 src/recipes/queue/src/c/include/zoo_queue.h create mode 100644 src/recipes/queue/src/c/src/zoo_queue.c create mode 100644 src/recipes/queue/src/c/tests/TestClient.cc create mode 100644 src/recipes/queue/src/c/tests/TestDriver.cc create mode 100644 src/recipes/queue/src/c/tests/Util.cc create mode 100644 src/recipes/queue/src/c/tests/Util.h create mode 100644 src/recipes/queue/src/c/tests/zkServer.sh create mode 100644 src/recipes/queue/src/java/org/apache/zookeeper/recipes/queue/DistributedQueue.java create mode 100644 src/recipes/queue/test/org/apache/zookeeper/recipes/queue/DistributedQueueTest.java create mode 100644 src/zookeeper.jute diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..af96048 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,19 @@ +# Auto detect text files and perform LF normalization +* text=auto + +*.cs text diff=csharp +*.java text diff=java +*.html text diff=html +*.py text diff=python +*.pl text diff=perl +*.pm text diff=perl +*.css text +*.js text +*.sql text + +*.sh text eol=lf + +*.bat text eol=crlf +*.cmd text eol=crlf +*.csproj text merge=union eol=crlf +*.sln text merge=union eol=crlf diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f89c90a --- /dev/null +++ b/.gitignore @@ -0,0 +1,81 @@ +# Java +hs_err_pid* + +# Git +*.orij +*.rej + +# SVN +.svn +.revision + +# Eclipse +.metadata +.classpath +.eclipse/ +.idea/ +.project +.revision/ +.settings/ +.externalToolBuilders/ +local.properties +.recommenders +*.launch +build/ +target/ +out/ + +# Intellij +*.ipr +*.iws +*.iml + +# NetBeans +*~.nib +nbbuild/ +dist/ +nbdist/ +.ndb-gradle/ +.cproject +.buildpath + +# Other +*~ +logs/ +*.out +*.log +*.bak +*.tmp +tmp/** +tmp/**/* +.DS_Store +.gradle +*.patch +*.swp + +# C +tags +.cproject +.project +obj +src/c/core.* +src/c/TEST-*.txt +src/c/*.la +src/c/*.lo +src/c/*.o +src/c/generated/ +src/java/generated/ +src/java/lib/ant-eclipse-* +src/java/lib/ivy-* +src/c/Makefile.in +src/c/aclocal.m4 +src/c/autom4te.cache/ +src/c/compile +src/c/config.guess +src/c/config.h.in +src/c/config.sub +src/c/configure +src/c/depcomp +src/c/install-sh +src/c/ltmain.sh +src/c/missing diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/NOTICE.txt b/NOTICE.txt new file mode 100644 index 0000000..1ae3351 --- /dev/null +++ b/NOTICE.txt @@ -0,0 +1,5 @@ +Apache ZooKeeper +Copyright 2009-2018 The Apache Software Foundation + +This product includes software developed at +The Apache Software Foundation (http://www.apache.org/). diff --git a/README_packaging.txt b/README_packaging.txt new file mode 100644 index 0000000..48b6918 --- /dev/null +++ b/README_packaging.txt @@ -0,0 +1,65 @@ +README file for Packaging Notes + +Requirement +----------- + +gcc, cppunit and python-setuptools are required to build +C and python bindings. + +On RHEL machine: + +yum install cppunit +yum install python-setuptools + +On Ubuntu: + +apt-get --install cppunit +apt-get --install python-setuptools + +Package build command +--------------------- + +Command to build Debian package: ant deb +Command to build RPM Package: ant rpm + +rpm and deb packages are generated and placed in: + +build/zookeeper*.[rpm|deb] +build/contrib/**.[rpm|deb] + +Default package file structure layout + + /usr/bin - User executable + /usr/sbin - System executable + /usr/libexec - Configuration boot trap script + /usr/lib - Native libraries + /usr/share/doc/zookeeper - Documents + /usr/share/zookeeper - Project files + /usr/share/zookeeper/template/conf - Configuration template files + /etc/zookeeper - Configuration files + /etc/init.d/zookeeper - OS startup script + +Source file structure layout +--------------------- + +src/packages/update-zookeeper-env.sh + - setup environment variables and symlink $PREFIX/etc/zookeeper to + /etc/zookeeper. + - This script is designed to run in post installation, and pre-remove + phase of ZooKeeper package. + - Run update-zookeeper-env.sh -h to get a list of supported parameters. + +src/packages/template + - Standard configuration template + +src/packages/deb + Meta data for creating Debian package + +src/packages/deb/init.d + Daemon start/stop script for Debian flavor of Linux + +src/packages/rpm + Meta data for creating RPM package + +src/packages/rpm/init.d + Daemon start/stop script for Redhat flavor of Linux diff --git a/bin/README.txt b/bin/README.txt new file mode 100644 index 0000000..e70506d --- /dev/null +++ b/bin/README.txt @@ -0,0 +1,6 @@ +This directory contain scripts that allow easy access (classpath in particular) +to the ZooKeeper server and command line client. + +Files ending in .sh are unix and cygwin compatible + +Files ending in .cmd are msdos/windows compatible diff --git a/bin/zkCleanup.sh b/bin/zkCleanup.sh new file mode 100644 index 0000000..38ee2e8 --- /dev/null +++ b/bin/zkCleanup.sh @@ -0,0 +1,51 @@ +#!/usr/bin/env bash + +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# +# This script cleans up old transaction logs and snapshots +# + +# +# If this scripted is run out of /usr/bin or some other system bin directory +# it should be linked to and not copied. Things like java jar files are found +# relative to the canonical path of this script. +# + +# use POSTIX interface, symlink is followed automatically +ZOOBIN="${BASH_SOURCE-$0}" +ZOOBIN="$(dirname "${ZOOBIN}")" +ZOOBINDIR="$(cd "${ZOOBIN}"; pwd)" + +if [ -e "$ZOOBIN/../libexec/zkEnv.sh" ]; then + . "$ZOOBINDIR"/../libexec/zkEnv.sh +else + . "$ZOOBINDIR"/zkEnv.sh +fi + +ZOODATADIR="$(grep "^[[:space:]]*dataDir=" "$ZOOCFG" | sed -e 's/.*=//')" +ZOODATALOGDIR="$(grep "^[[:space:]]*dataLogDir=" "$ZOOCFG" | sed -e 's/.*=//')" + +if [ "x$ZOODATALOGDIR" = "x" ] +then +"$JAVA" "-Dzookeeper.log.dir=${ZOO_LOG_DIR}" "-Dzookeeper.root.logger=${ZOO_LOG4J_PROP}" \ + -cp "$CLASSPATH" $JVMFLAGS \ + org.apache.zookeeper.server.PurgeTxnLog "$ZOODATADIR" $* +else +"$JAVA" "-Dzookeeper.log.dir=${ZOO_LOG_DIR}" "-Dzookeeper.root.logger=${ZOO_LOG4J_PROP}" \ + -cp "$CLASSPATH" $JVMFLAGS \ + org.apache.zookeeper.server.PurgeTxnLog "$ZOODATALOGDIR" "$ZOODATADIR" $* +fi diff --git a/bin/zkCli.cmd b/bin/zkCli.cmd new file mode 100644 index 0000000..0ffa030 --- /dev/null +++ b/bin/zkCli.cmd @@ -0,0 +1,24 @@ +@echo off +REM Licensed to the Apache Software Foundation (ASF) under one or more +REM contributor license agreements. See the NOTICE file distributed with +REM this work for additional information regarding copyright ownership. +REM The ASF licenses this file to You under the Apache License, Version 2.0 +REM (the "License"); you may not use this file except in compliance with +REM the License. You may obtain a copy of the License at +REM +REM http://www.apache.org/licenses/LICENSE-2.0 +REM +REM Unless required by applicable law or agreed to in writing, software +REM distributed under the License is distributed on an "AS IS" BASIS, +REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +REM See the License for the specific language governing permissions and +REM limitations under the License. + +setlocal +call "%~dp0zkEnv.cmd" + +set ZOOMAIN=org.apache.zookeeper.ZooKeeperMain +call %JAVA% "-Dzookeeper.log.dir=%ZOO_LOG_DIR%" "-Dzookeeper.root.logger=%ZOO_LOG4J_PROP%" -cp "%CLASSPATH%" %ZOOMAIN% %* + +endlocal + diff --git a/bin/zkCli.sh b/bin/zkCli.sh new file mode 100644 index 0000000..992a913 --- /dev/null +++ b/bin/zkCli.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env bash + +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# +# This script cleans up old transaction logs and snapshots +# + +# +# If this scripted is run out of /usr/bin or some other system bin directory +# it should be linked to and not copied. Things like java jar files are found +# relative to the canonical path of this script. +# + +# use POSTIX interface, symlink is followed automatically +ZOOBIN="${BASH_SOURCE-$0}" +ZOOBIN="$(dirname "${ZOOBIN}")" +ZOOBINDIR="$(cd "${ZOOBIN}"; pwd)" + +if [ -e "$ZOOBIN/../libexec/zkEnv.sh" ]; then + . "$ZOOBINDIR"/../libexec/zkEnv.sh +else + . "$ZOOBINDIR"/zkEnv.sh +fi + +"$JAVA" "-Dzookeeper.log.dir=${ZOO_LOG_DIR}" "-Dzookeeper.root.logger=${ZOO_LOG4J_PROP}" \ + -cp "$CLASSPATH" $CLIENT_JVMFLAGS $JVMFLAGS \ + org.apache.zookeeper.ZooKeeperMain "$@" diff --git a/bin/zkEnv.cmd b/bin/zkEnv.cmd new file mode 100644 index 0000000..fbc017f --- /dev/null +++ b/bin/zkEnv.cmd @@ -0,0 +1,52 @@ +@echo off +REM Licensed to the Apache Software Foundation (ASF) under one or more +REM contributor license agreements. See the NOTICE file distributed with +REM this work for additional information regarding copyright ownership. +REM The ASF licenses this file to You under the Apache License, Version 2.0 +REM (the "License"); you may not use this file except in compliance with +REM the License. You may obtain a copy of the License at +REM +REM http://www.apache.org/licenses/LICENSE-2.0 +REM +REM Unless required by applicable law or agreed to in writing, software +REM distributed under the License is distributed on an "AS IS" BASIS, +REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +REM See the License for the specific language governing permissions and +REM limitations under the License. + +set ZOOCFGDIR=%~dp0%..\conf +set ZOO_LOG_DIR=%~dp0%.. +set ZOO_LOG4J_PROP=INFO,CONSOLE + +REM for sanity sake assume Java 1.6 +REM see: http://java.sun.com/javase/6/docs/technotes/tools/windows/java.html + +REM add the zoocfg dir to classpath +set CLASSPATH=%ZOOCFGDIR% + +REM make it work in the release +SET CLASSPATH=%~dp0..\*;%~dp0..\lib\*;%CLASSPATH% + +REM make it work for developers +SET CLASSPATH=%~dp0..\build\classes;%~dp0..\build\lib\*;%CLASSPATH% + +set ZOOCFG=%ZOOCFGDIR%\zoo.cfg + +@REM setup java environment variables + +if not defined JAVA_HOME ( + echo Error: JAVA_HOME is not set. + goto :eof +) + +set JAVA_HOME=%JAVA_HOME:"=% + +if not exist "%JAVA_HOME%"\bin\java.exe ( + echo Error: JAVA_HOME is incorrectly set. + goto :eof +) + +REM strip off trailing \ from JAVA_HOME or java does not start +if "%JAVA_HOME:~-1%" EQU "\" set "JAVA_HOME=%JAVA_HOME:~0,-1%" + +set JAVA="%JAVA_HOME%"\bin\java diff --git a/bin/zkEnv.sh b/bin/zkEnv.sh new file mode 100644 index 0000000..43cbc22 --- /dev/null +++ b/bin/zkEnv.sh @@ -0,0 +1,115 @@ +#!/usr/bin/env bash + +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# This script should be sourced into other zookeeper +# scripts to setup the env variables + +# We use ZOOCFGDIR if defined, +# otherwise we use /etc/zookeeper +# or the conf directory that is +# a sibling of this script's directory + +ZOOBINDIR="${ZOOBINDIR:-/usr/bin}" +ZOOKEEPER_PREFIX="${ZOOBINDIR}/.." + +if [ "x$ZOOCFGDIR" = "x" ] +then + if [ -e "${ZOOKEEPER_PREFIX}/conf" ]; then + ZOOCFGDIR="$ZOOBINDIR/../conf" + else + ZOOCFGDIR="$ZOOBINDIR/../etc/zookeeper" + fi +fi + +if [ -f "${ZOOCFGDIR}/zookeeper-env.sh" ]; then + . "${ZOOCFGDIR}/zookeeper-env.sh" +fi + +if [ "x$ZOOCFG" = "x" ] +then + ZOOCFG="zoo.cfg" +fi + +ZOOCFG="$ZOOCFGDIR/$ZOOCFG" + +if [ -f "$ZOOCFGDIR/java.env" ] +then + . "$ZOOCFGDIR/java.env" +fi + +if [ "x${ZOO_LOG_DIR}" = "x" ] +then + ZOO_LOG_DIR="." +fi + +if [ "x${ZOO_LOG4J_PROP}" = "x" ] +then + ZOO_LOG4J_PROP="INFO,CONSOLE" +fi + +if [ "$JAVA_HOME" != "" ]; then + JAVA="$JAVA_HOME/bin/java" +else + JAVA=java +fi + +#add the zoocfg dir to classpath +CLASSPATH="$ZOOCFGDIR:$CLASSPATH" + +for i in "$ZOOBINDIR"/../src/java/lib/*.jar +do + CLASSPATH="$i:$CLASSPATH" +done + +#make it work in the binary package +#(use array for LIBPATH to account for spaces within wildcard expansion) +if [ -e "${ZOOKEEPER_PREFIX}"/share/zookeeper/zookeeper-*.jar ]; then + LIBPATH=("${ZOOKEEPER_PREFIX}"/share/zookeeper/*.jar) +else + #release tarball format + for i in "$ZOOBINDIR"/../zookeeper-*.jar + do + CLASSPATH="$i:$CLASSPATH" + done + LIBPATH=("${ZOOBINDIR}"/../lib/*.jar) +fi + +for i in "${LIBPATH[@]}" +do + CLASSPATH="$i:$CLASSPATH" +done + +#make it work for developers +for d in "$ZOOBINDIR"/../build/lib/*.jar +do + CLASSPATH="$d:$CLASSPATH" +done + +#make it work for developers +CLASSPATH="$ZOOBINDIR/../build/classes:$CLASSPATH" + +case "`uname`" in + CYGWIN*) cygwin=true ;; + *) cygwin=false ;; +esac + +if $cygwin +then + CLASSPATH=`cygpath -wp "$CLASSPATH"` +fi + +#echo "CLASSPATH=$CLASSPATH" \ No newline at end of file diff --git a/bin/zkServer.cmd b/bin/zkServer.cmd new file mode 100644 index 0000000..6b4cf02 --- /dev/null +++ b/bin/zkServer.cmd @@ -0,0 +1,24 @@ +@echo off +REM Licensed to the Apache Software Foundation (ASF) under one or more +REM contributor license agreements. See the NOTICE file distributed with +REM this work for additional information regarding copyright ownership. +REM The ASF licenses this file to You under the Apache License, Version 2.0 +REM (the "License"); you may not use this file except in compliance with +REM the License. You may obtain a copy of the License at +REM +REM http://www.apache.org/licenses/LICENSE-2.0 +REM +REM Unless required by applicable law or agreed to in writing, software +REM distributed under the License is distributed on an "AS IS" BASIS, +REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +REM See the License for the specific language governing permissions and +REM limitations under the License. + +setlocal +call "%~dp0zkEnv.cmd" + +set ZOOMAIN=org.apache.zookeeper.server.quorum.QuorumPeerMain +echo on +call %JAVA% "-Dzookeeper.log.dir=%ZOO_LOG_DIR%" "-Dzookeeper.root.logger=%ZOO_LOG4J_PROP%" -cp "%CLASSPATH%" %ZOOMAIN% "%ZOOCFG%" %* + +endlocal diff --git a/bin/zkServer.sh b/bin/zkServer.sh new file mode 100644 index 0000000..51dbe9f --- /dev/null +++ b/bin/zkServer.sh @@ -0,0 +1,225 @@ +#!/usr/bin/env bash + +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# +# If this scripted is run out of /usr/bin or some other system bin directory +# it should be linked to and not copied. Things like java jar files are found +# relative to the canonical path of this script. +# + + + +# use POSTIX interface, symlink is followed automatically +ZOOBIN="${BASH_SOURCE-$0}" +ZOOBIN="$(dirname "${ZOOBIN}")" +ZOOBINDIR="$(cd "${ZOOBIN}"; pwd)" + +if [ -e "$ZOOBIN/../libexec/zkEnv.sh" ]; then + . "$ZOOBINDIR/../libexec/zkEnv.sh" +else + . "$ZOOBINDIR/zkEnv.sh" +fi + +# See the following page for extensive details on setting +# up the JVM to accept JMX remote management: +# http://java.sun.com/javase/6/docs/technotes/guides/management/agent.html +# by default we allow local JMX connections +if [ "x$JMXLOCALONLY" = "x" ] +then + JMXLOCALONLY=false +fi + +if [ "x$JMXDISABLE" = "x" ] || [ "$JMXDISABLE" = 'false' ] +then + echo "ZooKeeper JMX enabled by default" >&2 + if [ "x$JMXPORT" = "x" ] + then + # for some reason these two options are necessary on jdk6 on Ubuntu + # accord to the docs they are not necessary, but otw jconsole cannot + # do a local attach + ZOOMAIN="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.local.only=$JMXLOCALONLY org.apache.zookeeper.server.quorum.QuorumPeerMain" + else + if [ "x$JMXAUTH" = "x" ] + then + JMXAUTH=false + fi + if [ "x$JMXSSL" = "x" ] + then + JMXSSL=false + fi + if [ "x$JMXLOG4J" = "x" ] + then + JMXLOG4J=true + fi + echo "ZooKeeper remote JMX Port set to $JMXPORT" >&2 + echo "ZooKeeper remote JMX authenticate set to $JMXAUTH" >&2 + echo "ZooKeeper remote JMX ssl set to $JMXSSL" >&2 + echo "ZooKeeper remote JMX log4j set to $JMXLOG4J" >&2 + ZOOMAIN="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=$JMXPORT -Dcom.sun.management.jmxremote.authenticate=$JMXAUTH -Dcom.sun.management.jmxremote.ssl=$JMXSSL -Dzookeeper.jmx.log4j.disable=$JMXLOG4J org.apache.zookeeper.server.quorum.QuorumPeerMain" + fi +else + echo "JMX disabled by user request" >&2 + ZOOMAIN="org.apache.zookeeper.server.quorum.QuorumPeerMain" +fi + +if [ "x$SERVER_JVMFLAGS" != "x" ] +then + JVMFLAGS="$SERVER_JVMFLAGS $JVMFLAGS" +fi + +if [ "x$2" != "x" ] +then + ZOOCFG="$ZOOCFGDIR/$2" +fi + +# if we give a more complicated path to the config, don't screw around in $ZOOCFGDIR +if [ "x$(dirname "$ZOOCFG")" != "x$ZOOCFGDIR" ] +then + ZOOCFG="$2" +fi + +if $cygwin +then + ZOOCFG=`cygpath -wp "$ZOOCFG"` + # cygwin has a "kill" in the shell itself, gets confused + KILL=/bin/kill +else + KILL=kill +fi + +echo "Using config: $ZOOCFG" >&2 + +case "$OSTYPE" in +*solaris*) + GREP=/usr/xpg4/bin/grep + ;; +*) + GREP=grep + ;; +esac +if [ -z "$ZOOPIDFILE" ]; then + ZOO_DATADIR="$($GREP "^[[:space:]]*dataDir" "$ZOOCFG" | sed -e 's/.*=//')" + if [ ! -d "$ZOO_DATADIR" ]; then + mkdir -p "$ZOO_DATADIR" + fi + ZOOPIDFILE="$ZOO_DATADIR/zookeeper_server.pid" +else + # ensure it exists, otw stop will fail + mkdir -p "$(dirname "$ZOOPIDFILE")" +fi + +if [ ! -w "$ZOO_LOG_DIR" ] ; then +mkdir -p "$ZOO_LOG_DIR" +fi + +_ZOO_DAEMON_OUT="$ZOO_LOG_DIR/zookeeper.out" + +case $1 in +start) + echo -n "Starting zookeeper ... " + if [ -f "$ZOOPIDFILE" ]; then + if kill -0 `cat "$ZOOPIDFILE"` > /dev/null 2>&1; then + echo $command already running as process `cat "$ZOOPIDFILE"`. + exit 0 + fi + fi + nohup "$JAVA" "-Dzookeeper.log.dir=${ZOO_LOG_DIR}" "-Dzookeeper.root.logger=${ZOO_LOG4J_PROP}" \ + -cp "$CLASSPATH" $JVMFLAGS $ZOOMAIN "$ZOOCFG" > "$_ZOO_DAEMON_OUT" 2>&1 < /dev/null & + if [ $? -eq 0 ] + then + case "$OSTYPE" in + *solaris*) + /bin/echo "${!}\\c" > "$ZOOPIDFILE" + ;; + *) + /bin/echo -n $! > "$ZOOPIDFILE" + ;; + esac + if [ $? -eq 0 ]; + then + sleep 1 + echo STARTED + else + echo FAILED TO WRITE PID + exit 1 + fi + else + echo SERVER DID NOT START + exit 1 + fi + ;; +start-foreground) + ZOO_CMD=(exec "$JAVA") + if [ "${ZOO_NOEXEC}" != "" ]; then + ZOO_CMD=("$JAVA") + fi + "${ZOO_CMD[@]}" "-Dzookeeper.log.dir=${ZOO_LOG_DIR}" "-Dzookeeper.root.logger=${ZOO_LOG4J_PROP}" \ + -cp "$CLASSPATH" $JVMFLAGS $ZOOMAIN "$ZOOCFG" + ;; +print-cmd) + echo "\"$JAVA\" -Dzookeeper.log.dir=\"${ZOO_LOG_DIR}\" -Dzookeeper.root.logger=\"${ZOO_LOG4J_PROP}\" -cp \"$CLASSPATH\" $JVMFLAGS $ZOOMAIN \"$ZOOCFG\" > \"$_ZOO_DAEMON_OUT\" 2>&1 < /dev/null" + ;; +stop) + echo -n "Stopping zookeeper ... " + if [ ! -f "$ZOOPIDFILE" ] + then + echo "no zookeeper to stop (could not find file $ZOOPIDFILE)" + else + $KILL -9 $(cat "$ZOOPIDFILE") + rm "$ZOOPIDFILE" + echo STOPPED + fi + exit 0 + ;; +upgrade) + shift + echo "upgrading the servers to 3.*" + "$JAVA" "-Dzookeeper.log.dir=${ZOO_LOG_DIR}" "-Dzookeeper.root.logger=${ZOO_LOG4J_PROP}" \ + -cp "$CLASSPATH" $JVMFLAGS org.apache.zookeeper.server.upgrade.UpgradeMain ${@} + echo "Upgrading ... " + ;; +restart) + shift + "$0" stop ${@} + sleep 3 + "$0" start ${@} + ;; +status) + # -q is necessary on some versions of linux where nc returns too quickly, and no stat result is output + clientPortAddress=`$GREP "^[[:space:]]*clientPortAddress[^[:alpha:]]" "$ZOOCFG" | sed -e 's/.*=//'` + if ! [ $clientPortAddress ] + then + clientPortAddress="localhost" + fi + clientPort=`$GREP "^[[:space:]]*clientPort[^[:alpha:]]" "$ZOOCFG" | sed -e 's/.*=//'` + STAT=`"$JAVA" "-Dzookeeper.log.dir=${ZOO_LOG_DIR}" "-Dzookeeper.root.logger=${ZOO_LOG4J_PROP}" \ + -cp "$CLASSPATH" $JVMFLAGS org.apache.zookeeper.client.FourLetterWordMain \ + $clientPortAddress $clientPort srvr 2> /dev/null \ + | $GREP Mode` + if [ "x$STAT" = "x" ] + then + echo "Error contacting service. It is probably not running." + exit 1 + else + echo $STAT + exit 0 + fi + ;; +*) + echo "Usage: $0 {start|start-foreground|stop|restart|status|upgrade|print-cmd}" >&2 + +esac diff --git a/bin/zkTxnLogToolkit.cmd b/bin/zkTxnLogToolkit.cmd new file mode 100644 index 0000000..362dc44 --- /dev/null +++ b/bin/zkTxnLogToolkit.cmd @@ -0,0 +1,24 @@ +@echo off +REM Licensed to the Apache Software Foundation (ASF) under one or more +REM contributor license agreements. See the NOTICE file distributed with +REM this work for additional information regarding copyright ownership. +REM The ASF licenses this file to You under the Apache License, Version 2.0 +REM (the "License"); you may not use this file except in compliance with +REM the License. You may obtain a copy of the License at +REM +REM http://www.apache.org/licenses/LICENSE-2.0 +REM +REM Unless required by applicable law or agreed to in writing, software +REM distributed under the License is distributed on an "AS IS" BASIS, +REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +REM See the License for the specific language governing permissions and +REM limitations under the License. + +setlocal +call "%~dp0zkEnv.cmd" + +set ZOOMAIN=org.apache.zookeeper.server.persistence.TxnLogToolkit +call %JAVA% -cp "%CLASSPATH%" %ZOOMAIN% %* + +endlocal + diff --git a/bin/zkTxnLogToolkit.sh b/bin/zkTxnLogToolkit.sh new file mode 100644 index 0000000..8beed20 --- /dev/null +++ b/bin/zkTxnLogToolkit.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash + +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# +# If this scripted is run out of /usr/bin or some other system bin directory +# it should be linked to and not copied. Things like java jar files are found +# relative to the canonical path of this script. +# + +# use POSIX interface, symlink is followed automatically +ZOOBIN="${BASH_SOURCE-$0}" +ZOOBIN="$(dirname "${ZOOBIN}")" +ZOOBINDIR="$(cd "${ZOOBIN}"; pwd)" + +if [ -e "$ZOOBIN/../libexec/zkEnv.sh" ]; then + . "$ZOOBINDIR"/../libexec/zkEnv.sh +else + . "$ZOOBINDIR"/zkEnv.sh +fi + +"$JAVA" -cp "$CLASSPATH" $JVMFLAGS \ + org.apache.zookeeper.server.persistence.TxnLogToolkit "$@" + + diff --git a/build.xml b/build.xml new file mode 100644 index 0000000..8017e2e --- /dev/null +++ b/build.xml @@ -0,0 +1,1993 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ') +} + + +function SwitchMenu(obj, thePath) +{ +var open = 'url("'+thePath + 'images/chapter_open.gif")'; +var close = 'url("'+thePath + 'images/chapter.gif")'; + if(document.getElementById) { + var el = document.getElementById(obj); + var title = document.getElementById(obj+'Title'); + + if(el.style.display != "block"){ + title.style.backgroundImage = open; + el.style.display = "block"; + }else{ + title.style.backgroundImage = close; + el.style.display = "none"; + } + }// end - if(document.getElementById) +}//end - function SwitchMenu(obj) diff --git a/docs/skin/images/README.txt b/docs/skin/images/README.txt new file mode 100644 index 0000000..e0932f4 --- /dev/null +++ b/docs/skin/images/README.txt @@ -0,0 +1 @@ +The images in this directory are used if the current skin lacks them. diff --git a/docs/skin/images/add.jpg b/docs/skin/images/add.jpg new file mode 100644 index 0000000000000000000000000000000000000000..06831eeb3ddf196c72e23557e0ed23ab5eebef14 GIT binary patch literal 1142 zcmex=8LQWSUGXZw=a9;-CH1opy?hi@Re9OjXnTmIP&sRNi|KfA6jNG!RuT!@9YtHw( z9erp2Zq<%rjVqhBF6#`j(Nz7-sP^lFKTm1Gh0D`qPDac0FaMRdT;F`zq?kW-W@pz% ze5s1wt~F!ht0dJ-6Wtq2zbVbV=fB~?vunDX+mkr&9obTxINM8acHwgGD`nz_>c8~X z#64k4<|uMwTb-nlGND71x8e8h0CS_Z??Mj^qF+we3cIj#)xArPJbFc z1J^&EzSnzGz5a8z`w3oY3k27{($?ztW&09(=ivnpp{KI7WqXY09TH4GKIhxFx{~WE za;gV-Un(Aaa&M}6?~U3j!7KUi>iU;l*gowzla$PHmbcrJ<^Kv-hZ^4yNZ?w%@WRrg z9hKMiif_BPt>>(?=HJZAb?S+a3uMc;RsFTId)L4BO>y9_%h9vu@!Dqx|QqvyOz9SIJ(F^=e;T^m(oCzw|lXRk=EsYqq%^ zT`d)L>*v{G>#v@6=iH9&5}xL?Y5R3H&Bwh9=Y-v2RZ~9aIrWlLlqS2Jh$?@c!KtzFq_@~|twFFteiZSS44jqO(VSv>5s zSk$Z3r4sR|%QU3V;-b@%!bJ@$Iu>ZHYFM=ZnC>fE$}45(-kf`P=H0v9*1LrwXLhOr z(Tqu+Dw97yVxO<^>3%?xVY_#66#K#toTr`}oRP~sdOKTC=ER@XAKDdr{M$Kf7M%Ki l%F17_Xw@h6ZS#V!{>|Nxc>kE literal 0 HcmV?d00001 diff --git a/docs/skin/images/apache-thanks.png b/docs/skin/images/apache-thanks.png new file mode 100644 index 0000000000000000000000000000000000000000..c0bea09cc8bcb9783fa3a67cb35db96f761002c3 GIT binary patch literal 4840 zcmVP)004R> z004l5008;`004mK004C`008P>0026e000+ooVrmw00004XF*Lt006O$eEU(800001 zb5ch_0Itp)=>Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01m_e01m_fl`9S#000s{ zNklmD^CEGjNos2W5-LQ6s;1O7XK!6{Zo{@p(wsthM zw4%1I4#S5J$L!g&QC?n-99;~A3OQ<8nsN8tcjM5ZLpXEh463WEQCnNv??@jvZX5?S zVkIRd`10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-M~UshE9KC#uP3O$Deg%>$bz3LW0DboKUC;jQh^` zD6f2XP&0nsQcIybS_03g+!g=fyM9hmDR>e`#1~wjo^)kRXOez(f}8#MB(c$gi(fn9 zJ9@h-yKY8&!0YSDpZpz}^Uoi9R2b99hdXq&G>IF-P7qdKh-W9BSq_DFH{n)IO?<|g z5_y5XaO$nz^qK?4(1Rtqwp#(?=!s(;ejg95>@R(wR>fBwHT;LZ@V;Qn*s<62Ip8j}+nKD;YH z7mPL+ObE&Uh`oucFFbI?^Eq}mXsF;11%`Zo^i|8f0L~%T?a|V|-h2jQqg{Bv%^zc0 zZ$It1Ty-}urn6=EW~Fb|qK`?6ebYj7V4m>AXb>sa~Njm-)y zZhYLAOR4tO^8`}pP%#Ipx>qzm>c$vWo0?t9)kL;&{&aubx%OcNj=xOeob)^)t39=A zG{niC9n=}&`ro`&(L+%ill&@R>|QQEJwN>}8g*ycfxY~76UQn$=x8q{E}(P6^t5VR zF9wOPA5Xb)2Z^?qmTwJuh~JrjW0Gy>hD-eL!FM!xR`!(2_fIB$u5Csh#C34ObFOdx zW;w(P$~O=9I>MXo)X!~xLD=-nxuCFQQTVrSD+H|)6d#RDb|(;uOHZ#lg#iFm9*o@~ zE0~KlkqyI9jMb)yI@Dk;D(e0znI8IWepdusg{3EDN;mnXK@~&ij^Q2Hm}VU0X|`vE z`Qz%|EsVNzHO)LfD6+Q1vD4pHzO;4dP-zi1TKET&TlX-mupW~v_z_lMD1ICH9DhOZ zZbh%I=JX{e+p;W$lk~8*G#6sMF4C+Y?U?vm&Wz|w`FPBtX_y6jxh)VSU`bE0_#t;u zQrOp)L;ZCVdOIQ-ZT?$z=j$vlFrhcg_WocBJ;t@?4<`zu$NlhjxgRE0vrEuWw%s@u zh$-n#eEqU)PHF#!v8UzaPtL@{%eWO^yh{r2ZePo82z} literal 0 HcmV?d00001 diff --git a/docs/skin/images/built-with-forrest-button.png b/docs/skin/images/built-with-forrest-button.png new file mode 100644 index 0000000000000000000000000000000000000000..4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@-PURI*lQP0-t8T_&{^nm zamG&RnUcY0o~~6qWBy(4eNK5~Ox(I2w%NP3-IJSYEYXC!` B3(^1p literal 0 HcmV?d00001 diff --git a/docs/skin/images/chapter_open.gif b/docs/skin/images/chapter_open.gif new file mode 100644 index 0000000000000000000000000000000000000000..eecce18b50a0146d663334eb5b38691fa40b4d5a GIT binary patch literal 49 zcmZ?wbhEHbWM^PuXkcJiy6xEi|Nj+#vM@3*Ff!;c00Bsbfr+Dqzfm%aH&TPa8UR61 B3ljhU literal 0 HcmV?d00001 diff --git a/docs/skin/images/current.gif b/docs/skin/images/current.gif new file mode 100644 index 0000000000000000000000000000000000000000..fd82c082012faa682ecd4e68d2eedef9ae2e6231 GIT binary patch literal 54 zcmZ?wbhEHbdvgf9JlRm%f*ED|^)zR->+Co862^^pk!u5$EP!3fjzw8XU#}8Il-2 zEI`Z*Zh{lXkg>50Py~%EL5*|HpdHu^uz_@DjRE$?+OB>2cHigy_~CiltzA2q(dY-R zE0ws?)uol-wpiR0>Zwh8gwrE{IE4kjFcsa zE<)u6=*0rOQdlXmQsSg~b2v>_e&*;)omVU%Jn>|M%;yddYu#v-EI}s0b+HN;3oue* zQpwmBX(`VSO8MC}-CeIu#fheb@BCT0%4VJ)QmWBvMb)yUR4#8pr71Q^aZ=)y#HSK3 zi^EBYPE(AO)UWyiAN=;Wkbp|%%%IeP9kb@tPsPeiHEF9Vw+tJ-#7Rk}u8!&z%Kp{@mlFk3&u$Ct;y9Gvwjj5D*FIBO$!^50-oB?3Lr$5Eqo7T}kG=xr4bXpv< z*R5s2hBg2OdwSTmay3J5pCob)Pe6dk!R?o=fVuO#q_s7>Q>ALh8Y@Tzqa&PbKSJ$w z&E#upxTXuR!K0ET*c*tT*NLtS0W6A@QMF#>Raf`zl9=%LrG z(NhYzXXUD;0X283s6e9Dd0|~m^4KvDJaG4riJ9HtH#%5 zaygn>T9_F{)I}5FE|f$7HUxB-XnqrXz$VE+aIOd*cRo4pZbnIJuD_l|_iaJMF{b2v z6}7djx&K}&m8Sc#-9!PrU_5gRxDe1l5`6!(6;Mgig`AkVPSWw?R@KtNqOJE6WwThV z+4@nHho0%-^oygxpzfTX|wxJzZvc-fOu>C=>| zWlLH7!>vTQ9Nsy0-SQ1y|IGoCW5@W#+E(;vf`}qM|Il_CZf<3SfDQp$f?ERp-nl;S z+NTw;=$B7>lP1rNXI_F=E^cP=_6LZ{%5c{5*sUA+`*Xi$P8>5giWz;mgJ)WAMvsmX z#WAaY@?#plw2I^+xCzkb{lQLarr!d9k z_v$o7%i?F%JCApceRpoAeb3$ra3{b8hy|QJc!>RN8!%Ghyr<7QhJ!~2&s)|WI_2C8 zlX+9#2cBNKd`5+_uVl4q)Ka1AW^ksWoPTt7QWr&B9mSL(CUm+3ObDbQ5M6r>eco}V zyPH{2Ou_rXE^AhFTHXDg1OV)8Y+6!n%%QwCGo>*Mc!vy7E+AWiy9vi^%ya@W1crjg z0tN47w>4ipX7%r<;#~Gh_Wc?4%W8Z$P%Xp)AHtZQ<1PX^iU#9K^J87Fg6E{OgWcAy ze`OjtOmQE$IQ}S;cbYPp{R$ccVo@xF@LXyzMb|4n8(_dYPB{Cg6VBe)X-&uF81MO7 zeoIC54K*UVy+Vi^D}^YFgdmi%H3SkLIPab7_5R>lZ+EWYIZTJA00000NkvXXu0mjf DMgv2X literal 0 HcmV?d00001 diff --git a/docs/skin/images/external-link.gif b/docs/skin/images/external-link.gif new file mode 100644 index 0000000000000000000000000000000000000000..ff2f7b2a0edcd149b45744fdcb0868e37143710c GIT binary patch literal 71 zcmZ?wbhEHbS8S}jHOdM}x%?#1T_hvOu zeqG%@%jEJ)+xMGqi`DhzUb?T@b*jm~qG)$k_0mNz)~?<@;qdjdiH;j0rN7>4^_4qo z5-gGTX~~LRHZje`Th!*x4E(t!-8@p`oW=c$!sDW9hig{2?%n3H_Ac9RW(;~SGaDvl^$sR zZR`Db@iJktYp>+@>&*J_Eg|S|(C5`M9bCDOPH*r!#U1(W>Vy8^PaL*AzXds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skin/images/hack.jpg b/docs/skin/images/hack.jpg new file mode 100644 index 0000000000000000000000000000000000000000..f38d50fe4e87cb4ede05ce4b6f124460b77f2a0f GIT binary patch literal 743 zcmex=i3*BJ!6k`h{6D}T z$iX1OAi~Tj$iO7X$SlbC{|JKw10w@7BLfm(XJ%pJ0LrKcFfc&?GgOv|nURH6kWENf zkwJ-FL|MfMs7f5@Q$`g1tjr8-KnXQL1_q#~fqGzOGcpM(GO!prCNi@M1qv57PW)i> z{}uxePyv%5vmk>#!z=Hw)gfzchs_dwb)6~u-lc{J9p#OZ6SG*{l#7i&yEVyNe`52m z?8<(|$z{?4i%i3(tlGKv6RT2AO_XoH_ze@T4q^E^|1Do4E?duNoY48XDn;^jy+5zl z+XU5E*B@I8^sa2*)?&wgVr`M0ezaz8!s?*grt`V(_w>!37OKV~GNofv@IAJ)s`t@z z^FlA$8!_%?Z7SXJL&p2U66xZ5uJx0j=v`Qu{B@(m?4Vh@_!qo9xtn^QNZp*i{dALZZD-PQj)&8J`hMPbAhvS`-8>JA6F4^r=zKIWe^-BH${BtgXXyz|z4k0IlcQSn1w>fm t4@cY%T^+SFHFVX2^CbaS}9ZZyUVQ>#nGL-7*pWflJ-z4MzO#pq+?lJ%X literal 0 HcmV?d00001 diff --git a/docs/skin/images/header_white_line.gif b/docs/skin/images/header_white_line.gif new file mode 100644 index 0000000000000000000000000000000000000000..369cae8dcf2da7d30c4ed7a8781b6bdf95a022d6 GIT binary patch literal 37 pcmZ?wbh9u|6k%XwXkcLY|NsA?3y*XdfB+=Iz{JwhKa-Wg8UV|E3E%(# literal 0 HcmV?d00001 diff --git a/docs/skin/images/info.png b/docs/skin/images/info.png new file mode 100644 index 0000000000000000000000000000000000000000..2e53447e8c2446ea0f6a56fec811e1786e691d49 GIT binary patch literal 1320 zcmWlXZ&1?)7>7&1q8${icL>E5?6e0xt=eJLszo9c2$*4!0MS*JoAHQRSf*8T8ZdHE zdRib#rv*B$t7TU0vk_F6krFk# z{0M25qh^EI4M??m+775mn6kUQeL~QvCalpgYqHn@xlXRFsY7J;T8#q3zT}0 zu;LUag($-0k|C^~pi$aJ+k6t3L20L!v>^lo$Y9Rx2UH}^x-^6ZHrfE0PN-#QtCz1f z$hAb9uTRgoFxDjmDTUq~4U%GrF>-CTwtj@536oo*Mj+BAL(FDpH_5djlwFBglzL7_ zImJ4Y0yT+YMx>=BIuoEW@TH&(ra*%YrCmY|X|i|o6{wD~Tikw$3IUXOG{hP$UI}P` zNV`bOptuoZ-C~#(g27uJi_6d2y8*c#P~aNE3LEVTJtu+~HExxooWbm&tX?T%mZ4_8 znv4$qX=ww*Y5_<~btZ&z;;h@(_dw6OL7bDotl8-=iC<6|G$~}44$kAP9Ua1hVMbYI z(YHL_C!&vp+epy%d z_3j;s5joeyGfxrfn#PmK8C#pN@SD3&FD!}K(X#nWD%6oXH({C}Y6y*4m3X)(buAR@ z4_u-yOwl?l(jk_j&-{tbZdh$!_x1T+6Jg2bX;OMh!&bv=a;{VYmguFkd>YejL z(yTq&UT55&C3U5Wc1=z%)jo#Yy zen~|sWUbU>aWPdDk^bhLbiZ$$`@YGsl+Uv~3ilO$Jt!N&UyaY^nfEtyNxtf*>aZ0P zYs$CH`_7_B`7<&$#o^RQSmo zVQlJ$#Y0d3y_u4%5I*UAefd&)*3;{b6J4v+)5D0SPOme`?20|p-rCw|0gnzQ=TAF# z^l^V6aX8}eo%wKHvLh@tv_@JJd7i&)WJBOUUKy47jkq_-)i|*w;aVUrH|R!ZNY~pb U&-nRQwxE@~taLcd4Hh&10}nn9o^tnS&|T3i>qxFe$? f}PJadT6$68(tDnm{r-UW|L@jfU literal 0 HcmV?d00001 diff --git a/docs/skin/images/label.gif b/docs/skin/images/label.gif new file mode 100644 index 0000000000000000000000000000000000000000..c83a3893c5526efb52f2edab685a1b0d7a1ecc74 GIT binary patch literal 54 zcmZ?wbhEHbdhCYGe8D3oWGWGIAWq$;?3`UWs4{$yd~ fVqj#@VE_V<76vBXp8m=M4RQ+_jm%nu85yhr=NMS;ykzBV zGV@+Ib>8iG+0i+5o5%e;$DOmCbGDtGouBno)Pp@O`xkod^YDHAe&7q={KCBSjEXQs zia-R}v;dr7tR!PTU@gZjorczO*Y4(!3udEUXj^5nt6CcbI=M{9lA3*v!R*V{5Xk12*s*W`tyJQzcOyP zZ|4nGYCwl+^~R>oQ9yIziSOk@uI9c7MHdfo+O=dPhNjo`t2TAlmN1bw7PY!& zb8wiMUN#=~j?AJaqD?aaD8@$vs`?(gvBH&H+cp7{2^cJn$wdq^+uv$+z|MKKt+?hr z*QsL5i(y(cUzD}JiFa$qb^-fga2lYfPWKeWPkU;dXzH zDz+;0UGiO>WV7RjIU=PTtqnMrXIV?F-0jLxCcN%Rd*oPrek$=zU&fPf)RHo>wLjZ` v{OiZh;9_~M^1Bpx^As`Ho2BPVXIo0*@-_bK23aA9FY1)%eyY46N3#9^6k+17 literal 0 HcmV?d00001 diff --git a/docs/skin/images/poddoc.png b/docs/skin/images/poddoc.png new file mode 100644 index 0000000000000000000000000000000000000000..a393df7372349f6df300eacf8d62987dba6f85aa GIT binary patch literal 856 zcmV-e1E>6nP)004R> z004l5008;`004mK004C`008P>0026e000+ooVrmw00004XF*Lt006syVXTxM00006 zVoOIv0RI600RN!9r;`8x010qNS#tmY4#WTe4#WYKD-Ig~00O*8L_t(|+QpVTNE|^J z$A2fM1T`LdK8|#PiddK?TFD{e3)I2~C^izoQX5IcN=2)r5d^`Af`y%hg(!sB1jJZ~ zhhQQ2xbuN2jD|xCJ-y4!uDkAD*4y(U^S#%Bffg1Pd~Ubu+KBq}=IwO^pm2rcF!(l?9kaD>;J^+QI_c}?CwAUL!v{63b zMSwIAqZURm`P~-C@AoSl%Ul|ean#u3@mK?mz^4>(UJ5^_rrx+pOJh1dEH4pbk^qc| zxl{Vd?dDxqS8R>E@IiO~%8JU*q-C#{P-mxZ#<)zE2x%c6UoZ>}L4H2$?ZMa>l$5Az zCnqp40PXEiQ={%(Ux)d5xVqAT?1CXlpEWmw&j&3nP+JR&i!e6_d3i883OPBDoD7?r z(Ax`*jr!5wmzQj8Y$$vp9wq^w1`@Agd>pp7p{ECymW1(_Rc*9OkB?zu0%m5QzFt52 zIwONp5k!(jWwFu7;ZU_IFNgDUI6PF>PfsBw#e8aa7qYWWK9VNW%oiI-Qd5&^mWvCx zzE;=L)BgraO_f<|84UJ5lBVnKhSgPATT?+LwYI{+f%#Nf8EkDmS@Y~Q(i21YCNmR; zhoPb2F}ErzV0IP?3QYMH3+f~e}F{5Y&DV_64k;u-pUk+1@tdkX!Dz!8_URaM9J0C iRWA_nQh{&$5BdZ3oY`MtoEnh;0000axdUs$VmXNZB}bC%VxwSp6_waJ)d|kVIc)zPRqeIZZsP!%PWP&!rJ{ccrcVef_824V*rcNe`YK8X6u^&TVfiYDOC!)l_wikn`gg#xkmuz4&!! zCzsZ~Q+eXo?}^E*8nm^kOS`apx&1SHP xOSk{*ch5;mUqxD8)P4*PsMYcJGhc`tpL?Kv*ou)#zg(Cser$hB&OAcs)<55`ex3jT literal 0 HcmV?d00001 diff --git a/docs/skin/images/rc-b-l-15-1body-2menu-3menu.png b/docs/skin/images/rc-b-l-15-1body-2menu-3menu.png new file mode 100644 index 0000000000000000000000000000000000000000..cdb460a1da7304fcc2d5e326db43e27c6fa9b025 GIT binary patch literal 348 zcmeAS@N?(olHy`uVBq!ia0vp^{2|H(?D8gCb5n0T@z;^_M8K-LV zNdpBhc)B=-RNPAba`NT>^A2hWNr{PR3em>=;?_TBi7s_Hc|B+4`ZEU(9`l-)7A&jU zw*UXXiOVBh8rmIW1DhHR$*SJK%G8XnD!U=Fb1;@b0XlLnh)q2r=G4T4?@%xY8I4J~G88*bRV z@j)-^8Y2b$lol(aFVkF%GBiAm42+EveLZx3%wg?nJ=YY_W-h?yH literal 0 HcmV?d00001 diff --git a/docs/skin/images/rc-b-r-15-1body-2menu-3menu.png b/docs/skin/images/rc-b-r-15-1body-2menu-3menu.png new file mode 100644 index 0000000000000000000000000000000000000000..3eff254fd179852394e8bd960eb1f610f05f2d4f GIT binary patch literal 319 zcmeAS@N?(olHy`uVBq!ia0vp^{2|H(?D8gCb5n0T@z;^_M8K-LV zNdpBpd%8G=RNPAba`NT>^A2hWO5w`f+{Qm=?YwdG#C08QO_zCTW@ch+#j>hKxom73 zTjv>7&YHT!RZ_*3)#Lh^W2X*H5PRiN6|!;D27?YTi6X6M9-jv*7;6_w9) zZgF9{q@i@+@P#?TM-Ci3*X5yc#3IzEqkW;KHHXLNh0Bbb8ks*SpICXq?9mk-FNPk6 z6&k9CCJ5ymU$9Q0)4KMskfp|2uWoLm2qtCuDGUxDJvbN`4z&r&mdK II;Vst0FZQVxBvhE literal 0 HcmV?d00001 diff --git a/docs/skin/images/rc-b-r-5-1header-2tab-selected-3tab-selected.png b/docs/skin/images/rc-b-r-5-1header-2tab-selected-3tab-selected.png new file mode 100644 index 0000000000000000000000000000000000000000..b175f27b16e19464241853fd16c8030d649b6d4a GIT binary patch literal 200 zcmeAS@N?(olHy`uVBq!ia0vp^tRT$61|)m))t&+=g=CK)Uj~LMH3o);76yi2K%s^g z3=E|P3=FRl7#OT(FffQ0%-I!a1C(G(@^*J&_z!{$_AZ|c6yYrJh%9Dc;5!1sj8nDw zq=AAqo-U3d6}OVVoP7EJd;{Bz3#=?Zb_B4_oH;{c&DT)DCIv=EySz4*dTBPX4PtS6 mY}~b?ZBH1Y+4#!B*chy;Ss!r=G{ytXVeoYIb6Mw<&;$T7sy6BX literal 0 HcmV?d00001 diff --git a/docs/skin/images/rc-t-l-5-1header-2searchbox-3searchbox.png b/docs/skin/images/rc-t-l-5-1header-2searchbox-3searchbox.png new file mode 100644 index 0000000000000000000000000000000000000000..e9f4440d1f58d53fa16a2ea141bd04cb69f0a595 GIT binary patch literal 199 zcmeAS@N?(olHy`uVBq!ia0vp^tRT$61|)m))t&+=g=CK)Uj~LMH3o);76yi2K%s^g z3=E|P3=FRl7#OT(FffQ0%-I!a1C(G(@^*J&_z!{$_AZ|c6yYrJh%9Dc;5!1sj8nDw zq=ACgo-U3d6}OWA@U#7wu&b{+{^9NK^tSr?dgBcZEcf=*o%!(mygu6k9cB)L#t;SW l23E(Y39JX26pSx0GKAXcJpW&R>>bb;22WQ%mvv4FO#q7bJP`l@ literal 0 HcmV?d00001 diff --git a/docs/skin/images/rc-t-l-5-1header-2tab-selected-3tab-selected.png b/docs/skin/images/rc-t-l-5-1header-2tab-selected-3tab-selected.png new file mode 100644 index 0000000000000000000000000000000000000000..f1e015b36c399a2d3a5879d69c3f31a82ee9f7bc GIT binary patch literal 209 zcmeAS@N?(olHy`uVBq!ia0vp^tRT$61|)m))t&+=g=CK)Uj~LMH3o);76yi2K%s^g z3=E|P3=FRl7#OT(FffQ0%-I!a1C(G(@^*J&_z!{$_AZ|c6yYrJh%9Dc;5!1sj8nDw zq=AC2o-U3d6}OWA@Uz(0{Y#73_gCfc!(wyExc&dn9AFaCcpHE6!;`1hZT9v53>z4P wJ&s(UHx3vIVCg!0D03wUjP6A literal 0 HcmV?d00001 diff --git a/docs/skin/images/rc-t-l-5-1header-2tab-unselected-3tab-unselected.png b/docs/skin/images/rc-t-l-5-1header-2tab-unselected-3tab-unselected.png new file mode 100644 index 0000000000000000000000000000000000000000..e9f4440d1f58d53fa16a2ea141bd04cb69f0a595 GIT binary patch literal 199 zcmeAS@N?(olHy`uVBq!ia0vp^tRT$61|)m))t&+=g=CK)Uj~LMH3o);76yi2K%s^g z3=E|P3=FRl7#OT(FffQ0%-I!a1C(G(@^*J&_z!{$_AZ|c6yYrJh%9Dc;5!1sj8nDw zq=ACgo-U3d6}OWA@U#7wu&b{+{^9NK^tSr?dgBcZEcf=*o%!(mygu6k9cB)L#t;SW l23E(Y39JX26pSx0GKAXcJpW&R>>bb;22WQ%mvv4FO#q7bJP`l@ literal 0 HcmV?d00001 diff --git a/docs/skin/images/rc-t-r-15-1body-2menu-3menu.png b/docs/skin/images/rc-t-r-15-1body-2menu-3menu.png new file mode 100644 index 0000000000000000000000000000000000000000..29388b5efc9155a12ec75c7ea12940bf45d5b3fc GIT binary patch literal 390 zcmeAS@N?(olHy`uVBq!ia0vp^{2|H(?D8gCb5n0T@z;^_M8K-LV zNdpCcdAc};RNPAba`NT>^M?+dIdJscF$HbSBMB>)A4*uZ_=JL{)&U2O4GkUk_5X}& zetn+%@YUSqJlo~>r9|v_$Osmj3zsmE%8e hpTGaab)Hi`4ELR~XEsLn)B!_*!PC{xWt~$(69Dz9se1qb literal 0 HcmV?d00001 diff --git a/docs/skin/images/rc-t-r-5-1header-2searchbox-3searchbox.png b/docs/skin/images/rc-t-r-5-1header-2searchbox-3searchbox.png new file mode 100644 index 0000000000000000000000000000000000000000..944ed73333d834f3509955d65fecc604393bf626 GIT binary patch literal 214 zcmeAS@N?(olHy`uVBq!ia0vp^tRT$61|)m))t&+=g=CK)Uj~LMH3o);76yi2K%s^g z3=E|P3=FRl7#OT(FffQ0%-I!a1C(G(@^*J&_z!{$_AZ|c6yYrJh%9Dc;5!1sj8nDw zq=AB7o-U3d6}OUWem!|spO%)!#^)EuW@jhJ=H{lxrpBi5bP0l+XkK DqZdXo literal 0 HcmV?d00001 diff --git a/docs/skin/images/rc-t-r-5-1header-2tab-unselected-3tab-unselected.png b/docs/skin/images/rc-t-r-5-1header-2tab-unselected-3tab-unselected.png new file mode 100644 index 0000000000000000000000000000000000000000..944ed73333d834f3509955d65fecc604393bf626 GIT binary patch literal 214 zcmeAS@N?(olHy`uVBq!ia0vp^tRT$61|)m))t&+=g=CK)Uj~LMH3o);76yi2K%s^g z3=E|P3=FRl7#OT(FffQ0%-I!a1C(G(@^*J&_z!{$_AZ|c6yYrJh%9Dc;5!1sj8nDw zq=AB7o-U3d6}OUWem!|spO%)!#^)EuW@jhJ=H{lxrpBi5TL z>B-E7X2&P~a4`6jwh^=64%N$KvYWpfx`zxWxwdqUOnSC!Nz1SzY(ekLziD#x^ zN5c#+_UIeyY-pcs;P~|OA~k0Xi4!{~wTsAVnY=KnKKB0f`iUPuesXv@{Yci~8^Yz; ze$Gr6yrcD=n6CQspW#+>&)4KPoVTPS*P1y_xgl9G>4Qerv-iJzj6I!?I`hUW=Uv;# zHL>yT)$${4S$`XkoKG^9y{xuxQw?uJf!VPYKQ*7-)s9v(dui5j;p*Lw-?h_ZE}fNP znwi!fr^&uU)A`}8>{ko!=Ix#T_|WcYS)p$px382xAu?rN%}Uqp&Q)t>SDty!{&wjU zF$1}Yb2`GEzRw9aTyRJxLO(N-d%~h~3;r!CocN-C`qZPZEBp0d?V0X;_S@7qkG}EW zu$cJqO5oK~FE(#jvTvWQ_qU8sn~sKLX5RGeejKvAxN5rQtVLh$3bizMgenJ$X;1#o zkZV6ctbo!DryG5`U%cNA- z37SIO>Jn2uPEOf&tRRquW%=UskTnw*lL4j4_oQFx5`5PDln65ExUE?CQL56{W=O6>4%t1lHGeC6k3=o{392#=l uSM0X)>rLCYt$Mw3&7xT=7q(o#=zPoVy6suxF44RH-vj{rcK4+K literal 0 HcmV?d00001 diff --git a/docs/skin/images/rss.png b/docs/skin/images/rss.png new file mode 100644 index 0000000000000000000000000000000000000000..f0796ac886201eb43b7a15113e2deb1b32fa9a09 GIT binary patch literal 360 zcmV-u0hj)XP)1pTfh($;sL0vc}u{{{FPIw4gub**+Xunj;hMg-Rk@N{o&!^ z{r&#_{{B{et%#+@{r~@)vdh1}zle=^0GR*(m;g35HkdZcHkixXHq)$8FWQhbW?9;ba!ELWdKKV zVQ^?^V?%Flc4cyOWpXuLNbUdt06|GaK~#90Vz9#p80;8u1CXpOE?Whx%fLW2AK{k88_xIu00030{{sMfLr(Xb|5zme0000&bhz z5bnJPc@Iw>rR$Xk0NnAP0=%b=G`t?HCJ;1;sS0GUaR^Poy(d)4L1!Z`B|uSw*8!8D z1>h1*q8RGKdru$=?;A%ZB_OKlg75{_YH&hNW(a$3KZtet`*CCTW|RqnCt6&9fL-$C zDR`VAOJA7@%7*R5r%~t_!pzTQ{PyECD&+v42uz$ZeUl8ZOTM%Yg!+h+nIH~LchAyC zG1xhRv*%9Z$h&VKs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bxsLQ074N#oB#j- literal 0 HcmV?d00001 diff --git a/docs/skin/images/warning.png b/docs/skin/images/warning.png new file mode 100644 index 0000000000000000000000000000000000000000..b81b2ce8a12f88ec3a4c64a910809e667cc20480 GIT binary patch literal 1215 zcmV;w1VH7dsKvk!Vn>-EJ6yV zwCFYvz63#Z5fw@Zda#RSA<;vFP*!L?BpDNvInA8C*8kSS-e=CJT~KEP!3B%8_kLL4 z@Bgjuzu3U_ajgzJvSY3teW9oSl{HhZWS{V|#1F14p?K^260|%Xb}o4LqmAX@ssdp0 zUE9>h(~J_78VifNmT%d7)c|bY(i;$zA5)*e$RT8h=H})-Up#tG+f@O;v?Wi93nmyj zfE~aIijlQ-%YLasU~${N`TCPAP68# zVDBJ4fl`8UjAi|~DI3QG0G;=3m#WP$%7iI_v4gR%0|-ONfyqJ0A>ahf1-x`%!=%a; z0odD%TTRM4)9Ojsg*+1b7c;cXY7<=ZmtPi&3{?$$ME(^f+FT2Hjew!v$jJCga`&kyke7*t94E7%E69^?x z@(}XKsSlfSw)ed?rQD@E5KerChbTW{IoGdV@d=F65Qb3%;nV>omx((Fd#DN;W1Hi} zwqFu}?OVD~eY8P+Qn#G4{-^Y;-RbWD04Glz2TU#yC#WjK()}9aVAq=~iyi-@6<;LY z+XkTJIUaN&*r)9#lwLeS=^1;Eb6>uNBZoi4p<^d7qYM;4P!fnLQ~^;y&7cYtB9!6~ zuL4-}{|-!=vrdMw$f%zBTKJ68lnXh;>e1nU!rD&5qNzYB5SVuaeL1(%za=ta?rF|O9j)JzSq8m0RY&`2UZo! z|L#EhoUJmbGnEn;*AowR&`emeUJobVhPbr@;jDY{`7eyKiH(Tss5u&@AqqPBtF~*j z>)%D@1aZ(Q3PtBuiino zSCl44DCYwxF1B9H>X|Sg3K0M4^eF)A&I360;~#y0X?{qUOU48h593svYn8J=)WDi< zN&*yOz$c}9Eu7Nlo*Mi9!MkxNQ@AS0uq@dhKq^O!~}xz;K@Xd7Y-~+5Tgkg z4;n8VKqrH)>yRyD!_v`xTg$fo_}cDk={CBt?%=_L7Y}CQKjF!DdgqtC!5i1Rxzm5QpK z2~!*=8j6+^RFjFz5M@|438BhMFucKv>1;3p-TwHTham%D8D%61LJ^iMt7uu;wz&}% zK~fJ;qBoRUaQh&XWhh(LZlSnqH_b3b)m(6g zK+=dNG@3;&+^-;m=LJ!M4B%C*Af?S^ax==QAzA<_v`7S4HpL}He-Nm8UeOD#i~wLVu%rwe1afI z+(Y0VFOHKq?)B^mK}2Y#{GWePpygL(#X+o$wPAbweFC$Gv2yh($4v7Cwy&zTbtKo@ zS6N-()=14cpC71f8JKBz_S+7fXusd+8r?r-Yq~s+)%9=Mo#%$$cR9~YzG`T@8>qGK z*j_hwKHy!W`Klw%?kC@KLIfOb?t4*F=a_#vd)D!`^$tBheQa@fZeX@^a;V|_ZNk1q z_HxHB+zX9YjJ3S(?HG%_>v&vs^W?>+HoR}+)0>Z%9+|NZ*9J$LdY=6#2)?P|(^nss We^=By_~!n}n&~UIh@aF1*7FC9)cB|X literal 0 HcmV?d00001 diff --git a/docs/skin/menu.js b/docs/skin/menu.js new file mode 100644 index 0000000..06ea471 --- /dev/null +++ b/docs/skin/menu.js @@ -0,0 +1,48 @@ +/* +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright ownership. +* The ASF licenses this file to You under the Apache License, Version 2.0 +* (the "License"); you may not use this file except in compliance with +* the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +/** + * This script, when included in a html file, can be used to make collapsible menus + * + * Typical usage: + * + */ + +if (document.getElementById){ + document.write('') +} + +function SwitchMenu(obj) +{ + if(document.getElementById) { + var el = document.getElementById(obj); + var title = document.getElementById(obj+'Title'); + + if(obj.indexOf("_selected_")==0&&el.style.display == ""){ + el.style.display = "block"; + title.className = "pagegroupselected"; + } + + if(el.style.display != "block"){ + el.style.display = "block"; + title.className = "pagegroupopen"; + } + else{ + el.style.display = "none"; + title.className = "pagegroup"; + } + }// end - if(document.getElementById) +}//end - function SwitchMenu(obj) diff --git a/docs/skin/note.txt b/docs/skin/note.txt new file mode 100644 index 0000000..d34c8db --- /dev/null +++ b/docs/skin/note.txt @@ -0,0 +1,50 @@ +Notes for developer: + +--Legend------------------- +TODO -> blocker +DONE -> blocker +ToDo -> enhancement bug +done -> enhancement bug + +--Issues------------------- +- the corner images should be rendered through svg with the header color. +-> DONE +-> ToDo: get rid of the images and use only divs! + +- the menu points should be displayed "better". +-> DONE +-- Use the krysalis-site menu approach for the overall menu display. +-> DONE +-- Use the old lenya innermenu approch to further enhance the menu . +-> DONE + +- the content area needs some attention. +-> DONE +-- introduce the heading scheme from krysalis () +-> DONE +-> ToDo: make box with round corners +-> done: make underlined with variable border height +-> ToDo: make underline with bottom round corner +-- introduce the toc for each html-page +-> DONE +-- introduce the external-link-images. +-> DONE + +- the publish note should be where now only a border is. +Like
+-> DONE +, but make it configurable. +-> DONE +- footer needs some attention +-> DONE +-- the footer do not have the color profile! Enable it! +-> DONE +-- the footer should as well contain a feedback link. +See http://issues.apache.org/eyebrowse/ReadMsg?listName=forrest-user@xml.apache.org&msgNo=71 +-> DONE + +- introduce credits alternativ location +-> DONE + +- border for published / breadtrail / menu /tab divs +-> ToDo \ No newline at end of file diff --git a/docs/skin/print.css b/docs/skin/print.css new file mode 100644 index 0000000..aaa9931 --- /dev/null +++ b/docs/skin/print.css @@ -0,0 +1,54 @@ +/* +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright ownership. +* The ASF licenses this file to You under the Apache License, Version 2.0 +* (the "License"); you may not use this file except in compliance with +* the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +body { + font-family: Georgia, Palatino, serif; + font-size: 12pt; + background: white; +} + +#tabs, +#menu, +#content .toc { + display: none; +} + +#content { + width: auto; + padding: 0; + float: none !important; + color: black; + background: inherit; +} + +a:link, a:visited { + color: #336699; + background: inherit; + text-decoration: underline; +} + +#top .logo { + padding: 0; + margin: 0 0 2em 0; +} + +#footer { + margin-top: 4em; +} + +acronym { + border: 0; +} \ No newline at end of file diff --git a/docs/skin/profile.css b/docs/skin/profile.css new file mode 100644 index 0000000..eefaa88 --- /dev/null +++ b/docs/skin/profile.css @@ -0,0 +1,168 @@ + + +/* ==================== aural ============================ */ + +@media aural { + h1, h2, h3, h4, h5, h6 { voice-family: paul, male; stress: 20; richness: 90 } + h1 { pitch: x-low; pitch-range: 90 } + h2 { pitch: x-low; pitch-range: 80 } + h3 { pitch: low; pitch-range: 70 } + h4 { pitch: medium; pitch-range: 60 } + h5 { pitch: medium; pitch-range: 50 } + h6 { pitch: medium; pitch-range: 40 } + li, dt, dd { pitch: medium; richness: 60 } + dt { stress: 80 } + pre, code, tt { pitch: medium; pitch-range: 0; stress: 0; richness: 80 } + em { pitch: medium; pitch-range: 60; stress: 60; richness: 50 } + strong { pitch: medium; pitch-range: 60; stress: 90; richness: 90 } + dfn { pitch: high; pitch-range: 60; stress: 60 } + s, strike { richness: 0 } + i { pitch: medium; pitch-range: 60; stress: 60; richness: 50 } + b { pitch: medium; pitch-range: 60; stress: 90; richness: 90 } + u { richness: 0 } + + :link { voice-family: harry, male } + :visited { voice-family: betty, female } + :active { voice-family: betty, female; pitch-range: 80; pitch: x-high } +} + +a.external { + padding: 0 20px 0px 0px; + display:inline; + background-repeat: no-repeat; + background-position: center right; + background-image: url(images/external-link.gif); +} + +#top { background-color: #FFFFFF;} + +#top .header .current { background-color: #4C6C8F;} +#top .header .current a:link { color: #ffffff; } +#top .header .current a:visited { color: #ffffff; } +#top .header .current a:hover { color: #ffffff; } + +#tabs li { background-color: #E5E4D9 ;} +#tabs li a:link { color: #000000; } +#tabs li a:visited { color: #000000; } +#tabs li a:hover { color: #000000; } + +#level2tabs a.selected { background-color: #4C6C8F ;} +#level2tabs a:link { color: #ffffff; } +#level2tabs a:visited { color: #ffffff; } +#level2tabs a:hover { color: #ffffff; } + +#level2tabs { background-color: #E5E4D9;} +#level2tabs a.unselected:link { color: #000000; } +#level2tabs a.unselected:visited { color: #000000; } +#level2tabs a.unselected:hover { color: #000000; } + +.heading { background-color: #E5E4D9;} + +.boxed { background-color: #E5E4D9;} +.underlined_5 {border-bottom: solid 5px #E5E4D9;} +.underlined_10 {border-bottom: solid 10px #E5E4D9;} +table caption { +background-color: #E5E4D9; +color: #000000; +} + +#feedback { +color: #FFFFFF; +background: #4C6C8F; +text-align: center; +} +#feedback #feedbackto { +color: #FFFFFF; +} + +#publishedStrip { +color: #FFFFFF; +background: #4C6C8F; +} + +#publishedStrip { +color: #000000; +background: #E5E4D9; +} + +#menu .menupagetitle { background-color: #CFDCED; + color: #000000;} + +#menu { border-color: #999999;} +#menu .menupagetitle { border-color: #999999;} +#menu .menupageitemgroup { border-color: #999999;} + +#menu { background-color: #4C6C8F;} +#menu { color: #ffffff;} +#menu a:link { color: #ffffff;} +#menu a:visited { color: #ffffff;} +#menu a:hover { +background-color: #4C6C8F; +color: #ffffff;} + +#menu h1 { +color: #000000; +background-color: #cfdced; +} + +#top .searchbox { +background-color: #E5E4D9 ; +color: #000000; +} + +#menu .menupageitemgroup { +background-color: #E5E4D9; +} +#menu .menupageitem { +color: #000000; +} +#menu .menupageitem a:link { color: #000000;} +#menu .menupageitem a:visited { color: #000000;} +#menu .menupageitem a:hover { +background-color: #E5E4D9; +color: #000000; +} + +body{ +background-color: #ffffff; +color: #000000; +} +a:link { color:#0000ff} +a:visited { color:#009999} +a:hover { color:#6587ff} + + +.ForrestTable { background-color: #ccc;} + +.ForrestTable td { background-color: #ffffff;} + +.highlight { background-color: #ffff00;} + +.fixme { border-color: #c60;} + +.note { border-color: #069;} + +.warning { border-color: #900;} + +.code { border-color: #a5b6c6;} + +#footer { background-color: #E5E4D9;} +/* extra-css */ + + p.quote { + margin-left: 2em; + padding: .5em; + background-color: #f0f0f0; + font-family: monospace; + } + + pre.code { + margin-left: 0em; + padding: 0.5em; + background-color: #f0f0f0; + font-family: monospace; + } + + + + \ No newline at end of file diff --git a/docs/skin/prototype.js b/docs/skin/prototype.js new file mode 100644 index 0000000..ed7d920 --- /dev/null +++ b/docs/skin/prototype.js @@ -0,0 +1,1257 @@ +/* Prototype JavaScript framework, version 1.4.0_pre4 + * (c) 2005 Sam Stephenson + * + * THIS FILE IS AUTOMATICALLY GENERATED. When sending patches, please diff + * against the source tree, available from the Prototype darcs repository. + * + * Prototype is freely distributable under the terms of an MIT-style license. + * + * For details, see the Prototype web site: http://prototype.conio.net/ + * +/*--------------------------------------------------------------------------*/ + +var Prototype = { + Version: '1.4.0_pre4', + + emptyFunction: function() {}, + K: function(x) {return x} +} + +var Class = { + create: function() { + return function() { + this.initialize.apply(this, arguments); + } + } +} + +var Abstract = new Object(); + +Object.extend = function(destination, source) { + for (property in source) { + destination[property] = source[property]; + } + return destination; +} + +Function.prototype.bind = function(object) { + var __method = this; + return function() { + return __method.apply(object, arguments); + } +} + +Function.prototype.bindAsEventListener = function(object) { + var __method = this; + return function(event) { + return __method.call(object, event || window.event); + } +} + +Number.prototype.toColorPart = function() { + var digits = this.toString(16); + if (this < 16) return '0' + digits; + return digits; +} + +var Try = { + these: function() { + var returnValue; + + for (var i = 0; i < arguments.length; i++) { + var lambda = arguments[i]; + try { + returnValue = lambda(); + break; + } catch (e) {} + } + + return returnValue; + } +} + +/*--------------------------------------------------------------------------*/ + +var PeriodicalExecuter = Class.create(); +PeriodicalExecuter.prototype = { + initialize: function(callback, frequency) { + this.callback = callback; + this.frequency = frequency; + this.currentlyExecuting = false; + + this.registerCallback(); + }, + + registerCallback: function() { + setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); + }, + + onTimerEvent: function() { + if (!this.currentlyExecuting) { + try { + this.currentlyExecuting = true; + this.callback(); + } finally { + this.currentlyExecuting = false; + } + } + } +} + +/*--------------------------------------------------------------------------*/ + +function $() { + var elements = new Array(); + + for (var i = 0; i < arguments.length; i++) { + var element = arguments[i]; + if (typeof element == 'string') + element = document.getElementById(element); + + if (arguments.length == 1) + return element; + + elements.push(element); + } + + return elements; +} + +if (!Array.prototype.push) { + Array.prototype.push = function() { + var startLength = this.length; + for (var i = 0; i < arguments.length; i++) + this[startLength + i] = arguments[i]; + return this.length; + } +} + +if (!Function.prototype.apply) { + // Based on code from http://www.youngpup.net/ + Function.prototype.apply = function(object, parameters) { + var parameterStrings = new Array(); + if (!object) object = window; + if (!parameters) parameters = new Array(); + + for (var i = 0; i < parameters.length; i++) + parameterStrings[i] = 'parameters[' + i + ']'; + + object.__apply__ = this; + var result = eval('object.__apply__(' + + parameterStrings.join(', ') + ')'); + object.__apply__ = null; + + return result; + } +} + +Object.extend(String.prototype, { + stripTags: function() { + return this.replace(/<\/?[^>]+>/gi, ''); + }, + + escapeHTML: function() { + var div = document.createElement('div'); + var text = document.createTextNode(this); + div.appendChild(text); + return div.innerHTML; + }, + + unescapeHTML: function() { + var div = document.createElement('div'); + div.innerHTML = this.stripTags(); + return div.childNodes[0].nodeValue; + }, + + parseQuery: function() { + var str = this; + if (str.substring(0,1) == '?') { + str = this.substring(1); + } + var result = {}; + var pairs = str.split('&'); + for (var i = 0; i < pairs.length; i++) { + var pair = pairs[i].split('='); + result[pair[0]] = pair[1]; + } + return result; + } +}); + + +var _break = new Object(); +var _continue = new Object(); + +var Enumerable = { + each: function(iterator) { + var index = 0; + try { + this._each(function(value) { + try { + iterator(value, index++); + } catch (e) { + if (e != _continue) throw e; + } + }); + } catch (e) { + if (e != _break) throw e; + } + }, + + all: function(iterator) { + var result = true; + this.each(function(value, index) { + if (!(result &= (iterator || Prototype.K)(value, index))) + throw _break; + }); + return result; + }, + + any: function(iterator) { + var result = true; + this.each(function(value, index) { + if (result &= (iterator || Prototype.K)(value, index)) + throw _break; + }); + return result; + }, + + collect: function(iterator) { + var results = []; + this.each(function(value, index) { + results.push(iterator(value, index)); + }); + return results; + }, + + detect: function (iterator) { + var result; + this.each(function(value, index) { + if (iterator(value, index)) { + result = value; + throw _break; + } + }); + return result; + }, + + findAll: function(iterator) { + var results = []; + this.each(function(value, index) { + if (iterator(value, index)) + results.push(value); + }); + return results; + }, + + grep: function(pattern, iterator) { + var results = []; + this.each(function(value, index) { + var stringValue = value.toString(); + if (stringValue.match(pattern)) + results.push((iterator || Prototype.K)(value, index)); + }) + return results; + }, + + include: function(object) { + var found = false; + this.each(function(value) { + if (value == object) { + found = true; + throw _break; + } + }); + return found; + }, + + inject: function(memo, iterator) { + this.each(function(value, index) { + memo = iterator(memo, value, index); + }); + return memo; + }, + + invoke: function(method) { + var args = $A(arguments).slice(1); + return this.collect(function(value) { + return value[method].apply(value, args); + }); + }, + + max: function(iterator) { + var result; + this.each(function(value, index) { + value = (iterator || Prototype.K)(value, index); + if (value >= (result || value)) + result = value; + }); + return result; + }, + + min: function(iterator) { + var result; + this.each(function(value, index) { + value = (iterator || Prototype.K)(value, index); + if (value <= (result || value)) + result = value; + }); + return result; + }, + + partition: function(iterator) { + var trues = [], falses = []; + this.each(function(value, index) { + ((iterator || Prototype.K)(value, index) ? + trues : falses).push(value); + }); + return [trues, falses]; + }, + + pluck: function(property) { + var results = []; + this.each(function(value, index) { + results.push(value[property]); + }); + return results; + }, + + reject: function(iterator) { + var results = []; + this.each(function(value, index) { + if (!iterator(value, index)) + results.push(value); + }); + return results; + }, + + sortBy: function(iterator) { + return this.collect(function(value, index) { + return {value: value, criteria: iterator(value, index)}; + }).sort(function(left, right) { + var a = left.criteria, b = right.criteria; + return a < b ? -1 : a > b ? 1 : 0; + }).pluck('value'); + }, + + toArray: function() { + return this.collect(Prototype.K); + }, + + zip: function() { + var iterator = Prototype.K, args = $A(arguments); + if (typeof args.last() == 'function') + iterator = args.pop(); + + var collections = [this].concat(args).map($A); + return this.map(function(value, index) { + iterator(value = collections.pluck(index)); + return value; + }); + } +} + +Object.extend(Enumerable, { + map: Enumerable.collect, + find: Enumerable.detect, + select: Enumerable.findAll, + member: Enumerable.include, + entries: Enumerable.toArray +}); + +$A = Array.from = function(iterable) { + var results = []; + for (var i = 0; i < iterable.length; i++) + results.push(iterable[i]); + return results; +} + +Object.extend(Array.prototype, { + _each: function(iterator) { + for (var i = 0; i < this.length; i++) + iterator(this[i]); + }, + + first: function() { + return this[0]; + }, + + last: function() { + return this[this.length - 1]; + } +}); + +Object.extend(Array.prototype, Enumerable); + + +var Ajax = { + getTransport: function() { + return Try.these( + function() {return new ActiveXObject('Msxml2.XMLHTTP')}, + function() {return new ActiveXObject('Microsoft.XMLHTTP')}, + function() {return new XMLHttpRequest()} + ) || false; + } +} + +Ajax.Base = function() {}; +Ajax.Base.prototype = { + setOptions: function(options) { + this.options = { + method: 'post', + asynchronous: true, + parameters: '' + } + Object.extend(this.options, options || {}); + }, + + responseIsSuccess: function() { + return this.transport.status == undefined + || this.transport.status == 0 + || (this.transport.status >= 200 && this.transport.status < 300); + }, + + responseIsFailure: function() { + return !this.responseIsSuccess(); + } +} + +Ajax.Request = Class.create(); +Ajax.Request.Events = + ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete']; + +Ajax.Request.prototype = Object.extend(new Ajax.Base(), { + initialize: function(url, options) { + this.transport = Ajax.getTransport(); + this.setOptions(options); + this.request(url); + }, + + request: function(url) { + var parameters = this.options.parameters || ''; + if (parameters.length > 0) parameters += '&_='; + + try { + if (this.options.method == 'get') + url += '?' + parameters; + + this.transport.open(this.options.method, url, + this.options.asynchronous); + + if (this.options.asynchronous) { + this.transport.onreadystatechange = this.onStateChange.bind(this); + setTimeout((function() {this.respondToReadyState(1)}).bind(this), 10); + } + + this.setRequestHeaders(); + + var body = this.options.postBody ? this.options.postBody : parameters; + this.transport.send(this.options.method == 'post' ? body : null); + + } catch (e) { + } + }, + + setRequestHeaders: function() { + var requestHeaders = + ['X-Requested-With', 'XMLHttpRequest', + 'X-Prototype-Version', Prototype.Version]; + + if (this.options.method == 'post') { + requestHeaders.push('Content-type', + 'application/x-www-form-urlencoded'); + + /* Force "Connection: close" for Mozilla browsers to work around + * a bug where XMLHttpReqeuest sends an incorrect Content-length + * header. See Mozilla Bugzilla #246651. + */ + if (this.transport.overrideMimeType) + requestHeaders.push('Connection', 'close'); + } + + if (this.options.requestHeaders) + requestHeaders.push.apply(requestHeaders, this.options.requestHeaders); + + for (var i = 0; i < requestHeaders.length; i += 2) + this.transport.setRequestHeader(requestHeaders[i], requestHeaders[i+1]); + }, + + onStateChange: function() { + var readyState = this.transport.readyState; + if (readyState != 1) + this.respondToReadyState(this.transport.readyState); + }, + + respondToReadyState: function(readyState) { + var event = Ajax.Request.Events[readyState]; + + if (event == 'Complete') + (this.options['on' + this.transport.status] + || this.options['on' + (this.responseIsSuccess() ? 'Success' : 'Failure')] + || Prototype.emptyFunction)(this.transport); + + (this.options['on' + event] || Prototype.emptyFunction)(this.transport); + + /* Avoid memory leak in MSIE: clean up the oncomplete event handler */ + if (event == 'Complete') + this.transport.onreadystatechange = Prototype.emptyFunction; + } +}); + +Ajax.Updater = Class.create(); +Ajax.Updater.ScriptFragment = '(?:)((\n|.)*?)(?:<\/script>)'; + +Object.extend(Object.extend(Ajax.Updater.prototype, Ajax.Request.prototype), { + initialize: function(container, url, options) { + this.containers = { + success: container.success ? $(container.success) : $(container), + failure: container.failure ? $(container.failure) : + (container.success ? null : $(container)) + } + + this.transport = Ajax.getTransport(); + this.setOptions(options); + + var onComplete = this.options.onComplete || Prototype.emptyFunction; + this.options.onComplete = (function() { + this.updateContent(); + onComplete(this.transport); + }).bind(this); + + this.request(url); + }, + + updateContent: function() { + var receiver = this.responseIsSuccess() ? + this.containers.success : this.containers.failure; + + var match = new RegExp(Ajax.Updater.ScriptFragment, 'img'); + var response = this.transport.responseText.replace(match, ''); + var scripts = this.transport.responseText.match(match); + + if (receiver) { + if (this.options.insertion) { + new this.options.insertion(receiver, response); + } else { + receiver.innerHTML = response; + } + } + + if (this.responseIsSuccess()) { + if (this.onComplete) + setTimeout((function() {this.onComplete( + this.transport)}).bind(this), 10); + } + + if (this.options.evalScripts && scripts) { + match = new RegExp(Ajax.Updater.ScriptFragment, 'im'); + setTimeout((function() { + for (var i = 0; i < scripts.length; i++) + eval(scripts[i].match(match)[1]); + }).bind(this), 10); + } + } +}); + +Ajax.PeriodicalUpdater = Class.create(); +Ajax.PeriodicalUpdater.prototype = Object.extend(new Ajax.Base(), { + initialize: function(container, url, options) { + this.setOptions(options); + this.onComplete = this.options.onComplete; + + this.frequency = (this.options.frequency || 2); + this.decay = 1; + + this.updater = {}; + this.container = container; + this.url = url; + + this.start(); + }, + + start: function() { + this.options.onComplete = this.updateComplete.bind(this); + this.onTimerEvent(); + }, + + stop: function() { + this.updater.onComplete = undefined; + clearTimeout(this.timer); + (this.onComplete || Ajax.emptyFunction).apply(this, arguments); + }, + + updateComplete: function(request) { + if (this.options.decay) { + this.decay = (request.responseText == this.lastText ? + this.decay * this.options.decay : 1); + + this.lastText = request.responseText; + } + this.timer = setTimeout(this.onTimerEvent.bind(this), + this.decay * this.frequency * 1000); + }, + + onTimerEvent: function() { + this.updater = new Ajax.Updater(this.container, this.url, this.options); + } +}); + +document.getElementsByClassName = function(className) { + var children = document.getElementsByTagName('*') || document.all; + var elements = new Array(); + + for (var i = 0; i < children.length; i++) { + var child = children[i]; + var classNames = child.className.split(' '); + for (var j = 0; j < classNames.length; j++) { + if (classNames[j] == className) { + elements.push(child); + break; + } + } + } + + return elements; +} + +/*--------------------------------------------------------------------------*/ + +if (!window.Element) { + var Element = new Object(); +} + +Object.extend(Element, { + toggle: function() { + for (var i = 0; i < arguments.length; i++) { + var element = $(arguments[i]); + element.style.display = + (element.style.display == 'none' ? '' : 'none'); + } + }, + + hide: function() { + for (var i = 0; i < arguments.length; i++) { + var element = $(arguments[i]); + element.style.display = 'none'; + } + }, + + show: function() { + for (var i = 0; i < arguments.length; i++) { + var element = $(arguments[i]); + element.style.display = ''; + } + }, + + remove: function(element) { + element = $(element); + element.parentNode.removeChild(element); + }, + + getHeight: function(element) { + element = $(element); + return element.offsetHeight; + }, + + hasClassName: function(element, className) { + element = $(element); + if (!element) + return; + var a = element.className.split(' '); + for (var i = 0; i < a.length; i++) { + if (a[i] == className) + return true; + } + return false; + }, + + addClassName: function(element, className) { + element = $(element); + Element.removeClassName(element, className); + element.className += ' ' + className; + }, + + removeClassName: function(element, className) { + element = $(element); + if (!element) + return; + var newClassName = ''; + var a = element.className.split(' '); + for (var i = 0; i < a.length; i++) { + if (a[i] != className) { + if (i > 0) + newClassName += ' '; + newClassName += a[i]; + } + } + element.className = newClassName; + }, + + // removes whitespace-only text node children + cleanWhitespace: function(element) { + var element = $(element); + for (var i = 0; i < element.childNodes.length; i++) { + var node = element.childNodes[i]; + if (node.nodeType == 3 && !/\S/.test(node.nodeValue)) + Element.remove(node); + } + } +}); + +var Toggle = new Object(); +Toggle.display = Element.toggle; + +/*--------------------------------------------------------------------------*/ + +Abstract.Insertion = function(adjacency) { + this.adjacency = adjacency; +} + +Abstract.Insertion.prototype = { + initialize: function(element, content) { + this.element = $(element); + this.content = content; + + if (this.adjacency && this.element.insertAdjacentHTML) { + this.element.insertAdjacentHTML(this.adjacency, this.content); + } else { + this.range = this.element.ownerDocument.createRange(); + if (this.initializeRange) this.initializeRange(); + this.fragment = this.range.createContextualFragment(this.content); + this.insertContent(); + } + } +} + +var Insertion = new Object(); + +Insertion.Before = Class.create(); +Insertion.Before.prototype = Object.extend(new Abstract.Insertion('beforeBegin'), { + initializeRange: function() { + this.range.setStartBefore(this.element); + }, + + insertContent: function() { + this.element.parentNode.insertBefore(this.fragment, this.element); + } +}); + +Insertion.Top = Class.create(); +Insertion.Top.prototype = Object.extend(new Abstract.Insertion('afterBegin'), { + initializeRange: function() { + this.range.selectNodeContents(this.element); + this.range.collapse(true); + }, + + insertContent: function() { + this.element.insertBefore(this.fragment, this.element.firstChild); + } +}); + +Insertion.Bottom = Class.create(); +Insertion.Bottom.prototype = Object.extend(new Abstract.Insertion('beforeEnd'), { + initializeRange: function() { + this.range.selectNodeContents(this.element); + this.range.collapse(this.element); + }, + + insertContent: function() { + this.element.appendChild(this.fragment); + } +}); + +Insertion.After = Class.create(); +Insertion.After.prototype = Object.extend(new Abstract.Insertion('afterEnd'), { + initializeRange: function() { + this.range.setStartAfter(this.element); + }, + + insertContent: function() { + this.element.parentNode.insertBefore(this.fragment, + this.element.nextSibling); + } +}); + +var Field = { + clear: function() { + for (var i = 0; i < arguments.length; i++) + $(arguments[i]).value = ''; + }, + + focus: function(element) { + $(element).focus(); + }, + + present: function() { + for (var i = 0; i < arguments.length; i++) + if ($(arguments[i]).value == '') return false; + return true; + }, + + select: function(element) { + $(element).select(); + }, + + activate: function(element) { + $(element).focus(); + $(element).select(); + } +} + +/*--------------------------------------------------------------------------*/ + +var Form = { + serialize: function(form) { + var elements = Form.getElements($(form)); + var queryComponents = new Array(); + + for (var i = 0; i < elements.length; i++) { + var queryComponent = Form.Element.serialize(elements[i]); + if (queryComponent) + queryComponents.push(queryComponent); + } + + return queryComponents.join('&'); + }, + + getElements: function(form) { + var form = $(form); + var elements = new Array(); + + for (tagName in Form.Element.Serializers) { + var tagElements = form.getElementsByTagName(tagName); + for (var j = 0; j < tagElements.length; j++) + elements.push(tagElements[j]); + } + return elements; + }, + + getInputs: function(form, typeName, name) { + var form = $(form); + var inputs = form.getElementsByTagName('input'); + + if (!typeName && !name) + return inputs; + + var matchingInputs = new Array(); + for (var i = 0; i < inputs.length; i++) { + var input = inputs[i]; + if ((typeName && input.type != typeName) || + (name && input.name != name)) + continue; + matchingInputs.push(input); + } + + return matchingInputs; + }, + + disable: function(form) { + var elements = Form.getElements(form); + for (var i = 0; i < elements.length; i++) { + var element = elements[i]; + element.blur(); + element.disabled = 'true'; + } + }, + + enable: function(form) { + var elements = Form.getElements(form); + for (var i = 0; i < elements.length; i++) { + var element = elements[i]; + element.disabled = ''; + } + }, + + focusFirstElement: function(form) { + var form = $(form); + var elements = Form.getElements(form); + for (var i = 0; i < elements.length; i++) { + var element = elements[i]; + if (element.type != 'hidden' && !element.disabled) { + Field.activate(element); + break; + } + } + }, + + reset: function(form) { + $(form).reset(); + } +} + +Form.Element = { + serialize: function(element) { + var element = $(element); + var method = element.tagName.toLowerCase(); + var parameter = Form.Element.Serializers[method](element); + + if (parameter) + return encodeURIComponent(parameter[0]) + '=' + + encodeURIComponent(parameter[1]); + }, + + getValue: function(element) { + var element = $(element); + var method = element.tagName.toLowerCase(); + var parameter = Form.Element.Serializers[method](element); + + if (parameter) + return parameter[1]; + } +} + +Form.Element.Serializers = { + input: function(element) { + switch (element.type.toLowerCase()) { + case 'submit': + case 'hidden': + case 'password': + case 'text': + return Form.Element.Serializers.textarea(element); + case 'checkbox': + case 'radio': + return Form.Element.Serializers.inputSelector(element); + } + return false; + }, + + inputSelector: function(element) { + if (element.checked) + return [element.name, element.value]; + }, + + textarea: function(element) { + return [element.name, element.value]; + }, + + select: function(element) { + var value = ''; + if (element.type == 'select-one') { + var index = element.selectedIndex; + if (index >= 0) + value = element.options[index].value || element.options[index].text; + } else { + value = new Array(); + for (var i = 0; i < element.length; i++) { + var opt = element.options[i]; + if (opt.selected) + value.push(opt.value || opt.text); + } + } + return [element.name, value]; + } +} + +/*--------------------------------------------------------------------------*/ + +var $F = Form.Element.getValue; + +/*--------------------------------------------------------------------------*/ + +Abstract.TimedObserver = function() {} +Abstract.TimedObserver.prototype = { + initialize: function(element, frequency, callback) { + this.frequency = frequency; + this.element = $(element); + this.callback = callback; + + this.lastValue = this.getValue(); + this.registerCallback(); + }, + + registerCallback: function() { + setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); + }, + + onTimerEvent: function() { + var value = this.getValue(); + if (this.lastValue != value) { + this.callback(this.element, value); + this.lastValue = value; + } + } +} + +Form.Element.Observer = Class.create(); +Form.Element.Observer.prototype = Object.extend(new Abstract.TimedObserver(), { + getValue: function() { + return Form.Element.getValue(this.element); + } +}); + +Form.Observer = Class.create(); +Form.Observer.prototype = Object.extend(new Abstract.TimedObserver(), { + getValue: function() { + return Form.serialize(this.element); + } +}); + +/*--------------------------------------------------------------------------*/ + +Abstract.EventObserver = function() {} +Abstract.EventObserver.prototype = { + initialize: function(element, callback) { + this.element = $(element); + this.callback = callback; + + this.lastValue = this.getValue(); + if (this.element.tagName.toLowerCase() == 'form') + this.registerFormCallbacks(); + else + this.registerCallback(this.element); + }, + + onElementEvent: function() { + var value = this.getValue(); + if (this.lastValue != value) { + this.callback(this.element, value); + this.lastValue = value; + } + }, + + registerFormCallbacks: function() { + var elements = Form.getElements(this.element); + for (var i = 0; i < elements.length; i++) + this.registerCallback(elements[i]); + }, + + registerCallback: function(element) { + if (element.type) { + switch (element.type.toLowerCase()) { + case 'checkbox': + case 'radio': + element.target = this; + element.prev_onclick = element.onclick || Prototype.emptyFunction; + element.onclick = function() { + this.prev_onclick(); + this.target.onElementEvent(); + } + break; + case 'password': + case 'text': + case 'textarea': + case 'select-one': + case 'select-multiple': + element.target = this; + element.prev_onchange = element.onchange || Prototype.emptyFunction; + element.onchange = function() { + this.prev_onchange(); + this.target.onElementEvent(); + } + break; + } + } + } +} + +Form.Element.EventObserver = Class.create(); +Form.Element.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), { + getValue: function() { + return Form.Element.getValue(this.element); + } +}); + +Form.EventObserver = Class.create(); +Form.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), { + getValue: function() { + return Form.serialize(this.element); + } +}); + + +if (!window.Event) { + var Event = new Object(); +} + +Object.extend(Event, { + KEY_BACKSPACE: 8, + KEY_TAB: 9, + KEY_RETURN: 13, + KEY_ESC: 27, + KEY_LEFT: 37, + KEY_UP: 38, + KEY_RIGHT: 39, + KEY_DOWN: 40, + KEY_DELETE: 46, + + element: function(event) { + return event.target || event.srcElement; + }, + + isLeftClick: function(event) { + return (((event.which) && (event.which == 1)) || + ((event.button) && (event.button == 1))); + }, + + pointerX: function(event) { + return event.pageX || (event.clientX + + (document.documentElement.scrollLeft || document.body.scrollLeft)); + }, + + pointerY: function(event) { + return event.pageY || (event.clientY + + (document.documentElement.scrollTop || document.body.scrollTop)); + }, + + stop: function(event) { + if (event.preventDefault) { + event.preventDefault(); + event.stopPropagation(); + } else { + event.returnValue = false; + } + }, + + // find the first node with the given tagName, starting from the + // node the event was triggered on; traverses the DOM upwards + findElement: function(event, tagName) { + var element = Event.element(event); + while (element.parentNode && (!element.tagName || + (element.tagName.toUpperCase() != tagName.toUpperCase()))) + element = element.parentNode; + return element; + }, + + observers: false, + + _observeAndCache: function(element, name, observer, useCapture) { + if (!this.observers) this.observers = []; + if (element.addEventListener) { + this.observers.push([element, name, observer, useCapture]); + element.addEventListener(name, observer, useCapture); + } else if (element.attachEvent) { + this.observers.push([element, name, observer, useCapture]); + element.attachEvent('on' + name, observer); + } + }, + + unloadCache: function() { + if (!Event.observers) return; + for (var i = 0; i < Event.observers.length; i++) { + Event.stopObserving.apply(this, Event.observers[i]); + Event.observers[i][0] = null; + } + Event.observers = false; + }, + + observe: function(element, name, observer, useCapture) { + var element = $(element); + useCapture = useCapture || false; + + if (name == 'keypress' && + ((/Konqueror|Safari|KHTML/.test(navigator.userAgent)) + || element.attachEvent)) + name = 'keydown'; + + this._observeAndCache(element, name, observer, useCapture); + }, + + stopObserving: function(element, name, observer, useCapture) { + var element = $(element); + useCapture = useCapture || false; + + if (name == 'keypress' && + ((/Konqueror|Safari|KHTML/.test(navigator.userAgent)) + || element.detachEvent)) + name = 'keydown'; + + if (element.removeEventListener) { + element.removeEventListener(name, observer, useCapture); + } else if (element.detachEvent) { + element.detachEvent('on' + name, observer); + } + } +}); + +/* prevent memory leaks in IE */ +Event.observe(window, 'unload', Event.unloadCache, false); + +var Position = { + + // set to true if needed, warning: firefox performance problems + // NOT neeeded for page scrolling, only if draggable contained in + // scrollable elements + includeScrollOffsets: false, + + // must be called before calling withinIncludingScrolloffset, every time the + // page is scrolled + prepare: function() { + this.deltaX = window.pageXOffset + || document.documentElement.scrollLeft + || document.body.scrollLeft + || 0; + this.deltaY = window.pageYOffset + || document.documentElement.scrollTop + || document.body.scrollTop + || 0; + }, + + realOffset: function(element) { + var valueT = 0, valueL = 0; + do { + valueT += element.scrollTop || 0; + valueL += element.scrollLeft || 0; + element = element.parentNode; + } while (element); + return [valueL, valueT]; + }, + + cumulativeOffset: function(element) { + var valueT = 0, valueL = 0; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + element = element.offsetParent; + } while (element); + return [valueL, valueT]; + }, + + // caches x/y coordinate pair to use with overlap + within: function(element, x, y) { + if (this.includeScrollOffsets) + return this.withinIncludingScrolloffsets(element, x, y); + this.xcomp = x; + this.ycomp = y; + this.offset = this.cumulativeOffset(element); + + return (y >= this.offset[1] && + y < this.offset[1] + element.offsetHeight && + x >= this.offset[0] && + x < this.offset[0] + element.offsetWidth); + }, + + withinIncludingScrolloffsets: function(element, x, y) { + var offsetcache = this.realOffset(element); + + this.xcomp = x + offsetcache[0] - this.deltaX; + this.ycomp = y + offsetcache[1] - this.deltaY; + this.offset = this.cumulativeOffset(element); + + return (this.ycomp >= this.offset[1] && + this.ycomp < this.offset[1] + element.offsetHeight && + this.xcomp >= this.offset[0] && + this.xcomp < this.offset[0] + element.offsetWidth); + }, + + // within must be called directly before + overlap: function(mode, element) { + if (!mode) return 0; + if (mode == 'vertical') + return ((this.offset[1] + element.offsetHeight) - this.ycomp) / + element.offsetHeight; + if (mode == 'horizontal') + return ((this.offset[0] + element.offsetWidth) - this.xcomp) / + element.offsetWidth; + }, + + clone: function(source, target) { + source = $(source); + target = $(target); + target.style.position = 'absolute'; + var offsets = this.cumulativeOffset(source); + target.style.top = offsets[1] + 'px'; + target.style.left = offsets[0] + 'px'; + target.style.width = source.offsetWidth + 'px'; + target.style.height = source.offsetHeight + 'px'; + } +} diff --git a/docs/skin/screen.css b/docs/skin/screen.css new file mode 100644 index 0000000..221cbe5 --- /dev/null +++ b/docs/skin/screen.css @@ -0,0 +1,587 @@ +/* +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright ownership. +* The ASF licenses this file to You under the Apache License, Version 2.0 +* (the "License"); you may not use this file except in compliance with +* the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +body { margin: 0px 0px 0px 0px; font-family: Verdana, Helvetica, sans-serif; } + +h1 { font-size : 160%; margin: 0px 0px 0px 0px; padding: 0px; } +h2 { font-size : 140%; margin: 1em 0px 0.8em 0px; padding: 0px; font-weight : bold;} +h3 { font-size : 130%; margin: 0.8em 0px 0px 0px; padding: 0px; font-weight : bold; } +.h3 { margin: 22px 0px 3px 0px; } +h4 { font-size : 120%; margin: 0.7em 0px 0px 0px; padding: 0px; font-weight : normal; text-align: left; } +.h4 { margin: 18px 0px 0px 0px; } +h4.faq { font-size : 120%; margin: 18px 0px 0px 0px; padding: 0px; font-weight : bold; text-align: left; } +h5 { font-size : 100%; margin: 14px 0px 0px 0px; padding: 0px; font-weight : normal; text-align: left; } + +/** +* table +*/ +table .title { background-color: #000000; } +.ForrestTable { + color: #ffffff; + background-color: #7099C5; + width: 100%; + font-size : 100%; + empty-cells: show; +} +table caption { + padding-left: 5px; + color: white; + text-align: left; + font-weight: bold; + background-color: #000000; +} +.ForrestTable td { + color: black; + background-color: #f0f0ff; +} +.ForrestTable th { text-align: center; } +/** + * Page Header + */ + +#top { + position: relative; + float: left; + width: 100%; + background: #294563; /* if you want a background in the header, put it here */ +} + +#top .breadtrail { + background: #CFDCED; + color: black; + border-bottom: solid 1px white; + padding: 3px 10px; + font-size: 75%; +} +#top .breadtrail a { color: black; } + +#top .header { + float: left; + width: 100%; + background: url("images/header_white_line.gif") repeat-x bottom; +} + +#top .grouplogo { + padding: 7px 0 10px 10px; + float: left; + text-align: left; +} +#top .projectlogo { + padding: 7px 0 10px 10px; + float: left; + width: 33%; + text-align: right; +} +#top .projectlogoA1 { + padding: 7px 0 10px 10px; + float: right; +} +html>body #top .searchbox { + bottom: 0px; +} +#top .searchbox { + position: absolute; + right: 10px; + height: 42px; + font-size: 70%; + white-space: nowrap; + text-align: right; + color: white; + background-color: #000000; + z-index:0; + background-image: url(images/rc-t-l-5-1header-2searchbox-3searchbox.png); + background-repeat: no-repeat; + background-position: top left; + bottom: -1px; /* compensate for IE rendering issue */ +} + +#top .searchbox form { + padding: 5px 10px; + margin: 0; +} +#top .searchbox p { + padding: 0 0 2px 0; + margin: 0; +} +#top .searchbox input { + font-size: 100%; +} + +#tabs { + clear: both; + padding-left: 10px; + margin: 0; + list-style: none; +} +/* background: #CFDCED url("images/tab-right.gif") no-repeat right top;*/ +#tabs li { + float: left; + background-image: url(images/rc-t-r-5-1header-2tab-unselected-3tab-unselected.png); + background-repeat: no-repeat; + background-position: top right; + background-color: #000000; + margin: 0 3px 0 0; + padding: 0; +} + +/*background: url("images/tab-left.gif") no-repeat left top;*/ +#tabs li a { + float: left; + display: block; + font-family: verdana, arial, sans-serif; + text-decoration: none; + color: black; + white-space: nowrap; + background-image: url(images/rc-t-l-5-1header-2tab-unselected-3tab-unselected.png); + background-repeat: no-repeat; + background-position: top left; + padding: 5px 15px 4px; + width: .1em; /* IE/Win fix */ +} + +#tabs li a:hover { + + cursor: pointer; + text-decoration:underline; +} + +#tabs > li a { width: auto; } /* Rest of IE/Win fix */ + +/* Commented Backslash Hack hides rule from IE5-Mac \*/ +#tabs a { float: none; } +/* End IE5-Mac hack */ + +#top .header .current { + background-color: #4C6C8F; + background-image: url(images/rc-t-r-5-1header-2tab-selected-3tab-selected.png); + background-repeat: no-repeat; + background-position: top right; +} +#top .header .current a { + font-weight: bold; + padding-bottom: 5px; + color: white; + background-image: url(images/rc-t-l-5-1header-2tab-selected-3tab-selected.png); + background-repeat: no-repeat; + background-position: top left; +} +#publishedStrip { + padding-right: 10px; + padding-left: 20px; + padding-top: 3px; + padding-bottom:3px; + color: #ffffff; + font-size : 60%; + font-weight: bold; + background-color: #4C6C8F; + text-align:right; +} + +#level2tabs { +margin: 0; +float:left; +position:relative; + +} + + + +#level2tabs a:hover { + + cursor: pointer; + text-decoration:underline; + +} + +#level2tabs a{ + + cursor: pointer; + text-decoration:none; + background-image: url('images/chapter.gif'); + background-repeat: no-repeat; + background-position: center left; + padding-left: 6px; + margin-left: 6px; +} + +/* +* border-top: solid #4C6C8F 15px; +*/ +#main { + position: relative; + background: white; + clear:both; +} +#main .breadtrail { + clear:both; + position: relative; + background: #CFDCED; + color: black; + border-bottom: solid 1px black; + border-top: solid 1px black; + padding: 0px 180px; + font-size: 75%; + z-index:10; +} +/** +* Round corner +*/ +#roundtop { + background-image: url(images/rc-t-r-15-1body-2menu-3menu.png); + background-repeat: no-repeat; + background-position: top right; +} + +#roundbottom { + background-image: url(images/rc-b-r-15-1body-2menu-3menu.png); + background-repeat: no-repeat; + background-position: top right; +} + +img.corner { + width: 15px; + height: 15px; + border: none; + display: block !important; +} + +.roundtopsmall { + background-image: url(images/rc-t-r-5-1header-2searchbox-3searchbox.png); + background-repeat: no-repeat; + background-position: top right; +} + +#roundbottomsmall { + background-image: url(images/rc-b-r-5-1header-2tab-selected-3tab-selected.png); + background-repeat: no-repeat; + background-position: top right; +} + +img.cornersmall { + width: 5px; + height: 5px; + border: none; + display: block !important; +} +/** + * Side menu + */ +#menu a { font-weight: normal; text-decoration: none;} +#menu a:visited { font-weight: normal; } +#menu a:active { font-weight: normal; } +#menu a:hover { font-weight: normal; text-decoration:underline;} + +#menuarea { width:10em;} +#menu { + position: relative; + float: left; + width: 160px; + padding-top: 0px; + top:-18px; + left:10px; + z-index: 20; + background-color: #f90; + font-size : 70%; + +} + +.menutitle { + cursor:pointer; + padding: 3px 12px; + margin-left: 10px; + background-image: url('images/chapter.gif'); + background-repeat: no-repeat; + background-position: center left; + font-weight : bold; + + +} + +.menutitle:hover{text-decoration:underline;cursor: pointer;} + +#menu .menuitemgroup { + margin: 0px 0px 6px 8px; + padding: 0px; + font-weight : bold; } + +#menu .selectedmenuitemgroup{ + margin: 0px 0px 0px 8px; + padding: 0px; + font-weight : normal; + + } + +#menu .menuitem { + padding: 2px 0px 1px 13px; + background-image: url('images/page.gif'); + background-repeat: no-repeat; + background-position: center left; + font-weight : normal; + margin-left: 10px; +} + +#menu .menupage { + margin: 2px 0px 1px 10px; + padding: 0px 3px 0px 12px; + background-image: url('images/page.gif'); + background-repeat: no-repeat; + background-position: center left; + font-style : normal; +} +#menu .menupagetitle { + padding: 0px 0px 0px 1px; + font-style : normal; + border-style: solid; + border-width: 1px; + margin-right: 10px; + +} +#menu .menupageitemgroup { + padding: 3px 0px 4px 6px; + font-style : normal; + border-bottom: 1px solid ; + border-left: 1px solid ; + border-right: 1px solid ; + margin-right: 10px; +} +#menu .menupageitem { + font-style : normal; + font-weight : normal; + border-width: 0px; + font-size : 90%; +} +#menu #credit { + text-align: center; +} +#menu #credit2 { + text-align: center; + padding: 3px 3px 3px 3px; + background-color: #ffffff; +} +#menu .searchbox { + text-align: center; +} +#menu .searchbox form { + padding: 3px 3px; + margin: 0; +} +#menu .searchbox input { + font-size: 100%; +} + +#content { + padding: 20px 20px 20px 180px; + margin: 0; + font : small Verdana, Helvetica, sans-serif; + font-size : 80%; +} + +#content ul { + margin: 0; + padding: 0 25px; +} +#content li { + padding: 0 5px; +} +#feedback { + color: black; + background: #CFDCED; + text-align:center; + margin-top: 5px; +} +#feedback #feedbackto { + font-size: 90%; + color: black; +} +#footer { + clear: both; + position: relative; /* IE bugfix (http://www.dracos.co.uk/web/css/ie6floatbug/) */ + width: 100%; + background: #CFDCED; + border-top: solid 1px #4C6C8F; + color: black; +} +#footer .copyright { + position: relative; /* IE bugfix cont'd */ + padding: 5px; + margin: 0; + width: 60%; +} +#footer .lastmodified { + position: relative; /* IE bugfix cont'd */ + float: right; + width: 30%; + padding: 5px; + margin: 0; + text-align: right; +} +#footer a { color: white; } + +#footer #logos { + text-align: left; +} + + +/** + * Misc Styles + */ + +acronym { cursor: help; } +.boxed { background-color: #a5b6c6;} +.underlined_5 {border-bottom: solid 5px #4C6C8F;} +.underlined_10 {border-bottom: solid 10px #4C6C8F;} +/* ==================== snail trail ============================ */ + +.trail { + position: relative; /* IE bugfix cont'd */ + font-size: 70%; + text-align: right; + float: right; + margin: -10px 5px 0px 5px; + padding: 0; +} + +#motd-area { + position:relative; + float:right; + width: 35%; + background-color: #f0f0ff; + border: solid 1px #4C6C8F; + margin: 0px 0px 10px 10px; + padding: 5px; +} + +#minitoc-area { + border-top: solid 1px #4C6C8F; + border-bottom: solid 1px #4C6C8F; + margin: 15px 10% 5px 15px; + /* margin-bottom: 15px; + margin-left: 15px; + margin-right: 10%;*/ + padding-bottom: 7px; + padding-top: 5px; +} +.minitoc { + list-style-image: url('images/current.gif'); + font-weight: normal; +} + +.abstract{ + text-align:justify; + } + +li p { + margin: 0; + padding: 0; +} + +.pdflink { + position: relative; /* IE bugfix cont'd */ + float: right; + margin: 0px 5px; + padding: 0; +} +.pdflink br { + margin-top: -10px; + padding-left: 1px; +} +.pdflink a { + display: block; + font-size: 70%; + text-align: center; + margin: 0; + padding: 0; +} + +.pdflink img { + display: block; + height: 16px; + width: 16px; +} +.xmllink { + position: relative; /* IE bugfix cont'd */ + float: right; + margin: 0px 5px; + padding: 0; +} +.xmllink br { + margin-top: -10px; + padding-left: 1px; +} +.xmllink a { + display: block; + font-size: 70%; + text-align: center; + margin: 0; + padding: 0; +} + +.xmllink img { + display: block; + height: 16px; + width: 16px; +} +.podlink { + position: relative; /* IE bugfix cont'd */ + float: right; + margin: 0px 5px; + padding: 0; +} +.podlink br { + margin-top: -10px; + padding-left: 1px; +} +.podlink a { + display: block; + font-size: 70%; + text-align: center; + margin: 0; + padding: 0; +} + +.podlink img { + display: block; + height: 16px; + width: 16px; +} + +.printlink { + position: relative; /* IE bugfix cont'd */ + float: right; +} +.printlink br { + margin-top: -10px; + padding-left: 1px; +} +.printlink a { + display: block; + font-size: 70%; + text-align: center; + margin: 0; + padding: 0; +} +.printlink img { + display: block; + height: 16px; + width: 16px; +} + +p.instruction { + display: list-item; + list-style-image: url('../images/instruction_arrow.png'); + list-style-position: outside; + margin-left: 2em; +} \ No newline at end of file diff --git a/docs/zookeeperAdmin.html b/docs/zookeeperAdmin.html new file mode 100644 index 0000000..d02522d --- /dev/null +++ b/docs/zookeeperAdmin.html @@ -0,0 +1,2231 @@ + + + + + + + +ZooKeeper Administrator's Guide + + + + + + + + + +
+ + + +
+ + + + + + + + + + + + +
+
+
+
+ +
+ + +
+ +
+ +   +
+ + + + + +
+ +

ZooKeeper Administrator's Guide

+

A Guide to Deployment and Administration

+ + + + + + + + + +

Deployment

+
+

This section contains information about deploying Zookeeper and + covers these topics:

+ +

The first two sections assume you are interested in installing + ZooKeeper in a production environment such as a datacenter. The final + section covers situations in which you are setting up ZooKeeper on a + limited basis - for evaluation, testing, or development - but not in a + production environment.

+ +

System Requirements

+ +

Supported Platforms

+

ZooKeeper consists of multiple components. Some components are + supported broadly, and other components are supported only on a smaller + set of platforms.

+
    + +
  • + +

    +Client is the Java client + library, used by applications to connect to a ZooKeeper ensemble. +

    + +
  • + +
  • + +

    +Server is the Java server + that runs on the ZooKeeper ensemble nodes.

    + +
  • + +
  • + +

    +Native Client is a client + implemented in C, similar to the Java client, used by applications + to connect to a ZooKeeper ensemble.

    + +
  • + +
  • + +

    +Contrib refers to multiple + optional add-on components.

    + +
  • + +
+

The following matrix describes the level of support committed for + running each component on different operating system platforms.

+ + + +Support Matrix + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Support Matrix
Operating SystemClientServerNative ClientContrib
GNU/LinuxDevelopment and ProductionDevelopment and ProductionDevelopment and ProductionDevelopment and Production
SolarisDevelopment and ProductionDevelopment and ProductionNot SupportedNot Supported
FreeBSDDevelopment and ProductionDevelopment and ProductionNot SupportedNot Supported
WindowsDevelopment and ProductionDevelopment and ProductionNot SupportedNot Supported
Mac OS XDevelopment OnlyDevelopment OnlyNot SupportedNot Supported
+

For any operating system not explicitly mentioned as supported in + the matrix, components may or may not work. The ZooKeeper community + will fix obvious bugs that are reported for other platforms, but there + is no full support.

+ +

Required Software

+

ZooKeeper runs in Java, release 1.6 or greater (JDK 6 or + greater). It runs as an ensemble of + ZooKeeper servers. Three ZooKeeper servers is the minimum + recommended size for an ensemble, and we also recommend that + they run on separate machines. At Yahoo!, ZooKeeper is + usually deployed on dedicated RHEL boxes, with dual-core + processors, 2GB of RAM, and 80GB IDE hard drives.

+ +

Clustered (Multi-Server) Setup

+

For reliable ZooKeeper service, you should deploy ZooKeeper in a + cluster known as an ensemble. As long as a majority + of the ensemble are up, the service will be available. Because Zookeeper + requires a majority, it is best to use an + odd number of machines. For example, with four machines ZooKeeper can + only handle the failure of a single machine; if two machines fail, the + remaining two machines do not constitute a majority. However, with five + machines ZooKeeper can handle the failure of two machines.

+
+
Note
+
+ +

+ As mentioned in the + ZooKeeper Getting Started Guide + , a minimum of three servers are required for a fault tolerant + clustered setup, and it is strongly recommended that you have an + odd number of servers. +

+ +

Usually three servers is more than enough for a production + install, but for maximum reliability during maintenance, you may + wish to install five servers. With three servers, if you perform + maintenance on one of them, you are vulnerable to a failure on one + of the other two servers during that maintenance. If you have five + of them running, you can take one down for maintenance, and know + that you're still OK if one of the other four suddenly fails. +

+ +

Your redundancy considerations should include all aspects of + your environment. If you have three ZooKeeper servers, but their + network cables are all plugged into the same network switch, then + the failure of that switch will take down your entire ensemble. +

+ +
+
+

Here are the steps to setting a server that will be part of an + ensemble. These steps should be performed on every host in the + ensemble:

+
    + +
  1. + +

    Install the Java JDK. You can use the native packaging system + for your system, or download the JDK from:

    + + +

    +http://java.sun.com/javase/downloads/index.jsp +

    + +
  2. + + +
  3. + +

    Set the Java heap size. This is very important to avoid + swapping, which will seriously degrade ZooKeeper performance. To + determine the correct value, use load tests, and make sure you are + well below the usage limit that would cause you to swap. Be + conservative - use a maximum heap size of 3GB for a 4GB + machine.

    + +
  4. + + +
  5. + +

    Install the ZooKeeper Server Package. It can be downloaded + from: +

    + +

    + + + http://zookeeper.apache.org/releases.html + + +

    + +
  6. + + +
  7. + +

    Create a configuration file. This file can be called anything. + Use the following settings as a starting point:

    + + +
    +tickTime=2000
    +dataDir=/var/lib/zookeeper/
    +clientPort=2181
    +initLimit=5
    +syncLimit=2
    +server.1=zoo1:2888:3888
    +server.2=zoo2:2888:3888
    +server.3=zoo3:2888:3888
    + + +

    You can find the meanings of these and other configuration + settings in the section Configuration Parameters. A word + though about a few here:

    + + +

    Every machine that is part of the ZooKeeper ensemble should know + about every other machine in the ensemble. You accomplish this with + the series of lines of the form server.id=host:port:port. The parameters host and port are straightforward. You attribute the + server id to each machine by creating a file named + myid, one for each server, which resides in + that server's data directory, as specified by the configuration file + parameter dataDir.

    +
  8. + + +
  9. +

    The myid file + consists of a single line containing only the text of that machine's + id. So myid of server 1 would contain the text + "1" and nothing else. The id must be unique within the + ensemble and should have a value between 1 and 255.

    + +
  10. + + +
  11. + +

    If your configuration file is set up, you can start a + ZooKeeper server:

    + + +

    +$ java -cp zookeeper.jar:lib/slf4j-api-1.6.1.jar:lib/slf4j-log4j12-1.6.1.jar:lib/log4j-1.2.15.jar:conf \ + org.apache.zookeeper.server.quorum.QuorumPeerMain zoo.cfg + +

    + + +

    QuorumPeerMain starts a ZooKeeper server, + JMX + management beans are also registered which allows + management through a JMX management console. + The ZooKeeper JMX + document contains details on managing ZooKeeper with JMX. +

    + + +

    See the script bin/zkServer.sh, + which is included in the release, for an example + of starting server instances.

    + + +
  12. + + +
  13. + +

    Test your deployment by connecting to the hosts:

    + + +

    In Java, you can run the following command to execute + simple operations:

    + + +

    +$ bin/zkCli.sh -server 127.0.0.1:2181 +

    + +
  14. + +
+ +

Single Server and Developer Setup

+

If you want to setup ZooKeeper for development purposes, you will + probably want to setup a single server instance of ZooKeeper, and then + install either the Java or C client-side libraries and bindings on your + development machine.

+

The steps to setting up a single server instance are the similar + to the above, except the configuration file is simpler. You can find the + complete instructions in the Installing and + Running ZooKeeper in Single Server Mode section of the ZooKeeper Getting Started + Guide.

+

For information on installing the client side libraries, refer to + the Bindings + section of the ZooKeeper + Programmer's Guide.

+
+ + + +

Administration

+
+

This section contains information about running and maintaining + ZooKeeper and covers these topics:

+ + +

Designing a ZooKeeper Deployment

+

The reliablity of ZooKeeper rests on two basic assumptions.

+
    + +
  1. +

    Only a minority of servers in a deployment + will fail. Failure in this context + means a machine crash, or some error in the network that + partitions a server off from the majority.

    + +
  2. + +
  3. +

    Deployed machines operate correctly. To + operate correctly means to execute code correctly, to have + clocks that work properly, and to have storage and network + components that perform consistently.

    + +
  4. + +
+

The sections below contain considerations for ZooKeeper + administrators to maximize the probability for these assumptions + to hold true. Some of these are cross-machines considerations, + and others are things you should consider for each and every + machine in your deployment.

+ +

Cross Machine Requirements

+

For the ZooKeeper service to be active, there must be a + majority of non-failing machines that can communicate with + each other. To create a deployment that can tolerate the + failure of F machines, you should count on deploying 2xF+1 + machines. Thus, a deployment that consists of three machines + can handle one failure, and a deployment of five machines can + handle two failures. Note that a deployment of six machines + can only handle two failures since three machines is not a + majority. For this reason, ZooKeeper deployments are usually + made up of an odd number of machines.

+

To achieve the highest probability of tolerating a failure + you should try to make machine failures independent. For + example, if most of the machines share the same switch, + failure of that switch could cause a correlated failure and + bring down the service. The same holds true of shared power + circuits, cooling systems, etc.

+ +

Single Machine Requirements

+

If ZooKeeper has to contend with other applications for + access to resourses like storage media, CPU, network, or + memory, its performance will suffer markedly. ZooKeeper has + strong durability guarantees, which means it uses storage + media to log changes before the operation responsible for the + change is allowed to complete. You should be aware of this + dependency then, and take great care if you want to ensure + that ZooKeeper operations aren’t held up by your media. Here + are some things you can do to minimize that sort of + degradation: +

+
    + +
  • + +

    ZooKeeper's transaction log must be on a dedicated + device. (A dedicated partition is not enough.) ZooKeeper + writes the log sequentially, without seeking Sharing your + log device with other processes can cause seeks and + contention, which in turn can cause multi-second + delays.

    + +
  • + + +
  • + +

    Do not put ZooKeeper in a situation that can cause a + swap. In order for ZooKeeper to function with any sort of + timeliness, it simply cannot be allowed to swap. + Therefore, make certain that the maximum heap size given + to ZooKeeper is not bigger than the amount of real memory + available to ZooKeeper. For more on this, see + Things to Avoid + below.

    + +
  • + +
+ +

Provisioning

+

+ +

Things to Consider: ZooKeeper Strengths and Limitations

+

+ +

Administering

+

+ +

Maintenance

+

Little long term maintenance is required for a ZooKeeper + cluster however you must be aware of the following:

+ +

Ongoing Data Directory Cleanup

+

The ZooKeeper Data + Directory contains files which are a persistent copy + of the znodes stored by a particular serving ensemble. These + are the snapshot and transactional log files. As changes are + made to the znodes these changes are appended to a + transaction log. Occasionally, when a log grows large, a + snapshot of the current state of all znodes will be written + to the filesystem and a new transaction log file is created + for future transactions. During snapshotting, ZooKeeper may + continue appending incoming transactions to the old log file. + Therefore, some transactions which are newer than a snapshot + may be found in the last transaction log preceding the + snapshot. +

+

A ZooKeeper server will not remove + old snapshots and log files when using the default + configuration (see autopurge below), this is the + responsibility of the operator. Every serving environment is + different and therefore the requirements of managing these + files may differ from install to install (backup for example). +

+

The PurgeTxnLog utility implements a simple retention + policy that administrators can use. The API docs contains details on + calling conventions (arguments, etc...). +

+

In the following example the last count snapshots and + their corresponding logs are retained and the others are + deleted. The value of <count> should typically be + greater than 3 (although not required, this provides 3 backups + in the unlikely event a recent log has become corrupted). This + can be run as a cron job on the ZooKeeper server machines to + clean up the logs daily.

+
 java -cp zookeeper.jar:lib/slf4j-api-1.6.1.jar:lib/slf4j-log4j12-1.6.1.jar:lib/log4j-1.2.15.jar:conf org.apache.zookeeper.server.PurgeTxnLog <dataDir> <snapDir> -n <count>
+

Automatic purging of the snapshots and corresponding + transaction logs was introduced in version 3.4.0 and can be + enabled via the following configuration parameters autopurge.snapRetainCount and autopurge.purgeInterval. For more on + this, see Advanced Configuration + below.

+ +

Debug Log Cleanup (log4j)

+

See the section on logging in this document. It is + expected that you will setup a rolling file appender using the + in-built log4j feature. The sample configuration file in the + release tar's conf/log4j.properties provides an example of + this. +

+ +

Supervision

+

You will want to have a supervisory process that manages + each of your ZooKeeper server processes (JVM). The ZK server is + designed to be "fail fast" meaning that it will shutdown + (process exit) if an error occurs that it cannot recover + from. As a ZooKeeper serving cluster is highly reliable, this + means that while the server may go down the cluster as a whole + is still active and serving requests. Additionally, as the + cluster is "self healing" the failed server once restarted will + automatically rejoin the ensemble w/o any manual + interaction.

+

Having a supervisory process such as daemontools or + SMF + (other options for supervisory process are also available, it's + up to you which one you would like to use, these are just two + examples) managing your ZooKeeper server ensures that if the + process does exit abnormally it will automatically be restarted + and will quickly rejoin the cluster.

+ +

Monitoring

+

The ZooKeeper service can be monitored in one of two + primary ways; 1) the command port through the use of 4 letter words and 2) JMX. See the appropriate section for + your environment/requirements.

+ +

Logging

+

ZooKeeper uses log4j version 1.2 as + its logging infrastructure. The ZooKeeper default log4j.properties + file resides in the conf directory. Log4j requires that + log4j.properties either be in the working directory + (the directory from which ZooKeeper is run) or be accessible from the classpath.

+

For more information, see + Log4j Default Initialization Procedure + of the log4j manual.

+ +

Troubleshooting

+
+ +
+ Server not coming up because of file corruption +
+
+

A server might not be able to read its database and fail to come up because of + some file corruption in the transaction logs of the ZooKeeper server. You will + see some IOException on loading ZooKeeper database. In such a case, + make sure all the other servers in your ensemble are up and working. Use "stat" + command on the command port to see if they are in good health. After you have verified that + all the other servers of the ensemble are up, you can go ahead and clean the database + of the corrupt server. Delete all the files in datadir/version-2 and datalogdir/version-2/. + Restart the server. +

+
+ +
+ +

Configuration Parameters

+

ZooKeeper's behavior is governed by the ZooKeeper configuration + file. This file is designed so that the exact same file can be used by + all the servers that make up a ZooKeeper server assuming the disk + layouts are the same. If servers use different configuration files, care + must be taken to ensure that the list of servers in all of the different + configuration files match.

+ +

Minimum Configuration

+

Here are the minimum configuration keywords that must be defined + in the configuration file:

+
+ +
+clientPort +
+
+

the port to listen for client connections; that is, the + port that clients attempt to connect to.

+
+ + +
+dataDir +
+
+

the location where ZooKeeper will store the in-memory + database snapshots and, unless specified otherwise, the + transaction log of updates to the database.

+
+
Note
+
+ +

Be careful where you put the transaction log. A + dedicated transaction log device is key to consistent good + performance. Putting the log on a busy device will adversely + effect performance.

+ +
+
+
+ + +
+tickTime +
+
+

the length of a single tick, which is the basic time unit + used by ZooKeeper, as measured in milliseconds. It is used to + regulate heartbeats, and timeouts. For example, the minimum + session timeout will be two ticks.

+
+ +
+ +

Advanced Configuration

+

The configuration settings in the section are optional. You can + use them to further fine tune the behaviour of your ZooKeeper servers. + Some can also be set using Java system properties, generally of the + form zookeeper.keyword. The exact system + property, when available, is noted below.

+
+ +
+dataLogDir +
+
+

(No Java system property)

+

This option will direct the machine to write the + transaction log to the dataLogDir rather than the dataDir. This allows a dedicated log + device to be used, and helps avoid competition between logging + and snaphots.

+
+
Note
+
+ +

Having a dedicated log device has a large impact on + throughput and stable latencies. It is highly recommened to + dedicate a log device and set dataLogDir to point to a directory on + that device, and then make sure to point dataDir to a directory + not residing on that device.

+ +
+
+
+ + +
+globalOutstandingLimit +
+
+

(Java system property: zookeeper.globalOutstandingLimit.)

+

Clients can submit requests faster than ZooKeeper can + process them, especially if there are a lot of clients. To + prevent ZooKeeper from running out of memory due to queued + requests, ZooKeeper will throttle clients so that there is no + more than globalOutstandingLimit outstanding requests in the + system. The default limit is 1,000.

+
+ + +
+preAllocSize +
+
+

(Java system property: zookeeper.preAllocSize)

+

To avoid seeks ZooKeeper allocates space in the + transaction log file in blocks of preAllocSize kilobytes. The + default block size is 64M. One reason for changing the size of + the blocks is to reduce the block size if snapshots are taken + more often. (Also, see snapCount).

+
+ + +
+snapCount +
+
+

(Java system property: zookeeper.snapCount)

+

ZooKeeper records its transactions using snapshots and + a transaction log (think write-ahead log).The number of + transactions recorded in the transaction log before a snapshot + can be taken (and the transaction log rolled) is determined + by snapCount. In order to prevent all of the machines in the quorum + from taking a snapshot at the same time, each ZooKeeper server + will take a snapshot when the number of transactions in the transaction log + reaches a runtime generated random value in the [snapCount/2+1, snapCount] + range.The default snapCount is 100,000.

+
+ + +
+maxClientCnxns +
+
+

(No Java system property)

+

Limits the number of concurrent connections (at the socket + level) that a single client, identified by IP address, may make + to a single member of the ZooKeeper ensemble. This is used to + prevent certain classes of DoS attacks, including file + descriptor exhaustion. The default is 60. Setting this to 0 + entirely removes the limit on concurrent connections.

+
+ + +
+clientPortAddress +
+
+

+New in 3.3.0: the + address (ipv4, ipv6 or hostname) to listen for client + connections; that is, the address that clients attempt + to connect to. This is optional, by default we bind in + such a way that any connection to the clientPort for any + address/interface/nic on the server will be + accepted.

+
+ + +
+minSessionTimeout +
+
+

(No Java system property)

+

+New in 3.3.0: the + minimum session timeout in milliseconds that the server + will allow the client to negotiate. Defaults to 2 times + the tickTime.

+
+ + +
+maxSessionTimeout +
+
+

(No Java system property)

+

+New in 3.3.0: the + maximum session timeout in milliseconds that the server + will allow the client to negotiate. Defaults to 20 times + the tickTime.

+
+ + +
+fsync.warningthresholdms +
+
+

(Java system property: zookeeper.fsync.warningthresholdms)

+

+New in 3.3.4: A + warning message will be output to the log whenever an + fsync in the Transactional Log (WAL) takes longer than + this value. The values is specified in milliseconds and + defaults to 1000. This value can only be set as a + system property.

+
+ + +
+autopurge.snapRetainCount +
+
+

(No Java system property)

+

+New in 3.4.0: + When enabled, ZooKeeper auto purge feature retains + the autopurge.snapRetainCount most + recent snapshots and the corresponding transaction logs in the + dataDir and dataLogDir respectively and deletes the rest. + Defaults to 3. Minimum value is 3.

+
+ + +
+autopurge.purgeInterval +
+
+

(No Java system property)

+

+New in 3.4.0: The + time interval in hours for which the purge task has to + be triggered. Set to a positive integer (1 and above) + to enable the auto purging. Defaults to 0.

+
+ + +
+syncEnabled +
+
+

(Java system property: zookeeper.observer.syncEnabled)

+

+New in 3.4.6, 3.5.0: + The observers now log transaction and write snapshot to disk + by default like the participants. This reduces the recovery time + of the observers on restart. Set to "false" to disable this + feature. Default is "true"

+
+ +
+ +

Cluster Options

+

The options in this section are designed for use with an ensemble + of servers -- that is, when deploying clusters of servers.

+
+ +
+electionAlg +
+
+

(No Java system property)

+

Election implementation to use. A value of "0" corresponds + to the original UDP-based version, "1" corresponds to the + non-authenticated UDP-based version of fast leader election, "2" + corresponds to the authenticated UDP-based version of fast + leader election, and "3" corresponds to TCP-based version of + fast leader election. Currently, algorithm 3 is the default

+
+
Note
+
+ +

The implementations of leader election 0, 1, and 2 are now + deprecated . We have the intention + of removing them in the next release, at which point only the + FastLeaderElection will be available. +

+ +
+
+
+ + +
+initLimit +
+
+

(No Java system property)

+

Amount of time, in ticks (see tickTime), to allow followers to + connect and sync to a leader. Increased this value as needed, if + the amount of data managed by ZooKeeper is large.

+
+ + +
+leaderServes +
+
+

(Java system property: zookeeper.leaderServes)

+

Leader accepts client connections. Default value is "yes". + The leader machine coordinates updates. For higher update + throughput at thes slight expense of read throughput the leader + can be configured to not accept clients and focus on + coordination. The default to this option is yes, which means + that a leader will accept client connections.

+
+
Note
+
+ +

Turning on leader selection is highly recommended when + you have more than three ZooKeeper servers in an ensemble.

+ +
+
+
+ + +
+server.x=[hostname]:nnnnn[:nnnnn], etc +
+
+

(No Java system property)

+

servers making up the ZooKeeper ensemble. When the server + starts up, it determines which server it is by looking for the + file myid in the data directory. That file + contains the server number, in ASCII, and it should match + x in server.x in the left hand side of this + setting.

+

The list of servers that make up ZooKeeper servers that is + used by the clients must match the list of ZooKeeper servers + that each ZooKeeper server has.

+

There are two port numbers nnnnn. + The first followers use to connect to the leader, and the second is for + leader election. The leader election port is only necessary if electionAlg + is 1, 2, or 3 (default). If electionAlg is 0, then the second port is not + necessary. If you want to test multiple servers on a single machine, then + different ports can be used for each server.

+
+ + +
+syncLimit +
+
+

(No Java system property)

+

Amount of time, in ticks (see tickTime), to allow followers to sync + with ZooKeeper. If followers fall too far behind a leader, they + will be dropped.

+
+ + +
+group.x=nnnnn[:nnnnn] +
+
+

(No Java system property)

+

Enables a hierarchical quorum construction."x" is a group identifier + and the numbers following the "=" sign correspond to server identifiers. + The left-hand side of the assignment is a colon-separated list of server + identifiers. Note that groups must be disjoint and the union of all groups + must be the ZooKeeper ensemble.

+

You will find an example here + +

+
+ + +
+weight.x=nnnnn +
+
+

(No Java system property)

+

Used along with "group", it assigns a weight to a server when + forming quorums. Such a value corresponds to the weight of a server + when voting. There are a few parts of ZooKeeper that require voting + such as leader election and the atomic broadcast protocol. By default + the weight of server is 1. If the configuration defines groups, but not + weights, then a value of 1 will be assigned to all servers. +

+

You will find an example here + +

+
+ + +
+cnxTimeout +
+
+

(Java system property: zookeeper.cnxTimeout)

+

Sets the timeout value for opening connections for leader election notifications. + Only applicable if you are using electionAlg 3. +

+
+
Note
+
+ +

Default value is 5 seconds.

+ +
+
+
+ + +
+4lw.commands.whitelist +
+
+

(Java system property: zookeeper.4lw.commands.whitelist)

+

+New in 3.4.10: + This property contains a list of comma separated + Four Letter Words commands. It is introduced + to provide fine grained control over the set of commands ZooKeeper can execute, + so users can turn off certain commands if necessary. + By default it contains all supported four letter word commands except "wchp" and "wchc", + if the property is not specified. If the property is specified, then only commands listed + in the whitelist are enabled. +

+

Here's an example of the configuration that enables stat, ruok, conf, and isro + command while disabling the rest of Four Letter Words command:

+
+                4lw.commands.whitelist=stat, ruok, conf, isro
+              
+

Users can also use asterisk option so they don't have to include every command one by one in the list. + As an example, this will enable all four letter word commands: +

+
+                4lw.commands.whitelist=*
+              
+
+ + +
+ipReachableTimeout +
+
+

(Java system property: zookeeper.ipReachableTimeout)

+

+New in 3.4.11: + Set this timeout value for IP addresses reachable checking when hostname is resolved, as mesured in + milliseconds. + By default, ZooKeeper will use the first IP address of the hostname(without any reachable checking). + When zookeeper.ipReachableTimeout is set(larger than 0), ZooKeeper will will try to pick up the first + IP address which is reachable. This is done by calling Java API InetAddress.isReachable(long timeout) + function, in which this timeout value is used. If none of such reachable IP address can be found, the + first IP address of the hostname will be used anyway. +

+
+ + +
+tcpKeepAlive +
+
+

(Java system property: zookeeper.tcpKeepAlive)

+

+New in 3.4.11: + Setting this to true sets the TCP keepAlive flag on the + sockets used by quorum members to perform elections. + This will allow for connections between quorum members to + remain up when there is network infrastructure that may + otherwise break them. Some NATs and firewalls may terminate + or lose state for long running or idle connections.

+

Enabling this option relies on OS level settings to work + properly, check your operating system's options regarding TCP + keepalive for more information. Defaults to + false. +

+
+ + +
+

+ +

Authentication & Authorization Options

+

The options in this section allow control over + authentication/authorization performed by the service.

+
+ +
+zookeeper.DigestAuthenticationProvider.superDigest +
+
+

(Java system property only: zookeeper.DigestAuthenticationProvider.superDigest)

+

By default this feature is disabled +

+

+New in 3.2: + Enables a ZooKeeper ensemble administrator to access the + znode hierarchy as a "super" user. In particular no ACL + checking occurs for a user authenticated as + super.

+

org.apache.zookeeper.server.auth.DigestAuthenticationProvider + can be used to generate the superDigest, call it with + one parameter of "super:<password>". Provide the + generated "super:<data>" as the system property value + when starting each server of the ensemble.

+

When authenticating to a ZooKeeper server (from a + ZooKeeper client) pass a scheme of "digest" and authdata + of "super:<password>". Note that digest auth passes + the authdata in plaintext to the server, it would be + prudent to use this authentication method only on + localhost (not over the network) or over an encrypted + connection.

+
+ + +
+isro +
+
+

+New in 3.4.0: Tests if + server is running in read-only mode. The server will respond with + "ro" if in read-only mode or "rw" if not in read-only mode.

+
+ + +
+gtmk +
+
+

Gets the current trace mask as a 64-bit signed long value in + decimal format. See stmk for an explanation of + the possible values.

+
+ + +
+stmk +
+
+

Sets the current trace mask. The trace mask is 64 bits, + where each bit enables or disables a specific category of trace + logging on the server. Log4J must be configured to enable + TRACE level first in order to see trace logging + messages. The bits of the trace mask correspond to the following + trace logging categories.

+ + + +Trace Mask Bit Values + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Trace Mask Bit Values
0b0000000000Unused, reserved for future use.
0b0000000010Logs client requests, excluding ping + requests.
0b0000000100Unused, reserved for future use.
0b0000001000Logs client ping requests.
0b0000010000Logs packets received from the quorum peer that is + the current leader, excluding ping requests.
0b0000100000Logs addition, removal and validation of client + sessions.
0b0001000000Logs delivery of watch events to client + sessions.
0b0010000000Logs ping packets received from the quorum peer + that is the current leader.
0b0100000000Unused, reserved for future use.
0b1000000000Unused, reserved for future use.
+

All remaining bits in the 64-bit value are unused and + reserved for future use. Multiple trace logging categories are + specified by calculating the bitwise OR of the documented values. + The default trace mask is 0b0100110010. Thus, by default, trace + logging includes client requests, packets received from the + leader and sessions.

+

To set a different trace mask, send a request containing the + stmk four-letter word followed by the trace + mask represented as a 64-bit signed long value. This example uses + the Perl pack function to construct a trace + mask that enables all trace logging categories described above and + convert it to a 64-bit signed long value with big-endian byte + order. The result is appended to stmk and sent + to the server using netcat. The server responds with the new + trace mask in decimal format.

+
$ perl -e "print 'stmk', pack('q>', 0b0011111010)" | nc localhost 2181
+250
+              
+
+ +
+ +

Experimental Options/Features

+

New features that are currently considered experimental.

+
+ +
+Read Only Mode Server +
+
+

(Java system property: readonlymode.enabled)

+

+New in 3.4.0: + Setting this value to true enables Read Only Mode server + support (disabled by default). ROM allows clients + sessions which requested ROM support to connect to the + server even when the server might be partitioned from + the quorum. In this mode ROM clients can still read + values from the ZK service, but will be unable to write + values and see changes from other clients. See + ZOOKEEPER-784 for more details. +

+
+ + +
+ +

Unsafe Options

+

The following options can be useful, but be careful when you use + them. The risk of each is explained along with the explanation of what + the variable does.

+
+ +
+forceSync +
+
+

(Java system property: zookeeper.forceSync)

+

Requires updates to be synced to media of the transaction + log before finishing processing the update. If this option is + set to no, ZooKeeper will not require updates to be synced to + the media.

+
+ + +
+jute.maxbuffer: +
+
+

(Java system property: + jute.maxbuffer)

+

This option can only be set as a Java system property. + There is no zookeeper prefix on it. It specifies the maximum + size of the data that can be stored in a znode. The default is + 0xfffff, or just under 1M. If this option is changed, the system + property must be set on all servers and clients otherwise + problems will arise. This is really a sanity check. ZooKeeper is + designed to store data on the order of kilobytes in size.

+
+ + +
+skipACL +
+
+

(Java system property: zookeeper.skipACL)

+

Skips ACL checks. This results in a boost in throughput, + but opens up full access to the data tree to everyone.

+
+ + +
+quorumListenOnAllIPs +
+
+

When set to true the ZooKeeper server will listen + for connections from its peers on all available IP addresses, + and not only the address configured in the server list of the + configuration file. It affects the connections handling the + ZAB protocol and the Fast Leader Election protocol. Default + value is false.

+
+ + +
+ +

Communication using the Netty framework

+

+New in + 3.4: Netty + is an NIO based client/server communication framework, it + simplifies (over NIO being used directly) many of the + complexities of network level communication for java + applications. Additionally the Netty framework has built + in support for encryption (SSL) and authentication + (certificates). These are optional features and can be + turned on or off individually. +

+

Prior to version 3.4 ZooKeeper has always used NIO + directly, however in versions 3.4 and later Netty is + supported as an option to NIO (replaces). NIO continues to + be the default, however Netty based communication can be + used in place of NIO by setting the environment variable + "zookeeper.serverCnxnFactory" to + "org.apache.zookeeper.server.NettyServerCnxnFactory". You + have the option of setting this on either the client(s) or + server(s), typically you would want to set this on both, + however that is at your discretion. +

+

+ TBD - tuning options for netty - currently there are none that are netty specific but we should add some. Esp around max bound on the number of reader worker threads netty creates. +

+

+ TBD - how to manage encryption +

+

+ TBD - how to manage certificates +

+ +

ZooKeeper Commands: The Four Letter Words

+

ZooKeeper responds to a small set of commands. Each command is + composed of four letters. You issue the commands to ZooKeeper via telnet + or nc, at the client port.

+

Three of the more interesting commands: "stat" gives some + general information about the server and connected clients, + while "srvr" and "cons" give extended details on server and + connections respectively.

+
+ +
+conf +
+
+

+New in 3.3.0: Print + details about serving configuration.

+
+ + +
+cons +
+
+

+New in 3.3.0: List + full connection/session details for all clients connected + to this server. Includes information on numbers of packets + received/sent, session id, operation latencies, last + operation performed, etc...

+
+ + +
+crst +
+
+

+New in 3.3.0: Reset + connection/session statistics for all connections.

+
+ + +
+dump +
+
+

Lists the outstanding sessions and ephemeral nodes. This + only works on the leader.

+
+ + +
+envi +
+
+

Print details about serving environment

+
+ + +
+ruok +
+
+

Tests if server is running in a non-error state. The server + will respond with imok if it is running. Otherwise it will not + respond at all.

+

A response of "imok" does not necessarily indicate that the + server has joined the quorum, just that the server process is active + and bound to the specified client port. Use "stat" for details on + state wrt quorum and client connection information.

+
+ + +
+srst +
+
+

Reset server statistics.

+
+ + +
+srvr +
+
+

+New in 3.3.0: Lists + full details for the server.

+
+ + +
+stat +
+
+

Lists brief details for the server and connected + clients.

+
+ + +
+wchs +
+
+

+New in 3.3.0: Lists + brief information on watches for the server.

+
+ + +
+wchc +
+
+

+New in 3.3.0: Lists + detailed information on watches for the server, by + session. This outputs a list of sessions(connections) + with associated watches (paths). Note, depending on the + number of watches this operation may be expensive (ie + impact server performance), use it carefully.

+
+ + +
+wchp +
+
+

+New in 3.3.0: Lists + detailed information on watches for the server, by path. + This outputs a list of paths (znodes) with associated + sessions. Note, depending on the number of watches this + operation may be expensive (ie impact server performance), + use it carefully.

+
+ + + +
+mntr +
+
+

+New in 3.4.0: Outputs a list + of variables that could be used for monitoring the health of the cluster.

+
$ echo mntr | nc localhost 2185
+
+zk_version  3.4.0
+zk_avg_latency  0
+zk_max_latency  0
+zk_min_latency  0
+zk_packets_received 70
+zk_packets_sent 69
+zk_outstanding_requests 0
+zk_server_state leader
+zk_znode_count   4
+zk_watch_count  0
+zk_ephemerals_count 0
+zk_approximate_data_size    27
+zk_followers    4                   - only exposed by the Leader
+zk_synced_followers 4               - only exposed by the Leader
+zk_pending_syncs    0               - only exposed by the Leader
+zk_open_file_descriptor_count 23    - only available on Unix platforms
+zk_max_file_descriptor_count 1024   - only available on Unix platforms
+zk_fsync_threshold_exceed_count	0
+
+

The output is compatible with java properties format and the content + may change over time (new keys added). Your scripts should expect changes.

+

ATTENTION: Some of the keys are platform specific and some of the keys are only exported by the Leader.

+

The output contains multiple lines with the following format:

+
key \t value
+
+ +
+

Here's an example of the ruok + command:

+
$ echo ruok | nc 127.0.0.1 5111
+imok
+
+ +

Data File Management

+

ZooKeeper stores its data in a data directory and its transaction + log in a transaction log directory. By default these two directories are + the same. The server can (and should) be configured to store the + transaction log files in a separate directory than the data files. + Throughput increases and latency decreases when transaction logs reside + on a dedicated log devices.

+ +

The Data Directory

+

This directory has two files in it:

+
    + +
  • + +

    +myid - contains a single integer in + human readable ASCII text that represents the server id.

    + +
  • + + +
  • + +

    +snapshot.<zxid> - holds the fuzzy + snapshot of a data tree.

    + +
  • + +
+

Each ZooKeeper server has a unique id. This id is used in two + places: the myid file and the configuration file. + The myid file identifies the server that + corresponds to the given data directory. The configuration file lists + the contact information for each server identified by its server id. + When a ZooKeeper server instance starts, it reads its id from the + myid file and then, using that id, reads from the + configuration file, looking up the port on which it should + listen.

+

The snapshot files stored in the data + directory are fuzzy snapshots in the sense that during the time the + ZooKeeper server is taking the snapshot, updates are occurring to the + data tree. The suffix of the snapshot file names + is the zxid, the ZooKeeper transaction id, of the + last committed transaction at the start of the snapshot. Thus, the + snapshot includes a subset of the updates to the data tree that + occurred while the snapshot was in process. The snapshot, then, may + not correspond to any data tree that actually existed, and for this + reason we refer to it as a fuzzy snapshot. Still, ZooKeeper can + recover using this snapshot because it takes advantage of the + idempotent nature of its updates. By replaying the transaction log + against fuzzy snapshots ZooKeeper gets the state of the system at the + end of the log.

+ +

The Log Directory

+

The Log Directory contains the ZooKeeper transaction logs. + Before any update takes place, ZooKeeper ensures that the transaction + that represents the update is written to non-volatile storage. A new + log file is started when the number of transactions written to the + current log file reaches a (variable) threshold. The threshold is + computed using the same parameter which influences the frequency of + snapshotting (see snapCount above). The log file's suffix is the first + zxid written to that log.

+ +

File Management

+

The format of snapshot and log files does not change between + standalone ZooKeeper servers and different configurations of + replicated ZooKeeper servers. Therefore, you can pull these files from + a running replicated ZooKeeper server to a development machine with a + stand-alone ZooKeeper server for trouble shooting.

+

Using older log and snapshot files, you can look at the previous + state of ZooKeeper servers and even restore that state. The + LogFormatter class allows an administrator to look at the transactions + in a log.

+

The ZooKeeper server creates snapshot and log files, but + never deletes them. The retention policy of the data and log + files is implemented outside of the ZooKeeper server. The + server itself only needs the latest complete fuzzy snapshot, all log + files following it, and the last log file preceding it. The latter + requirement is necessary to include updates which happened after this + snapshot was started but went into the existing log file at that time. + This is possible because snapshotting and rolling over of logs + proceed somewhat independently in ZooKeeper. See the + maintenance section in + this document for more details on setting a retention policy + and maintenance of ZooKeeper storage. +

+
+
Note
+
+ +

The data stored in these files is not encrypted. In the case of + storing sensitive data in ZooKeeper, necessary measures need to be + taken to prevent unauthorized access. Such measures are external to + ZooKeeper (e.g., control access to the files) and depend on the + individual settings in which it is being deployed.

+ +
+
+ +

Recovery - TxnLogToolkit

+

TxnLogToolkit is a command line tool shipped with ZooKeeper which + is capable of recovering transaction log entries with broken CRC.

+

Running it without any command line parameters or with the "-h,--help" + argument, it outputs the following help page:

+
+          $ bin/zkTxnLogToolkit.sh
+
+          usage: TxnLogToolkit [-dhrv] txn_log_file_name
+          -d,--dump      Dump mode. Dump all entries of the log file. (this is the default)
+          -h,--help      Print help message
+          -r,--recover   Recovery mode. Re-calculate CRC for broken entries.
+          -v,--verbose   Be verbose in recovery mode: print all entries, not just fixed ones.
+          -y,--yes       Non-interactive mode: repair all CRC errors without asking
+        
+

The default behaviour is safe: it dumps the entries of the given + transaction log file to the screen: (same as using '-d,--dump' parameter)

+
+          $ bin/zkTxnLogToolkit.sh log.100000001
+          ZooKeeper Transactional Log File with dbid 0 txnlog format version 2
+          4/5/18 2:15:58 PM CEST session 0x16295bafcc40000 cxid 0x0 zxid 0x100000001 createSession 30000
+          CRC ERROR - 4/5/18 2:16:05 PM CEST session 0x16295bafcc40000 cxid 0x1 zxid 0x100000002 closeSession null
+          4/5/18 2:16:05 PM CEST session 0x16295bafcc40000 cxid 0x1 zxid 0x100000002 closeSession null
+          4/5/18 2:16:12 PM CEST session 0x26295bafcc90000 cxid 0x0 zxid 0x100000003 createSession 30000
+          4/5/18 2:17:34 PM CEST session 0x26295bafcc90000 cxid 0x0 zxid 0x200000001 closeSession null
+          4/5/18 2:17:34 PM CEST session 0x16295bd23720000 cxid 0x0 zxid 0x200000002 createSession 30000
+          4/5/18 2:18:02 PM CEST session 0x16295bd23720000 cxid 0x2 zxid 0x200000003 create '/andor,#626262,v{s{31,s{'world,'anyone}}},F,1
+          EOF reached after 6 txns.
+        
+

There's a CRC error in the 2nd entry of the above transaction log file. In dump + mode, the toolkit only prints this information to the screen without touching the original file. In + recovery mode (-r,--recover flag) the original file still remains + untouched and all transactions will be copied over to a new txn log file with ".fixed" suffix. It recalculates + CRC values and copies the calculated value, if it doesn't match the original txn entry. + By default, the tool works interactively: it asks for confirmation whenever CRC error encountered.

+
+          $ bin/zkTxnLogToolkit.sh -r log.100000001
+          ZooKeeper Transactional Log File with dbid 0 txnlog format version 2
+          CRC ERROR - 4/5/18 2:16:05 PM CEST session 0x16295bafcc40000 cxid 0x1 zxid 0x100000002 closeSession null
+          Would you like to fix it (Yes/No/Abort) ?
+        
+

Answering Yes means the newly calculated CRC value will be outputted + to the new file. No means that the original CRC value will be copied over. + Abort will abort the entire operation and exits. + (In this case the ".fixed" will not be deleted and left in a half-complete state: contains only entries which + have already been processed or only the header if the operation was aborted at the first entry.)

+
+          $ bin/zkTxnLogToolkit.sh -r log.100000001
+          ZooKeeper Transactional Log File with dbid 0 txnlog format version 2
+          CRC ERROR - 4/5/18 2:16:05 PM CEST session 0x16295bafcc40000 cxid 0x1 zxid 0x100000002 closeSession null
+          Would you like to fix it (Yes/No/Abort) ? y
+          EOF reached after 6 txns.
+          Recovery file log.100000001.fixed has been written with 1 fixed CRC error(s)
+        
+

The default behaviour of recovery is to be silent: only entries with CRC error get printed to the screen. + One can turn on verbose mode with the -v,--verbose parameter to see all records. + Interactive mode can be turned off with the -y,--yes parameter. In this case all CRC errors will be fixed + in the new transaction file.

+ +

Things to Avoid

+

Here are some common problems you can avoid by configuring + ZooKeeper correctly:

+
+ +
+inconsistent lists of servers +
+
+

The list of ZooKeeper servers used by the clients must match + the list of ZooKeeper servers that each ZooKeeper server has. + Things work okay if the client list is a subset of the real list, + but things will really act strange if clients have a list of + ZooKeeper servers that are in different ZooKeeper clusters. Also, + the server lists in each Zookeeper server configuration file + should be consistent with one another.

+
+ + +
+incorrect placement of transaction log +
+
+

The most performance critical part of ZooKeeper is the + transaction log. ZooKeeper syncs transactions to media before it + returns a response. A dedicated transaction log device is key to + consistent good performance. Putting the log on a busy device will + adversely effect performance. If you only have one storage device, + put trace files on NFS and increase the snapshotCount; it doesn't + eliminate the problem, but it should mitigate it.

+
+ + +
+incorrect Java heap size +
+
+

You should take special care to set your Java max heap size + correctly. In particular, you should not create a situation in + which ZooKeeper swaps to disk. The disk is death to ZooKeeper. + Everything is ordered, so if processing one request swaps the + disk, all other queued requests will probably do the same. the + disk. DON'T SWAP.

+

Be conservative in your estimates: if you have 4G of RAM, do + not set the Java max heap size to 6G or even 4G. For example, it + is more likely you would use a 3G heap for a 4G machine, as the + operating system and the cache also need memory. The best and only + recommend practice for estimating the heap size your system needs + is to run load tests, and then make sure you are well below the + usage limit that would cause the system to swap.

+
+ + +
+Publicly accessible deployment +
+
+

+ A ZooKeeper ensemble is expected to operate in a trusted computing environment. + It is thus recommended to deploy ZooKeeper behind a firewall. +

+
+ +
+ +

Best Practices

+

For best results, take note of the following list of good + Zookeeper practices:

+

For multi-tennant installations see the section + detailing ZooKeeper "chroot" support, this can be very useful + when deploying many applications/services interfacing to a + single ZooKeeper cluster.

+
+ +

+ +

+
+ +
 
+
+ + + diff --git a/docs/zookeeperAdmin.pdf b/docs/zookeeperAdmin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..8d0028ede0d835057a143e3d2c2baae913591a7a GIT binary patch literal 86044 zcmd43WmFv9w(kwW-6dFXhi+)xgS)%COK`UYC%A>+5Foe)CxKwW-QC^YFYxF&d*6GW z{eF4R=rQQ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AB}!3Hy2za{n0~$kJ%Z TH8QCKOcIQH_H-TYX8ivELra5< literal 0 HcmV?d00001 diff --git a/docs/zookeeperHierarchicalQuorums.html b/docs/zookeeperHierarchicalQuorums.html new file mode 100644 index 0000000..5ebde0a --- /dev/null +++ b/docs/zookeeperHierarchicalQuorums.html @@ -0,0 +1,276 @@ + + + + + + + +Introduction to hierarchical quorums + + + + + + + + + +

+ + + +
+ + + + + + + + + + + + +
+
+
+
+ +
+ + +
+ +
+ +   +
+ + + + + +
+ +

Introduction to hierarchical quorums

+
+ + + + + +

+ This document gives an example of how to use hierarchical quorums. The basic idea is + very simple. First, we split servers into groups, and add a line for each group listing + the servers that form this group. Next we have to assign a weight to each server. +

+ + +

+ The following example shows how to configure a system with three groups of three servers + each, and we assign a weight of 1 to each server: +

+ + +
+    group.1=1:2:3
+    group.2=4:5:6
+    group.3=7:8:9
+   
+    weight.1=1
+    weight.2=1
+    weight.3=1
+    weight.4=1
+    weight.5=1
+    weight.6=1
+    weight.7=1
+    weight.8=1
+    weight.9=1
+ 	
+ + +

+ When running the system, we are able to form a quorum once we have a majority of votes from + a majority of non-zero-weight groups. Groups that have zero weight are discarded and not + considered when forming quorums. Looking at the example, we are able to form a quorum once + we have votes from at least two servers from each of two different groups. +

+ +

+ +

+
+ +
 
+
+ + + diff --git a/docs/zookeeperHierarchicalQuorums.pdf b/docs/zookeeperHierarchicalQuorums.pdf new file mode 100644 index 0000000000000000000000000000000000000000..fd20251ec0b7aa8da7e2241c7630e266e175163e GIT binary patch literal 6650 zcmb7Jc_38n_opN#$xumKjz-^ob`FmbLMjnDGNiK0$NcSA(fMxmyb{ePyo&8 zFhWZUfh3Tb6cCWvLuJxw&R!%YnMMVeG{B7v(us7E8<|9;07txNbT1EvECOli<#ZS% zF##D{8qF94JwZA|v{;Y?>41!$Cz0d^0yuLEzzU=@U|lFhbrp!mfDRI2-G)RaWX(_m zgF>sJuoyJ-r-D*ZK&eWjP|~sp9UTNnb%uRY`R*eCAk6?J1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&-Lww8t literal 0 HcmV?d00001 diff --git a/docs/zookeeperInternals.html b/docs/zookeeperInternals.html new file mode 100644 index 0000000..00e907d --- /dev/null +++ b/docs/zookeeperInternals.html @@ -0,0 +1,805 @@ + + + + + + + +ZooKeeper Internals + + + + + + + + + +
+ + + +
+ + + + + + + + + + + + +
+
+
+
+ +
+ + +
+ +
+ +   +
+ + + + + +
+ +

ZooKeeper Internals

+ + + + + + + +

Introduction

+
+

This document contains information on the inner workings of ZooKeeper. + So far, it discusses these topics: +

+ +
+ + + +

Atomic Broadcast

+
+

+At the heart of ZooKeeper is an atomic messaging system that keeps all of the servers in sync.

+ +

Guarantees, Properties, and Definitions

+

+The specific guarantees provided by the messaging system used by ZooKeeper are the following:

+
+ + +
+ +Reliable delivery + +
+
+

If a message, m, is delivered +by one server, it will be eventually delivered by all servers.

+
+ + +
+ +Total order + +
+
+

If a message is +delivered before message b by one server, a will be delivered before b by all +servers. If a and b are delivered messages, either a will be delivered before b +or b will be delivered before a.

+
+ + +
+ +Causal order + +
+
+

+If a message b is sent after a message a has been delivered by the sender of b, +a must be ordered before b. If a sender sends c after sending b, c must be ordered after b. +

+
+ + +
+

+The ZooKeeper messaging system also needs to be efficient, reliable, and easy to +implement and maintain. We make heavy use of messaging, so we need the system to +be able to handle thousands of requests per second. Although we can require at +least k+1 correct servers to send new messages, we must be able to recover from +correlated failures such as power outages. When we implemented the system we had +little time and few engineering resources, so we needed a protocol that is +accessible to engineers and is easy to implement. We found that our protocol +satisfied all of these goals. + +

+

+Our protocol assumes that we can construct point-to-point FIFO channels between +the servers. While similar services usually assume message delivery that can +lose or reorder messages, our assumption of FIFO channels is very practical +given that we use TCP for communication. Specifically we rely on the following property of TCP:

+
+ + +
+ +Ordered delivery + +
+
+

Data is delivered in the same order it is sent and a message m is +delivered only after all messages sent before m have been delivered. +(The corollary to this is that if message m is lost all messages after m will be lost.)

+
+ + +
+ +No message after close + +
+
+

Once a FIFO channel is closed, no messages will be received from it.

+
+ + +
+

+FLP proved that consensus cannot be achieved in asynchronous distributed systems +if failures are possible. To ensure we achieve consensus in the presence of failures +we use timeouts. However, we rely on times for liveness not for correctness. So, +if timeouts stop working (clocks malfunction for example) the messaging system may +hang, but it will not violate its guarantees.

+

When describing the ZooKeeper messaging protocol we will talk of packets, +proposals, and messages:

+
+ +
+ +Packet + +
+
+

a sequence of bytes sent through a FIFO channel

+
+
+ +Proposal + +
+
+

a unit of agreement. Proposals are agreed upon by exchanging packets +with a quorum of ZooKeeper servers. Most proposals contain messages, however the +NEW_LEADER proposal is an example of a proposal that does not correspond to a message.

+
+
+ +Message + +
+
+

a sequence of bytes to be atomically broadcast to all ZooKeeper +servers. A message put into a proposal and agreed upon before it is delivered.

+
+ + +
+

+As stated above, ZooKeeper guarantees a total order of messages, and it also +guarantees a total order of proposals. ZooKeeper exposes the total ordering using +a ZooKeeper transaction id (zxid). All proposals will be stamped with a zxid when +it is proposed and exactly reflects the total ordering. Proposals are sent to all +ZooKeeper servers and committed when a quorum of them acknowledge the proposal. +If a proposal contains a message, the message will be delivered when the proposal +is committed. Acknowledgement means the server has recorded the proposal to persistent storage. +Our quorums have the requirement that any pair of quorum must have at least one server +in common. We ensure this by requiring that all quorums have size (n/2+1) where +n is the number of servers that make up a ZooKeeper service. +

+

+The zxid has two parts: the epoch and a counter. In our implementation the zxid +is a 64-bit number. We use the high order 32-bits for the epoch and the low order +32-bits for the counter. Because it has two parts represent the zxid both as a +number and as a pair of integers, (epoch, count). The epoch number represents a +change in leadership. Each time a new leader comes into power it will have its +own epoch number. We have a simple algorithm to assign a unique zxid to a proposal: +the leader simply increments the zxid to obtain a unique zxid for each proposal. +Leadership activation will ensure that only one leader uses a given epoch, so our +simple algorithm guarantees that every proposal will have a unique id. + +

+

+ZooKeeper messaging consists of two phases:

+
+ +
+ +Leader activation + +
+
+

In this phase a leader establishes the correct state of the system +and gets ready to start making proposals.

+
+ + +
+ +Active messaging + +
+
+

In this phase a leader accepts messages to propose and coordinates message delivery.

+
+ +
+

+ZooKeeper is a holistic protocol. We do not focus on individual proposals, rather +look at the stream of proposals as a whole. Our strict ordering allows us to do this +efficiently and greatly simplifies our protocol. Leadership activation embodies +this holistic concept. A leader becomes active only when a quorum of followers +(The leader counts as a follower as well. You can always vote for yourself ) has synced +up with the leader, they have the same state. This state consists of all of the +proposals that the leader believes have been committed and the proposal to follow +the leader, the NEW_LEADER proposal. (Hopefully you are thinking to +yourself, Does the set of proposals that the leader believes has been committed +included all the proposals that really have been committed? The answer is yes. +Below, we make clear why.) +

+ +

Leader Activation

+

+Leader activation includes leader election. We currently have two leader election +algorithms in ZooKeeper: LeaderElection and FastLeaderElection (AuthFastLeaderElection +is a variant of FastLeaderElection that uses UDP and allows servers to perform a simple +form of authentication to avoid IP spoofing). ZooKeeper messaging doesn't care about the +exact method of electing a leader has long as the following holds: +

+
    + + +
  • +

    The leader has seen the highest zxid of all the followers.

    +
  • + +
  • +

    A quorum of servers have committed to following the leader.

    +
  • + + +
+

+Of these two requirements only the first, the highest zxid amoung the followers +needs to hold for correct operation. The second requirement, a quorum of followers, +just needs to hold with high probability. We are going to recheck the second requirement, +so if a failure happens during or after the leader election and quorum is lost, +we will recover by abandoning leader activation and running another election. +

+

+After leader election a single server will be designated as a leader and start +waiting for followers to connect. The rest of the servers will try to connect to +the leader. The leader will sync up with followers by sending any proposals they +are missing, or if a follower is missing too many proposals, it will send a full +snapshot of the state to the follower. +

+

+There is a corner case in which a follower that has proposals, U, not seen +by a leader arrives. Proposals are seen in order, so the proposals of U will have a zxids +higher than zxids seen by the leader. The follower must have arrived after the +leader election, otherwise the follower would have been elected leader given that +it has seen a higher zxid. Since committed proposals must be seen by a quorum of +servers, and a quorum of servers that elected the leader did not see U, the proposals +of you have not been committed, so they can be discarded. When the follower connects +to the leader, the leader will tell the follower to discard U. +

+

+A new leader establishes a zxid to start using for new proposals by getting the +epoch, e, of the highest zxid it has seen and setting the next zxid to use to be +(e+1, 0), fter the leader syncs with a follower, it will propose a NEW_LEADER +proposal. Once the NEW_LEADER proposal has been committed, the leader will activate +and start receiving and issuing proposals. +

+

+It all sounds complicated but here are the basic rules of operation during leader +activation: +

+
    + +
  • +

    A follower will ACK the NEW_LEADER proposal after it has synced with the leader.

    +
  • + +
  • +

    A follower will only ACK a NEW_LEADER proposal with a given zxid from a single server.

    +
  • + +
  • +

    A new leader will COMMIT the NEW_LEADER proposal when a quorum of followers have ACKed it.

    +
  • + +
  • +

    A follower will commit any state it received from the leader when the NEW_LEADER proposal is COMMIT.

    +
  • + +
  • +

    A new leader will not accept new proposals until the NEW_LEADER proposal has been COMMITED.

    +
  • + +
+

+If leader election terminates erroneously, we don't have a problem since the +NEW_LEADER proposal will not be committed since the leader will not have quorum. +When this happens, the leader and any remaining followers will timeout and go back +to leader election. +

+ +

Active Messaging

+

+Leader Activation does all the heavy lifting. Once the leader is coronated he can +start blasting out proposals. As long as he remains the leader no other leader can +emerge since no other leader will be able to get a quorum of followers. If a new +leader does emerge, +it means that the leader has lost quorum, and the new leader will clean up any +mess left over during her leadership activation. +

+

ZooKeeper messaging operates similar to a classic two-phase commit.

+

+All communication channels are FIFO, so everything is done in order. Specifically +the following operating constraints are observed:

+
    + + +
  • +

    The leader sends proposals to all followers using +the same order. Moreover, this order follows the order in which requests have been +received. Because we use FIFO channels this means that followers also receive proposals in order. +

    +
  • + + +
  • +

    Followers process messages in the order they are received. This +means that messages will be ACKed in order and the leader will receive ACKs from +followers in order, due to the FIFO channels. It also means that if message $m$ +has been written to non-volatile storage, all messages that were proposed before +$m$ have been written to non-volatile storage.

    +
  • + + +
  • +

    The leader will issue a COMMIT to all followers as soon as a +quorum of followers have ACKed a message. Since messages are ACKed in order, +COMMITs will be sent by the leader as received by the followers in order.

    +
  • + + +
  • +

    COMMITs are processed in order. Followers deliver a proposals +message when that proposal is committed.

    +
  • + + +
+ +

Summary

+

So there you go. Why does it work? Specifically, why does is set of proposals +believed by a new leader always contain any proposal that has actually been committed? +First, all proposals have a unique zxid, so unlike other protocols, we never have +to worry about two different values being proposed for the same zxid; followers +(a leader is also a follower) see and record proposals in order; proposals are +committed in order; there is only one active leader at a time since followers only +follow a single leader at a time; a new leader has seen all committed proposals +from the previous epoch since it has seen the highest zxid from a quorum of servers; +any uncommited proposals from a previous epoch seen by a new leader will be committed +by that leader before it becomes active.

+ +

Comparisons

+

+Isn't this just Multi-Paxos? No, Multi-Paxos requires some way of assuring that +there is only a single coordinator. We do not count on such assurances. Instead +we use the leader activation to recover from leadership change or old leaders +believing they are still active. +

+

+Isn't this just Paxos? Your active messaging phase looks just like phase 2 of Paxos? +Actually, to us active messaging looks just like 2 phase commit without the need to +handle aborts. Active messaging is different from both in the sense that it has +cross proposal ordering requirements. If we do not maintain strict FIFO ordering of +all packets, it all falls apart. Also, our leader activation phase is different from +both of them. In particular, our use of epochs allows us to skip blocks of uncommitted +proposals and to not worry about duplicate proposals for a given zxid. +

+
+ + + +

Quorums

+
+

+Atomic broadcast and leader election use the notion of quorum to guarantee a consistent +view of the system. By default, ZooKeeper uses majority quorums, which means that every +voting that happens in one of these protocols requires a majority to vote on. One example is +acknowledging a leader proposal: the leader can only commit once it receives an +acknowledgement from a quorum of servers. +

+

+If we extract the properties that we really need from our use of majorities, we have that we only +need to guarantee that groups of processes used to validate an operation by voting (e.g., acknowledging +a leader proposal) pairwise intersect in at least one server. Using majorities guarantees such a property. +However, there are other ways of constructing quorums different from majorities. For example, we can assign +weights to the votes of servers, and say that the votes of some servers are more important. To obtain a quorum, +we get enough votes so that the sum of weights of all votes is larger than half of the total sum of all weights. +

+

+A different construction that uses weights and is useful in wide-area deployments (co-locations) is a hierarchical +one. With this construction, we split the servers into disjoint groups and assign weights to processes. To form +a quorum, we have to get a hold of enough servers from a majority of groups G, such that for each group g in G, +the sum of votes from g is larger than half of the sum of weights in g. Interestingly, this construction enables +smaller quorums. If we have, for example, 9 servers, we split them into 3 groups, and assign a weight of 1 to each +server, then we are able to form quorums of size 4. Note that two subsets of processes composed each of a majority +of servers from each of a majority of groups necessarily have a non-empty intersection. It is reasonable to expect +that a majority of co-locations will have a majority of servers available with high probability. +

+

+With ZooKeeper, we provide a user with the ability of configuring servers to use majority quorums, weights, or a +hierarchy of groups. +

+
+ + + +

Logging

+
+

+Zookeeper uses +slf4j as an abstraction layer for logging. +log4j in version 1.2 is chosen as the final logging implementation for now. +For better embedding support, it is planned in the future to leave the decision of choosing the final logging implementation to the end user. +Therefore, always use the slf4j api to write log statements in the code, but configure log4j for how to log at runtime. +Note that slf4j has no FATAL level, former messages at FATAL level have been moved to ERROR level. +For information on configuring log4j for +ZooKeeper, see the Logging section +of the ZooKeeper Administrator's Guide. + + +

+ +

Developer Guidelines

+

Please follow the +slf4j manual when creating log statements within code. +Also read the +FAQ on performance +, when creating log statements. Patch reviewers will look for the following:

+ +

Logging at the Right Level

+

+There are several levels of logging in slf4j. +It's important to pick the right one. In order of higher to lower severity:

+
    + +
  1. +

    ERROR level designates error events that might still allow the application to continue running.

    +
  2. + +
  3. +

    WARN level designates potentially harmful situations.

    +
  4. + +
  5. +

    INFO level designates informational messages that highlight the progress of the application at coarse-grained level.

    +
  6. + +
  7. +

    DEBUG Level designates fine-grained informational events that are most useful to debug an application.

    +
  8. + +
  9. +

    TRACE Level designates finer-grained informational events than the DEBUG.

    +
  10. + +
+

+ZooKeeper is typically run in production such that log messages of INFO level +severity and higher (more severe) are output to the log.

+ +

Use of Standard slf4j Idioms

+

+Static Message Logging +

+
+LOG.debug("process completed successfully!");
+
+

+However when creating parameterized messages are required, use formatting anchors. +

+
+LOG.debug("got {} messages in {} minutes",new Object[]{count,time});    
+
+

+Naming +

+

+Loggers should be named after the class in which they are used. +

+
+public class Foo {
+    private static final Logger LOG = LoggerFactory.getLogger(Foo.class);
+    ....
+    public Foo() {
+       LOG.info("constructing Foo");
+
+

+Exception handling +

+
+try {
+  // code
+} catch (XYZException e) {
+  // do this
+  LOG.error("Something bad happened", e);
+  // don't do this (generally)
+  // LOG.error(e);
+  // why? because "don't do" case hides the stack trace
+ 
+  // continue process here as you need... recover or (re)throw
+}
+
+
+ + +

+ +

+
+ +
 
+
+ + + diff --git a/docs/zookeeperInternals.pdf b/docs/zookeeperInternals.pdf new file mode 100644 index 0000000000000000000000000000000000000000..69cadc4391892a4d3015db65c4de3429601f97dc GIT binary patch literal 48806 zcmeFY1yo$yvNqaCa0vtt1cFO&cefBUxD(vnrAY`7oIrp8!QI{6Em&}Ohu{v~ugTs! zJ2~gvd(M61j`#jI#%snJ-BVVrS+izUeO0xfP!N-#XJ%kSqR1~OEJ9)CZR2F@U}IqANQ1=q+WC!zv7ys1!;nq|2U{a&L&!{O zVLJmuGh-47c?A+xV+TibTN@H425xr998m{j11CsZ%)kjkT#Sc>iJ6OugM}IL$Iiq> z&%{Z^#6(4dBp`rfY-9AW6!yQDL_)$SN5YB(`Fdq+W9no^!psU8RC?%;Ft>s%4)SdU zp(|!=XlrErK*P}q@;GZGw=YStuIjJ1p7ks_%3bJ_Kes~g49F4!e8kB1MVU!|90h>F zBq2w+6jClt&+S!$r3qFq)eIO9qDBi|T|`xa{iIpA+CD0loO6D0u{bw(NWA5hymWip zv~?eL>5c}-^nF##gsTcAL>={k?5+vF%>Ecd<&M(pSLQ51yH{ls&Kp0F8&g-{w1EVPj#AVc?bp(rckUt>@A2Jq474SgVuTjhfi)Ek=Gu=+xSjkJCz zfkC(KxXzs_h1BqVST?#M>5KGgFGBT~Er2gsmQP!sUg>*15=HW^p?(G|WTi236vyI6 z9gAK5T?ortrY97bCU}8~Z5XF``!5VQB$W|bUk#;*D~`uLXDp9y3WY=0QN!%)=GN96!j<+@abe&T*y-x&&8jCy@PQ8_dPiVN`$vi|r*>{{gHBZQF&2KSOx*kp%4poOUGKdm)sQHkMKX zEI*~vNBe+@R5Z4CCL>5_esXpwU*NV{DeNB211^10LVa`eF&m-B9>W?uXA$#fd+yx} zTmFua1cwdx#Q$9y0yWypcS_GO$o*r5Ez^{83G)MX(@eItwyB*6>H(-CuBp$>2yd`G z;K`T}v)k%RX{?Yd^clGj!r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kjiog(LVu0P}blKL{A*wL{Or_tVPJUfH*OLGM literal 0 HcmV?d00001 diff --git a/docs/zookeeperJMX.html b/docs/zookeeperJMX.html new file mode 100644 index 0000000..c82f5f8 --- /dev/null +++ b/docs/zookeeperJMX.html @@ -0,0 +1,479 @@ + + + + + + + +ZooKeeper JMX + + + + + + + + + +
+ + + +
+ + + + + + + + + + + + +
+
+
+
+ +
+ + +
+ +
+ +   +
+ + + + + +
+ +

ZooKeeper JMX

+ + + + + + + +

JMX

+
+

Apache ZooKeeper has extensive support for JMX, allowing you + to view and manage a ZooKeeper serving ensemble.

+

This document assumes that you have basic knowledge of + JMX. See + Sun JMX Technology page to get started with JMX. +

+

See the + JMX Management Guide for details on setting up local and + remote management of VM instances. By default the included + zkServer.sh supports only local management - + review the linked document to enable support for remote management + (beyond the scope of this document). +

+
+ + + +

Starting ZooKeeper with JMX enabled

+
+

The class + org.apache.zookeeper.server.quorum.QuorumPeerMain + will start a JMX manageable ZooKeeper server. This class + registers the proper MBeans during initalization to support JMX + monitoring and management of the + instance. See bin/zkServer.sh for one + example of starting ZooKeeper using QuorumPeerMain.

+
+ + + +

Run a JMX console

+
+

There are a number of JMX consoles available which can connect + to the running server. For this example we will use Sun's + jconsole.

+

The Java JDK ships with a simple JMX console + named jconsole + which can be used to connect to ZooKeeper and inspect a running + server. Once you've started ZooKeeper using QuorumPeerMain + start jconsole, which typically resides in + JDK_HOME/bin/jconsole +

+

When the "new connection" window is displayed either connect + to local process (if jconsole started on same host as Server) or + use the remote process connection.

+

By default the "overview" tab for the VM is displayed (this + is a great way to get insight into the VM btw). Select + the "MBeans" tab.

+

You should now see org.apache.ZooKeeperService + on the left hand side. Expand this item and depending on how you've + started the server you will be able to monitor and manage various + service related features.

+

Also note that ZooKeeper will register log4j MBeans as + well. In the same section along the left hand side you will see + "log4j". Expand that to manage log4j through JMX. Of particular + interest is the ability to dynamically change the logging levels + used by editing the appender and root thresholds. Log4j MBean + registration can be disabled by passing + -Dzookeeper.jmx.log4j.disable=true to the JVM + when starting ZooKeeper. +

+
+ + + +

ZooKeeper MBean Reference

+
+

This table details JMX for a server participating in a + replicated ZooKeeper ensemble (ie not standalone). This is the + typical case for a production environment.

+ + + +MBeans, their names and description + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MBeans, their names and description
MBeanMBean Object NameDescription
QuorumReplicatedServer_id<#>Represents the Quorum, or Ensemble - parent of all + cluster members. Note that the object name includes the + "myid" of the server (name suffix) that your JMX agent has + connected to.
LocalPeer|RemotePeerreplica.<#>Represents a local or remote peer (ie server + participating in the ensemble). Note that the object name + includes the "myid" of the server (name suffix).
LeaderElectionLeaderElectionRepresents a ZooKeeper cluster leader election which is + in progress. Provides information about the election, such as + when it started.
LeaderLeaderIndicates that the parent replica is the leader and + provides attributes/operations for that server. Note that + Leader is a subclass of ZooKeeperServer, so it provides + all of the information normally associated with a + ZooKeeperServer node.
FollowerFollowerIndicates that the parent replica is a follower and + provides attributes/operations for that server. Note that + Follower is a subclass of ZooKeeperServer, so it provides + all of the information normally associated with a + ZooKeeperServer node.
DataTreeInMemoryDataTreeStatistics on the in memory znode database, also + operations to access finer (and more computationally + intensive) statistics on the data (such as ephemeral + count). InMemoryDataTrees are children of ZooKeeperServer + nodes.
ServerCnxn<session_id>Statistics on each client connection, also + operations on those connections (such as + termination). Note the object name is the session id of + the connection in hex form.
+

This table details JMX for a standalone server. Typically + standalone is only used in development situations.

+ + + +MBeans, their names and description + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MBeans, their names and description
MBeanMBean Object NameDescription
ZooKeeperServerStandaloneServer_port<#>Statistics on the running server, also operations + to reset these attributes. Note that the object name + includes the client port of the server (name + suffix).
DataTreeInMemoryDataTreeStatistics on the in memory znode database, also + operations to access finer (and more computationally + intensive) statistics on the data (such as ephemeral + count).
ServerCnxn<session_id>Statistics on each client connection, also + operations on those connections (such as + termination). Note the object name is the session id of + the connection in hex form.
+
+ + +

+ +

+
+ +
 
+
+ + + diff --git a/docs/zookeeperJMX.pdf b/docs/zookeeperJMX.pdf new file mode 100644 index 0000000000000000000000000000000000000000..316bd66237b995b37735705c1b9becf95b5721df GIT binary patch literal 16471 zcmc(GcRZEv`#24uvRCG@vYqMJM3ND*_jZgr9OKxl%p^*MLL?zu5i&zk8IkOj9hq6l z`ab8Nde{5&`Mf{h-|zMMI)8ZX>%O1szOL)O?)$#h!+lXfQ3xuGAmz@^$;~50fFK}@ z)g@9XDN?YG0~U<}@fu+;swk8*$`z!dX23@Z)^@kLgtEr|(g6T3x?*hHt${JTa?Y04 z_9&2|#zl}G%GJ#Q;{<{Ti;Dnb&bp#3u|QkF5(}VJkbps;Vh|(@3j9PMVnPs69tebo zk5op66y;=tBSPdSF(43F9Rw!@{#`&h*>>u|eT* zxM6|m97(;B9>jSXXiu>=4!fzZS#YtViG9P;&k)2=W?VVZ`-tK;0U;HL>%{sQox(>? z-e?`+yKYcu6!tNKm+boJ&`GT$ca3sK>)I8PGgsHvhWh&#*rxoFhc`E?rnaNjy~zk3 zU%8MEq1Pik!+ZN0=T_CJr!Gq;W(lqkvRYh`CSZ1QD$zGEfZP&ji*I=oD|t1rJtvVs ztFiz}>w9%qBYOb-^aug(h1MdkEtCAD$nm86;J11`JQEjGTQ5RxXcZa+oDsjwE9M@S zC%f5Pm>J|PPpQ!wHl6;zBMllF$ZaKHMG7Hra7+F!F9qd|7iVCLudo> zrzyLy+*Gy<;fb}B%M7!EmdNuu#4j(jrkvCK7{?BNcBd-x4s}QE>zzpX?e2yezH=D6 z&*#2PCCjbs$f5%$;yVclE~}U&3I+Du&LQ}0a_q|ML0R-`UxJHq>v>~e={MSFmv5hr zv8m|mo1B{JC;n!_bWSd?dl&nS>HDZJ^7>o=n7lqbr7p%+h2eU+OA)N-v6Z3|GQ7zS zvMcp!S8TE1y(LSn#z^D_hqpqp-@7A^bi6ChNnKUA#cf5bu$vXJ3z^kOxPSS@lPESq zp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^9nc2^DOlCP#tmeQ-@_n$R#yvz z5AkY&@F%1e$P`yRwtqVORPCRlIt$cY1I36q03P?xyzD^*C}{um*&A@d(h7xk1MTlz z5Lm+$>0a}3qZm_Z=ATIg+|7QW+$DN8cG>?V^B^O&seAdv()V=jA~MN9r$?mN;e)js$ggM?l~Ze5vO}5HFMuCtpBlI9CN| z!}i*+gEoAx4L@ij@NN8}{8*Kr%W|+g<*adKfF=!}hBn{|#+;#KgpY=M5qXK!1N%93t{NAAns3{ascNafs;e zd_bXak>6e2k`wa#WM~MDOAM#Hff{KX! zE-NS;D*C$&pim^_cYIJd{0})pMPRVs*B1&@#Q!-5{Ezj3!Vw~W&LM*M10V3}A2I;S zwf`I^_BSwbu|LKkAmV?}2h{ZcE>kG5Eq|F8>uTwMM!DiY+t+sRLE-i^SPO%}g7)@2 zSlP)I1HxHRK;B6iIEtm@5eg!T;_^_asL0uK2$+Z>OdKKyR3yoXiy{=|5aKeR|2zbL YXuIL8XZ%S5$W{bN%FTUFLy`1<0PdO!LI3~& literal 0 HcmV?d00001 diff --git a/docs/zookeeperObservers.html b/docs/zookeeperObservers.html new file mode 100644 index 0000000..42f9d16 --- /dev/null +++ b/docs/zookeeperObservers.html @@ -0,0 +1,366 @@ + + + + + + + +ZooKeeper Observers + + + + + + + + + +
+ + + +
+ + + + + + + + + + + + +
+
+
+
+ +
+ + +
+ +
+ +   +
+ + + + + +
+ +

ZooKeeper Observers

+ + + + + + + +

Observers: Scaling ZooKeeper Without Hurting Write Performance +

+
+

+ Although ZooKeeper performs very well by having clients connect directly + to voting members of the ensemble, this architecture makes it hard to + scale out to huge numbers of clients. The problem is that as we add more + voting members, the write performance drops. This is due to the fact that + a write operation requires the agreement of (in general) at least half the + nodes in an ensemble and therefore the cost of a vote can increase + significantly as more voters are added. +

+

+ We have introduced a new type of ZooKeeper node called + an Observer which helps address this problem and + further improves ZooKeeper's scalability. Observers are non-voting members + of an ensemble which only hear the results of votes, not the agreement + protocol that leads up to them. Other than this simple distinction, + Observers function exactly the same as Followers - clients may connect to + them and send read and write requests to them. Observers forward these + requests to the Leader like Followers do, but they then simply wait to + hear the result of the vote. Because of this, we can increase the number + of Observers as much as we like without harming the performance of votes. +

+

+ Observers have other advantages. Because they do not vote, they are not a + critical part of the ZooKeeper ensemble. Therefore they can fail, or be + disconnected from the cluster, without harming the availability of the + ZooKeeper service. The benefit to the user is that Observers may connect + over less reliable network links than Followers. In fact, Observers may be + used to talk to a ZooKeeper server from another data center. Clients of + the Observer will see fast reads, as all reads are served locally, and + writes result in minimal network traffic as the number of messages + required in the absence of the vote protocol is smaller. +

+
+ + +

How to use Observers

+
+

Setting up a ZooKeeper ensemble that uses Observers is very simple, + and requires just two changes to your config files. Firstly, in the config + file of every node that is to be an Observer, you must place this line: +

+
+      peerType=observer
+    
+

+ This line tells ZooKeeper that the server is to be an Observer. Secondly, + in every server config file, you must add :observer to the server + definition line of each Observer. For example: +

+
+      server.1:localhost:2181:3181:observer
+    
+

+ This tells every other server that server.1 is an Observer, and that they + should not expect it to vote. This is all the configuration you need to do + to add an Observer to your ZooKeeper cluster. Now you can connect to it as + though it were an ordinary Follower. Try it out, by running:

+
+      $ bin/zkCli.sh -server localhost:2181
+    
+

+ where localhost:2181 is the hostname and port number of the Observer as + specified in every config file. You should see a command line prompt + through which you can issue commands like ls to query + the ZooKeeper service. +

+
+ + + +

Example use cases

+
+

+ Two example use cases for Observers are listed below. In fact, wherever + you wish to scale the numbe of clients of your ZooKeeper ensemble, or + where you wish to insulate the critical part of an ensemble from the load + of dealing with client requests, Observers are a good architectural + choice. +

+
    + +
  • + +

    As a datacenter bridge: Forming a ZK ensemble between two + datacenters is a problematic endeavour as the high variance in latency + between the datacenters could lead to false positive failure detection + and partitioning. However if the ensemble runs entirely in one + datacenter, and the second datacenter runs only Observers, partitions + aren't problematic as the ensemble remains connected. Clients of the + Observers may still see and issue proposals.

    + +
  • + +
  • + +

    As a link to a message bus: Some companies have expressed an + interest in using ZK as a component of a persistent reliable message + bus. Observers would give a natural integration point for this work: a + plug-in mechanism could be used to attach the stream of proposals an + Observer sees to a publish-subscribe system, again without loading the + core ensemble. +

    + +
  • + +
+
+ +

+ +

+
+ +
 
+
+ + + diff --git a/docs/zookeeperObservers.pdf b/docs/zookeeperObservers.pdf new file mode 100644 index 0000000000000000000000000000000000000000..843e860b82c7986e32531d0583dae270843d5503 GIT binary patch literal 12867 zcmd6Oc|6qL_b`%bk``;WhU{Wi!&s6vvSwe?U@$di7-L^6B}q!6NJ7a@2w7W@vSkZJ zWDi*)CEN3!v9)}@zu)Kk{PR4TSLU93?>Xn5bMLulxdio9)g@q(NRVK9MrIZW35J4+ zwr4={@*s#2j*Q2GMJ$L!EiBdrO9JcJx?xEkSdyD42x91Ndj@Mq{-qlL>XV4}?smXP z5hWLlof8(UuBQ(+0Vd#x1Ta(*Ed`8GAz?9Opsk7_1ISfn;ZT?i6a|L?|D>QO38=I% z6e=tVI(ig@CD>C~k=kMj42I}}5g_1~HkRN>b^^oTK&Jr(ppL_n0m2YEb6s`nm!o1g#q;ltFS5x;xAi;LwW%i-U> znP?saX=g*(O=ypaL|#6;RDSTW>kQ)rO%N^b=^zCfZUUju)XWTeUHolKL+vfObAinn zaWn>HIWSh=bE|sk-T24!G$PuK`Cdy_*>}SR@7{sDHt7@|($;F!hh86fQfv}x=Z!rv8T1r08#?-w6* z8${pN0F?$e>D|(mSf@w26fzM=QHib1htcG(R`4+o8@6QnOmRNtb{2qcT`u3 zsu3MW)qafJQ<_^*#0L(=wA0X>J#i{dBCsFSZuUeAklED=^pV!BsCJ z`TT3?^UiaF*^umCFP=}_DZ+H(yaC^Sfs4^fXA=!lxzjI=B|3~+j*5^uOKA2ed*0`B z;{M6%v*R#ySIYB}Tv7b){L>Jbo!5fdpQpJnmC;L{mwtK6Wt-o=$soO#F@0RQi~%4$ zJ{mrLaup4R|449nF#n7Oh+o|VEU2-)C8&VEN8=D_&ka82T1yrNH8q&Nb`+Nw4eQ1J zB$B?kew==L>T)WR5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ajx#v1lGSJx#1K4w@TYworE$GZ~yP5`Ma@NbGZNg zCNUra$L?Pf`|V^=-vLmPdv1WAPIL!09s&f>!r8llEvY61@a!qJ15Ax(48Ycu%H6u< z*g7;@YEc267~qMH6aW?JR&H;j%n4pIKzGGJ_g^y7vBTf?IR zyqN_s zjM(H)T?&j?Go!$oDG!M441uQ*mHX z<3n}ry@0`SW$Q>2)@;m~F+rW_HL?a>yq6)TL*D1uz+yab-0zn!I2u+}1f;%2>O_A(|g8$wr z{|Xxdfd&Gdzp!l?!p&grpLnBc2E4_a6dVo&QGa3EI-&m)wzWO{3o@kCKe4uT{3wAG z33z(2c~fa)fEHry^4PNKUL>po2nt4^K|r9n{sTryNdf!H0lWr-!JueB;glaRVG{;J z0kr;rA)tWO{tX5+CJy$QfL`q zNB%YriiA><@4v%PK(gR(nDn1(gQ9>pJb#XpmXZFG7vPmW#W(t$h71((=Uf;-_OH3X z8~wlLqNSz&gu!4aDNfQKydWrB;13uQ^{0NJXn^n^<6yua5&Q#8 z<}ZA}Yo|Z)!Jtr?zhQ8Sjrxrj7!-m0dmNHtzWx{|h5Q?alKOKWz@XB9$rJ{a`Fm|p zw9GHOkVzOE9&jQ6!v`_M`CuvM17biV0>_E!fI>704n**ppAOLk43Rt%_{$1)6*y7~ zts<=|jg(Oasyi^GvI + + + + + + +ZooKeeper + + + + + + + + + +
+ + + +
+ + + + + + + + + + + + +
+
+
+
+ +
+ + +
+ +
+ +   +
+ + + + + +
+ +

ZooKeeper

+
+ +
+ + + + + + +

Other Info

+
+

currently empty

+
+ +

+ +

+
+ +
 
+
+ + + diff --git a/docs/zookeeperOtherInfo.pdf b/docs/zookeeperOtherInfo.pdf new file mode 100644 index 0000000000000000000000000000000000000000..bbefa1339805374eec7313fb2e387d9c10e82bca GIT binary patch literal 2947 zcmb_e=~C)Q6#k#5Xar<6k3awV8)E?poY^y$%>ttT>x&MEy1jHTqU$<~-CTD;yxQpk z5~oR=OMqMs)9nSi&mDc&(rv?E0Y=~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-v-@{f8e|1rEIlwTgWz6AB<|P9F|UWuWdoK#cCkK;&RQ;yDSf_Rg}V z$ED!iEih%Prt855``R`E(bC>`?^*l9)t49vC|?zIIskJ8cj;jT=W3@jRrg6 z3618U0w3>@By!bfngHwLCmP2 + + + + + + +ZooKeeper + + + + + + + + + +
+ + + +
+ + + + + + + + + + + + +
+
+
+
+ +
+ + +
+ +
+ +   +
+ + + + + +
+ +

ZooKeeper

+ + + + + + + +

ZooKeeper: A Distributed Coordination Service for Distributed + Applications

+
+

ZooKeeper is a distributed, open-source coordination service for + distributed applications. It exposes a simple set of primitives that + distributed applications can build upon to implement higher level services + for synchronization, configuration maintenance, and groups and naming. It + is designed to be easy to program to, and uses a data model styled after + the familiar directory tree structure of file systems. It runs in Java and + has bindings for both Java and C.

+

Coordination services are notoriously hard to get right. They are + especially prone to errors such as race conditions and deadlock. The + motivation behind ZooKeeper is to relieve distributed applications the + responsibility of implementing coordination services from scratch.

+ +

Design Goals

+

+ZooKeeper is simple. ZooKeeper + allows distributed processes to coordinate with each other through a + shared hierarchal namespace which is organized similarly to a standard + file system. The name space consists of data registers - called znodes, + in ZooKeeper parlance - and these are similar to files and directories. + Unlike a typical file system, which is designed for storage, ZooKeeper + data is kept in-memory, which means ZooKeeper can acheive high + throughput and low latency numbers.

+

The ZooKeeper implementation puts a premium on high performance, + highly available, strictly ordered access. The performance aspects of + ZooKeeper means it can be used in large, distributed systems. The + reliability aspects keep it from being a single point of failure. The + strict ordering means that sophisticated synchronization primitives can + be implemented at the client.

+

+ZooKeeper is replicated. Like the + distributed processes it coordinates, ZooKeeper itself is intended to be + replicated over a sets of hosts called an ensemble.

+ + + + + + + +
ZooKeeper Service
+ + + +
+

The servers that make up the ZooKeeper service must all know about + each other. They maintain an in-memory image of state, along with a + transaction logs and snapshots in a persistent store. As long as a + majority of the servers are available, the ZooKeeper service will be + available.

+

Clients connect to a single ZooKeeper server. The client maintains + a TCP connection through which it sends requests, gets responses, gets + watch events, and sends heart beats. If the TCP connection to the server + breaks, the client will connect to a different server.

+

+ZooKeeper is ordered. ZooKeeper + stamps each update with a number that reflects the order of all + ZooKeeper transactions. Subsequent operations can use the order to + implement higher-level abstractions, such as synchronization + primitives.

+

+ZooKeeper is fast. It is + especially fast in "read-dominant" workloads. ZooKeeper applications run + on thousands of machines, and it performs best where reads are more + common than writes, at ratios of around 10:1.

+ +

Data model and the hierarchical namespace

+

The name space provided by ZooKeeper is much like that of a + standard file system. A name is a sequence of path elements separated by + a slash (/). Every node in ZooKeeper's name space is identified by a + path.

+ + + + + + + +
ZooKeeper's Hierarchical Namespace
+ + + +
+ +

Nodes and ephemeral nodes

+

Unlike is standard file systems, each node in a ZooKeeper + namespace can have data associated with it as well as children. It is + like having a file-system that allows a file to also be a directory. + (ZooKeeper was designed to store coordination data: status information, + configuration, location information, etc., so the data stored at each + node is usually small, in the byte to kilobyte range.) We use the term + znode to make it clear that we are talking about + ZooKeeper data nodes.

+

Znodes maintain a stat structure that includes version numbers for + data changes, ACL changes, and timestamps, to allow cache validations + and coordinated updates. Each time a znode's data changes, the version + number increases. For instance, whenever a client retrieves data it also + receives the version of the data.

+

The data stored at each znode in a namespace is read and written + atomically. Reads get all the data bytes associated with a znode and a + write replaces all the data. Each node has an Access Control List (ACL) + that restricts who can do what.

+

ZooKeeper also has the notion of ephemeral nodes. These znodes + exists as long as the session that created the znode is active. When the + session ends the znode is deleted. Ephemeral nodes are useful when you + want to implement [tbd].

+ +

Conditional updates and watches

+

ZooKeeper supports the concept of watches. + Clients can set a watch on a znodes. A watch will be triggered and + removed when the znode changes. When a watch is triggered the client + receives a packet saying that the znode has changed. And if the + connection between the client and one of the Zoo Keeper servers is + broken, the client will receive a local notification. These can be used + to [tbd].

+ +

Guarantees

+

ZooKeeper is very fast and very simple. Since its goal, though, is + to be a basis for the construction of more complicated services, such as + synchronization, it provides a set of guarantees. These are:

+
    + +
  • + +

    Sequential Consistency - Updates from a client will be applied + in the order that they were sent.

    + +
  • + + +
  • + +

    Atomicity - Updates either succeed or fail. No partial + results.

    + +
  • + + +
  • + +

    Single System Image - A client will see the same view of the + service regardless of the server that it connects to.

    + +
  • + +
+
    + +
  • + +

    Reliability - Once an update has been applied, it will persist + from that time forward until a client overwrites the update.

    + +
  • + +
+
    + +
  • + +

    Timeliness - The clients view of the system is guaranteed to + be up-to-date within a certain time bound.

    + +
  • + +
+

For more information on these, and how they can be used, see + [tbd] +

+ +

Simple API

+

One of the design goals of ZooKeeper is provide a very simple + programming interface. As a result, it supports only these + operations:

+
+ +
+create +
+
+

creates a node at a location in the tree

+
+ + +
+delete +
+
+

deletes a node

+
+ + +
+exists +
+
+

tests if a node exists at a location

+
+ + +
+get data +
+
+

reads the data from a node

+
+ + +
+set data +
+
+

writes data to a node

+
+ + +
+get children +
+
+

retrieves a list of children of a node

+
+ + +
+sync +
+
+

waits for data to be propagated

+
+ +
+

For a more in-depth discussion on these, and how they can be used + to implement higher level operations, please refer to + [tbd] +

+ +

Implementation

+

+ZooKeeper Components shows the high-level components + of the ZooKeeper service. With the exception of the request processor, + each of + the servers that make up the ZooKeeper service replicates its own copy + of each of components.

+ + + + + + + +
ZooKeeper Components
+ + + +
+

The replicated database is an in-memory database containing the + entire data tree. Updates are logged to disk for recoverability, and + writes are serialized to disk before they are applied to the in-memory + database.

+

Every ZooKeeper server services clients. Clients connect to + exactly one server to submit irequests. Read requests are serviced from + the local replica of each server database. Requests that change the + state of the service, write requests, are processed by an agreement + protocol.

+

As part of the agreement protocol all write requests from clients + are forwarded to a single server, called the + leader. The rest of the ZooKeeper servers, called + followers, receive message proposals from the + leader and agree upon message delivery. The messaging layer takes care + of replacing leaders on failures and syncing followers with + leaders.

+

ZooKeeper uses a custom atomic messaging protocol. Since the + messaging layer is atomic, ZooKeeper can guarantee that the local + replicas never diverge. When the leader receives a write request, it + calculates what the state of the system is when the write is to be + applied and transforms this into a transaction that captures this new + state.

+ +

Uses

+

The programming interface to ZooKeeper is deliberately simple. + With it, however, you can implement higher order operations, such as + synchronizations primitives, group membership, ownership, etc. Some + distributed applications have used it to: [tbd: add uses from + white paper and video presentation.] For more information, see + [tbd] +

+ +

Performance

+

ZooKeeper is designed to be highly performant. But is it? The + results of the ZooKeeper's development team at Yahoo! Research indicate + that it is. (See ZooKeeper Throughput as the Read-Write Ratio Varies.) It is especially high + performance in applications where reads outnumber writes, since writes + involve synchronizing the state of all servers. (Reads outnumbering + writes is typically the case for a coordination service.)

+ + + + + + + +
ZooKeeper Throughput as the Read-Write Ratio Varies
+ + + +
+

The figure ZooKeeper Throughput as the Read-Write Ratio Varies is a throughput + graph of ZooKeeper release 3.2 running on servers with dual 2Ghz + Xeon and two SATA 15K RPM drives. One drive was used as a + dedicated ZooKeeper log device. The snapshots were written to + the OS drive. Write requests were 1K writes and the reads were + 1K reads. "Servers" indicate the size of the ZooKeeper + ensemble, the number of servers that make up the + service. Approximately 30 other servers were used to simulate + the clients. The ZooKeeper ensemble was configured such that + leaders do not allow connections from clients.

+
+
Note
+
+

In version 3.2 r/w performance improved by ~2x + compared to the previous + 3.1 release.

+
+
+

Benchmarks also indicate that it is reliable, too. Reliability in the Presence of Errors shows how a deployment responds to + various failures. The events marked in the figure are the + following:

+
    + +
  1. + +

    Failure and recovery of a follower

    + +
  2. + + +
  3. + +

    Failure and recovery of a different follower

    + +
  4. + + +
  5. + +

    Failure of the leader

    + +
  6. + + +
  7. + +

    Failure and recovery of two followers

    + +
  8. + + +
  9. + +

    Failure of another leader

    + +
  10. + +
+ +

Reliability

+

To show the behavior of the system over time as + failures are injected we ran a ZooKeeper service made up of + 7 machines. We ran the same saturation benchmark as before, + but this time we kept the write percentage at a constant + 30%, which is a conservative ratio of our expected + workloads. +

+ + + + + + + +
Reliability in the Presence of Errors
+ + + +
+

The are a few important observations from this graph. First, if + followers fail and recover quickly, then ZooKeeper is able to sustain a + high throughput despite the failure. But maybe more importantly, the + leader election algorithm allows for the system to recover fast enough + to prevent throughput from dropping substantially. In our observations, + ZooKeeper takes less than 200ms to elect a new leader. Third, as + followers recover, ZooKeeper is able to raise throughput again once they + start processing requests.

+ +

The ZooKeeper Project

+

ZooKeeper has been + + successfully used + + in many industrial applications. It is used at Yahoo! as the + coordination and failure recovery service for Yahoo! Message + Broker, which is a highly scalable publish-subscribe system + managing thousands of topics for replication and data + delivery. It is used by the Fetching Service for Yahoo! + crawler, where it also manages failure recovery. A number of + Yahoo! advertising systems also use ZooKeeper to implement + reliable services. +

+

All users and developers are encouraged to join the + community and contribute their expertise. See the + + Zookeeper Project on Apache + + for more information. +

+
+ +

+ +

+
+ +
 
+
+ + + diff --git a/docs/zookeeperOver.pdf b/docs/zookeeperOver.pdf new file mode 100644 index 0000000000000000000000000000000000000000..7ce6705f76e022a800aa09bbf49a84d10e4dc0da GIT binary patch literal 302479 zcmeFY2UJtr)<3!t5$OUVouEkXy%@+*6a)mMcMvf2PLQCHSm^brRB0jt(m_C^2tp`F zK#-20K!S9TL|TN9yp8AFd(S!d{@?q?`~KsVF+LcOwb!0&t~u9SW&Y-x5x#y|M_OJ+ ziC(z0th|C=Nl;GE-^Gg_3Z<7d_eA)>1;uRr{SDyo0Cy%pE#X1Ip8kGW-g>9w@z;eI!d1W^8$AcBIjMuLj;;Kwz%pF6@sQ2t0t)1wL zv8;{{$oDeb)&C~^h(|C2?9P`SnVpjsYHhY8&@&rsw0q^)Ik$LccXwubdK0pQ z%AGwpc)N6%xEIC@ytsF*QjXJ->KC!cF+!xb+%a?Akyrl4M_*9se~uQ}(^(r0BvmgMsUE z38vN7;lHSRi>ZY~RlpAVtBW6mU1BvJcoa0SNEb%`Ep;mjD(*B8b1oeRrGhyPOf2|h zi*wL_CF!tAehvPr{_HA!bHt$GliHkYJ=||6UuQ1?_k;?=+uu7?M>q+ZobMXwl{w8| zI&z*dxRM4l(-qlua&F1}yD*y@S9Df8>lW9#l(UMi`N?kb!&ePD^S2vgjuKt;Y^$8g8JJu77UfIvmPuq)08#hDP?C zPPV_ex}p+0u~gwiv*?R%_pwAbcA@=uB}>pw6(%X&U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Programmers.html new file mode 100644 index 0000000..b134409 --- /dev/null +++ b/docs/zookeeperProgrammers.html @@ -0,0 +1,2285 @@ + + + + + + + +ZooKeeper Programmer's Guide + + + + + + + + + +

+ + + +
+ + + + + + + + + + + + +
+
+
+
+ +
+ + +
+ +
+ +   +
+ + + + + +
+ +

ZooKeeper Programmer's Guide

+

Developing Distributed Applications that use ZooKeeper

+ + + + + + + + + +

Introduction

+
+

This document is a guide for developers wishing to create + distributed applications that take advantage of ZooKeeper's coordination + services. It contains conceptual and practical information.

+

The first four sections of this guide present higher level + discussions of various ZooKeeper concepts. These are necessary both for an + understanding of how ZooKeeper works as well how to work with it. It does + not contain source code, but it does assume a familiarity with the + problems associated with distributed computing. The sections in this first + group are:

+ +

The next four sections provide practical programming + information. These are:

+ +

The book concludes with an appendix containing links to other + useful, ZooKeeper-related information.

+

Most of information in this document is written to be accessible as + stand-alone reference material. However, before starting your first + ZooKeeper application, you should probably at least read the chaptes on + the ZooKeeper Data Model and ZooKeeper Basic Operations. Also, + the Simple Programmming + Example [tbd] is helpful for understanding the basic + structure of a ZooKeeper client application.

+
+ + + +

The ZooKeeper Data Model

+
+

ZooKeeper has a hierarchal name space, much like a distributed file + system. The only difference is that each node in the namespace can have + data associated with it as well as children. It is like having a file + system that allows a file to also be a directory. Paths to nodes are + always expressed as canonical, absolute, slash-separated paths; there are + no relative reference. Any unicode character can be used in a path subject + to the following constraints:

+
    + +
  • + +

    The null character (\u0000) cannot be part of a path name. (This + causes problems with the C binding.)

    + +
  • + + +
  • + +

    The following characters can't be used because they don't + display well, or render in confusing ways: \u0001 - \u0019 and \u007F + - \u009F.

    + +
  • + + +
  • + +

    The following characters are not allowed: \ud800 -uF8FFF, + \uFFF0 - uFFFF.

    + +
  • + + +
  • + +

    The "." character can be used as part of another name, but "." + and ".." cannot alone be used to indicate a node along a path, + because ZooKeeper doesn't use relative paths. The following would be + invalid: "/a/b/./c" or "/a/b/../c".

    + +
  • + + +
  • + +

    The token "zookeeper" is reserved.

    + +
  • + +
+ +

ZNodes

+

Every node in a ZooKeeper tree is referred to as a + znode. Znodes maintain a stat structure that + includes version numbers for data changes, acl changes. The stat + structure also has timestamps. The version number, together with the + timestamp, allows ZooKeeper to validate the cache and to coordinate + updates. Each time a znode's data changes, the version number increases. + For instance, whenever a client retrieves data, it also receives the + version of the data. And when a client performs an update or a delete, + it must supply the version of the data of the znode it is changing. If + the version it supplies doesn't match the actual version of the data, + the update will fail. (This behavior can be overridden. For more + information see... )[tbd...] +

+
+
Note
+
+ +

In distributed application engineering, the word + node can refer to a generic host machine, a + server, a member of an ensemble, a client process, etc. In the ZooKeeper + documentation, znodes refer to the data nodes. + Servers refer to machines that make up the + ZooKeeper service; quorum peers refer to the + servers that make up an ensemble; client refers to any host or process + which uses a ZooKeeper service.

+ +
+
+

A znode is the main abstraction a programmer needs to be aware of. Znodes have + several characteristics that are worth mentioning here.

+ +

Watches

+

Clients can set watches on znodes. Changes to that znode trigger + the watch and then clear the watch. When a watch triggers, ZooKeeper + sends the client a notification. More information about watches can be + found in the section + ZooKeeper Watches.

+ +

Data Access

+

The data stored at each znode in a namespace is read and written + atomically. Reads get all the data bytes associated with a znode and a + write replaces all the data. Each node has an Access Control List + (ACL) that restricts who can do what.

+

ZooKeeper was not designed to be a general database or large + object store. Instead, it manages coordination data. This data can + come in the form of configuration, status information, rendezvous, etc. + A common property of the various forms of coordination data is that + they are relatively small: measured in kilobytes. + The ZooKeeper client and the server implementations have sanity checks + to ensure that znodes have less than 1M of data, but the data should + be much less than that on average. Operating on relatively large data + sizes will cause some operations to take much more time than others and + will affect the latencies of some operations because of the extra time + needed to move more data over the network and onto storage media. If + large data storage is needed, the usually pattern of dealing with such + data is to store it on a bulk storage system, such as NFS or HDFS, and + store pointers to the storage locations in ZooKeeper.

+ +

Ephemeral Nodes

+

ZooKeeper also has the notion of ephemeral nodes. These znodes + exists as long as the session that created the znode is active. When + the session ends the znode is deleted. Because of this behavior + ephemeral znodes are not allowed to have children.

+ +

Sequence Nodes -- Unique Naming

+

When creating a znode you can also request that + ZooKeeper append a monotonically increasing counter to the end + of path. This counter is unique to the parent znode. The + counter has a format of %010d -- that is 10 digits with 0 + (zero) padding (the counter is formatted in this way to + simplify sorting), i.e. "<path>0000000001". See + Queue + Recipe for an example use of this feature. Note: the + counter used to store the next sequence number is a signed int + (4bytes) maintained by the parent node, the counter will + overflow when incremented beyond 2147483647 (resulting in a + name "<path>-2147483648").

+ +

Time in ZooKeeper

+

ZooKeeper tracks time multiple ways:

+
    + +
  • + +

    +Zxid +

    + + +

    Every change to the ZooKeeper state receives a stamp in the + form of a zxid (ZooKeeper Transaction Id). + This exposes the total ordering of all changes to ZooKeeper. Each + change will have a unique zxid and if zxid1 is smaller than zxid2 + then zxid1 happened before zxid2.

    + +
  • + + +
  • + +

    +Version numbers +

    + + +

    Every change to a node will cause an increase to one of the + version numbers of that node. The three version numbers are version + (number of changes to the data of a znode), cversion (number of + changes to the children of a znode), and aversion (number of changes + to the ACL of a znode).

    + +
  • + + +
  • + +

    +Ticks +

    + + +

    When using multi-server ZooKeeper, servers use ticks to define + timing of events such as status uploads, session timeouts, + connection timeouts between peers, etc. The tick time is only + indirectly exposed through the minimum session timeout (2 times the + tick time); if a client requests a session timeout less than the + minimum session timeout, the server will tell the client that the + session timeout is actually the minimum session timeout.

    + +
  • + + +
  • + +

    +Real time +

    + + +

    ZooKeeper doesn't use real time, or clock time, at all except + to put timestamps into the stat structure on znode creation and + znode modification.

    + +
  • + +
+ +

ZooKeeper Stat Structure

+

The Stat structure for each znode in ZooKeeper is made up of the + following fields:

+
    + +
  • + +

    +czxid +

    + + +

    The zxid of the change that caused this znode to be + created.

    + +
  • + + +
  • + +

    +mzxid +

    + + +

    The zxid of the change that last modified this znode.

    + +
  • + + +
  • + +

    +pzxid +

    + + +

    The zxid of the change that last modified children of this znode.

    + +
  • + + +
  • + +

    +ctime +

    + + +

    The time in milliseconds from epoch when this znode was + created.

    + +
  • + + +
  • + +

    +mtime +

    + + +

    The time in milliseconds from epoch when this znode was last + modified.

    + +
  • + + +
  • + +

    +version +

    + + +

    The number of changes to the data of this znode.

    + +
  • + + +
  • + +

    +cversion +

    + + +

    The number of changes to the children of this znode.

    + +
  • + + +
  • + +

    +aversion +

    + + +

    The number of changes to the ACL of this znode.

    + +
  • + + +
  • + +

    +ephemeralOwner +

    + + +

    The session id of the owner of this znode if the znode is an + ephemeral node. If it is not an ephemeral node, it will be + zero.

    + +
  • + + +
  • + +

    +dataLength +

    + + +

    The length of the data field of this znode.

    + +
  • + + +
  • + +

    +numChildren +

    + + +

    The number of children of this znode.

    + +
  • + + +
+
+ + + +

ZooKeeper Sessions

+
+

A ZooKeeper client establishes a session with the ZooKeeper + service by creating a handle to the service using a language + binding. Once created, the handle starts of in the CONNECTING state + and the client library tries to connect to one of the servers that + make up the ZooKeeper service at which point it switches to the + CONNECTED state. During normal operation will be in one of these + two states. If an unrecoverable error occurs, such as session + expiration or authentication failure, or if the application explicitly + closes the handle, the handle will move to the CLOSED state. + The following figure shows the possible state transitions of a + ZooKeeper client:

+

To create a client session the application code must provide + a connection string containing a comma separated list of host:port pairs, + each corresponding to a ZooKeeper server (e.g. "127.0.0.1:4545" or + "127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002"). The ZooKeeper + client library will pick an arbitrary server and try to connect to + it. If this connection fails, or if the client becomes + disconnected from the server for any reason, the client will + automatically try the next server in the list, until a connection + is (re-)established.

+

+Added in 3.2.0: An + optional "chroot" suffix may also be appended to the connection + string. This will run the client commands while interpreting all + paths relative to this root (similar to the unix chroot + command). If used the example would look like: + "127.0.0.1:4545/app/a" or + "127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002/app/a" where the + client would be rooted at "/app/a" and all paths would be relative + to this root - ie getting/setting/etc... "/foo/bar" would result + in operations being run on "/app/a/foo/bar" (from the server + perspective). This feature is particularly useful in multi-tenant + environments where each user of a particular ZooKeeper service + could be rooted differently. This makes re-use much simpler as + each user can code his/her application as if it were rooted at + "/", while actual location (say /app/a) could be determined at + deployment time.

+

When a client gets a handle to the ZooKeeper service, + ZooKeeper creates a ZooKeeper session, represented as a 64-bit + number, that it assigns to the client. If the client connects to a + different ZooKeeper server, it will send the session id as a part + of the connection handshake. As a security measure, the server + creates a password for the session id that any ZooKeeper server + can validate.The password is sent to the client with the session + id when the client establishes the session. The client sends this + password with the session id whenever it reestablishes the session + with a new server.

+

One of the parameters to the ZooKeeper client library call + to create a ZooKeeper session is the session timeout in + milliseconds. The client sends a requested timeout, the server + responds with the timeout that it can give the client. The current + implementation requires that the timeout be a minimum of 2 times + the tickTime (as set in the server configuration) and a maximum of + 20 times the tickTime. The ZooKeeper client API allows access to + the negotiated timeout.

+

When a client (session) becomes partitioned from the ZK + serving cluster it will begin searching the list of servers that + were specified during session creation. Eventually, when + connectivity between the client and at least one of the servers is + re-established, the session will either again transition to the + "connected" state (if reconnected within the session timeout + value) or it will transition to the "expired" state (if + reconnected after the session timeout). It is not advisable to + create a new session object (a new ZooKeeper.class or zookeeper + handle in the c binding) for disconnection. The ZK client library + will handle reconnect for you. In particular we have heuristics + built into the client library to handle things like "herd effect", + etc... Only create a new session when you are notified of session + expiration (mandatory).

+

Session expiration is managed by the ZooKeeper cluster + itself, not by the client. When the ZK client establishes a + session with the cluster it provides a "timeout" value detailed + above. This value is used by the cluster to determine when the + client's session expires. Expirations happens when the cluster + does not hear from the client within the specified session timeout + period (i.e. no heartbeat). At session expiration the cluster will + delete any/all ephemeral nodes owned by that session and + immediately notify any/all connected clients of the change (anyone + watching those znodes). At this point the client of the expired + session is still disconnected from the cluster, it will not be + notified of the session expiration until/unless it is able to + re-establish a connection to the cluster. The client will stay in + disconnected state until the TCP connection is re-established with + the cluster, at which point the watcher of the expired session + will receive the "session expired" notification.

+

Example state transitions for an expired session as seen by + the expired session's watcher:

+
    + +
  1. +

    'connected' : session is established and client + is communicating with cluster (client/server communication is + operating properly)

    +
  2. + +
  3. +

    .... client is partitioned from the + cluster

    +
  4. + +
  5. +

    'disconnected' : client has lost connectivity + with the cluster

    +
  6. + +
  7. +

    .... time elapses, after 'timeout' period the + cluster expires the session, nothing is seen by client as it is + disconnected from cluster

    +
  8. + +
  9. +

    .... time elapses, the client regains network + level connectivity with the cluster

    +
  10. + +
  11. +

    'expired' : eventually the client reconnects to + the cluster, it is then notified of the + expiration

    +
  12. + +
+

Another parameter to the ZooKeeper session establishment + call is the default watcher. Watchers are notified when any state + change occurs in the client. For example if the client loses + connectivity to the server the client will be notified, or if the + client's session expires, etc... This watcher should consider the + initial state to be disconnected (i.e. before any state changes + events are sent to the watcher by the client lib). In the case of + a new connection, the first event sent to the watcher is typically + the session connection event.

+

The session is kept alive by requests sent by the client. If + the session is idle for a period of time that would timeout the + session, the client will send a PING request to keep the session + alive. This PING request not only allows the ZooKeeper server to + know that the client is still active, but it also allows the + client to verify that its connection to the ZooKeeper server is + still active. The timing of the PING is conservative enough to + ensure reasonable time to detect a dead connection and reconnect + to a new server.

+

+ Once a connection to the server is successfully established + (connected) there are basically two cases where the client lib generates + connectionloss (the result code in c binding, exception in Java -- see + the API documentation for binding specific details) when either a synchronous or + asynchronous operation is performed and one of the following holds: +

+
    + +
  1. +

    The application calls an operation on a session that is no + longer alive/valid

    +
  2. + +
  3. +

    The ZooKeeper client disconnects from a server when there + are pending operations to that server, i.e., there is a pending asynchronous call. +

    +
  4. + +
+

+Added in 3.2.0 -- SessionMovedException. There is an internal + exception that is generally not seen by clients called the SessionMovedException. + This exception occurs because a request was received on a connection for a session + which has been reestablished on a different server. The normal cause of this error is + a client that sends a request to a server, but the network packet gets delayed, so + the client times out and connects to a new server. When the delayed packet arrives at + the first server, the old server detects that the session has moved, and closes the + client connection. Clients normally do not see this error since they do not read + from those old connections. (Old connections are usually closed.) One situation in which this + condition can be seen is when two clients try to reestablish the same connection using + a saved session id and password. One of the clients will reestablish the connection + and the second client will be disconnected (causing the pair to attempt to re-establish + its connection/session indefinitely).

+
+ + + +

ZooKeeper Watches

+
+

All of the read operations in ZooKeeper - getData(), getChildren(), and exists() - have the option of setting a watch as a + side effect. Here is ZooKeeper's definition of a watch: a watch event is + one-time trigger, sent to the client that set the watch, which occurs when + the data for which the watch was set changes. There are three key points + to consider in this definition of a watch:

+
    + +
  • + +

    +One-time trigger +

    + + +

    One watch event will be sent to the client when the data has changed. + For example, if a client does a getData("/znode1", true) and later the + data for /znode1 is changed or deleted, the client will get a watch + event for /znode1. If /znode1 changes again, no watch event will be + sent unless the client has done another read that sets a new + watch.

    + +
  • + + +
  • + +

    +Sent to the client +

    + + +

    This implies that an event is on the way to the client, but may + not reach the client before the successful return code to the change + operation reaches the client that initiated the change. Watches are + sent asynchronously to watchers. ZooKeeper provides an ordering + guarantee: a client will never see a change for which it has set a + watch until it first sees the watch event. Network delays or other + factors may cause different clients to see watches and return codes + from updates at different times. The key point is that everything seen + by the different clients will have a consistent order.

    + +
  • + + +
  • + +

    +The data for which the watch was + set +

    + + +

    This refers to the different ways a node can change. It + helps to think of ZooKeeper as maintaining two lists of + watches: data watches and child watches. getData() and + exists() set data watches. getChildren() sets child + watches. Alternatively, it may help to think of watches being + set according to the kind of data returned. getData() and + exists() return information about the data of the node, + whereas getChildren() returns a list of children. Thus, + setData() will trigger data watches for the znode being set + (assuming the set is successful). A successful create() will + trigger a data watch for the znode being created and a child + watch for the parent znode. A successful delete() will trigger + both a data watch and a child watch (since there can be no + more children) for a znode being deleted as well as a child + watch for the parent znode.

    + +
  • + +
+

Watches are maintained locally at the ZooKeeper server to which the + client is connected. This allows watches to be lightweight to set, + maintain, and dispatch. When a client connects to a new server, the watch + will be triggered for any session events. Watches will not be received + while disconnected from a server. When a client reconnects, any previously + registered watches will be reregistered and triggered if needed. In + general this all occurs transparently. There is one case where a watch + may be missed: a watch for the existence of a znode not yet created will + be missed if the znode is created and deleted while disconnected.

+ +

Semantics of Watches

+

We can set watches with the three calls that read the state of + ZooKeeper: exists, getData, and getChildren. The following list details + the events that a watch can trigger and the calls that enable them: +

+
    + +
  • + +

    +Created event: +

    + +

    Enabled with a call to exists.

    + +
  • + + +
  • + +

    +Deleted event: +

    + +

    Enabled with a call to exists, getData, and getChildren.

    + +
  • + + +
  • + +

    +Changed event: +

    + +

    Enabled with a call to exists and getData.

    + +
  • + + +
  • + +

    +Child event: +

    + +

    Enabled with a call to getChildren.

    + +
  • + +
+ +

What ZooKeeper Guarantees about Watches

+

With regard to watches, ZooKeeper maintains these + guarantees:

+
    + +
  • + +

    Watches are ordered with respect to other events, other + watches, and asynchronous replies. The ZooKeeper client libraries + ensures that everything is dispatched in order.

    + +
  • + +
+
    + +
  • + +

    A client will see a watch event for a znode it is watching + before seeing the new data that corresponds to that znode.

    + +
  • + +
+
    + +
  • + +

    The order of watch events from ZooKeeper corresponds to the + order of the updates as seen by the ZooKeeper service.

    + +
  • + +
+ +

Things to Remember about Watches

+
    + +
  • + +

    Watches are one time triggers; if you get a watch event and + you want to get notified of future changes, you must set another + watch.

    + +
  • + +
+
    + +
  • + +

    Because watches are one time triggers and there is latency + between getting the event and sending a new request to get a watch + you cannot reliably see every change that happens to a node in + ZooKeeper. Be prepared to handle the case where the znode changes + multiple times between getting the event and setting the watch + again. (You may not care, but at least realize it may + happen.)

    + +
  • + +
+
    + +
  • + +

    A watch object, or function/context pair, will only be + triggered once for a given notification. For example, if the same + watch object is registered for an exists and a getData call for the + same file and that file is then deleted, the watch object would + only be invoked once with the deletion notification for the file. +

    + +
  • + +
+
    + +
  • + +

    When you disconnect from a server (for example, when the + server fails), you will not get any watches until the connection + is reestablished. For this reason session events are sent to all + outstanding watch handlers. Use session events to go into a safe + mode: you will not be receiving events while disconnected, so your + process should act conservatively in that mode.

    + +
  • + +
+
+ + + +

ZooKeeper access control using ACLs

+
+

ZooKeeper uses ACLs to control access to its znodes (the + data nodes of a ZooKeeper data tree). The ACL implementation is + quite similar to UNIX file access permissions: it employs + permission bits to allow/disallow various operations against a + node and the scope to which the bits apply. Unlike standard UNIX + permissions, a ZooKeeper node is not limited by the three standard + scopes for user (owner of the file), group, and world + (other). ZooKeeper does not have a notion of an owner of a + znode. Instead, an ACL specifies sets of ids and permissions that + are associated with those ids.

+

Note also that an ACL pertains only to a specific znode. In + particular it does not apply to children. For example, if + /app is only readable by ip:172.16.16.1 and + /app/status is world readable, anyone will + be able to read /app/status; ACLs are not + recursive.

+

ZooKeeper supports pluggable authentication schemes. Ids are + specified using the form scheme:id, + where scheme is a the authentication scheme + that the id corresponds to. For + example, ip:172.16.16.1 is an id for a + host with the address 172.16.16.1.

+

When a client connects to ZooKeeper and authenticates + itself, ZooKeeper associates all the ids that correspond to a + client with the clients connection. These ids are checked against + the ACLs of znodes when a clients tries to access a node. ACLs are + made up of pairs of (scheme:expression, + perms). The format of + the expression is specific to the scheme. For + example, the pair (ip:19.22.0.0/16, READ) + gives the READ permission to any clients with + an IP address that starts with 19.22.

+ +

ACL Permissions

+

ZooKeeper supports the following permissions:

+
    + +
  • +

    +CREATE: you can create a child node

    +
  • + +
  • +

    +READ: you can get data from a node and list its children.

    +
  • + +
  • +

    +WRITE: you can set data for a node

    +
  • + +
  • +

    +DELETE: you can delete a child node

    +
  • + +
  • +

    +ADMIN: you can set permissions

    +
  • + +
+

The CREATE + and DELETE permissions have been broken out + of the WRITE permission for finer grained + access controls. The cases for CREATE + and DELETE are the following:

+

You want A to be able to do a set on a ZooKeeper node, but + not be able to CREATE + or DELETE children.

+

+CREATE + without DELETE: clients create requests by + creating ZooKeeper nodes in a parent directory. You want all + clients to be able to add, but only request processor can + delete. (This is kind of like the APPEND permission for + files.)

+

Also, the ADMIN permission is there + since ZooKeeper doesn’t have a notion of file owner. In some + sense the ADMIN permission designates the + entity as the owner. ZooKeeper doesn’t support the LOOKUP + permission (execute permission bit on directories to allow you + to LOOKUP even though you can't list the directory). Everyone + implicitly has LOOKUP permission. This allows you to stat a + node, but nothing more. (The problem is, if you want to call + zoo_exists() on a node that doesn't exist, there is no + permission to check.)

+ +

Builtin ACL Schemes

+

ZooKeeeper has the following built in schemes:

+
    + +
  • +

    +world has a + single id, anyone, that represents + anyone.

    +
  • + + +
  • +

    +auth doesn't + use any id, represents any authenticated + user.

    +
  • + + +
  • +

    +digest uses + a username:password string to generate + MD5 hash which is then used as an ACL ID + identity. Authentication is done by sending + the username:password in clear text. When + used in the ACL the expression will be + the username:base64 + encoded SHA1 + password digest.

    + +
  • + + +
  • +

    +ip uses the + client host IP as an ACL ID identity. The ACL expression is of + the form addr/bits where the most + significant bits + of addr are matched against the most + significant bits of the client host + IP.

    +
  • + + +
+ +

ZooKeeper C client API

+

The following constants are provided by the ZooKeeper C + library:

+
    + +
  • +

    +const int ZOO_PERM_READ; //can read node’s value and list its children

    +
  • + +
  • +

    +const int ZOO_PERM_WRITE;// can set the node’s value

    +
  • + +
  • +

    +const int ZOO_PERM_CREATE; //can create children

    +
  • + +
  • +

    +const int ZOO_PERM_DELETE;// can delete children

    +
  • + +
  • +

    +const int ZOO_PERM_ADMIN; //can execute set_acl()

    +
  • + +
  • +

    +const int ZOO_PERM_ALL;// all of the above flags OR’d together

    +
  • + +
+

The following are the standard ACL IDs:

+
    + +
  • +

    +struct Id ZOO_ANYONE_ID_UNSAFE; //(‘world’,’anyone’)

    +
  • + +
  • +

    +struct Id ZOO_AUTH_IDS;// (‘auth’,’’)

    +
  • + +
+

ZOO_AUTH_IDS empty identity string should be interpreted as “the identity of the creator”.

+

ZooKeeper client comes with three standard ACLs:

+
    + +
  • +

    +struct ACL_vector ZOO_OPEN_ACL_UNSAFE; //(ZOO_PERM_ALL,ZOO_ANYONE_ID_UNSAFE)

    +
  • + +
  • +

    +struct ACL_vector ZOO_READ_ACL_UNSAFE;// (ZOO_PERM_READ, ZOO_ANYONE_ID_UNSAFE)

    +
  • + +
  • +

    +struct ACL_vector ZOO_CREATOR_ALL_ACL; //(ZOO_PERM_ALL,ZOO_AUTH_IDS)

    +
  • + +
+

The ZOO_OPEN_ACL_UNSAFE is completely open free for all + ACL: any application can execute any operation on the node and + can create, list and delete its children. The + ZOO_READ_ACL_UNSAFE is read-only access for any + application. CREATE_ALL_ACL grants all permissions to the + creator of the node. The creator must have been authenticated by + the server (for example, using “digest” + scheme) before it can create nodes with this ACL.

+

The following ZooKeeper operations deal with ACLs:

+
    +
  • + +

    +int zoo_add_auth + (zhandle_t *zh,const char* + scheme,const char* + cert, int certLen, void_completion_t + completion, const void + *data);

    + +
  • +
+

The application uses the zoo_add_auth function to + authenticate itself to the server. The function can be called + multiple times if the application wants to authenticate using + different schemes and/or identities.

+
    +
  • + +

    +int zoo_create + (zhandle_t *zh, const char + *path, const char + *value,int + valuelen, const struct + ACL_vector *acl, int + flags,char + *realpath, int + max_realpath_len);

    + +
  • +
+

zoo_create(...) operation creates a new node. The acl + parameter is a list of ACLs associated with the node. The parent + node must have the CREATE permission bit set.

+
    +
  • + +

    +int zoo_get_acl + (zhandle_t *zh, const char + *path,struct ACL_vector + *acl, struct Stat *stat);

    + +
  • +
+

This operation returns a node’s ACL info.

+
    +
  • + +

    +int zoo_set_acl + (zhandle_t *zh, const char + *path, int + version,const struct + ACL_vector *acl);

    + +
  • +
+

This function replaces node’s ACL list with a new one. The + node must have the ADMIN permission set.

+

Here is a sample code that makes use of the above APIs to + authenticate itself using the “foo” scheme + and create an ephemeral node “/xyz” with create-only + permissions.

+
+
Note
+
+

This is a very simple example which is intended to show + how to interact with ZooKeeper ACLs + specifically. See .../trunk/src/c/src/cli.c + for an example of a C client implementation

+ +
+
+
+#include <string.h>
+#include <errno.h>
+
+#include "zookeeper.h"
+
+static zhandle_t *zh;
+
+/**
+ * In this example this method gets the cert for your
+ *   environment -- you must provide
+ */
+char *foo_get_cert_once(char* id) { return 0; }
+
+/** Watcher function -- empty for this example, not something you should
+ * do in real code */
+void watcher(zhandle_t *zzh, int type, int state, const char *path,
+             void *watcherCtx) {}
+
+int main(int argc, char argv) {
+  char buffer[512];
+  char p[2048];
+  char *cert=0;
+  char appId[64];
+
+  strcpy(appId, "example.foo_test");
+  cert = foo_get_cert_once(appId);
+  if(cert!=0) {
+    fprintf(stderr,
+            "Certificate for appid [%s] is [%s]\n",appId,cert);
+    strncpy(p,cert, sizeof(p)-1);
+    free(cert);
+  } else {
+    fprintf(stderr, "Certificate for appid [%s] not found\n",appId);
+    strcpy(p, "dummy");
+  }
+
+  zoo_set_debug_level(ZOO_LOG_LEVEL_DEBUG);
+
+  zh = zookeeper_init("localhost:3181", watcher, 10000, 0, 0, 0);
+  if (!zh) {
+    return errno;
+  }
+  if(zoo_add_auth(zh,"foo",p,strlen(p),0,0)!=ZOK)
+    return 2;
+
+  struct ACL CREATE_ONLY_ACL[] = {{ZOO_PERM_CREATE, ZOO_AUTH_IDS}};
+  struct ACL_vector CREATE_ONLY = {1, CREATE_ONLY_ACL};
+  int rc = zoo_create(zh,"/xyz","value", 5, &CREATE_ONLY, ZOO_EPHEMERAL,
+                      buffer, sizeof(buffer)-1);
+
+  /** this operation will fail with a ZNOAUTH error */
+  int buflen= sizeof(buffer);
+  struct Stat stat;
+  rc = zoo_get(zh, "/xyz", 0, buffer, &buflen, &stat);
+  if (rc) {
+    fprintf(stderr, "Error %d for %s\n", rc, __LINE__);
+  }
+
+  zookeeper_close(zh);
+  return 0;
+}
+      
+
+ + + +

Pluggable ZooKeeper authentication

+
+

ZooKeeper runs in a variety of different environments with + various different authentication schemes, so it has a completely + pluggable authentication framework. Even the builtin authentication + schemes use the pluggable authentication framework.

+

To understand how the authentication framework works, first you must + understand the two main authentication operations. The framework + first must authenticate the client. This is usually done as soon as + the client connects to a server and consists of validating information + sent from or gathered about a client and associating it with the connection. + The second operation handled by the framework is finding the entries in an + ACL that correspond to client. ACL entries are <idspec, + permissions> pairs. The idspec may be + a simple string match against the authentication information associated + with the connection or it may be a expression that is evaluated against that + information. It is up to the implementation of the authentication plugin + to do the match. Here is the interface that an authentication plugin must + implement:

+
+public interface AuthenticationProvider {
+    String getScheme();
+    KeeperException.Code handleAuthentication(ServerCnxn cnxn, byte authData[]);
+    boolean isValid(String id);
+    boolean matches(String id, String aclExpr);
+    boolean isAuthenticated();
+}
+    
+

The first method getScheme returns the string + that identifies the plugin. Because we support multiple methods of authentication, + an authentication credential or an idspec will always be + prefixed with scheme:. The ZooKeeper server uses the scheme + returned by the authentication plugin to determine which ids the scheme + applies to.

+

+handleAuthentication is called when a client + sends authentication information to be associated with a connection. The + client specifies the scheme to which the information corresponds. The + ZooKeeper server passes the information to the authentication plugin whose + getScheme matches the scheme passed by the client. The + implementor of handleAuthentication will usually return + an error if it determines that the information is bad, or it will associate information + with the connection using cnxn.getAuthInfo().add(new Id(getScheme(), data)). +

+

The authentication plugin is involved in both setting and using ACLs. When an + ACL is set for a znode, the ZooKeeper server will pass the id part of the entry to + the isValid(String id) method. It is up to the plugin to verify + that the id has a correct form. For example, ip:172.16.0.0/16 + is a valid id, but ip:host.com is not. If the new ACL includes + an "auth" entry, isAuthenticated is used to see if the + authentication information for this scheme that is assocatied with the connection + should be added to the ACL. Some schemes + should not be included in auth. For example, the IP address of the client is not + considered as an id that should be added to the ACL if auth is specified.

+

ZooKeeper invokes + matches(String id, String aclExpr) when checking an ACL. It + needs to match authentication information of the client against the relevant ACL + entries. To find the entries which apply to the client, the ZooKeeper server will + find the scheme of each entry and if there is authentication information + from that client for that scheme, matches(String id, String aclExpr) + will be called with id set to the authentication information + that was previously added to the connection by handleAuthentication and + aclExpr set to the id of the ACL entry. The authentication plugin + uses its own logic and matching scheme to determine if id is included + in aclExpr. +

+

There are two built in authentication plugins: ip and + digest. Additional plugins can adding using system properties. At + startup the ZooKeeper server will look for system properties that start with + "zookeeper.authProvider." and interpret the value of those properties as the class name + of an authentication plugin. These properties can be set using the + -Dzookeeeper.authProvider.X=com.f.MyAuth or adding entries such as + the following in the server configuration file:

+
+authProvider.1=com.f.MyAuth
+authProvider.2=com.f.MyAuth2
+    
+

Care should be taking to ensure that the suffix on the property is unique. If there are + duplicates such as -Dzookeeeper.authProvider.X=com.f.MyAuth -Dzookeeper.authProvider.X=com.f.MyAuth2, + only one will be used. Also all servers must have the same plugins defined, otherwise clients using + the authentication schemes provided by the plugins will have problems connecting to some servers. +

+
+ + + +

Consistency Guarantees

+
+

ZooKeeper is a high performance, scalable service. Both reads and + write operations are designed to be fast, though reads are faster than + writes. The reason for this is that in the case of reads, ZooKeeper can + serve older data, which in turn is due to ZooKeeper's consistency + guarantees:

+
+ +
+Sequential Consistency +
+
+

Updates from a client will be applied in the order that they + were sent.

+
+ + +
+Atomicity +
+
+

Updates either succeed or fail -- there are no partial + results.

+
+ + +
+Single System Image +
+
+

A client will see the same view of the service regardless of + the server that it connects to.

+
+ + +
+Reliability +
+
+

Once an update has been applied, it will persist from that + time forward until a client overwrites the update. This guarantee + has two corollaries:

+
    + +
  1. + +

    If a client gets a successful return code, the update will + have been applied. On some failures (communication errors, + timeouts, etc) the client will not know if the update has + applied or not. We take steps to minimize the failures, but the + guarantee is only present with successful return codes. + (This is called the monotonicity condition in Paxos.)

    + +
  2. + + +
  3. + +

    Any updates that are seen by the client, through a read + request or successful update, will never be rolled back when + recovering from server failures.

    + +
  4. + +
+
+ + +
+Timeliness +
+
+

The clients view of the system is guaranteed to be up-to-date + within a certain time bound (on the order of tens of seconds). + Either system changes will be seen by a client within this bound, or + the client will detect a service outage.

+
+ +
+

Using these consistency guarantees it is easy to build higher level + functions such as leader election, barriers, queues, and read/write + revocable locks solely at the ZooKeeper client (no additions needed to + ZooKeeper). See Recipes and Solutions + for more details.

+
+
Note
+
+ +

Sometimes developers mistakenly assume one other guarantee that + ZooKeeper does not in fact make. This is:

+ + +
+ +
+Simultaneously Consistent Cross-Client Views +
+
+

ZooKeeper does not guarantee that at every instance in + time, two different clients will have identical views of + ZooKeeper data. Due to factors like network delays, one client + may perform an update before another client gets notified of the + change. Consider the scenario of two clients, A and B. If client + A sets the value of a znode /a from 0 to 1, then tells client B + to read /a, client B may read the old value of 0, depending on + which server it is connected to. If it + is important that Client A and Client B read the same value, + Client B should should call the sync() method from the ZooKeeper API + method before it performs its read.

+

So, ZooKeeper by itself doesn't guarantee that changes occur + synchronously across all servers, but ZooKeeper + primitives can be used to construct higher level functions that + provide useful client synchronization. (For more information, + see the ZooKeeper Recipes. + [tbd:..]).

+
+ +
+ +
+
+
+ + + +

Bindings

+
+

The ZooKeeper client libraries come in two languages: Java and C. + The following sections describe these.

+ +

Java Binding

+

There are two packages that make up the ZooKeeper Java binding: + org.apache.zookeeper and org.apache.zookeeper.data. The rest of the + packages that make up ZooKeeper are used internally or are part of the + server implementation. The org.apache.zookeeper.data package is made up of + generated classes that are used simply as containers.

+

The main class used by a ZooKeeper Java client is the ZooKeeper class. Its two constructors differ only + by an optional session id and password. ZooKeeper supports session + recovery accross instances of a process. A Java program may save its + session id and password to stable storage, restart, and recover the + session that was used by the earlier instance of the program.

+

When a ZooKeeper object is created, two threads are created as + well: an IO thread and an event thread. All IO happens on the IO thread + (using Java NIO). All event callbacks happen on the event thread. + Session maintenance such as reconnecting to ZooKeeper servers and + maintaining heartbeat is done on the IO thread. Responses for + synchronous methods are also processed in the IO thread. All responses + to asynchronous methods and watch events are processed on the event + thread. There are a few things to notice that result from this + design:

+
    + +
  • + +

    All completions for asynchronous calls and watcher callbacks + will be made in order, one at a time. The caller can do any + processing they wish, but no other callbacks will be processed + during that time.

    + +
  • + + +
  • + +

    Callbacks do not block the processing of the IO thread or the + processing of the synchronous calls.

    + +
  • + + +
  • + +

    Synchronous calls may not return in the correct order. For + example, assume a client does the following processing: issues an + asynchronous read of node /a with + watch set to true, and then in the completion + callback of the read it does a synchronous read of /a. (Maybe not good practice, but not illegal + either, and it makes for a simple example.)

    + + +

    Note that if there is a change to /a between the asynchronous read and the + synchronous read, the client library will receive the watch event + saying /a changed before the + response for the synchronous read, but because the completion + callback is blocking the event queue, the synchronous read will + return with the new value of /a + before the watch event is processed.

    + +
  • + +
+

Finally, the rules associated with shutdown are straightforward: + once a ZooKeeper object is closed or receives a fatal event + (SESSION_EXPIRED and AUTH_FAILED), the ZooKeeper object becomes invalid. + On a close, the two threads shut down and any further access on zookeeper + handle is undefined behavior and should be avoided.

+ +

C Binding

+

The C binding has a single-threaded and multi-threaded library. + The multi-threaded library is easiest to use and is most similar to the + Java API. This library will create an IO thread and an event dispatch + thread for handling connection maintenance and callbacks. The + single-threaded library allows ZooKeeper to be used in event driven + applications by exposing the event loop used in the multi-threaded + library.

+

The package includes two shared libraries: zookeeper_st and + zookeeper_mt. The former only provides the asynchronous APIs and + callbacks for integrating into the application's event loop. The only + reason this library exists is to support the platforms were a + pthread library is not available or is unstable + (i.e. FreeBSD 4.x). In all other cases, application developers should + link with zookeeper_mt, as it includes support for both Sync and Async + API.

+ +

Installation

+

If you're building the client from a check-out from the Apache + repository, follow the steps outlined below. If you're building from a + project source package downloaded from apache, skip to step 3.

+
    + +
  1. + +

    Run ant compile_jute from the ZooKeeper + top level directory (.../trunk). + This will create a directory named "generated" under + .../trunk/src/c.

    + +
  2. + + +
  3. + +

    Change directory to the.../trunk/src/c + and run autoreconf -if to bootstrap autoconf, automake and libtool. Make sure you have autoconf version 2.59 or greater installed. + Skip to step 4.

    + +
  4. + + +
  5. + +

    If you are building from a project source package, + unzip/untar the source tarball and cd to the + zookeeper-x.x.x/src/c directory.

    + +
  6. + + +
  7. + +

    Run ./configure <your-options> to + generate the makefile. Here are some of options the configure utility supports that can be + useful in this step:

    + + +
      + +
    • + +

      +--enable-debug +

      + + +

      Enables optimization and enables debug info compiler + options. (Disabled by default.)

      + +
    • + + +
    • + +

      +--without-syncapi +

      + + +

      Disables Sync API support; zookeeper_mt library won't be + built. (Enabled by default.)

      + +
    • + + +
    • + +

      +--disable-static +

      + + +

      Do not build static libraries. (Enabled by + default.)

      + +
    • + + +
    • + +

      +--disable-shared +

      + + +

      Do not build shared libraries. (Enabled by + default.)

      + +
    • + +
    + + +
    +
    Note
    +
    + +

    See INSTALL for general information about running + configure.

    + +
    +
    + +
  8. + + +
  9. + +

    Run make or make + install to build the libraries and install them.

    + +
  10. + + +
  11. + +

    To generate doxygen documentation for the ZooKeeper API, run + make doxygen-doc. All documentation will be + placed in a new subfolder named docs. By default, this command + only generates HTML. For information on other document formats, + run ./configure --help +

    + +
  12. + +
+ +

Building Your Own C Client

+

In order to be able to use the ZooKeeper API in your application + you have to remember to

+
    + +
  1. + +

    Include ZooKeeper header: #include + <zookeeper/zookeeper.h>

    + +
  2. + + +
  3. + +

    If you are building a multithreaded client, compile with + -DTHREADED compiler flag to enable the multi-threaded version of + the library, and then link against against the + zookeeper_mt library. If you are building a + single-threaded client, do not compile with -DTHREADED, and be + sure to link against the zookeeper_st + library.

    + +
  4. + +
+
+
Note
+
+

+ See .../trunk/src/c/src/cli.c + for an example of a C client implementation

+ +
+
+
+ + + +

Building Blocks: A Guide to ZooKeeper Operations

+
+

This section surveys all the operations a developer can perform + against a ZooKeeper server. It is lower level information than the earlier + concepts chapters in this manual, but higher level than the ZooKeeper API + Reference. It covers these topics:

+ + +

Handling Errors

+

Both the Java and C client bindings may report errors. The Java client binding does so by throwing KeeperException, calling code() on the exception will return the specific error code. The C client binding returns an error code as defined in the enum ZOO_ERRORS. API callbacks indicate result code for both language bindings. See the API documentation (javadoc for Java, doxygen for C) for full details on the possible errors and their meaning.

+ +

Connecting to ZooKeeper

+

+ +

Read Operations

+

+ +

Write Operations

+

+ +

Handling Watches

+

+ +

Miscelleaneous ZooKeeper Operations

+

+
+ + + +

Program Structure, with Simple Example

+
+

+[tbd] +

+
+ + + +

Gotchas: Common Problems and Troubleshooting

+
+

So now you know ZooKeeper. It's fast, simple, your application + works, but wait ... something's wrong. Here are some pitfalls that + ZooKeeper users fall into:

+
    + +
  1. + +

    If you are using watches, you must look for the connected watch + event. When a ZooKeeper client disconnects from a server, you will + not receive notification of changes until reconnected. If you are + watching for a znode to come into existence, you will miss the event + if the znode is created and deleted while you are disconnected.

    + +
  2. + + +
  3. + +

    You must test ZooKeeper server failures. The ZooKeeper service + can survive failures as long as a majority of servers are active. The + question to ask is: can your application handle it? In the real world + a client's connection to ZooKeeper can break. (ZooKeeper server + failures and network partitions are common reasons for connection + loss.) The ZooKeeper client library takes care of recovering your + connection and letting you know what happened, but you must make sure + that you recover your state and any outstanding requests that failed. + Find out if you got it right in the test lab, not in production - test + with a ZooKeeper service made up of a several of servers and subject + them to reboots.

    + +
  4. + + +
  5. + +

    The list of ZooKeeper servers used by the client must match the + list of ZooKeeper servers that each ZooKeeper server has. Things can + work, although not optimally, if the client list is a subset of the + real list of ZooKeeper servers, but not if the client lists ZooKeeper + servers not in the ZooKeeper cluster.

    + +
  6. + + +
  7. + +

    Be careful where you put that transaction log. The most + performance-critical part of ZooKeeper is the transaction log. + ZooKeeper must sync transactions to media before it returns a + response. A dedicated transaction log device is key to consistent good + performance. Putting the log on a busy device will adversely effect + performance. If you only have one storage device, put trace files on + NFS and increase the snapshotCount; it doesn't eliminate the problem, + but it can mitigate it.

    + +
  8. + + +
  9. + +

    Set your Java max heap size correctly. It is very important to + avoid swapping. Going to disk unnecessarily will + almost certainly degrade your performance unacceptably. Remember, in + ZooKeeper, everything is ordered, so if one request hits the disk, all + other queued requests hit the disk.

    + + +

    To avoid swapping, try to set the heapsize to the amount of + physical memory you have, minus the amount needed by the OS and cache. + The best way to determine an optimal heap size for your configurations + is to run load tests. If for some reason you + can't, be conservative in your estimates and choose a number well + below the limit that would cause your machine to swap. For example, on + a 4G machine, a 3G heap is a conservative estimate to start + with.

    + +
  10. + +
+
+ + + + + +Links to Other Information + + +

Outside the formal documentation, there're several other sources of + information for ZooKeeper developers.

+ + +
+ +
+ZooKeeper Whitepaper [tbd: find url] + +
+
+

The definitive discussion of ZooKeeper design and performance, + by Yahoo! Research

+
+ + +
+API Reference [tbd: find url] + +
+
+

The complete reference to the ZooKeeper API

+
+ + +
+ +ZooKeeper + Talk at the Hadoup Summit 2008 + +
+
+

A video introduction to ZooKeeper, by Benjamin Reed of Yahoo! + Research

+
+ + +
+ +Barrier and + Queue Tutorial + +
+
+

The excellent Java tutorial by Flavio Junqueira, implementing + simple barriers and producer-consumer queues using ZooKeeper.

+
+ + +
+ +ZooKeeper + - A Reliable, Scalable Distributed Coordination System + +
+
+

An article by Todd Hoff (07/15/2008)

+
+ + +
+ +ZooKeeper Recipes + +
+
+

Pseudo-level discussion of the implementation of various + synchronization solutions with ZooKeeper: Event Handles, Queues, + Locks, and Two-phase Commits.

+
+ + +
+ +[tbd] + +
+
+

Any other good sources anyone can think of...

+
+ +
+ +
+ +

+ +

+
+ +
 
+
+ + + diff --git a/docs/zookeeperProgrammers.pdf b/docs/zookeeperProgrammers.pdf new file mode 100644 index 0000000000000000000000000000000000000000..cb1db8cd79e50a6769e233f843124727f15f5dde GIT binary patch literal 134096 zcmdSB1z23o(k?o<1_Hrd26uON2pU|2LvWW6EJ)D6V8PuzxCgi3?ry;yf}J5>KH2-< z=bZoCd!Oe#cZP;p)xD~_RZM`Tj9 zbhb7nq1LvulQT87H+3XYasj;1j>9Ym6g_Y5A8|SIY|v$HY5c zX)AYkEjtep*B&T<9N*Vv%-HG>!qlKooCgzbuJVYg%+;?-UQ&{?V;O%nWm;!zYv@ZwK}Ay3Q)ib;u9 z4FwUz5Da6m1-f|*gVS?Ca;3Y}KShvmArUhGPX%{UKZi49NmyDM&igBYK6MSkpX zyNUxp(qZllmC%$?2tz?C!Lnx{T==3f!@XVwr1;^VK)1dnf`^GFL7|7$je-pjMm}q2 zt-!_?0cpy9J zhd$`9{sbgg?AT|4{+aO9D6;-4q-emvcoC~il>&mIpdXoLyE?nn&UlT07ou(%q!t7} zF+JhPnGy2Z8!Kq6k*eM@al=OjV7C|AqclS^`g3*0*+Y4~Jn~iSOjyOQK=wvdBn6O? zId=gJ$>;+j0?1CK5y>RgNhqXY#(k^FmZXUtUqq9>>eIo1m5^XjdL4^T3&0Fq&vI0v zQ%Y8vDtIVBQDypp_YR&T5OE*9)zS7Z>n9F=0Pu z8h>XV{sMSSKuK7IQH4;2G!euTh}(s1oL8Y)LOG4NANiu&u>#$ir55r1%lGK-G5P#I zd?a7La6sV}(&bkO(D_*WjqqFQH@)tN^}JJB_gBqyf*2#6*z1EQ5jVE?ruXpPNg1-t z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(aXWU?4#_!Ki z_(1jl6?QhOal}9nzWXVB@!1;9=nq1`8{3dmAbElu5-@}Wj8A#`d_AY_Dno8d(NgQL z)isj3SL9llq+)T8BUld;&)8UTW1O+xBg#Bu^L(|HFfta!2X(^Agf|P;*0B1(;#F5F z%eO_m)XCW1t$oPF`K!pyu$PSW@}8WvkK9v48%x>A1S{5Sm~PfFTX>&qjL`iV$!4#y z(r1r9?oAkLBcl8h*5?SOpRhr^o7Ok>^F&|envVS-EG?wW0I2Fih34_Nx0X zGc>&)tPRskVlcy48=@m@!PejEC0;qE{;qkx(#u$n5IvRKwapm9Fdwk6UuhqEyREAz z>*F_D1eRX6g?=oXqcwXxK+1BX#4FZoj776xK+-S!gxJXkUGlBH0}(kb<| z$PHarWDnnhsa%f%a#PnXa(jGWiySecg277EZ&6?T<8dxq3jc#F7^fKO-_Sd}AM#w0;zhXH-Wa-?@zyu2K7jF(@AbYBu(yRW}`VR^vX%MR0a%^L7;VtJvGF`w*{6 z%=SZ0?GiCQNJIy;E)GVsUgE-aTYnzV?yw2O#)vuCj{!lK;s&bAF(^LM!Ou}xpEyMP4 zbwE_QB-i{Y}OepCyWs)8DXg=qBguk1%&zLtJ3R{h{b3Nq}MmVCeW&LJ4%QtC+9( z3f=;G+2!`e-I~rDp6nfLcOCUGzW}3F|GQO)j*TDA!rHeE<-0I+7@Lkug{>$CMY25y zwKl)I`C4Z8Fuzq7*?~+)Q?5+knsR>X<150-4&`CUt$00~*TGTD&(veHy_nVFT<deA&ZV01U5MU0YpCsRmyKjo+LqSbZ?%3sR&TH0Uw-kN zgZte3Z!dp;oCh5DUwN!^%Sz+)?f&!cpMP%Y<@uXiz7N~wQl2mSr>(8W=cnh#x?kGU moaJGxhhw{JA8-FJa^45>rt$UdJXc}%IZC*>yL-5q1;+ literal 0 HcmV?d00001 diff --git a/docs/zookeeperQuotas.html b/docs/zookeeperQuotas.html new file mode 100644 index 0000000..597e9e1 --- /dev/null +++ b/docs/zookeeperQuotas.html @@ -0,0 +1,290 @@ + + + + + + + +ZooKeeper Quota's Guide + + + + + + + + + +
+ + + +
+ + + + + + + + + + + + +
+
+
+
+ +
+ + +
+ +
+ +   +
+ + + + + +
+ +

ZooKeeper Quota's Guide

+

A Guide to Deployment and Administration

+
+
+ +
+
+ + + + + +

Quotas

+
+

ZooKeeper has both namespace and bytes quotas. You can use the ZooKeeperMain class to setup quotas. + ZooKeeper prints WARN messages if users exceed the quota assigned to them. The messages + are printed in the log of the ZooKeeper. +

+

+$ bin/zkCli.sh -server host:port +

+

The above command gives you a command line option of using quotas.

+ +

Setting Quotas

+

You can use + setquota to set a quota on a ZooKeeper node. It has an option of setting quota with + -n (for namespace) + and -b (for bytes).

+

The ZooKeeper quota are stored in ZooKeeper itself in /zookeeper/quota. To disable other people from + changing the quota's set the ACL for /zookeeper/quota such that only admins are able to read and write to it. +

+ +

Listing Quotas

+

You can use + listquota to list a quota on a ZooKeeper node. +

+ +

Deleting Quotas

+

You can use + delquota to delete quota on a ZooKeeper node. +

+
+ +

+ +

+
+ +
 
+
+ + + diff --git a/docs/zookeeperQuotas.pdf b/docs/zookeeperQuotas.pdf new file mode 100644 index 0000000000000000000000000000000000000000..1455fb9967db33be6bc37771f044a6ef2e372324 GIT binary patch literal 11180 zcmc&)c|26#`=^gAle8#HR5!_zn9YnCYqn8YL&%Z_gQ+p2nXzRJ?V*LFp;CRUS&AZK zY11YoQTC;xlBI~U{_dTzRQmpY_5J6k*DLOG&Ux1JJm-C$dpB4Z5R{QBs;~_inb)#l zssI9@x$J>yYQo^wWG00KDA?0z#w3zAi4JV{p)rZ_48X{T>_$?A!L58;_K;keKTH9M z7Id1Mk1IG^LD!q;>PZ3!<`#eriOwL?r~pC*j{)cC(@8`o_-sIAf&vWGQ3xasfkh#~ ze;9lg|3tS#_^@)W$Fy-YvV1A{cn+-_1OymZgLVH(XwNnum8e zAS*nw**f=f+G9&T#bb84_J>{`RS-GW*}B-0FV_BA=e-((3#ng+hg+MP`qy>`U1%E{ zE9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r;&&BTM?s-2zjBhz7|i z82;ym2WMu#hsU(u2?_~dABYqWG`N%cduXh6z~lVl!FHEPpiMYDmKT~#dQ5*YK^uku zHqY?T2Ioz`r;X`$CZOTqy%pSYgU26!4~^*&*`UE&61btkS^4jwF&*RtG(0%0i?>aY zL8{+_<59cG8x`5Q@_TSRykfwy(Y&pSZ2R~2NR2YNx=qC-Xyeh-crh9C6O2c(9>j zlIEMDx8?C@1SzOz%p)MUzsX|h*TI0trA@B-9?oPdesCi?fyfU|L}dO$5%730%5H^1 z>hJ_K)E$QYp(x{ZSZLIcs}6?)c>+frC_wYnTyAwlxwu7eJw;iv=mXF?u~ zvyMQ3j{W4QlOhsvJa}p3iR`xjRo9@_NBT?d_2 z%2h{%?2xMtI!K1A4v*&L4Ugreg(y7<&C-zWapE9K^Uw_T+(N#C`#IDNH{gDbN6ugte-e1$Xj1NXv49xvIy{c&T|7Y=I`NegFIEa#4VE=HaX( z5uxq_M;)Fh1zlFlQ3o^#I&zky4)6i37vZSG6VZ_C6^2TfP=b69CbJ;5|3_R zq~SF-9M6GECwSTeY|(=*@Z)-p0Hr=$bwntbaMnpp4IRkDg+|ZfkCMcp?t!M04T5L+6xn)e)ii&s9f)I?J4OL;`e50!JO5i09E~ zu-6z$#WWGac~_dpN8mv~;*mWL!{c9otayA09vC%G8-WnOQwLO> z+h#yI1l@VW$s3Lcof5)X2gJ++53IK2kqb!8c=P~VB*lYcGMm9;c-t30NnF6=c>D{n z4j!AqL&*;}A9xb4Ou@(#55EK{c0OF4&A^%sXRt&G4BFXxk>L)Kq&Ai6iUQsMIuJmO zVnsy(X~6#n!+Elbc&s8xNl8&jdY6invJy!}k$_VK$}fdc2DvYWD3AL6Bk-UfSTN)4 T3ir$KBw*b98#gLzsqp_lf{9pE literal 0 HcmV?d00001 diff --git a/docs/zookeeperStarted.html b/docs/zookeeperStarted.html new file mode 100644 index 0000000..361b334 --- /dev/null +++ b/docs/zookeeperStarted.html @@ -0,0 +1,629 @@ + + + + + + + +ZooKeeper Getting Started Guide + + + + + + + + + + +
+
+ +
+ + +
+ +
+ +   +
+ + + + + +
+ +

ZooKeeper Getting Started Guide

+ + + + + + + +

Getting Started: Coordinating Distributed Applications with + ZooKeeper

+
+

This document contains information to get you started quickly with + ZooKeeper. It is aimed primarily at developers hoping to try it out, and + contains simple installation instructions for a single ZooKeeper server, a + few commands to verify that it is running, and a simple programming + example. Finally, as a convenience, there are a few sections regarding + more complicated installations, for example running replicated + deployments, and optimizing the transaction log. However for the complete + instructions for commercial deployments, please refer to the ZooKeeper + Administrator's Guide.

+ +

Pre-requisites

+

See + System Requirements in the Admin guide.

+ +

Download

+

To get a ZooKeeper distribution, download a recent + + stable release from one of the Apache Download + Mirrors.

+ +

Standalone Operation

+

Setting up a ZooKeeper server in standalone mode is + straightforward. The server is contained in a single JAR file, + so installation consists of creating a configuration.

+

Once you've downloaded a stable ZooKeeper release unpack + it and cd to the root

+

To start ZooKeeper you need a configuration file. Here is a sample, + create it in conf/zoo.cfg:

+
+tickTime=2000
+dataDir=/var/lib/zookeeper
+clientPort=2181
+
+

This file can be called anything, but for the sake of this + discussion call + it conf/zoo.cfg. Change the + value of dataDir to specify an + existing (empty to start with) directory. Here are the meanings + for each of the fields:

+
+ +
+ +tickTime + +
+
+

the basic time unit in milliseconds used by ZooKeeper. It is + used to do heartbeats and the minimum session timeout will be + twice the tickTime.

+
+ +
+
+ +
+ +dataDir + +
+
+

the location to store the in-memory database snapshots and, + unless specified otherwise, the transaction log of updates to the + database.

+
+ + +
+ +clientPort + +
+
+

the port to listen for client connections

+
+ +
+

Now that you created the configuration file, you can start + ZooKeeper:

+
bin/zkServer.sh start
+

ZooKeeper logs messages using log4j -- more detail + available in the + Logging + section of the Programmer's Guide. You will see log messages + coming to the console (default) and/or a log file depending on + the log4j configuration.

+

The steps outlined here run ZooKeeper in standalone mode. There is + no replication, so if ZooKeeper process fails, the service will go down. + This is fine for most development situations, but to run ZooKeeper in + replicated mode, please see Running Replicated + ZooKeeper.

+ +

Managing ZooKeeper Storage

+

For long running production systems ZooKeeper storage must + be managed externally (dataDir and logs). See the section on + maintenance for + more details.

+ +

Connecting to ZooKeeper

+
$ bin/zkCli.sh -server 127.0.0.1:2181
+

This lets you perform simple, file-like operations.

+

Once you have connected, you should see something like: +

+
+
+Connecting to localhost:2181
+log4j:WARN No appenders could be found for logger (org.apache.zookeeper.ZooKeeper).
+log4j:WARN Please initialize the log4j system properly.
+Welcome to ZooKeeper!
+JLine support is enabled
+[zkshell: 0]
+        
+

+ From the shell, type help to get a listing of commands that can be executed from the client, as in: +

+
+
+[zkshell: 0] help
+ZooKeeper host:port cmd args
+        get path [watch]
+        ls path [watch]
+        set path data [version]
+        delquota [-n|-b] path
+        quit
+        printwatches on|off
+        createpath data acl
+        stat path [watch]
+        listquota path
+        history
+        setAcl path acl
+        getAcl path
+        sync path
+        redo cmdno
+        addauth scheme auth
+        delete path [version]
+        setquota -n|-b val path
+
+        
+

From here, you can try a few simple commands to get a feel for this simple command line interface. First, start by issuing the list command, as + in ls, yielding: +

+
+
+[zkshell: 8] ls /
+[zookeeper]
+        
+

Next, create a new znode by running create /zk_test my_data. This creates a new znode and associates the string "my_data" with the node. + You should see:

+
+
+[zkshell: 9] create /zk_test my_data
+Created /zk_test
+      
+

Issue another ls / command to see what the directory looks like: +

+
+
+[zkshell: 11] ls /
+[zookeeper, zk_test]
+
+        
+

+ Notice that the zk_test directory has now been created. +

+

Next, verify that the data was associated with the znode by running the get command, as in: +

+
+
+[zkshell: 12] get /zk_test
+my_data
+cZxid = 5
+ctime = Fri Jun 05 13:57:06 PDT 2009
+mZxid = 5
+mtime = Fri Jun 05 13:57:06 PDT 2009
+pZxid = 5
+cversion = 0
+dataVersion = 0
+aclVersion = 0
+ephemeralOwner = 0
+dataLength = 7
+numChildren = 0
+        
+

We can change the data associated with zk_test by issuing the set command, as in: +

+
+
+[zkshell: 14] set /zk_test junk
+cZxid = 5
+ctime = Fri Jun 05 13:57:06 PDT 2009
+mZxid = 6
+mtime = Fri Jun 05 14:01:52 PDT 2009
+pZxid = 5
+cversion = 0
+dataVersion = 1
+aclVersion = 0
+ephemeralOwner = 0
+dataLength = 4
+numChildren = 0
+[zkshell: 15] get /zk_test
+junk
+cZxid = 5
+ctime = Fri Jun 05 13:57:06 PDT 2009
+mZxid = 6
+mtime = Fri Jun 05 14:01:52 PDT 2009
+pZxid = 5
+cversion = 0
+dataVersion = 1
+aclVersion = 0
+ephemeralOwner = 0
+dataLength = 4
+numChildren = 0
+      
+

+ (Notice we did a get after setting the data and it did, indeed, change.

+

Finally, let's delete the node by issuing: +

+
+
+[zkshell: 16] delete /zk_test
+[zkshell: 17] ls /
+[zookeeper]
+[zkshell: 18]
+
+

That's it for now. To explore more, continue with the rest of this document and see the Programmer's Guide.

+ +

Programming to ZooKeeper

+

ZooKeeper has a Java bindings and C bindings. They are + functionally equivalent. The C bindings exist in two variants: single + threaded and multi-threaded. These differ only in how the messaging loop + is done. For more information, see the Programming + Examples in the ZooKeeper Programmer's Guide for + sample code using of the different APIs.

+ +

Running Replicated ZooKeeper

+

Running ZooKeeper in standalone mode is convenient for evaluation, + some development, and testing. But in production, you should run + ZooKeeper in replicated mode. A replicated group of servers in the same + application is called a quorum, and in replicated + mode, all servers in the quorum have copies of the same configuration + file.

+
+
Note
+
+ +

+ For replicated mode, a minimum of three servers are required, + and it is strongly recommended that you have an odd number of + servers. If you only have two servers, then you are in a + situation where if one of them fails, there are not enough + machines to form a majority quorum. Two servers is inherently + less + stable than a single server, because there are two single + points of failure. +

+ +
+
+

+ The required + conf/zoo.cfg + file for replicated mode is similar to the one used in standalone + mode, but with a few differences. Here is an example: +

+
+tickTime=2000
+dataDir=/var/lib/zookeeper
+clientPort=2181
+initLimit=5
+syncLimit=2
+server.1=zoo1:2888:3888
+server.2=zoo2:2888:3888
+server.3=zoo3:2888:3888
+
+

The new entry, initLimit is + timeouts ZooKeeper uses to limit the length of time the ZooKeeper + servers in quorum have to connect to a leader. The entry syncLimit limits how far out of date a server can + be from a leader.

+

With both of these timeouts, you specify the unit of time using + tickTime. In this example, the timeout + for initLimit is 5 ticks at 2000 milleseconds a tick, or 10 + seconds.

+

The entries of the form server.X list the + servers that make up the ZooKeeper service. When the server starts up, + it knows which server it is by looking for the file + myid in the data directory. That file has the + contains the server number, in ASCII.

+

Finally, note the two port numbers after each server + name: " 2888" and "3888". Peers use the former port to connect + to other peers. Such a connection is necessary so that peers + can communicate, for example, to agree upon the order of + updates. More specifically, a ZooKeeper server uses this port + to connect followers to the leader. When a new leader arises, a + follower opens a TCP connection to the leader using this + port. Because the default leader election also uses TCP, we + currently require another port for leader election. This is the + second port in the server entry. +

+
+
Note
+
+ +

If you want to test multiple servers on a single + machine, specify the servername + as localhost with unique quorum & + leader election ports (i.e. 2888:3888, 2889:3889, 2890:3890 in + the example above) for each server.X in that server's config + file. Of course separate dataDirs and + distinct clientPorts are also necessary + (in the above replicated example, running on a + single localhost, you would still have + three config files).

+ +

Please be aware that setting up multiple servers on a single + machine will not create any redundancy. If something were to + happen which caused the machine to die, all of the zookeeper + servers would be offline. Full redundancy requires that each + server have its own machine. It must be a completely separate + physical server. Multiple virtual machines on the same physical + host are still vulnerable to the complete failure of that host.

+ +
+
+ +

Other Optimizations

+

There are a couple of other configuration parameters that can + greatly increase performance:

+
    + +
  • + +

    To get low latencies on updates it is important to + have a dedicated transaction log directory. By default + transaction logs are put in the same directory as the data + snapshots and myid file. The dataLogDir + parameters indicates a different directory to use for the + transaction logs.

    + +
  • + + +
  • + +

    +[tbd: what is the other config param?] +

    + +
  • + +
+
+ +

+ +

+
+ +
 
+
+ + + diff --git a/docs/zookeeperStarted.pdf b/docs/zookeeperStarted.pdf new file mode 100644 index 0000000000000000000000000000000000000000..95d7fcfd5e5ac781f6281d82e3ba231fb8b5ef13 GIT binary patch literal 28069 zcmd431yo$yvNno41PGP@p#ucB#y!D3xO<>+cb5Pm!JXg%g1ZE_;O-DK5ZvAMZ;0%i zv-kaP&VBEVcL!^%?w)I|S~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K1ID;;=nK literal 0 HcmV?d00001 diff --git a/docs/zookeeperTutorial.html b/docs/zookeeperTutorial.html new file mode 100644 index 0000000..e9c0646 --- /dev/null +++ b/docs/zookeeperTutorial.html @@ -0,0 +1,937 @@ + + + + + + + +Programming with ZooKeeper - A basic tutorial + + + + + + + + + +
+ + + +
+ + + + + + + + + + + + +
+
+
+
+ +
+ + +
+ +
+ +   +
+ + + + + +
+ +

Programming with ZooKeeper - A basic tutorial

+ + + + + + + +

Introduction

+
+

In this tutorial, we show simple implementations of barriers and + producer-consumer queues using ZooKeeper. We call the respective classes Barrier and Queue. + These examples assume that you have at least one ZooKeeper server running.

+

Both primitives use the following common excerpt of code:

+
+    static ZooKeeper zk = null;
+    static Integer mutex;
+
+    String root;
+
+    SyncPrimitive(String address) {
+        if(zk == null){
+            try {
+                System.out.println("Starting ZK:");
+                zk = new ZooKeeper(address, 3000, this);
+                mutex = new Integer(-1);
+                System.out.println("Finished starting ZK: " + zk);
+            } catch (IOException e) {
+                System.out.println(e.toString());
+                zk = null;
+            }
+        }
+    }
+
+    synchronized public void process(WatchedEvent event) {
+        synchronized (mutex) {
+            mutex.notify();
+        }
+    }
+
+

Both classes extend SyncPrimitive. In this way, we execute steps that are +common to all primitives in the constructor of SyncPrimitive. To keep the examples +simple, we create a ZooKeeper object the first time we instantiate either a barrier +object or a queue object, and we declare a static variable that is a reference +to this object. The subsequent instances of Barrier and Queue check whether a +ZooKeeper object exists. Alternatively, we could have the application creating a +ZooKeeper object and passing it to the constructor of Barrier and Queue.

+

+We use the process() method to process notifications triggered due to watches. +In the following discussion, we present code that sets watches. A watch is internal +structure that enables ZooKeeper to notify a client of a change to a node. For example, +if a client is waiting for other clients to leave a barrier, then it can set a watch and +wait for modifications to a particular node, which can indicate that it is the end of the wait. +This point becomes clear once we go over the examples. +

+
+ + + +

Barriers

+
+

+ A barrier is a primitive that enables a group of processes to synchronize the + beginning and the end of a computation. The general idea of this implementation + is to have a barrier node that serves the purpose of being a parent for individual + process nodes. Suppose that we call the barrier node "/b1". Each process "p" then + creates a node "/b1/p". Once enough processes have created their corresponding + nodes, joined processes can start the computation. +

+

In this example, each process instantiates a Barrier object, and its constructor takes as parameters:

+
    +
  • +

    the address of a ZooKeeper server (e.g., "zoo1.foo.com:2181")

    +
  • + +
  • +

    the path of the barrier node on ZooKeeper (e.g., "/b1")

    +
  • + +
  • +

    the size of the group of processes

    +
  • + +
+

The constructor of Barrier passes the address of the Zookeeper server to the +constructor of the parent class. The parent class creates a ZooKeeper instance if +one does not exist. The constructor of Barrier then creates a +barrier node on ZooKeeper, which is the parent node of all process nodes, and +we call root (Note: This is not the ZooKeeper root "/").

+
+        /**
+         * Barrier constructor
+         *
+         * @param address
+         * @param root
+         * @param size
+         */
+        Barrier(String address, String root, int size) {
+            super(address);
+            this.root = root;
+            this.size = size;
+
+            // Create barrier node
+            if (zk != null) {
+                try {
+                    Stat s = zk.exists(root, false);
+                    if (s == null) {
+                        zk.create(root, new byte[0], Ids.OPEN_ACL_UNSAFE,
+                                CreateMode.PERSISTENT);
+                    }
+                } catch (KeeperException e) {
+                    System.out
+                            .println("Keeper exception when instantiating queue: "
+                                    + e.toString());
+                } catch (InterruptedException e) {
+                    System.out.println("Interrupted exception");
+                }
+            }
+
+            // My node name
+            try {
+                name = new String(InetAddress.getLocalHost().getCanonicalHostName().toString());
+            } catch (UnknownHostException e) {
+                System.out.println(e.toString());
+            }
+
+        }
+
+

+To enter the barrier, a process calls enter(). The process creates a node under +the root to represent it, using its host name to form the node name. It then wait +until enough processes have entered the barrier. A process does it by checking +the number of children the root node has with "getChildren()", and waiting for +notifications in the case it does not have enough. To receive a notification when +there is a change to the root node, a process has to set a watch, and does it +through the call to "getChildren()". In the code, we have that "getChildren()" +has two parameters. The first one states the node to read from, and the second is +a boolean flag that enables the process to set a watch. In the code the flag is true. +

+
+        /**
+         * Join barrier
+         *
+         * @return
+         * @throws KeeperException
+         * @throws InterruptedException
+         */
+
+        boolean enter() throws KeeperException, InterruptedException{
+            zk.create(root + "/" + name, new byte[0], Ids.OPEN_ACL_UNSAFE,
+                    CreateMode.EPHEMERAL_SEQUENTIAL);
+            while (true) {
+                synchronized (mutex) {
+                    List<String> list = zk.getChildren(root, true);
+
+                    if (list.size() < size) {
+                        mutex.wait();
+                    } else {
+                        return true;
+                    }
+                }
+            }
+        }
+
+

+Note that enter() throws both KeeperException and InterruptedException, so it is +the reponsability of the application to catch and handle such exceptions.

+

+Once the computation is finished, a process calls leave() to leave the barrier. +First it deletes its corresponding node, and then it gets the children of the root +node. If there is at least one child, then it waits for a notification (obs: note +that the second parameter of the call to getChildren() is true, meaning that +ZooKeeper has to set a watch on the the root node). Upon reception of a notification, +it checks once more whether the root node has any child.

+
+        /**
+         * Wait until all reach barrier
+         *
+         * @return
+         * @throws KeeperException
+         * @throws InterruptedException
+         */
+
+        boolean leave() throws KeeperException, InterruptedException{
+            zk.delete(root + "/" + name, 0);
+            while (true) {
+                synchronized (mutex) {
+                    List<String> list = zk.getChildren(root, true);
+                        if (list.size() > 0) {
+                            mutex.wait();
+                        } else {
+                            return true;
+                        }
+                    }
+                }
+        }
+    }
+
+
+ + +

Producer-Consumer Queues

+
+

+A producer-consumer queue is a distributed data estructure thata group of processes +use to generate and consume items. Producer processes create new elements and add +them to the queue. Consumer processes remove elements from the list, and process them. +In this implementation, the elements are simple integers. The queue is represented +by a root node, and to add an element to the queue, a producer process creates a new node, +a child of the root node. +

+

+The following excerpt of code corresponds to the constructor of the object. As +with Barrier objects, it first calls the constructor of the parent class, SyncPrimitive, +that creates a ZooKeeper object if one doesn't exist. It then verifies if the root +node of the queue exists, and creates if it doesn't. +

+
+        /**
+         * Constructor of producer-consumer queue
+         *
+         * @param address
+         * @param name
+         */
+        Queue(String address, String name) {
+            super(address);
+            this.root = name;
+            // Create ZK node name
+            if (zk != null) {
+                try {
+                    Stat s = zk.exists(root, false);
+                    if (s == null) {
+                        zk.create(root, new byte[0], Ids.OPEN_ACL_UNSAFE,
+                                CreateMode.PERSISTENT);
+                    }
+                } catch (KeeperException e) {
+                    System.out
+                            .println("Keeper exception when instantiating queue: "
+                                    + e.toString());
+                } catch (InterruptedException e) {
+                    System.out.println("Interrupted exception");
+                }
+            }
+        }
+
+

+A producer process calls "produce()" to add an element to the queue, and passes +an integer as an argument. To add an element to the queue, the method creates a +new node using "create()", and uses the SEQUENCE flag to instruct ZooKeeper to +append the value of the sequencer counter associated to the root node. In this way, +we impose a total order on the elements of the queue, thus guaranteeing that the +oldest element of the queue is the next one consumed. +

+
+        /**
+         * Add element to the queue.
+         *
+         * @param i
+         * @return
+         */
+
+        boolean produce(int i) throws KeeperException, InterruptedException{
+            ByteBuffer b = ByteBuffer.allocate(4);
+            byte[] value;
+
+            // Add child with value i
+            b.putInt(i);
+            value = b.array();
+            zk.create(root + "/element", value, Ids.OPEN_ACL_UNSAFE,
+                        CreateMode.PERSISTENT_SEQUENTIAL);
+
+            return true;
+        }
+
+

+To consume an element, a consumer process obtains the children of the root node, +reads the node with smallest counter value, and returns the element. Note that +if there is a conflict, then one of the two contending processes won't be able to +delete the node and the delete operation will throw an exception.

+

+A call to getChildren() returns the list of children in lexicographic order. +As lexicographic order does not necessary follow the numerical order of the counter +values, we need to decide which element is the smallest. To decide which one has +the smallest counter value, we traverse the list, and remove the prefix "element" +from each one.

+
+        /**
+         * Remove first element from the queue.
+         *
+         * @return
+         * @throws KeeperException
+         * @throws InterruptedException
+         */
+        int consume() throws KeeperException, InterruptedException{
+            int retvalue = -1;
+            Stat stat = null;
+
+            // Get the first element available
+            while (true) {
+                synchronized (mutex) {
+                    List<String> list = zk.getChildren(root, true);
+                    if (list.size() == 0) {
+                        System.out.println("Going to wait");
+                        mutex.wait();
+                    } else {
+                        Integer min = new Integer(list.get(0).substring(7));
+                        for(String s : list){
+                            Integer tempValue = new Integer(s.substring(7));
+                            //System.out.println("Temporary value: " + tempValue);
+                            if(tempValue < min) min = tempValue;
+                        }
+                        System.out.println("Temporary value: " + root + "/element" + min);
+                        byte[] b = zk.getData(root + "/element" + min,
+                                    false, stat);
+                        zk.delete(root + "/element" + min, 0);
+                        ByteBuffer buffer = ByteBuffer.wrap(b);
+                        retvalue = buffer.getInt();
+
+                        return retvalue;
+                    }
+                }
+            }
+        }
+    }
+
+
+ + + +

Complete example

+
+

+In the following section you can find a complete command line application to demonstrate the above mentioned +recipes. Use the following command to run it. +

+
+ZOOBINDIR="[path_to_distro]/bin"
+. "$ZOOBINDIR"/zkEnv.sh
+java SyncPrimitive [Test Type] [ZK server] [No of elements] [Client type]
+
+ +

Queue test

+

Start a producer to create 100 elements

+
+java SyncPrimitive qTest localhost 100 p
+
+

Start a consumer to consume 100 elements

+
+java SyncPrimitive qTest localhost 100 c
+
+ +

Barrier test

+

Start a barrier with 2 participants (start as many times as many participants you'd like to enter)

+
+java SyncPrimitive bTest localhost 2
+
+ +

Source Listing

+
+
SyncPrimitive.Java
+
+ +SyncPrimitive.Java + +
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.nio.ByteBuffer;
+import java.util.List;
+import java.util.Random;
+
+import org.apache.zookeeper.CreateMode;
+import org.apache.zookeeper.KeeperException;
+import org.apache.zookeeper.WatchedEvent;
+import org.apache.zookeeper.Watcher;
+import org.apache.zookeeper.ZooKeeper;
+import org.apache.zookeeper.ZooDefs.Ids;
+import org.apache.zookeeper.data.Stat;
+
+public class SyncPrimitive implements Watcher {
+
+    static ZooKeeper zk = null;
+    static Integer mutex;
+
+    String root;
+
+    SyncPrimitive(String address) {
+        if(zk == null){
+            try {
+                System.out.println("Starting ZK:");
+                zk = new ZooKeeper(address, 3000, this);
+                mutex = new Integer(-1);
+                System.out.println("Finished starting ZK: " + zk);
+            } catch (IOException e) {
+                System.out.println(e.toString());
+                zk = null;
+            }
+        }
+        //else mutex = new Integer(-1);
+    }
+
+    synchronized public void process(WatchedEvent event) {
+        synchronized (mutex) {
+            //System.out.println("Process: " + event.getType());
+            mutex.notify();
+        }
+    }
+
+    /**
+     * Barrier
+     */
+    static public class Barrier extends SyncPrimitive {
+        int size;
+        String name;
+
+        /**
+         * Barrier constructor
+         *
+         * @param address
+         * @param root
+         * @param size
+         */
+        Barrier(String address, String root, int size) {
+            super(address);
+            this.root = root;
+            this.size = size;
+
+            // Create barrier node
+            if (zk != null) {
+                try {
+                    Stat s = zk.exists(root, false);
+                    if (s == null) {
+                        zk.create(root, new byte[0], Ids.OPEN_ACL_UNSAFE,
+                                CreateMode.PERSISTENT);
+                    }
+                } catch (KeeperException e) {
+                    System.out
+                            .println("Keeper exception when instantiating queue: "
+                                    + e.toString());
+                } catch (InterruptedException e) {
+                    System.out.println("Interrupted exception");
+                }
+            }
+
+            // My node name
+            try {
+                name = new String(InetAddress.getLocalHost().getCanonicalHostName().toString());
+            } catch (UnknownHostException e) {
+                System.out.println(e.toString());
+            }
+
+        }
+
+        /**
+         * Join barrier
+         *
+         * @return
+         * @throws KeeperException
+         * @throws InterruptedException
+         */
+
+        boolean enter() throws KeeperException, InterruptedException{
+            zk.create(root + "/" + name, new byte[0], Ids.OPEN_ACL_UNSAFE,
+                    CreateMode.EPHEMERAL_SEQUENTIAL);
+            while (true) {
+                synchronized (mutex) {
+                    List<String> list = zk.getChildren(root, true);
+
+                    if (list.size() < size) {
+                        mutex.wait();
+                    } else {
+                        return true;
+                    }
+                }
+            }
+        }
+
+        /**
+         * Wait until all reach barrier
+         *
+         * @return
+         * @throws KeeperException
+         * @throws InterruptedException
+         */
+
+        boolean leave() throws KeeperException, InterruptedException{
+            zk.delete(root + "/" + name, 0);
+            while (true) {
+                synchronized (mutex) {
+                    List<String> list = zk.getChildren(root, true);
+                        if (list.size() > 0) {
+                            mutex.wait();
+                        } else {
+                            return true;
+                        }
+                    }
+                }
+        }
+    }
+
+    /**
+     * Producer-Consumer queue
+     */
+    static public class Queue extends SyncPrimitive {
+
+        /**
+         * Constructor of producer-consumer queue
+         *
+         * @param address
+         * @param name
+         */
+        Queue(String address, String name) {
+            super(address);
+            this.root = name;
+            // Create ZK node name
+            if (zk != null) {
+                try {
+                    Stat s = zk.exists(root, false);
+                    if (s == null) {
+                        zk.create(root, new byte[0], Ids.OPEN_ACL_UNSAFE,
+                                CreateMode.PERSISTENT);
+                    }
+                } catch (KeeperException e) {
+                    System.out
+                            .println("Keeper exception when instantiating queue: "
+                                    + e.toString());
+                } catch (InterruptedException e) {
+                    System.out.println("Interrupted exception");
+                }
+            }
+        }
+
+        /**
+         * Add element to the queue.
+         *
+         * @param i
+         * @return
+         */
+
+        boolean produce(int i) throws KeeperException, InterruptedException{
+            ByteBuffer b = ByteBuffer.allocate(4);
+            byte[] value;
+
+            // Add child with value i
+            b.putInt(i);
+            value = b.array();
+            zk.create(root + "/element", value, Ids.OPEN_ACL_UNSAFE,
+                        CreateMode.PERSISTENT_SEQUENTIAL);
+
+            return true;
+        }
+
+
+        /**
+         * Remove first element from the queue.
+         *
+         * @return
+         * @throws KeeperException
+         * @throws InterruptedException
+         */
+        int consume() throws KeeperException, InterruptedException{
+            int retvalue = -1;
+            Stat stat = null;
+
+            // Get the first element available
+            while (true) {
+                synchronized (mutex) {
+                    List<String> list = zk.getChildren(root, true);
+                    if (list.size() == 0) {
+                        System.out.println("Going to wait");
+                        mutex.wait();
+                    } else {
+                        Integer min = new Integer(list.get(0).substring(7));
+                        String minNode = list.get(0);
+                        for(String s : list){
+                            Integer tempValue = new Integer(s.substring(7));
+                            //System.out.println("Temporary value: " + tempValue);
+                            if(tempValue < min) {
+                                min = tempValue;
+                                minNode = s;
+                            }
+                        }
+                        System.out.println("Temporary value: " + root + "/" + minNode);
+                        byte[] b = zk.getData(root + "/" + minNode,
+                        false, stat);
+                        zk.delete(root + "/" + minNode, 0);
+                        ByteBuffer buffer = ByteBuffer.wrap(b);
+                        retvalue = buffer.getInt();
+
+                        return retvalue;
+                    }
+                }
+            }
+        }
+    }
+
+    public static void main(String args[]) {
+        if (args[0].equals("qTest"))
+            queueTest(args);
+        else
+            barrierTest(args);
+
+    }
+
+    public static void queueTest(String args[]) {
+        Queue q = new Queue(args[1], "/app1");
+
+        System.out.println("Input: " + args[1]);
+        int i;
+        Integer max = new Integer(args[2]);
+
+        if (args[3].equals("p")) {
+            System.out.println("Producer");
+            for (i = 0; i < max; i++)
+                try{
+                    q.produce(10 + i);
+                } catch (KeeperException e){
+
+                } catch (InterruptedException e){
+
+                }
+        } else {
+            System.out.println("Consumer");
+
+            for (i = 0; i < max; i++) {
+                try{
+                    int r = q.consume();
+                    System.out.println("Item: " + r);
+                } catch (KeeperException e){
+                    i--;
+                } catch (InterruptedException e){
+
+                }
+            }
+        }
+    }
+
+    public static void barrierTest(String args[]) {
+        Barrier b = new Barrier(args[1], "/b1", new Integer(args[2]));
+        try{
+            boolean flag = b.enter();
+            System.out.println("Entered barrier: " + args[2]);
+            if(!flag) System.out.println("Error when entering the barrier");
+        } catch (KeeperException e){
+
+        } catch (InterruptedException e){
+
+        }
+
+        // Generate random integer
+        Random rand = new Random();
+        int r = rand.nextInt(100);
+        // Loop for rand iterations
+        for (int i = 0; i < r; i++) {
+            try {
+                Thread.sleep(100);
+            } catch (InterruptedException e) {
+
+            }
+        }
+        try{
+            b.leave();
+        } catch (KeeperException e){
+
+        } catch (InterruptedException e){
+
+        }
+        System.out.println("Left barrier");
+    }
+}
+
+
+
+
+ + +

+ +

+
+ +
 
+
+ + + diff --git a/docs/zookeeperTutorial.pdf b/docs/zookeeperTutorial.pdf new file mode 100644 index 0000000000000000000000000000000000000000..5b3faf688c1b4adcedfa7f68c8cac9a163044d8e GIT binary patch literal 34208 zcmd43WmFx@)-H?$4GzJAOK^7&?(VJ&cNXrRpuru2ySqbh2o~JkEx3~l**n?$yyv{% z-S_)-20aG7s;g$tSv9Ml`OK8IV%F4{zguvMhXiA`AVkV zbATa`fc$s8=fY1S$Y~2QwRM0(x2wmghQx_5gk0^KT)2 z;PY*TI2q{~*y&jr8J_=G=-FxL*~sYW$tYlXd0_$8MlVXT{G}`b0i6s16YTRpDS)-f zvyu#q&leS53Pj8-fzLOl6R~`jD+D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4}Ww*6?A8w@yzcThGg*#5ny+kUvq4GKd6P`O`I*sja{TiI}4 zy~_;(1p~*?4shFpod2>Hwu8eiHv}9wWOk6-KkJ19+~DxP(iA(o{QGvp#k5_~;J~@N zgQ8($$qqBzIO+F@6E{x64Qh4=6^=Ig1|-}dB$xy^Ot<|H81ce^y`Tml91RNQ#%x~2 z`~zA1rh!pF(A`IaVy+t6Ljww!sJxE`Mgr>Wr9qGw+4s{>K+xDjgMi_fb8~xWP%!*p z9dIOOYwn)sxMAFwdBR>A0&|%001W~}+WpUA#$$VFJV*>y?4=>NF&(;>hUCWB!d@B* zbx>v`H)fmDp69^a+{pd1fWb(}{&oR#1D&-0T_EG={(b{KTOWK5lP+`ryTED6{knnS z2=0UYP^bg)!Fe!nv{w%v=z+Ee!+B8q`x49p#~fqc^DY$3gIQAALj#_}fcG961PsG~ z-5wegjKs`C_Rs)!$b-+Jzz1bPVq)K(ccDO=9%yGC6nwwFPzd+I_Csj1ad$RB=mr-fswGk@EM*1_6LDN4)_NIXw?1s0#62*Kw!oodued)1N{a80Pw)ONC;*Qxc6NI5)ElpFPD+uPab8k+%AHeh_nb;HVo zik6mkAi&8nN3bO<3@kx_Lt%dh210yDA*6^fL`(>I4FD7FYhYmr3@i#@2oxd)*r$+~ f0O;=@!48>h?R0JIu;>Pbz@ShPHa1Z?F_QlSbo4u4 literal 0 HcmV?d00001 diff --git a/ivy.xml b/ivy.xml new file mode 100644 index 0000000..8e5f198 --- /dev/null +++ b/ivy.xml @@ -0,0 +1,155 @@ + + + + + + + + ZooKeeper + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ivysettings.xml b/ivysettings.xml new file mode 100644 index 0000000..1d06c40 --- /dev/null +++ b/ivysettings.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/src/LICENSE.txt b/src/LICENSE.txt new file mode 100644 index 0000000..867ac6d --- /dev/null +++ b/src/LICENSE.txt @@ -0,0 +1,216 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +This distribution bundles jline 0.9.94, which is available under the +2-clause BSD License. For details, see a copy of the license in +lib/jline-0.9.94.LICENSE.txt + +This distribution bundles SLF4J 1.6.1, which is available under the MIT +License. For details, see a copy of the license in +lib/slf4j-1.6.1.LICENSE.txt + +This distribution bundles a modified version of 'JZLib' as part of +Netty-3.7.0, which is available under the 3-clause BSD licence. For +details, see a copy of the licence in META-INF/license/LICENSE-jzlib.txt +as part of the Netty jar in lib/netty-3.7.0.Final.jar. diff --git a/src/NOTICE.txt b/src/NOTICE.txt new file mode 100644 index 0000000..08388e8 --- /dev/null +++ b/src/NOTICE.txt @@ -0,0 +1,100 @@ +Apache ZooKeeper +Copyright 2009-2018 The Apache Software Foundation + +This product includes software developed at +The Apache Software Foundation (http://www.apache.org/). + +This product includes software developed by +The Netty Project (http://netty.io/) +Copyright 2011 The Netty Project + +The Netty NOTICE file contains the following items: +This product contains the extensions to Java Collections Framework which has +been derived from the works by JSR-166 EG, Doug Lea, and Jason T. Greene: + + * LICENSE: + * license/LICENSE.jsr166y.txt (Public Domain) + * HOMEPAGE: + * http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/ + * http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbosscache/experimental/jsr166/ + +This product contains a modified version of Robert Harder's Public Domain +Base64 Encoder and Decoder, which can be obtained at: + + * LICENSE: + * license/LICENSE.base64.txt (Public Domain) + * HOMEPAGE: + * http://iharder.sourceforge.net/current/java/base64/ + +This product contains a modified version of 'JZlib', a re-implementation of +zlib in pure Java, which can be obtained at: + + * LICENSE: + * license/LICENSE.jzlib.txt (BSD Style License) + * HOMEPAGE: + * http://www.jcraft.com/jzlib/ + +This product contains a modified version of 'Webbit', a Java event based +WebSocket and HTTP server: + + * LICENSE: + * license/LICENSE.webbit.txt (BSD License) + * HOMEPAGE: + * https://github.com/joewalnes/webbit + +This product optionally depends on 'Protocol Buffers', Google's data +interchange format, which can be obtained at: + + * LICENSE: + * license/LICENSE.protobuf.txt (New BSD License) + * HOMEPAGE: + * http://code.google.com/p/protobuf/ + +This product optionally depends on 'Bouncy Castle Crypto APIs' to generate +a temporary self-signed X.509 certificate when the JVM does not provide the +equivalent functionality. It can be obtained at: + + * LICENSE: + * license/LICENSE.bouncycastle.txt (MIT License) + * HOMEPAGE: + * http://www.bouncycastle.org/ + +This product optionally depends on 'SLF4J', a simple logging facade for Java, +which can be obtained at: + + * LICENSE: + * license/LICENSE.slf4j.txt (MIT License) + * HOMEPAGE: + * http://www.slf4j.org/ + +This product optionally depends on 'Apache Commons Logging', a logging +framework, which can be obtained at: + + * LICENSE: + * license/LICENSE.commons-logging.txt (Apache License 2.0) + * HOMEPAGE: + * http://commons.apache.org/logging/ + +This product optionally depends on 'Apache Log4J', a logging framework, +which can be obtained at: + + * LICENSE: + * license/LICENSE.log4j.txt (Apache License 2.0) + * HOMEPAGE: + * http://logging.apache.org/log4j/ + +This product optionally depends on 'JBoss Logging', a logging framework, +which can be obtained at: + + * LICENSE: + * license/LICENSE.jboss-logging.txt (GNU LGPL 2.1) + * HOMEPAGE: + * http://anonsvn.jboss.org/repos/common/common-logging-spi/ + +This product optionally depends on 'Apache Felix', an open source OSGi +framework implementation, which can be obtained at: + + * LICENSE: + * license/LICENSE.felix.txt (Apache License 2.0) + * HOMEPAGE: + * http://felix.apache.org/ diff --git a/src/c/CMakeLists.txt b/src/c/CMakeLists.txt new file mode 100644 index 0000000..e7dfbeb --- /dev/null +++ b/src/c/CMakeLists.txt @@ -0,0 +1,237 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +cmake_minimum_required(VERSION 3.6) + +project(zookeeper VERSION 3.4.13) +set(email user@zookeeper.apache.org) +set(description "zookeeper C client") + +# general options +include_directories(include tests generated ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR}) +if(UNIX) + add_compile_options(-Wall -fPIC) +elseif(WIN32) + add_compile_options(/W3) +endif() +add_definitions(-DUSE_STATIC_LIB) + +# TODO: Enable /WX and /W4 on Windows. Currently there are ~1000 warnings. +# TODO: Add Solaris support. +# TODO: Add a shared library option. +# TODO: Specify symbols to export. +# TODO: Generate doxygen documentation. + +# Sync API option +option(WANT_SYNCAPI "Enables Sync API support" ON) +if(WANT_SYNCAPI) + add_definitions(-DTHREADED) + if(WIN32) + # Note that the generator expression ensures that `/MTd` is used when Debug + # configurations are built. + add_compile_options(/MT$<$:d>) + endif() +endif() + +# CppUnit option +if(WIN32 OR APPLE) + # The tests do not yet compile on Windows or macOS, + # so we set this to off by default. + # + # Note that CMake does not have expressions except in conditionals, + # so we're left with this if/else/endif pattern. + set(DEFAULT_WANT_CPPUNIT OFF) +else() + set(DEFAULT_WANT_CPPUNIT ON) +endif() +option(WANT_CPPUNIT "Enables CppUnit and tests" ${DEFAULT_WANT_CPPUNIT}) + +# The function `to_have(in out)` converts a header name like `arpa/inet.h` +# into an Autotools style preprocessor definition `HAVE_ARPA_INET_H`. +# This is then set or unset in `configure_file()` step. +# +# Note that CMake functions do not have return values; instead an "out" +# variable must be passed, and explicitly set with parent scope. +function(to_have in out) + string(TOUPPER ${in} str) + string(REGEX REPLACE "/|\\." "_" str ${str}) + set(${out} "HAVE_${str}" PARENT_SCOPE) +endfunction() + +# include file checks +foreach(f generated/zookeeper.jute.h generated/zookeeper.jute.c) + if(EXISTS "${CMAKE_SOURCE_DIR}/${f}") + to_have(${f} name) + set(${name} 1) + else() + message(FATAL_ERROR + "jute files are missing!\n" + "Please run 'ant compile_jute' while in the ZooKeeper top level directory.") + endif() +endforeach() + +# header checks +include(CheckIncludeFile) +set(check_headers + arpa/inet.h + dlfcn.h + fcntl.h + inttypes.h + memory.h + netdb.h + netinet/in.h + stdint.h + stdlib.h + string.h + strings.h + sys/socket.h + sys/stat.h + sys/time.h + sys/types.h + unistd.h + sys/utsname.h) + +foreach(f ${check_headers}) + to_have(${f} name) + check_include_file(${f} ${name}) +endforeach() + +# function checks +include(CheckFunctionExists) +set(check_functions + getcwd + gethostbyname + gethostname + getlogin + getpwuid_r + gettimeofday + getuid + memmove + memset + poll + socket + strchr + strdup + strerror + strtol) + +foreach(fn ${check_functions}) + to_have(${fn} name) + check_function_exists(${fn} ${name}) +endforeach() + +# library checks +set(check_libraries rt m pthread) +foreach(lib ${check_libraries}) + to_have("lib${lib}" name) + find_library(${name} ${lib}) +endforeach() + +# IPv6 check +include(CheckStructHasMember) +check_struct_has_member("struct sockaddr_in6" sin6_addr "netinet/in.h" ZOO_IPV6_ENABLED) + +# configure +configure_file(cmake_config.h.in ${CMAKE_SOURCE_DIR}/include/config.h) + +# hashtable library +set(hashtable_sources src/hashtable/hashtable_itr.c src/hashtable/hashtable.c) +add_library(hashtable STATIC ${hashtable_sources}) +target_link_libraries(hashtable PUBLIC $<$:m>) + +# zookeeper library +set(zookeeper_sources + src/zookeeper.c + src/recordio.c + generated/zookeeper.jute.c + src/zk_log.c + src/zk_hashtable.c) + +if(WANT_SYNCAPI) + list(APPEND zookeeper_sources src/mt_adaptor.c) +else() + list(APPEND zookeeper_sources src/st_adaptor.c) +endif() + +if(WIN32) + list(APPEND zookeeper_sources src/winport.c) +endif() + +add_library(zookeeper STATIC ${zookeeper_sources}) +target_link_libraries(zookeeper PUBLIC + hashtable + $<$:rt> # clock_gettime + $<$:ws2_32>) # Winsock 2.0 + +if(WANT_SYNCAPI AND NOT WIN32) + find_package(Threads REQUIRED) + target_link_libraries(zookeeper PUBLIC Threads::Threads) +endif() + +# cli executable +add_executable(cli src/cli.c) +target_link_libraries(cli zookeeper) + +# load_gen executable +if(WANT_SYNCAPI AND NOT WIN32) + add_executable(load_gen src/load_gen.c) + target_link_libraries(load_gen zookeeper) +endif() + +# tests +set(test_sources + tests/TestDriver.cc + tests/LibCMocks.cc + tests/LibCSymTable.cc + tests/MocksBase.cc + tests/ZKMocks.cc + tests/Util.cc + tests/ThreadingUtil.cc + tests/TestZookeeperInit.cc + tests/TestZookeeperClose.cc + tests/TestClientRetry.cc + tests/TestOperations.cc + tests/TestMulti.cc + tests/TestWatchers.cc + tests/TestClient.cc) + +if(WANT_SYNCAPI) + list(APPEND test_sources tests/PthreadMocks.cc) +endif() + +if(WANT_CPPUNIT) + add_executable(zktest ${test_sources}) + target_compile_definitions(zktest + PRIVATE -DZKSERVER_CMD="${CMAKE_SOURCE_DIR}/tests/zkServer.sh") + # TODO: Use `find_library()` for `cppunit`. + target_link_libraries(zktest zookeeper cppunit dl) + + # This reads the link flags from the file `tests/wrappers.opt` into + # the variable `symbol_wrappers` for use in `target_link_libraries`. + # It is a holdover from the original build system. + file(STRINGS tests/wrappers.opt symbol_wrappers) + if(WANT_SYNCAPI) + file(STRINGS tests/wrappers-mt.opt symbol_wrappers_mt) + endif() + + target_link_libraries(zktest ${symbol_wrappers} ${symbol_wrappers_mt}) + + enable_testing() + add_test(NAME zktest_runner COMMAND zktest) + set_property(TEST zktest_runner PROPERTY ENVIRONMENT + "ZKROOT=${CMAKE_SOURCE_DIR}/../.." + "CLASSPATH=$CLASSPATH:$CLOVER_HOME/lib/clover.jar") +endif() diff --git a/src/c/ChangeLog b/src/c/ChangeLog new file mode 100644 index 0000000..c85a6c0 --- /dev/null +++ b/src/c/ChangeLog @@ -0,0 +1,116 @@ +Release 2.1.1 +2008-04-30 Andrew Kornev + + * changed the distributino package name to "c-client-src" + +Release 2.1.0 +2008-04-30 Andrew Kornev + + * added the client latency diagnostics; the client prints a warning when the + reponse latency exceeds 20ms + + * modified logging format to report the znode path for which the zookeeper + operation is called + + * fixed a minor bug where error messages were missing for some of the newer + zookeeper error codes (ZCLOSING and ZNOTHING). + + * improved logging by adding the XID to the message to make it easy to match + requests to responses + + * fixed the bug causing sporadic session termination and timeouts + + * added a new return code to zookeeper_process() -- ZNOTHING -- + that indicates that the socket has no more data to read + + * more unit tests added + +Release 1.1.3 +2008-02-07 Andrew Kornev + + * get_xid() is not thread-safe (xid initialization race condition + in the multi-threaded mode). + + * the I/O thread doesn’t automatically terminate on AUTH_FAILURE and + SESSION_EXPIRED events. + + * all session events should be processed on the completion thread. + + * PING operation doesn’t atomically enqueue the completion and + send buffers like other operations do. + + * corrected zookeeper_init() doxygen docs. + + * new unit tests added. + + +Release 1.1.2 +2008-01-24 Andrew Kornev + + * fixed a race condition caused by the code in zookeeper_process() + and free_completions() setting sc->complete to 1 without proper + synchronization; + + * fixed zoo_get() not updating buffer_len value with the actual + buffer length on return; added missing enter_critical/leave_critical + calls to the async ZK operations. + + * Replaced select() with poll() to fix the problem with the FD_SET + macro causing stack corruption for FDs higher than 1024 + + * Added zoo_set_log_stream() to the public API. The function allows + applications to specify a different log file. + + * Removed unused declarations from zookeeper.h (ACL related) + + * changed zoo_get() signature to take a pointer to buffer length. + The function sets the parameter to the actual data length upon return. + + * the watcher callback now takes the zhandle as its first parameter. This + is to avoid a race condition in the multi-threaded client when a watcher + is called before zookeeper_init() has returned. + + * fixed zookeeper_close() resource leaks and race conditions, + fixed the race condition causing xid mismatch. + + * added support for cppunit, added new targets: "check" and "run-check" + to build and run unit tests. + + * Changed the signature of zookeeper_init(): it now takes a context pointer + as a parameter. This is to avoid a race condition in the multi-threaded client. + + * Using a self-pipe rather than SIGUSR1 to wake up select() in the I/O thread + + * Added the doxygen target to the autoconf scripts + + * Pulled out the logging functionality from zookeeper.c to zk_log.c/.h. + Fixed a minor issue with PING responses being unnecessarily put on + the completion queue rather than simply dropped. Make use of DLL_EXPORT + symbol for building shared lib on cygwin. + + * Implemented new Zookeeper operation sync() to flush the leader channel + to ensure that all updates have reached the followers. + + * Synchronous methods not being handled properly on disconnect + + * breed: fixed an incorrect parameter passed to zookeeper API by + the Sync API wrapper functions + + * breed: the set and delete commands now support both Sync and Async API. + Prefix the command name with an 'a' to call the Async API: aset, adelete + + * Make sure mutexes and condition variables are properly initialized + and destroyed + + * Fixed zookeeper_close() causing core dumps with mt_adaptor + + +Release 1.0.0 +2007-11-27 Andrew Kornev + + * configure.ac and Makefile.am added support for GNU autotools + + * recordio.c/.h updated jute IO routines to use bit-explicit integer types + (int32_t vs. int, and int64_t vs. long long) + + * README rough draft \ No newline at end of file diff --git a/src/c/INSTALL b/src/c/INSTALL new file mode 100644 index 0000000..5458714 --- /dev/null +++ b/src/c/INSTALL @@ -0,0 +1,234 @@ +Installation Instructions +************************* + +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, +2006 Free Software Foundation, Inc. + +This file is free documentation; the Free Software Foundation gives +unlimited permission to copy, distribute and modify it. + +Basic Installation +================== + +Briefly, the shell commands `./configure; make; make install' should +configure, build, and install this package. The following +more-detailed instructions are generic; see the `README' file for +instructions specific to this package. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. Caching is +disabled by default to prevent problems with accidental use of stale +cache files. + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You need `configure.ac' if +you want to change it or regenerate `configure' using a newer version +of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. + + Running `configure' might take a while. While running, it prints + some messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + +Some systems require unusual options for compilation or linking that the +`configure' script does not know about. Run `./configure --help' for +details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c99 CFLAGS=-g LIBS=-lposix + + *Note Defining Variables::, for more details. + +Compiling For Multiple Architectures +==================================== + +You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you can use GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + With a non-GNU `make', it is safer to compile the package for one +architecture at a time in the source code directory. After you have +installed the package for one architecture, use `make distclean' before +reconfiguring for another architecture. + +Installation Names +================== + +By default, `make install' installs the package's commands under +`/usr/local/bin', include files under `/usr/local/include', etc. You +can specify an installation prefix other than `/usr/local' by giving +`configure' the option `--prefix=PREFIX'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +pass the option `--exec-prefix=PREFIX' to `configure', the package uses +PREFIX as the prefix for installing programs and libraries. +Documentation and other data files still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=DIR' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + +Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + +There may be some features `configure' cannot figure out automatically, +but needs to determine by the type of machine the package will run on. +Usually, assuming the package is built to be run on the _same_ +architectures, `configure' can figure that out, but if it prints a +message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + + CPU-COMPANY-SYSTEM + +where SYSTEM can have one of these forms: + + OS KERNEL-OS + + See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the machine type. + + If you are _building_ compiler tools for cross-compiling, you should +use the option `--target=TYPE' to select the type of system they will +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. + +Sharing Defaults +================ + +If you want to set default values for `configure' scripts to share, you +can create a site shell script called `config.site' that gives default +values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Defining Variables +================== + +Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the `configure' command line, using `VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +causes the specified `gcc' to be used as the C compiler (unless it is +overridden in the site shell script). + +Unfortunately, this technique does not work for `CONFIG_SHELL' due to +an Autoconf bug. Until the bug is fixed you can use this workaround: + + CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash + +`configure' Invocation +====================== + +`configure' recognizes the following options to control how it operates. + +`--help' +`-h' + Print a summary of the options to `configure', and exit. + +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. + diff --git a/src/c/LICENSE b/src/c/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/src/c/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/src/c/Makefile.am b/src/c/Makefile.am new file mode 100644 index 0000000..5993098 --- /dev/null +++ b/src/c/Makefile.am @@ -0,0 +1,128 @@ +# need this for Doxygen integration +include $(top_srcdir)/aminclude.am + +if SOLARIS + SOLARIS_CPPFLAGS = -D_POSIX_PTHREAD_SEMANTICS + SOLARIS_LIB_LDFLAGS = -lnsl -lsocket +endif +AM_CPPFLAGS = -I${srcdir}/include -I${srcdir}/tests -I${srcdir}/generated $(SOLARIS_CPPFLAGS) +AM_CFLAGS = -Wall -Werror +AM_CXXFLAGS = -Wall $(USEIPV6) + +# Additional flags for coverage testing (if enabled) +if ENABLEGCOV + AM_CFLAGS += -fprofile-arcs -ftest-coverage + AM_LDFLAGS = -lgcov +endif + +LIB_LDFLAGS = -no-undefined -version-info 2 $(SOLARIS_LIB_LDFLAGS) + +pkginclude_HEADERS = include/zookeeper.h include/zookeeper_version.h include/zookeeper_log.h include/proto.h include/recordio.h generated/zookeeper.jute.h +EXTRA_DIST=LICENSE + +HASHTABLE_SRC = src/hashtable/hashtable_itr.h src/hashtable/hashtable_itr.c \ + src/hashtable/hashtable_private.h src/hashtable/hashtable.h src/hashtable/hashtable.c + +noinst_LTLIBRARIES = libhashtable.la +libhashtable_la_SOURCES = $(HASHTABLE_SRC) + +COMMON_SRC = src/zookeeper.c include/zookeeper.h include/zookeeper_version.h include/zookeeper_log.h\ + src/recordio.c include/recordio.h include/proto.h \ + src/zk_adaptor.h generated/zookeeper.jute.c \ + src/zookeeper_log.h src/zk_log.c src/zk_hashtable.h src/zk_hashtable.c + +# These are the symbols (classes, mostly) we want to export from our library. +EXPORT_SYMBOLS = '(zoo_|zookeeper_|zhandle|Z|format_log_message|log_message|logLevel|deallocate_|allocate_|zerror|is_unrecoverable)' +noinst_LTLIBRARIES += libzkst.la +libzkst_la_SOURCES =$(COMMON_SRC) src/st_adaptor.c +libzkst_la_LIBADD = -lm + +lib_LTLIBRARIES = libzookeeper_st.la +libzookeeper_st_la_SOURCES = +libzookeeper_st_la_LIBADD=libzkst.la libhashtable.la +libzookeeper_st_la_DEPENDENCIES=libzkst.la libhashtable.la +libzookeeper_st_la_LDFLAGS = $(LIB_LDFLAGS) -export-symbols-regex $(EXPORT_SYMBOLS) + +if WANT_SYNCAPI +noinst_LTLIBRARIES += libzkmt.la +libzkmt_la_SOURCES =$(COMMON_SRC) src/mt_adaptor.c +libzkmt_la_CFLAGS = -DTHREADED +libzkmt_la_LIBADD = -lm + +lib_LTLIBRARIES += libzookeeper_mt.la +libzookeeper_mt_la_SOURCES = +libzookeeper_mt_la_LIBADD=libzkmt.la libhashtable.la -lpthread +libzookeeper_mt_la_DEPENDENCIES=libzkmt.la libhashtable.la +libzookeeper_mt_la_LDFLAGS = $(LIB_LDFLAGS) -export-symbols-regex $(EXPORT_SYMBOLS) +endif + +bin_PROGRAMS = cli_st + +cli_st_SOURCES = src/cli.c +cli_st_LDADD = libzookeeper_st.la + +if WANT_SYNCAPI +bin_PROGRAMS += cli_mt load_gen + +cli_mt_SOURCES = src/cli.c +cli_mt_LDADD = libzookeeper_mt.la +cli_mt_CFLAGS = -DTHREADED + +load_gen_SOURCES = src/load_gen.c +load_gen_LDADD = libzookeeper_mt.la +load_gen_CFLAGS = -DTHREADED + +endif + +######################################################################### +# build and run unit tests + +EXTRA_DIST+=$(wildcard ${srcdir}/tests/*.cc) $(wildcard ${srcdir}/tests/*.h) \ + ${srcdir}/tests/wrappers.opt ${srcdir}/tests/wrappers-mt.opt + +TEST_SOURCES = tests/TestDriver.cc tests/LibCMocks.cc tests/LibCSymTable.cc \ + tests/MocksBase.cc tests/ZKMocks.cc tests/Util.cc tests/ThreadingUtil.cc \ + tests/TestClientRetry.cc \ + tests/TestOperations.cc tests/TestZookeeperInit.cc \ + tests/TestZookeeperClose.cc tests/TestClient.cc \ + tests/TestMulti.cc tests/TestWatchers.cc + + +if SOLARIS + SHELL_SYMBOL_WRAPPERS = cat ${srcdir}/tests/wrappers.opt + SYMBOL_WRAPPERS=$(SHELL_SYMBOL_WRAPPERS:sh) +else + SYMBOL_WRAPPERS=$(shell cat ${srcdir}/tests/wrappers.opt) +endif + +check_PROGRAMS = zktest-st +nodist_zktest_st_SOURCES = $(TEST_SOURCES) +zktest_st_LDADD = libzkst.la libhashtable.la $(CPPUNIT_LIBS) +zktest_st_CXXFLAGS = -DUSE_STATIC_LIB $(CPPUNIT_CFLAGS) $(USEIPV6) $(SOLARIS_CPPFLAGS) +zktest_st_LDFLAGS = -static-libtool-libs $(SYMBOL_WRAPPERS) $(SOLARIS_LIB_LDFLAGS) + +if WANT_SYNCAPI + check_PROGRAMS += zktest-mt + nodist_zktest_mt_SOURCES = $(TEST_SOURCES) tests/PthreadMocks.cc + zktest_mt_LDADD = libzkmt.la libhashtable.la -lpthread $(CPPUNIT_LIBS) + zktest_mt_CXXFLAGS = -DUSE_STATIC_LIB -DTHREADED $(CPPUNIT_CFLAGS) $(USEIPV6) +if SOLARIS + SHELL_SYMBOL_WRAPPERS_MT = cat ${srcdir}/tests/wrappers-mt.opt + SYMBOL_WRAPPERS_MT=$(SYMBOL_WRAPPERS) $(SHELL_SYMBOL_WRAPPERS_MT:sh) +else + SYMBOL_WRAPPERS_MT=$(SYMBOL_WRAPPERS) $(shell cat ${srcdir}/tests/wrappers-mt.opt) +endif + zktest_mt_LDFLAGS = -static-libtool-libs $(SYMBOL_WRAPPERS_MT) $(SOLARIS_LIB_LDFLAGS) +endif + +run-check: check + ./zktest-st $(TEST_OPTIONS) +if WANT_SYNCAPI + ./zktest-mt $(TEST_OPTIONS) +endif + +clean-local: clean-check + $(RM) $(DX_CLEANFILES) + +clean-check: + $(RM) $(nodist_zktest_st_OBJECTS) $(nodist_zktest_mt_OBJECTS) diff --git a/src/c/NOTICE.txt b/src/c/NOTICE.txt new file mode 100644 index 0000000..dcd9d53 --- /dev/null +++ b/src/c/NOTICE.txt @@ -0,0 +1,41 @@ +Apache ZooKeeper +Copyright 2009-2018 The Apache Software Foundation + +This product includes software developed at +The Apache Software Foundation (http://www.apache.org/). + +---------- +include/winstdint.h is included only for Windows Client support, as follows: + +// ISO C9x compliant stdint.h for Microsoft Visual Studio +// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124 +// +// Copyright (c) 2006-2008 Alexander Chemeris +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// 1. Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. The name of the author may be used to endorse or promote products +// derived from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +/////////////////////////////////////////////////////////////////////////////// + +---------- diff --git a/src/c/README b/src/c/README new file mode 100644 index 0000000..5115845 --- /dev/null +++ b/src/c/README @@ -0,0 +1,156 @@ + Zookeeper C client library + + +This package provides a C client interface to Zookeeper server. + +For the latest information about ZooKeeper, please visit our website at: + http://zookeeper.apache.org/ +and our wiki, at: + https://cwiki.apache.org/confluence/display/ZOOKEEPER + +Full documentation for this release can also be found in ../../docs/index.html + + +OVERVIEW + +The client supports two types of APIs -- synchronous and asynchronous. + +Asynchronous API provides non-blocking operations with completion callbacks and +relies on the application to implement event multiplexing on its behalf. + +On the other hand, Synchronous API provides a blocking flavor of +zookeeper operations and runs its own event loop in a separate thread. + +Sync and Async APIs can be mixed and matched within the same application. + +The package includes two shared libraries: zookeeper_st and +zookeeper_mt. The former only provides the Async API and is not +thread-safe. The only reason this library exists is to support the +platforms were pthread library is not available or unstable +(i.e. FreeBSD 4.x). In all other cases the application developers are +advised to link against zookeeper_mt as it includes support for both +Sync and Async API. + + +INSTALLATION + +If you're building the client from a source checkout you need to +follow the steps outlined below. If you're building from a release +tar downloaded from Apache please skip to step 2. + +1) do a "ant compile_jute" from the zookeeper top level directory (.../trunk). + This will create a directory named "generated" under src/c. Skip to step 3. +2) unzip/untar the source tarball and cd to the zookeeper-x.x.x/src/c directory +3) change directory to src/c and do a "autoreconf -if" to bootstrap + autoconf, automake and libtool. Please make sure you have autoconf + version 2.59 or greater installed. If cppunit is installed in a non-standard + directory, you need to specify where to find cppunit.m4. For example, if + cppunit is installed under /usr/local, run: + + ACLOCAL="aclocal -I /usr/local/share/aclocal" autoreconf -if + +4) do a "./configure [OPTIONS]" to generate the makefile. See INSTALL + for general information about running configure. Additionally, the + configure supports the following options: + --enable-debug enables optimization and enables debug info compiler + options, disabled by default + --without-syncapi disables Sync API support; zookeeper_mt library won't + be built, enabled by default + --disable-static do not build static libraries, enabled by default + --disable-shared do not build shared libraries, enabled by default + --without-cppunit do not build the test library, enabled by default. + +5) do a "make" or "make install" to build the libraries and install them. + Alternatively, you can also build and run a unit test suite (and + you probably should). Please make sure you have cppunit-1.10.x or + higher installed before you execute step 4. Once ./configure has + finished, do a "make run-check". It will build the libraries, build + the tests and run them. +6) to generate doxygen documentation do a "make doxygen-doc". All + documentations will be placed to a new subfolder named docs. By + default only HTML documentation is generated. For information on + other document formats please use "./configure --help" + +Alternatively you can use the CMake build system. On Windows, this is required. +Follow steps 1 and 2 above, and then continue here. + +1) do a "cmake [OPTIONS]" to generate the makefile or msbuild files (the correct + build system will be generated based on your platform). Some options from above + are supported: + -DCMAKE_BUILD_TYPE Debug by default, Release enables optimzation etc. + -DWANT_SYNCAPI ON by default, OFF disables the Sync API support + -DWANT_CPPUNIT ON except on Windows, OFF disables the tests + -DBUILD_SHARED_LIBS not yet supported, only static libraries are built + other CMake options see "cmake --help" for generic options, such as generator + +2) do a "cmake --build ." to build the default targets. Alternatively you can + invoke "make" or "msbuild" manually. If the tests were enabled, use "ctest -V" + to run them. + +Current limitations of the CMake build system include lack of Solaris support, +no shared library option, no explicitly exported symbols (all are exported by +default), no versions on the libraries, and no documentation generation. +Features of CMake include a single, easily consumed cross-platform build system +to generate the ZooKeeper C Client libraries for any project, with little to no +configuration. + +EXAMPLE/SAMPLE C CLIENT SHELL + +NOTE: the ZooKeeper C client shell (cli_st and cli_mt) is meant as a +example/sample of ZooKeeper C client API usage. It is not a full +fledged client and not meant for production usage - see the Java +client shell for a fully featured shell. + +You can test your client by running a zookeeper server (see +instructions on the project wiki page on how to run it) and connecting +to it using the zookeeper shell application cli that is built as part +of the installation procedure. + +cli_mt (multithreaded, built against zookeeper_mt library) is shown in +this example, but you could also use cli_st (singlethreaded, built +against zookeeper_st library): + +$ cli_mt zookeeper_host:9876 + +This is a client application that gives you a shell for executing +simple zookeeper commands. Once successfully started and connected to +the server it displays a shell prompt. + +You can now enter zookeeper commands. For example, to create a node: + +> create /my_new_node + +To verify that the node's been created: + +> ls / + +You should see a list of nodes who are the children of the root node "/". + +Here's a list of command supported by the cli shell: + +ls -- list children of a znode identified by . The + command set a children watch on the znode. +get -- get the value of a znode at +set -- set the value of a znode at to +create [+e|+s] -- create a znode as a child of znode ; + use +e option to create an ephemeral znode, + use +s option to create a znode with a sequence number + appended to the name. The operation will fail if + the parent znode (the one identified by ) doesn't + exist. +delete -- delete the znode at . The command will fail if the znode + has children. +sync -- make sure all pending updates have been applied to znode at +exists -- returns a result code indicating whether the znode at + exists. The command also sets a znode watch. +myid -- prints out the current zookeeper session id. +quit -- exit the shell. + +In order to be able to use the zookeeper API in your application you have to +1) remember to include the zookeeper header + #include +2) use -DTHREADED compiler option to enable Sync API; in this case you should + be linking your code against zookeeper_mt library + +Please take a look at cli.c to understand how to use the two API types. +(TODO: some kind of short tutorial would be helpful, I guess) diff --git a/src/c/acinclude.m4 b/src/c/acinclude.m4 new file mode 100644 index 0000000..d0041d8 --- /dev/null +++ b/src/c/acinclude.m4 @@ -0,0 +1,312 @@ +# This file is part of Autoconf. -*- Autoconf -*- + +# Copyright (C) 2004 Oren Ben-Kiki +# This file is distributed under the same terms as the Autoconf macro files. + +# Generate automatic documentation using Doxygen. Works in concert with the +# aminclude.m4 file and a compatible doxygen configuration file. Defines the +# following public macros: +# +# DX_???_FEATURE(ON|OFF) - control the default setting fo a Doxygen feature. +# Supported features are 'DOXYGEN' itself, 'DOT' for generating graphics, +# 'HTML' for plain HTML, 'CHM' for compressed HTML help (for MS users), 'CHI' +# for generating a seperate .chi file by the .chm file, and 'MAN', 'RTF', +# 'XML', 'PDF' and 'PS' for the appropriate output formats. The environment +# variable DOXYGEN_PAPER_SIZE may be specified to override the default 'a4wide' +# paper size. +# +# By default, HTML, PDF and PS documentation is generated as this seems to be +# the most popular and portable combination. MAN pages created by Doxygen are +# usually problematic, though by picking an appropriate subset and doing some +# massaging they might be better than nothing. CHM and RTF are specific for MS +# (note that you can't generate both HTML and CHM at the same time). The XML is +# rather useless unless you apply specialized post-processing to it. +# +# The macro mainly controls the default state of the feature. The use can +# override the default by specifying --enable or --disable. The macros ensure +# that contradictory flags are not given (e.g., --enable-doxygen-html and +# --enable-doxygen-chm, --enable-doxygen-anything with --disable-doxygen, etc.) +# Finally, each feature will be automatically disabled (with a warning) if the +# required programs are missing. +# +# Once all the feature defaults have been specified, call DX_INIT_DOXYGEN with +# the following parameters: a one-word name for the project for use as a +# filename base etc., an optional configuration file name (the default is +# 'Doxyfile', the same as Doxygen's default), and an optional output directory +# name (the default is 'doxygen-doc'). + +## ----------## +## Defaults. ## +## ----------## + +DX_ENV="" +AC_DEFUN([DX_FEATURE_doc], ON) +AC_DEFUN([DX_FEATURE_dot], ON) +AC_DEFUN([DX_FEATURE_man], OFF) +AC_DEFUN([DX_FEATURE_html], ON) +AC_DEFUN([DX_FEATURE_chm], OFF) +AC_DEFUN([DX_FEATURE_chi], OFF) +AC_DEFUN([DX_FEATURE_rtf], OFF) +AC_DEFUN([DX_FEATURE_xml], OFF) +AC_DEFUN([DX_FEATURE_pdf], ON) +AC_DEFUN([DX_FEATURE_ps], ON) + +## --------------- ## +## Private macros. ## +## --------------- ## + +# DX_ENV_APPEND(VARIABLE, VALUE) +# ------------------------------ +# Append VARIABLE="VALUE" to DX_ENV for invoking doxygen. +AC_DEFUN([DX_ENV_APPEND], [AC_SUBST([DX_ENV], ["$DX_ENV $1='$2'"])]) + +# DX_DIRNAME_EXPR +# --------------- +# Expand into a shell expression prints the directory part of a path. +AC_DEFUN([DX_DIRNAME_EXPR], + [[expr ".$1" : '\(\.\)[^/]*$' \| "x$1" : 'x\(.*\)/[^/]*$']]) + +# DX_IF_FEATURE(FEATURE, IF-ON, IF-OFF) +# ------------------------------------- +# Expands according to the M4 (static) status of the feature. +AC_DEFUN([DX_IF_FEATURE], [ifelse(DX_FEATURE_$1, ON, [$2], [$3])]) + +# DX_REQUIRE_PROG(VARIABLE, PROGRAM) +# ---------------------------------- +# Require the specified program to be found for the DX_CURRENT_FEATURE to work. +AC_DEFUN([DX_REQUIRE_PROG], [ +AC_PATH_TOOL([$1], [$2]) +if test "$DX_FLAG_$[DX_CURRENT_FEATURE$$1]" = 1; then + AC_MSG_WARN([$2 not found - will not DX_CURRENT_DESCRIPTION]) + AC_SUBST([DX_FLAG_]DX_CURRENT_FEATURE, 0) +fi +]) + +# DX_TEST_FEATURE(FEATURE) +# ------------------------ +# Expand to a shell expression testing whether the feature is active. +AC_DEFUN([DX_TEST_FEATURE], [test "$DX_FLAG_$1" = 1]) + +# DX_CHECK_DEPEND(REQUIRED_FEATURE, REQUIRED_STATE) +# ------------------------------------------------- +# Verify that a required features has the right state before trying to turn on +# the DX_CURRENT_FEATURE. +AC_DEFUN([DX_CHECK_DEPEND], [ +test "$DX_FLAG_$1" = "$2" \ +|| AC_MSG_ERROR([doxygen-DX_CURRENT_FEATURE ifelse([$2], 1, + requires, contradicts) doxygen-DX_CURRENT_FEATURE]) +]) + +# DX_CLEAR_DEPEND(FEATURE, REQUIRED_FEATURE, REQUIRED_STATE) +# ---------------------------------------------------------- +# Turn off the DX_CURRENT_FEATURE if the required feature is off. +AC_DEFUN([DX_CLEAR_DEPEND], [ +test "$DX_FLAG_$1" = "$2" || AC_SUBST([DX_FLAG_]DX_CURRENT_FEATURE, 0) +]) + +# DX_FEATURE_ARG(FEATURE, DESCRIPTION, +# CHECK_DEPEND, CLEAR_DEPEND, +# REQUIRE, DO-IF-ON, DO-IF-OFF) +# -------------------------------------------- +# Parse the command-line option controlling a feature. CHECK_DEPEND is called +# if the user explicitly turns the feature on (and invokes DX_CHECK_DEPEND), +# otherwise CLEAR_DEPEND is called to turn off the default state if a required +# feature is disabled (using DX_CLEAR_DEPEND). REQUIRE performs additional +# requirement tests (DX_REQUIRE_PROG). Finally, an automake flag is set and +# DO-IF-ON or DO-IF-OFF are called according to the final state of the feature. +AC_DEFUN([DX_ARG_ABLE], [ + AC_DEFUN([DX_CURRENT_FEATURE], [$1]) + AC_DEFUN([DX_CURRENT_DESCRIPTION], [$2]) + AC_ARG_ENABLE(doxygen-$1, + [AS_HELP_STRING(DX_IF_FEATURE([$1], [--disable-doxygen-$1], + [--enable-doxygen-$1]), + DX_IF_FEATURE([$1], [don't $2], [$2]))], + [ +case "$enableval" in +#( +y|Y|yes|Yes|YES) + AC_SUBST([DX_FLAG_$1], 1) + $3 +;; #( +n|N|no|No|NO) + AC_SUBST([DX_FLAG_$1], 0) +;; #( +*) + AC_MSG_ERROR([invalid value '$enableval' given to doxygen-$1]) +;; +esac +], [ +AC_SUBST([DX_FLAG_$1], [DX_IF_FEATURE([$1], 1, 0)]) +$4 +]) +if DX_TEST_FEATURE([$1]); then + $5 + : +fi +if DX_TEST_FEATURE([$1]); then + AM_CONDITIONAL(DX_COND_$1, :) + $6 + : +else + AM_CONDITIONAL(DX_COND_$1, false) + $7 + : +fi +]) + +## -------------- ## +## Public macros. ## +## -------------- ## + +# DX_XXX_FEATURE(DEFAULT_STATE) +# ----------------------------- +AC_DEFUN([DX_DOXYGEN_FEATURE], [AC_DEFUN([DX_FEATURE_doc], [$1])]) +AC_DEFUN([DX_MAN_FEATURE], [AC_DEFUN([DX_FEATURE_man], [$1])]) +AC_DEFUN([DX_HTML_FEATURE], [AC_DEFUN([DX_FEATURE_html], [$1])]) +AC_DEFUN([DX_CHM_FEATURE], [AC_DEFUN([DX_FEATURE_chm], [$1])]) +AC_DEFUN([DX_CHI_FEATURE], [AC_DEFUN([DX_FEATURE_chi], [$1])]) +AC_DEFUN([DX_RTF_FEATURE], [AC_DEFUN([DX_FEATURE_rtf], [$1])]) +AC_DEFUN([DX_XML_FEATURE], [AC_DEFUN([DX_FEATURE_xml], [$1])]) +AC_DEFUN([DX_XML_FEATURE], [AC_DEFUN([DX_FEATURE_xml], [$1])]) +AC_DEFUN([DX_PDF_FEATURE], [AC_DEFUN([DX_FEATURE_pdf], [$1])]) +AC_DEFUN([DX_PS_FEATURE], [AC_DEFUN([DX_FEATURE_ps], [$1])]) + +# DX_INIT_DOXYGEN(PROJECT, [CONFIG-FILE], [OUTPUT-DOC-DIR]) +# --------------------------------------------------------- +# PROJECT also serves as the base name for the documentation files. +# The default CONFIG-FILE is "Doxyfile" and OUTPUT-DOC-DIR is "doxygen-doc". +AC_DEFUN([DX_INIT_DOXYGEN], [ + +# Files: +AC_SUBST([DX_PROJECT], [$1]) +AC_SUBST([DX_CONFIG], [ifelse([$2], [], Doxyfile, [$2])]) +AC_SUBST([DX_DOCDIR], [ifelse([$3], [], doxygen-doc, [$3])]) + +# Environment variables used inside doxygen.cfg: +DX_ENV_APPEND(SRCDIR, $srcdir) +DX_ENV_APPEND(PROJECT, $DX_PROJECT) +DX_ENV_APPEND(DOCDIR, $DX_DOCDIR) +DX_ENV_APPEND(VERSION, $PACKAGE_VERSION) + +# Doxygen itself: +DX_ARG_ABLE(doc, [generate any doxygen documentation], + [], + [], + [DX_REQUIRE_PROG([DX_DOXYGEN], doxygen) + DX_REQUIRE_PROG([DX_PERL], perl)], + [DX_ENV_APPEND(PERL_PATH, $DX_PERL)]) + +# Dot for graphics: +DX_ARG_ABLE(dot, [generate graphics for doxygen documentation], + [DX_CHECK_DEPEND(doc, 1)], + [DX_CLEAR_DEPEND(doc, 1)], + [DX_REQUIRE_PROG([DX_DOT], dot)], + [DX_ENV_APPEND(HAVE_DOT, YES) + DX_ENV_APPEND(DOT_PATH, [`DX_DIRNAME_EXPR($DX_DOT)`])], + [DX_ENV_APPEND(HAVE_DOT, NO)]) + +# Man pages generation: +DX_ARG_ABLE(man, [generate doxygen manual pages], + [DX_CHECK_DEPEND(doc, 1)], + [DX_CLEAR_DEPEND(doc, 1)], + [], + [DX_ENV_APPEND(GENERATE_MAN, YES)], + [DX_ENV_APPEND(GENERATE_MAN, NO)]) + +# RTF file generation: +DX_ARG_ABLE(rtf, [generate doxygen RTF documentation], + [DX_CHECK_DEPEND(doc, 1)], + [DX_CLEAR_DEPEND(doc, 1)], + [], + [DX_ENV_APPEND(GENERATE_RTF, YES)], + [DX_ENV_APPEND(GENERATE_RTF, NO)]) + +# XML file generation: +DX_ARG_ABLE(xml, [generate doxygen XML documentation], + [DX_CHECK_DEPEND(doc, 1)], + [DX_CLEAR_DEPEND(doc, 1)], + [], + [DX_ENV_APPEND(GENERATE_XML, YES)], + [DX_ENV_APPEND(GENERATE_XML, NO)]) + +# (Compressed) HTML help generation: +DX_ARG_ABLE(chm, [generate doxygen compressed HTML help documentation], + [DX_CHECK_DEPEND(doc, 1)], + [DX_CLEAR_DEPEND(doc, 1)], + [DX_REQUIRE_PROG([DX_HHC], hhc)], + [DX_ENV_APPEND(HHC_PATH, $DX_HHC) + DX_ENV_APPEND(GENERATE_HTML, YES) + DX_ENV_APPEND(GENERATE_HTMLHELP, YES)], + [DX_ENV_APPEND(GENERATE_HTMLHELP, NO)]) + +# Seperate CHI file generation. +DX_ARG_ABLE(chi, [generate doxygen seperate compressed HTML help index file], + [DX_CHECK_DEPEND(chm, 1)], + [DX_CLEAR_DEPEND(chm, 1)], + [], + [DX_ENV_APPEND(GENERATE_CHI, YES)], + [DX_ENV_APPEND(GENERATE_CHI, NO)]) + +# Plain HTML pages generation: +DX_ARG_ABLE(html, [generate doxygen plain HTML documentation], + [DX_CHECK_DEPEND(doc, 1) DX_CHECK_DEPEND(chm, 0)], + [DX_CLEAR_DEPEND(doc, 1) DX_CLEAR_DEPEND(chm, 0)], + [], + [DX_ENV_APPEND(GENERATE_HTML, YES)], + [DX_TEST_FEATURE(chm) || DX_ENV_APPEND(GENERATE_HTML, NO)]) + +# PostScript file generation: +DX_ARG_ABLE(ps, [generate doxygen PostScript documentation], + [DX_CHECK_DEPEND(doc, 1)], + [DX_CLEAR_DEPEND(doc, 1)], + [DX_REQUIRE_PROG([DX_LATEX], latex) + DX_REQUIRE_PROG([DX_MAKEINDEX], makeindex) + DX_REQUIRE_PROG([DX_DVIPS], dvips) + DX_REQUIRE_PROG([DX_EGREP], egrep)]) + +# PDF file generation: +DX_ARG_ABLE(pdf, [generate doxygen PDF documentation], + [DX_CHECK_DEPEND(doc, 1)], + [DX_CLEAR_DEPEND(doc, 1)], + [DX_REQUIRE_PROG([DX_PDFLATEX], pdflatex) + DX_REQUIRE_PROG([DX_MAKEINDEX], makeindex) + DX_REQUIRE_PROG([DX_EGREP], egrep)]) + +# LaTeX generation for PS and/or PDF: +if DX_TEST_FEATURE(ps) || DX_TEST_FEATURE(pdf); then + AM_CONDITIONAL(DX_COND_latex, :) + DX_ENV_APPEND(GENERATE_LATEX, YES) +else + AM_CONDITIONAL(DX_COND_latex, false) + DX_ENV_APPEND(GENERATE_LATEX, NO) +fi + +# Paper size for PS and/or PDF: +AC_ARG_VAR(DOXYGEN_PAPER_SIZE, + [a4wide (default), a4, letter, legal or executive]) +case "$DOXYGEN_PAPER_SIZE" in +#( +"") + AC_SUBST(DOXYGEN_PAPER_SIZE, "") +;; #( +a4wide|a4|letter|legal|executive) + DX_ENV_APPEND(PAPER_SIZE, $DOXYGEN_PAPER_SIZE) +;; #( +*) + AC_MSG_ERROR([unknown DOXYGEN_PAPER_SIZE='$DOXYGEN_PAPER_SIZE']) +;; +esac + +#For debugging: +#echo DX_FLAG_doc=$DX_FLAG_doc +#echo DX_FLAG_dot=$DX_FLAG_dot +#echo DX_FLAG_man=$DX_FLAG_man +#echo DX_FLAG_html=$DX_FLAG_html +#echo DX_FLAG_chm=$DX_FLAG_chm +#echo DX_FLAG_chi=$DX_FLAG_chi +#echo DX_FLAG_rtf=$DX_FLAG_rtf +#echo DX_FLAG_xml=$DX_FLAG_xml +#echo DX_FLAG_pdf=$DX_FLAG_pdf +#echo DX_FLAG_ps=$DX_FLAG_ps +#echo DX_ENV=$DX_ENV +]) diff --git a/src/c/aminclude.am b/src/c/aminclude.am new file mode 100644 index 0000000..420049e --- /dev/null +++ b/src/c/aminclude.am @@ -0,0 +1,186 @@ +# Copyright (C) 2004 Oren Ben-Kiki +# This file is distributed under the same terms as the Automake macro files. + +# Generate automatic documentation using Doxygen. Goals and variables values +# are controlled by the various DX_COND_??? conditionals set by autoconf. +# +# The provided goals are: +# doxygen-doc: Generate all doxygen documentation. +# doxygen-run: Run doxygen, which will generate some of the documentation +# (HTML, CHM, CHI, MAN, RTF, XML) but will not do the post +# processing required for the rest of it (PS, PDF, and some MAN). +# doxygen-man: Rename some doxygen generated man pages. +# doxygen-ps: Generate doxygen PostScript documentation. +# doxygen-pdf: Generate doxygen PDF documentation. +# +# Note that by default these are not integrated into the automake goals. If +# doxygen is used to generate man pages, you can achieve this integration by +# setting man3_MANS to the list of man pages generated and then adding the +# dependency: +# +# $(man3_MANS): doxygen-doc +# +# This will cause make to run doxygen and generate all the documentation. +# +# The following variable is intended for use in Makefile.am: +# +# DX_CLEANFILES = everything to clean. +# +# This is usually added to MOSTLYCLEANFILES. + +## --------------------------------- ## +## Format-independent Doxygen rules. ## +## --------------------------------- ## + +if DX_COND_doc + +## ------------------------------- ## +## Rules specific for HTML output. ## +## ------------------------------- ## + +if DX_COND_html + +DX_CLEAN_HTML = @DX_DOCDIR@/html + +endif DX_COND_html + +## ------------------------------ ## +## Rules specific for CHM output. ## +## ------------------------------ ## + +if DX_COND_chm + +DX_CLEAN_CHM = @DX_DOCDIR@/chm + +if DX_COND_chi + +DX_CLEAN_CHI = @DX_DOCDIR@/@PACKAGE@.chi + +endif DX_COND_chi + +endif DX_COND_chm + +## ------------------------------ ## +## Rules specific for MAN output. ## +## ------------------------------ ## + +if DX_COND_man + +DX_CLEAN_MAN = @DX_DOCDIR@/man + +endif DX_COND_man + +## ------------------------------ ## +## Rules specific for RTF output. ## +## ------------------------------ ## + +if DX_COND_rtf + +DX_CLEAN_RTF = @DX_DOCDIR@/rtf + +endif DX_COND_rtf + +## ------------------------------ ## +## Rules specific for XML output. ## +## ------------------------------ ## + +if DX_COND_xml + +DX_CLEAN_XML = @DX_DOCDIR@/xml + +endif DX_COND_xml + +## ----------------------------- ## +## Rules specific for PS output. ## +## ----------------------------- ## + +if DX_COND_ps + +DX_CLEAN_PS = @DX_DOCDIR@/@PACKAGE@.ps + +DX_PS_GOAL = doxygen-ps + +doxygen-ps: @DX_DOCDIR@/@PACKAGE@.ps + +@DX_DOCDIR@/@PACKAGE@.ps: @DX_DOCDIR@/@PACKAGE@.tag + cd @DX_DOCDIR@/latex; \ + rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \ + $(DX_LATEX) refman.tex; \ + $(MAKEINDEX_PATH) refman.idx; \ + $(DX_LATEX) refman.tex; \ + countdown=5; \ + while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \ + refman.log > /dev/null 2>&1 \ + && test $$countdown -gt 0; do \ + $(DX_LATEX) refman.tex; \ + countdown=`expr $$countdown - 1`; \ + done; \ + $(DX_DVIPS) -o ../@PACKAGE@.ps refman.dvi + +endif DX_COND_ps + +## ------------------------------ ## +## Rules specific for PDF output. ## +## ------------------------------ ## + +if DX_COND_pdf + +DX_CLEAN_PDF = @DX_DOCDIR@/@PACKAGE@.pdf + +DX_PDF_GOAL = doxygen-pdf + +doxygen-pdf: @DX_DOCDIR@/@PACKAGE@.pdf + +@DX_DOCDIR@/@PACKAGE@.pdf: @DX_DOCDIR@/@PACKAGE@.tag + cd @DX_DOCDIR@/latex; \ + rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \ + $(DX_PDFLATEX) refman.tex; \ + $(DX_MAKEINDEX) refman.idx; \ + $(DX_PDFLATEX) refman.tex; \ + countdown=5; \ + while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \ + refman.log > /dev/null 2>&1 \ + && test $$countdown -gt 0; do \ + $(DX_PDFLATEX) refman.tex; \ + countdown=`expr $$countdown - 1`; \ + done; \ + mv refman.pdf ../@PACKAGE@.pdf + +endif DX_COND_pdf + +## ------------------------------------------------- ## +## Rules specific for LaTeX (shared for PS and PDF). ## +## ------------------------------------------------- ## + +if DX_COND_latex + +DX_CLEAN_LATEX = @DX_DOCDIR@/latex + +endif DX_COND_latex + +.PHONY: doxygen-run doxygen-doc $(DX_PS_GOAL) $(DX_PDF_GOAL) + +.INTERMEDIATE: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL) + +doxygen-run: @DX_DOCDIR@/@PACKAGE@.tag + +doxygen-doc: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL) + +@DX_DOCDIR@/@PACKAGE@.tag: $(DX_CONFIG) $(pkginclude_HEADERS) + rm -rf @DX_DOCDIR@ + $(DX_ENV) $(DX_DOXYGEN) $(srcdir)/$(DX_CONFIG) + +DX_CLEANFILES = \ + @DX_DOCDIR@/@PACKAGE@.tag \ + -r \ + $(DX_CLEAN_HTML) \ + $(DX_CLEAN_CHM) \ + $(DX_CLEAN_CHI) \ + $(DX_CLEAN_MAN) \ + $(DX_CLEAN_RTF) \ + $(DX_CLEAN_XML) \ + $(DX_CLEAN_PS) \ + $(DX_CLEAN_PDF) \ + $(DX_CLEAN_LATEX) + +endif DX_COND_doc diff --git a/src/c/c-doc.Doxyfile b/src/c/c-doc.Doxyfile new file mode 100644 index 0000000..e9029cb --- /dev/null +++ b/src/c/c-doc.Doxyfile @@ -0,0 +1,1252 @@ +# Doxyfile 1.4.7 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project +# +# All text after a hash (#) is considered a comment and will be ignored +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" ") + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. + +PROJECT_NAME = $(PROJECT)-$(VERSION) + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = $(DOCDIR) + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, +# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese, +# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian, +# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, +# Swedish, and Ukrainian. + +OUTPUT_LANGUAGE = English + +# This tag can be used to specify the encoding used in the generated output. +# The encoding is not always determined by the language that is chosen, +# but also whether or not the output is meant for Windows or non-Windows users. +# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES +# forces the Windows encoding (this is the default for the Windows binary), +# whereas setting the tag to NO uses a Unix-style encoding (the default for +# all platforms other than Windows). + +USE_WINDOWS_ENCODING = NO + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = YES + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like the Qt-style comments (thus requiring an +# explicit @brief command for a brief description. + +JAVADOC_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the DETAILS_AT_TOP tag is set to YES then Doxygen +# will output the detailed description near the top, like JavaDoc. +# If set to NO, the detailed description appears after the member +# documentation. + +DETAILS_AT_TOP = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 8 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = YES + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for Java. +# For instance, namespaces will be presented as packages, qualified scopes +# will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to +# include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = YES + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = NO + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST = YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + +SHOW_DIRECTORIES = NO + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from the +# version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be abled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = include/zookeeper.h + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx +# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py + +FILE_PATTERNS = + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = NO + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix filesystem feature) are excluded +# from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# is applied to all files. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES (the default) +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = YES + +# If the REFERENCES_RELATION tag is set to YES (the default) +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = YES + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. Otherwise they will link to the documentstion. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = NO + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = $(GENERATE_HTML) + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = $(GENERATE_HTMLHELP) + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = ../$(PROJECT).chm + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = $(HHC_PATH) + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = $(GENERATE_CHI) + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + +DISABLE_INDEX = NO + +# This tag can be used to set the number of enum values (range [1..20]) +# that doxygen will group on one line in the generated HTML documentation. + +ENUM_VALUES_PER_LINE = 4 + +# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be +# generated containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, +# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are +# probably better off using the HTML help feature. + +GENERATE_TREEVIEW = NO + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = $(GENERATE_LATEX) + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = $(PAPER_SIZE) + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = NO + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = $(GENERATE_PDF) + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = $(GENERATE_RTF) + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = $(GENERATE_MAN) + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = $(GENERATE_XML) + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. This is useful +# if you want to understand what is going on. On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = NO + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# in the INCLUDE_PATH (see below) will be search if a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse +# the parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = $(DOCDIR)/$(PROJECT).tag + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option is superseded by the HAVE_DOT option below. This is only a +# fallback. It is recommended to install and use dot, since it yields more +# powerful graphs. + +CLASS_DIAGRAMS = YES + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = $(HAVE_DOT) + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = YES + +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = NO + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will +# generate a call dependency graph for every global function or class method. +# Note that enabling this option will significantly increase the time of a run. +# So in most cases it will be better to enable call graphs for selected +# functions only using the \callgraph command. + +CALL_GRAPH = NO + +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then doxygen will +# generate a caller dependency graph for every global function or class method. +# Note that enabling this option will significantly increase the time of a run. +# So in most cases it will be better to enable caller graphs for selected +# functions only using the \callergraph command. + +CALLER_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = YES + +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are png, jpg, or gif +# If left blank png will be used. + +DOT_IMAGE_FORMAT = png + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. + +DOT_PATH = $(DOT_PATH) + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width +# (in pixels) of the graphs generated by dot. If a graph becomes larger than +# this value, doxygen will try to truncate the graph, so that it fits within +# the specified constraint. Beware that most browsers cannot cope with very +# large images. + +MAX_DOT_GRAPH_WIDTH = 1024 + +# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height +# (in pixels) of the graphs generated by dot. If a graph becomes larger than +# this value, doxygen will try to truncate the graph, so that it fits within +# the specified constraint. Beware that most browsers cannot cope with very +# large images. + +MAX_DOT_GRAPH_HEIGHT = 1024 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that a graph may be further truncated if the graph's +# image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH +# and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), +# the graph is not depth-constrained. + +MAX_DOT_GRAPH_DEPTH = 0 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, which results in a white background. +# Warning: Depending on the platform used, enabling this option may lead to +# badly anti-aliased labels on the edges of a graph (i.e. they become hard to +# read). + +DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = NO + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- + +# The SEARCHENGINE tag specifies whether or not a search engine should be +# used. If set to NO the values of all tags below this one will be ignored. + +SEARCHENGINE = NO diff --git a/src/c/cmake_config.h.in b/src/c/cmake_config.h.in new file mode 100644 index 0000000..55efd8a --- /dev/null +++ b/src/c/cmake_config.h.in @@ -0,0 +1,154 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef CONFIG_H_ +#define CONFIG_H_ + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_ARPA_INET_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_FCNTL_H 1 + +/* Define to 1 if you have the file `generated/zookeeper.jute.c'. */ +#cmakedefine HAVE_GENERATED_ZOOKEEPER_JUTE_C 1 + +/* Define to 1 if you have the file `generated/zookeeper.jute.h'. */ +#cmakedefine HAVE_GENERATED_ZOOKEEPER_JUTE_H 1 + +/* Define to 1 if you have the `getcwd' function. */ +#cmakedefine HAVE_GETCWD 1 + +/* Define to 1 if you have the `gethostbyname' function. */ +#cmakedefine HAVE_GETHOSTBYNAME 1 + +/* Define to 1 if you have the `gethostname' function. */ +#cmakedefine HAVE_GETHOSTNAME 1 + +/* Define to 1 if you have the `getlogin' function. */ +#cmakedefine HAVE_GETLOGIN 1 + +/* Define to 1 if you have the `getpwuid_r' function. */ +#cmakedefine HAVE_GETPWUID_R 1 + +/* Define to 1 if you have the `gettimeofday' function. */ +#cmakedefine HAVE_GETTIMEOFDAY 1 + +/* Define to 1 if you have the `getuid' function. */ +#cmakedefine HAVE_GETUID 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the `rt' library (-lrt). */ +#cmakedefine HAVE_LIBRT 1 + +/* Define to 1 if you have the `memmove' function. */ +#cmakedefine HAVE_MEMMOVE 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `memset' function. */ +#cmakedefine HAVE_MEMSET 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_NETDB_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_NETINET_IN_H 1 + +/* Define to 1 if you have the `poll' function. */ +#cmakedefine HAVE_POLL 1 + +/* Define to 1 if you have the `socket' function. */ +#cmakedefine HAVE_SOCKET 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `strchr' function. */ +#cmakedefine HAVE_STRCHR 1 + +/* Define to 1 if you have the `strdup' function. */ +#cmakedefine HAVE_STRDUP 1 + +/* Define to 1 if you have the `strerror' function. */ +#cmakedefine HAVE_STRERROR 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_STRING_H 1 + +/* Define to 1 if you have the `strtol' function. */ +#cmakedefine HAVE_STRTOL 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_SOCKET_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_UTSNAME_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_UNISTD_H 1 + +/* Define to 1 if IPv6 support is available. */ +#cmakedefine ZOO_IPV6_ENABLED 1 + +/* poll() second argument type */ +#define POLL_NFDS_TYPE nfds_t + +/* Name of package */ +#define PACKAGE "${PROJECT_NAME}" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "${email}" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "${description}" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "${description} ${PROJECT_VERSION}" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "${PROJECT_NAME}" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "${PROJECT_VERSION}" + +/* Version number of package */ +#define VERSION "${PROJECT_VERSION}" + +#endif diff --git a/src/c/configure.ac b/src/c/configure.ac new file mode 100644 index 0000000..2483d38 --- /dev/null +++ b/src/c/configure.ac @@ -0,0 +1,165 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +AC_PREREQ(2.59) + +AC_INIT([zookeeper C client],3.4.13,[user@zookeeper.apache.org],[zookeeper]) +AC_CONFIG_SRCDIR([src/zookeeper.c]) + +# Save initial CFLAGS and CXXFLAGS values before AC_PROG_CC and AC_PROG_CXX +init_cflags="$CFLAGS" +init_cxxflags="$CXXFLAGS" + +# initialize Doxygen support +DX_HTML_FEATURE(ON) +DX_CHM_FEATURE(OFF) +DX_CHI_FEATURE(OFF) +DX_MAN_FEATURE(OFF) +DX_RTF_FEATURE(OFF) +DX_XML_FEATURE(OFF) +DX_PDF_FEATURE(OFF) +DX_PS_FEATURE(OFF) +DX_INIT_DOXYGEN([zookeeper],[c-doc.Doxyfile],[docs]) + +# initialize automake +AM_INIT_AUTOMAKE([-Wall foreign]) +AC_CONFIG_HEADER([config.h]) + +# Checks for programs. +AC_ARG_WITH(cppunit, + [ --without-cppunit do not use CPPUNIT]) + +if test "$with_cppunit" = "no" ; then + CPPUNIT_PATH="No_CPPUNIT" + CPPUNIT_INCLUDE= + CPPUNIT_LIBS= +else + AM_PATH_CPPUNIT(1.10.2) +fi + +if test "$CALLER" = "ANT" ; then +CPPUNIT_CFLAGS="$CPPUNIT_CFLAGS -DZKSERVER_CMD=\"\\\"${base_dir}/src/c/tests/zkServer.sh\\\"\"" +else +CPPUNIT_CFLAGS="$CPPUNIT_CFLAGS -DZKSERVER_CMD=\"\\\"./tests/zkServer.sh\\\"\"" +AC_CHECK_FILES([generated/zookeeper.jute.c generated/zookeeper.jute.h],[], + [AC_MSG_ERROR([jute files are missing! Please run "ant compile_jute" while in the zookeeper top level directory.]) +]) +fi +AC_SUBST(CPPUNIT_CFLAGS) + +AC_PROG_CC +AM_PROG_CC_C_O +AC_PROG_CXX +AC_PROG_INSTALL +AC_PROG_LN_S + +# AC_DISABLE_SHARED +AC_PROG_LIBTOOL + +#enable -D_GNU_SOURCE since the return code value of getaddrinfo +#ifdefed with __USE_GNU +#features.h header undef's __USE_GNU and defines it only if _GNU_SOURCE is defined +#hence this define for gcc +AC_ARG_ENABLE([debug], + [AS_HELP_STRING([--enable-debug],[enable debug build [default=no]])], + [],[enable_debug=no]) + +if test "x$enable_debug" = xyes; then + if test "x$init_cflags" = x; then + CFLAGS="" + fi + CFLAGS="$CFLAGS -g -O0 -D_GNU_SOURCE" +else + if test "x$init_cflags" = x; then + CFLAGS="-g -O2 -D_GNU_SOURCE" + fi +fi + +if test "x$enable_debug" = xyes; then + if test "x$init_cxxflags" = x; then + CXXFLAGS="" + fi + CXXFLAGS="$CXXFLAGS -g -O0" +else + if test "x$init_cxxflags" = x; then + CXXFLAGS="-g -O2" + fi +fi + +# Check whether to enable gcov (coverage test) +AC_ARG_ENABLE(gcov, [AS_HELP_STRING([--enable-gcov],[enable coverage test])]) +AC_MSG_CHECKING([whether to enable gcov]) +AS_IF([test "x${enable_gcov}" = "xyes"],AC_MSG_RESULT([yes]),AC_MSG_RESULT([no])) +AM_CONDITIONAL([ENABLEGCOV],[test "x${enable_gcov}" = "xyes"]) + +AC_ARG_WITH([syncapi], + [AS_HELP_STRING([--with-syncapi],[build with support for SyncAPI [default=yes]])], + [],[with_syncapi=yes]) + +# Checks for libraries. +AC_CHECK_LIB([pthread], [pthread_mutex_lock],[have_pthread=yes],[have_pthread=no]) + +if test "x$with_syncapi" != xno && test "x$have_pthread" = xno; then + AC_MSG_WARN([cannot build SyncAPI -- pthread not found]) + with_syncapi=no +fi +if test "x$with_syncapi" != xno; then + AC_MSG_NOTICE([building with SyncAPI support]) +else + AC_MSG_NOTICE([building without SyncAPI support]) +fi + +AM_CONDITIONAL([WANT_SYNCAPI],[test "x$with_syncapi" != xno]) + +# Checks for header files. +AC_HEADER_STDC +AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h sys/utsname.h]) + +# Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST +AC_C_INLINE +AC_HEADER_TIME +AC_CHECK_TYPE([nfds_t], + [AC_DEFINE([POLL_NFDS_TYPE],[nfds_t],[poll() second argument type])], + [AC_DEFINE([POLL_NFDS_TYPE],[unsigned int],[poll() second argument type])], + [#include ]) + +AC_MSG_CHECKING([whether to enable ipv6]) + +AC_TRY_RUN([ /* is AF_INET6 available? */ +#include +#include +main() +{ + if (socket(AF_INET6, SOCK_STREAM, 0) < 0) + exit(1); + else + exit(0); +} +], AC_MSG_RESULT(yes) + ipv6=yes, + AC_MSG_RESULT(no) + ipv6=no, + AC_MSG_RESULT(no) + ipv6=no) + +if test x"$ipv6" = xyes; then + USEIPV6="-DZOO_IPV6_ENABLED" + AC_SUBST(USEIPV6) +fi + +# Checks for library functions. +AC_CHECK_FUNCS([getcwd gethostbyname gethostname getlogin getpwuid_r gettimeofday getuid memmove memset poll socket strchr strdup strerror strtol]) + +AC_CONFIG_FILES([Makefile]) +AC_CANONICAL_HOST +AM_CONDITIONAL([SOLARIS],[ + case "$host_os" in + *solaris*) + true + ;; + *) + false + ;; + esac ]) +AC_OUTPUT diff --git a/src/c/include/proto.h b/src/c/include/proto.h new file mode 100644 index 0000000..bce408e --- /dev/null +++ b/src/c/include/proto.h @@ -0,0 +1,47 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef PROTO_H_ +#define PROTO_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#define ZOO_NOTIFY_OP 0 +#define ZOO_CREATE_OP 1 +#define ZOO_DELETE_OP 2 +#define ZOO_EXISTS_OP 3 +#define ZOO_GETDATA_OP 4 +#define ZOO_SETDATA_OP 5 +#define ZOO_GETACL_OP 6 +#define ZOO_SETACL_OP 7 +#define ZOO_GETCHILDREN_OP 8 +#define ZOO_SYNC_OP 9 +#define ZOO_PING_OP 11 +#define ZOO_GETCHILDREN2_OP 12 +#define ZOO_CHECK_OP 13 +#define ZOO_MULTI_OP 14 +#define ZOO_CLOSE_OP -11 +#define ZOO_SETAUTH_OP 100 +#define ZOO_SETWATCHES_OP 101 + +#ifdef __cplusplus +} +#endif + +#endif /*PROTO_H_*/ diff --git a/src/c/include/recordio.h b/src/c/include/recordio.h new file mode 100644 index 0000000..eed5f99 --- /dev/null +++ b/src/c/include/recordio.h @@ -0,0 +1,83 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef __RECORDIO_H__ +#define __RECORDIO_H__ + +#include +#include /* for int64_t */ +#ifdef WIN32 +#include "winconfig.h" +#define STRUCT_INITIALIZER(l,r) r +#else +#define STRUCT_INITIALIZER(l,r) .l = r +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +struct buffer { + int32_t len; + char *buff; +}; + +void deallocate_String(char **s); +void deallocate_Buffer(struct buffer *b); +void deallocate_vector(void *d); +struct iarchive { + int (*start_record)(struct iarchive *ia, const char *tag); + int (*end_record)(struct iarchive *ia, const char *tag); + int (*start_vector)(struct iarchive *ia, const char *tag, int32_t *count); + int (*end_vector)(struct iarchive *ia, const char *tag); + int (*deserialize_Bool)(struct iarchive *ia, const char *name, int32_t *); + int (*deserialize_Int)(struct iarchive *ia, const char *name, int32_t *); + int (*deserialize_Long)(struct iarchive *ia, const char *name, int64_t *); + int (*deserialize_Buffer)(struct iarchive *ia, const char *name, + struct buffer *); + int (*deserialize_String)(struct iarchive *ia, const char *name, char **); + void *priv; +}; +struct oarchive { + int (*start_record)(struct oarchive *oa, const char *tag); + int (*end_record)(struct oarchive *oa, const char *tag); + int (*start_vector)(struct oarchive *oa, const char *tag, const int32_t *count); + int (*end_vector)(struct oarchive *oa, const char *tag); + int (*serialize_Bool)(struct oarchive *oa, const char *name, const int32_t *); + int (*serialize_Int)(struct oarchive *oa, const char *name, const int32_t *); + int (*serialize_Long)(struct oarchive *oa, const char *name, + const int64_t *); + int (*serialize_Buffer)(struct oarchive *oa, const char *name, + const struct buffer *); + int (*serialize_String)(struct oarchive *oa, const char *name, char **); + void *priv; +}; + +struct oarchive *create_buffer_oarchive(void); +void close_buffer_oarchive(struct oarchive **oa, int free_buffer); +struct iarchive *create_buffer_iarchive(char *buffer, int len); +void close_buffer_iarchive(struct iarchive **ia); +char *get_buffer(struct oarchive *); +int get_buffer_len(struct oarchive *); + +int64_t zoo_htonll(int64_t v); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/c/include/winconfig.h b/src/c/include/winconfig.h new file mode 100644 index 0000000..c273a93 --- /dev/null +++ b/src/c/include/winconfig.h @@ -0,0 +1,15 @@ +#ifndef WINCONFIG_H_ +#define WINCONFIG_H_ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +#define inline __inline +#endif + +#define __attribute__(x) +#define __func__ __FUNCTION__ + +#define ACL ZKACL /* Conflict with windows API */ + +#endif diff --git a/src/c/include/zookeeper.h b/src/c/include/zookeeper.h new file mode 100644 index 0000000..aee865b --- /dev/null +++ b/src/c/include/zookeeper.h @@ -0,0 +1,1589 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ZOOKEEPER_H_ +#define ZOOKEEPER_H_ + +#include + +/* we must not include config.h as a public header */ +#ifndef WIN32 +#include +#include +#endif + +#ifdef WIN32 +#include /* must always be included before ws2tcpip.h */ +#include /* for struct sock_addr and socklen_t */ +#endif + +#include +#include + +#include "proto.h" +#include "zookeeper_version.h" +#include "recordio.h" +#include "zookeeper.jute.h" + +/** + * \file zookeeper.h + * \brief ZooKeeper functions and definitions. + * + * ZooKeeper is a network service that may be backed by a cluster of + * synchronized servers. The data in the service is represented as a tree + * of data nodes. Each node has data, children, an ACL, and status information. + * The data for a node is read and write in its entirety. + * + * ZooKeeper clients can leave watches when they queries the data or children + * of a node. If a watch is left, that client will be notified of the change. + * The notification is a one time trigger. Subsequent chances to the node will + * not trigger a notification unless the client issues a query with the watch + * flag set. If the client is ever disconnected from the service, the watches do + * not need to be reset. The client automatically resets the watches. + * + * When a node is created, it may be flagged as an ephemeral node. Ephemeral + * nodes are automatically removed when a client session is closed or when + * a session times out due to inactivity (the ZooKeeper runtime fills in + * periods of inactivity with pings). Ephemeral nodes cannot have children. + * + * ZooKeeper clients are identified by a server assigned session id. For + * security reasons The server + * also generates a corresponding password for a session. A client may save its + * id and corresponding password to persistent storage in order to use the + * session across program invocation boundaries. + */ + +/* Support for building on various platforms */ + +// on cygwin we should take care of exporting/importing symbols properly +#ifdef DLL_EXPORT +# define ZOOAPI __declspec(dllexport) +#else +# if (defined(__CYGWIN__) || defined(WIN32)) && !defined(USE_STATIC_LIB) +# define ZOOAPI __declspec(dllimport) +# else +# define ZOOAPI +# endif +#endif + +/** zookeeper return constants **/ + +enum ZOO_ERRORS { + ZOK = 0, /*!< Everything is OK */ + + /** System and server-side errors. + * This is never thrown by the server, it shouldn't be used other than + * to indicate a range. Specifically error codes greater than this + * value, but lesser than {@link #ZAPIERROR}, are system errors. */ + ZSYSTEMERROR = -1, + ZRUNTIMEINCONSISTENCY = -2, /*!< A runtime inconsistency was found */ + ZDATAINCONSISTENCY = -3, /*!< A data inconsistency was found */ + ZCONNECTIONLOSS = -4, /*!< Connection to the server has been lost */ + ZMARSHALLINGERROR = -5, /*!< Error while marshalling or unmarshalling data */ + ZUNIMPLEMENTED = -6, /*!< Operation is unimplemented */ + ZOPERATIONTIMEOUT = -7, /*!< Operation timeout */ + ZBADARGUMENTS = -8, /*!< Invalid arguments */ + ZINVALIDSTATE = -9, /*!< Invliad zhandle state */ + + /** API errors. + * This is never thrown by the server, it shouldn't be used other than + * to indicate a range. Specifically error codes greater than this + * value are API errors (while values less than this indicate a + * {@link #ZSYSTEMERROR}). + */ + ZAPIERROR = -100, + ZNONODE = -101, /*!< Node does not exist */ + ZNOAUTH = -102, /*!< Not authenticated */ + ZBADVERSION = -103, /*!< Version conflict */ + ZNOCHILDRENFOREPHEMERALS = -108, /*!< Ephemeral nodes may not have children */ + ZNODEEXISTS = -110, /*!< The node already exists */ + ZNOTEMPTY = -111, /*!< The node has children */ + ZSESSIONEXPIRED = -112, /*!< The session has been expired by the server */ + ZINVALIDCALLBACK = -113, /*!< Invalid callback specified */ + ZINVALIDACL = -114, /*!< Invalid ACL specified */ + ZAUTHFAILED = -115, /*!< Client authentication failed */ + ZCLOSING = -116, /*!< ZooKeeper is closing */ + ZNOTHING = -117, /*!< (not error) no server responses to process */ + ZSESSIONMOVED = -118 /*! + * The legacy style, an application wishing to receive events from ZooKeeper must + * first implement a function with this signature and pass a pointer to the function + * to \ref zookeeper_init. Next, the application sets a watch by calling one of + * the getter API that accept the watch integer flag (for example, \ref zoo_aexists, + * \ref zoo_get, etc). + *

+ * The watcher object style uses an instance of a "watcher object" which in + * the C world is represented by a pair: a pointer to a function implementing this + * signature and a pointer to watcher context -- handback user-specific data. + * When a watch is triggered this function will be called along with + * the watcher context. An application wishing to use this style must use + * the getter API functions with the "w" prefix in their names (for example, \ref + * zoo_awexists, \ref zoo_wget, etc). + * + * \param zh zookeeper handle + * \param type event type. This is one of the *_EVENT constants. + * \param state connection state. The state value will be one of the *_STATE constants. + * \param path znode path for which the watcher is triggered. NULL if the event + * type is ZOO_SESSION_EVENT + * \param watcherCtx watcher context. + */ +typedef void (*watcher_fn)(zhandle_t *zh, int type, + int state, const char *path,void *watcherCtx); + +/** + * \brief create a handle to used communicate with zookeeper. + * + * This method creates a new handle and a zookeeper session that corresponds + * to that handle. Session establishment is asynchronous, meaning that the + * session should not be considered established until (and unless) an + * event of state ZOO_CONNECTED_STATE is received. + * \param host comma separated host:port pairs, each corresponding to a zk + * server. e.g. "127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002" + * \param fn the global watcher callback function. When notifications are + * triggered this function will be invoked. + * \param clientid the id of a previously established session that this + * client will be reconnecting to. Pass 0 if not reconnecting to a previous + * session. Clients can access the session id of an established, valid, + * connection by calling \ref zoo_client_id. If the session corresponding to + * the specified clientid has expired, or if the clientid is invalid for + * any reason, the returned zhandle_t will be invalid -- the zhandle_t + * state will indicate the reason for failure (typically + * ZOO_EXPIRED_SESSION_STATE). + * \param context the handback object that will be associated with this instance + * of zhandle_t. Application can access it (for example, in the watcher + * callback) using \ref zoo_get_context. The object is not used by zookeeper + * internally and can be null. + * \param flags reserved for future use. Should be set to zero. + * \return a pointer to the opaque zhandle structure. If it fails to create + * a new zhandle the function returns NULL and the errno variable + * indicates the reason. + */ +ZOOAPI zhandle_t *zookeeper_init(const char *host, watcher_fn fn, + int recv_timeout, const clientid_t *clientid, void *context, int flags); + +/** + * \brief close the zookeeper handle and free up any resources. + * + * After this call, the client session will no longer be valid. The function + * will flush any outstanding send requests before return. As a result it may + * block. + * + * This method should only be called only once on a zookeeper handle. Calling + * twice will cause undefined (and probably undesirable behavior). Calling any other + * zookeeper method after calling close is undefined behaviour and should be avoided. + * + * \param zh the zookeeper handle obtained by a call to \ref zookeeper_init + * \return a result code. Regardless of the error code returned, the zhandle + * will be destroyed and all resources freed. + * + * ZOK - success + * ZBADARGUMENTS - invalid input parameters + * ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory + * ZOPERATIONTIMEOUT - failed to flush the buffers within the specified timeout. + * ZCONNECTIONLOSS - a network error occurred while attempting to send request to server + * ZSYSTEMERROR -- a system (OS) error occurred; it's worth checking errno to get details + */ +ZOOAPI int zookeeper_close(zhandle_t *zh); + +/** + * \brief return the client session id, only valid if the connections + * is currently connected (ie. last watcher state is ZOO_CONNECTED_STATE) + */ +ZOOAPI const clientid_t *zoo_client_id(zhandle_t *zh); + +/** + * \brief return the timeout for this session, only valid if the connections + * is currently connected (ie. last watcher state is ZOO_CONNECTED_STATE). This + * value may change after a server re-connect. + */ +ZOOAPI int zoo_recv_timeout(zhandle_t *zh); + +/** + * \brief return the context for this handle. + */ +ZOOAPI const void *zoo_get_context(zhandle_t *zh); + +/** + * \brief set the context for this handle. + */ +ZOOAPI void zoo_set_context(zhandle_t *zh, void *context); + +/** + * \brief set a watcher function + * \return previous watcher function + */ +ZOOAPI watcher_fn zoo_set_watcher(zhandle_t *zh,watcher_fn newFn); + +/** + * \brief returns the socket address for the current connection + * \return socket address of the connected host or NULL on failure, only valid if the + * connection is current connected + */ +ZOOAPI struct sockaddr* zookeeper_get_connected_host(zhandle_t *zh, + struct sockaddr *addr, socklen_t *addr_len); + +#ifndef THREADED +/** + * \brief Returns the events that zookeeper is interested in. + * + * \param zh the zookeeper handle obtained by a call to \ref zookeeper_init + * \param fd is the file descriptor of interest + * \param interest is an or of the ZOOKEEPER_WRITE and ZOOKEEPER_READ flags to + * indicate the I/O of interest on fd. + * \param tv a timeout value to be used with select/poll system call + * \return a result code. + * ZOK - success + * ZBADARGUMENTS - invalid input parameters + * ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE + * ZCONNECTIONLOSS - a network error occurred while attempting to establish + * a connection to the server + * ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory + * ZOPERATIONTIMEOUT - hasn't received anything from the server for 2/3 of the + * timeout value specified in zookeeper_init() + * ZSYSTEMERROR -- a system (OS) error occurred; it's worth checking errno to get details + */ +#ifdef WIN32 +ZOOAPI int zookeeper_interest(zhandle_t *zh, SOCKET *fd, int *interest, + struct timeval *tv); +#else +ZOOAPI int zookeeper_interest(zhandle_t *zh, int *fd, int *interest, + struct timeval *tv); +#endif + +/** + * \brief Notifies zookeeper that an event of interest has happened. + * + * \param zh the zookeeper handle obtained by a call to \ref zookeeper_init + * \param events will be an OR of the ZOOKEEPER_WRITE and ZOOKEEPER_READ flags. + * \return a result code. + * ZOK - success + * ZBADARGUMENTS - invalid input parameters + * ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE + * ZCONNECTIONLOSS - a network error occurred while attempting to send request to server + * ZSESSIONEXPIRED - connection attempt failed -- the session's expired + * ZAUTHFAILED - authentication request failed, e.i. invalid credentials + * ZRUNTIMEINCONSISTENCY - a server response came out of order + * ZSYSTEMERROR -- a system (OS) error occurred; it's worth checking errno to get details + * ZNOTHING -- not an error; simply indicates that there no more data from the server + * to be processed (when called with ZOOKEEPER_READ flag). + */ +ZOOAPI int zookeeper_process(zhandle_t *zh, int events); +#endif + +/** + * \brief signature of a completion function for a call that returns void. + * + * This method will be invoked at the end of a asynchronous call and also as + * a result of connection loss or timeout. + * \param rc the error code of the call. Connection loss/timeout triggers + * the completion with one of the following error codes: + * ZCONNECTIONLOSS -- lost connection to the server + * ZOPERATIONTIMEOUT -- connection timed out + * Data related events trigger the completion with error codes listed the + * Exceptions section of the documentation of the function that initiated the + * call. (Zero indicates call was successful.) + * \param data the pointer that was passed by the caller when the function + * that this completion corresponds to was invoked. The programmer + * is responsible for any memory freeing associated with the data + * pointer. + */ +typedef void (*void_completion_t)(int rc, const void *data); + +/** + * \brief signature of a completion function that returns a Stat structure. + * + * This method will be invoked at the end of a asynchronous call and also as + * a result of connection loss or timeout. + * \param rc the error code of the call. Connection loss/timeout triggers + * the completion with one of the following error codes: + * ZCONNECTIONLOSS -- lost connection to the server + * ZOPERATIONTIMEOUT -- connection timed out + * Data related events trigger the completion with error codes listed the + * Exceptions section of the documentation of the function that initiated the + * call. (Zero indicates call was successful.) + * \param stat a pointer to the stat information for the node involved in + * this function. If a non zero error code is returned, the content of + * stat is undefined. The programmer is NOT responsible for freeing stat. + * \param data the pointer that was passed by the caller when the function + * that this completion corresponds to was invoked. The programmer + * is responsible for any memory freeing associated with the data + * pointer. + */ +typedef void (*stat_completion_t)(int rc, const struct Stat *stat, + const void *data); + +/** + * \brief signature of a completion function that returns data. + * + * This method will be invoked at the end of a asynchronous call and also as + * a result of connection loss or timeout. + * \param rc the error code of the call. Connection loss/timeout triggers + * the completion with one of the following error codes: + * ZCONNECTIONLOSS -- lost connection to the server + * ZOPERATIONTIMEOUT -- connection timed out + * Data related events trigger the completion with error codes listed the + * Exceptions section of the documentation of the function that initiated the + * call. (Zero indicates call was successful.) + * \param value the value of the information returned by the asynchronous call. + * If a non zero error code is returned, the content of value is undefined. + * The programmer is NOT responsible for freeing value. + * \param value_len the number of bytes in value. + * \param stat a pointer to the stat information for the node involved in + * this function. If a non zero error code is returned, the content of + * stat is undefined. The programmer is NOT responsible for freeing stat. + * \param data the pointer that was passed by the caller when the function + * that this completion corresponds to was invoked. The programmer + * is responsible for any memory freeing associated with the data + * pointer. + */ +typedef void (*data_completion_t)(int rc, const char *value, int value_len, + const struct Stat *stat, const void *data); + +/** + * \brief signature of a completion function that returns a list of strings. + * + * This method will be invoked at the end of a asynchronous call and also as + * a result of connection loss or timeout. + * \param rc the error code of the call. Connection loss/timeout triggers + * the completion with one of the following error codes: + * ZCONNECTIONLOSS -- lost connection to the server + * ZOPERATIONTIMEOUT -- connection timed out + * Data related events trigger the completion with error codes listed the + * Exceptions section of the documentation of the function that initiated the + * call. (Zero indicates call was successful.) + * \param strings a pointer to the structure containng the list of strings of the + * names of the children of a node. If a non zero error code is returned, + * the content of strings is undefined. The programmer is NOT responsible + * for freeing strings. + * \param data the pointer that was passed by the caller when the function + * that this completion corresponds to was invoked. The programmer + * is responsible for any memory freeing associated with the data + * pointer. + */ +typedef void (*strings_completion_t)(int rc, + const struct String_vector *strings, const void *data); + +/** + * \brief signature of a completion function that returns a list of strings and stat. + * . + * + * This method will be invoked at the end of a asynchronous call and also as + * a result of connection loss or timeout. + * \param rc the error code of the call. Connection loss/timeout triggers + * the completion with one of the following error codes: + * ZCONNECTIONLOSS -- lost connection to the server + * ZOPERATIONTIMEOUT -- connection timed out + * Data related events trigger the completion with error codes listed the + * Exceptions section of the documentation of the function that initiated the + * call. (Zero indicates call was successful.) + * \param strings a pointer to the structure containng the list of strings of the + * names of the children of a node. If a non zero error code is returned, + * the content of strings is undefined. The programmer is NOT responsible + * for freeing strings. + * \param stat a pointer to the stat information for the node involved in + * this function. If a non zero error code is returned, the content of + * stat is undefined. The programmer is NOT responsible for freeing stat. + * \param data the pointer that was passed by the caller when the function + * that this completion corresponds to was invoked. The programmer + * is responsible for any memory freeing associated with the data + * pointer. + */ +typedef void (*strings_stat_completion_t)(int rc, + const struct String_vector *strings, const struct Stat *stat, + const void *data); + +/** + * \brief signature of a completion function that returns a list of strings. + * + * This method will be invoked at the end of a asynchronous call and also as + * a result of connection loss or timeout. + * \param rc the error code of the call. Connection loss/timeout triggers + * the completion with one of the following error codes: + * ZCONNECTIONLOSS -- lost connection to the server + * ZOPERATIONTIMEOUT -- connection timed out + * Data related events trigger the completion with error codes listed the + * Exceptions section of the documentation of the function that initiated the + * call. (Zero indicates call was successful.) + * \param value the value of the string returned. + * \param data the pointer that was passed by the caller when the function + * that this completion corresponds to was invoked. The programmer + * is responsible for any memory freeing associated with the data + * pointer. + */ +typedef void + (*string_completion_t)(int rc, const char *value, const void *data); + +/** + * \brief signature of a completion function that returns an ACL. + * + * This method will be invoked at the end of a asynchronous call and also as + * a result of connection loss or timeout. + * \param rc the error code of the call. Connection loss/timeout triggers + * the completion with one of the following error codes: + * ZCONNECTIONLOSS -- lost connection to the server + * ZOPERATIONTIMEOUT -- connection timed out + * Data related events trigger the completion with error codes listed the + * Exceptions section of the documentation of the function that initiated the + * call. (Zero indicates call was successful.) + * \param acl a pointer to the structure containng the ACL of a node. If a non + * zero error code is returned, the content of strings is undefined. The + * programmer is NOT responsible for freeing acl. + * \param stat a pointer to the stat information for the node involved in + * this function. If a non zero error code is returned, the content of + * stat is undefined. The programmer is NOT responsible for freeing stat. + * \param data the pointer that was passed by the caller when the function + * that this completion corresponds to was invoked. The programmer + * is responsible for any memory freeing associated with the data + * pointer. + */ +typedef void (*acl_completion_t)(int rc, struct ACL_vector *acl, + struct Stat *stat, const void *data); + +/** + * \brief get the state of the zookeeper connection. + * + * The return value will be one of the \ref State Consts. + */ +ZOOAPI int zoo_state(zhandle_t *zh); + +/** + * \brief create a node. + * + * This method will create a node in ZooKeeper. A node can only be created if + * it does not already exists. The Create Flags affect the creation of nodes. + * If ZOO_EPHEMERAL flag is set, the node will automatically get removed if the + * client session goes away. If the ZOO_SEQUENCE flag is set, a unique + * monotonically increasing sequence number is appended to the path name. The + * sequence number is always fixed length of 10 digits, 0 padded. + * + * \param zh the zookeeper handle obtained by a call to \ref zookeeper_init + * \param path The name of the node. Expressed as a file name with slashes + * separating ancestors of the node. + * \param value The data to be stored in the node. + * \param valuelen The number of bytes in data. + * \param acl The initial ACL of the node. The ACL must not be null or empty. + * \param flags this parameter can be set to 0 for normal create or an OR + * of the Create Flags + * \param completion the routine to invoke when the request completes. The completion + * will be triggered with one of the following codes passed in as the rc argument: + * ZOK operation completed successfully + * ZNONODE the parent node does not exist. + * ZNODEEXISTS the node already exists + * ZNOAUTH the client does not have permission. + * ZNOCHILDRENFOREPHEMERALS cannot create children of ephemeral nodes. + * \param data The data that will be passed to the completion routine when the + * function completes. + * \return ZOK on success or one of the following errcodes on failure: + * ZBADARGUMENTS - invalid input parameters + * ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE + * ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory + */ +ZOOAPI int zoo_acreate(zhandle_t *zh, const char *path, const char *value, + int valuelen, const struct ACL_vector *acl, int flags, + string_completion_t completion, const void *data); + +/** + * \brief delete a node in zookeeper. + * + * \param zh the zookeeper handle obtained by a call to \ref zookeeper_init + * \param path the name of the node. Expressed as a file name with slashes + * separating ancestors of the node. + * \param version the expected version of the node. The function will fail if the + * actual version of the node does not match the expected version. + * If -1 is used the version check will not take place. + * \param completion the routine to invoke when the request completes. The completion + * will be triggered with one of the following codes passed in as the rc argument: + * ZOK operation completed successfully + * ZNONODE the node does not exist. + * ZNOAUTH the client does not have permission. + * ZBADVERSION expected version does not match actual version. + * ZNOTEMPTY children are present; node cannot be deleted. + * \param data the data that will be passed to the completion routine when + * the function completes. + * \return ZOK on success or one of the following errcodes on failure: + * ZBADARGUMENTS - invalid input parameters + * ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE + * ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory + */ +ZOOAPI int zoo_adelete(zhandle_t *zh, const char *path, int version, + void_completion_t completion, const void *data); + +/** + * \brief checks the existence of a node in zookeeper. + * + * \param zh the zookeeper handle obtained by a call to \ref zookeeper_init + * \param path the name of the node. Expressed as a file name with slashes + * separating ancestors of the node. + * \param watch if nonzero, a watch will be set at the server to notify the + * client if the node changes. The watch will be set even if the node does not + * exist. This allows clients to watch for nodes to appear. + * \param completion the routine to invoke when the request completes. The completion + * will be triggered with one of the following codes passed in as the rc argument: + * ZOK operation completed successfully + * ZNONODE the node does not exist. + * ZNOAUTH the client does not have permission. + * \param data the data that will be passed to the completion routine when the + * function completes. + * \return ZOK on success or one of the following errcodes on failure: + * ZBADARGUMENTS - invalid input parameters + * ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE + * ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory + */ +ZOOAPI int zoo_aexists(zhandle_t *zh, const char *path, int watch, + stat_completion_t completion, const void *data); + +/** + * \brief checks the existence of a node in zookeeper. + * + * This function is similar to \ref zoo_axists except it allows one specify + * a watcher object - a function pointer and associated context. The function + * will be called once the watch has fired. The associated context data will be + * passed to the function as the watcher context parameter. + * + * \param zh the zookeeper handle obtained by a call to \ref zookeeper_init + * \param path the name of the node. Expressed as a file name with slashes + * separating ancestors of the node. + * \param watcher if non-null a watch will set on the specified znode on the server. + * The watch will be set even if the node does not exist. This allows clients + * to watch for nodes to appear. + * \param watcherCtx user specific data, will be passed to the watcher callback. + * Unlike the global context set by \ref zookeeper_init, this watcher context + * is associated with the given instance of the watcher only. + * \param completion the routine to invoke when the request completes. The completion + * will be triggered with one of the following codes passed in as the rc argument: + * ZOK operation completed successfully + * ZNONODE the node does not exist. + * ZNOAUTH the client does not have permission. + * \param data the data that will be passed to the completion routine when the + * function completes. + * \return ZOK on success or one of the following errcodes on failure: + * ZBADARGUMENTS - invalid input parameters + * ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE + * ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory + */ +ZOOAPI int zoo_awexists(zhandle_t *zh, const char *path, + watcher_fn watcher, void* watcherCtx, + stat_completion_t completion, const void *data); + +/** + * \brief gets the data associated with a node. + * + * \param zh the zookeeper handle obtained by a call to \ref zookeeper_init + * \param path the name of the node. Expressed as a file name with slashes + * separating ancestors of the node. + * \param watch if nonzero, a watch will be set at the server to notify + * the client if the node changes. + * \param completion the routine to invoke when the request completes. The completion + * will be triggered with one of the following codes passed in as the rc argument: + * ZOK operation completed successfully + * ZNONODE the node does not exist. + * ZNOAUTH the client does not have permission. + * \param data the data that will be passed to the completion routine when + * the function completes. + * \return ZOK on success or one of the following errcodes on failure: + * ZBADARGUMENTS - invalid input parameters + * ZINVALIDSTATE - zhandle state is either in ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE + * ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory + */ +ZOOAPI int zoo_aget(zhandle_t *zh, const char *path, int watch, + data_completion_t completion, const void *data); + +/** + * \brief gets the data associated with a node. + * + * This function is similar to \ref zoo_aget except it allows one specify + * a watcher object rather than a boolean watch flag. + * + * \param zh the zookeeper handle obtained by a call to \ref zookeeper_init + * \param path the name of the node. Expressed as a file name with slashes + * separating ancestors of the node. + * \param watcher if non-null, a watch will be set at the server to notify + * the client if the node changes. + * \param watcherCtx user specific data, will be passed to the watcher callback. + * Unlike the global context set by \ref zookeeper_init, this watcher context + * is associated with the given instance of the watcher only. + * \param completion the routine to invoke when the request completes. The completion + * will be triggered with one of the following codes passed in as the rc argument: + * ZOK operation completed successfully + * ZNONODE the node does not exist. + * ZNOAUTH the client does not have permission. + * \param data the data that will be passed to the completion routine when + * the function completes. + * \return ZOK on success or one of the following errcodes on failure: + * ZBADARGUMENTS - invalid input parameters + * ZINVALIDSTATE - zhandle state is either in ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE + * ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory + */ +ZOOAPI int zoo_awget(zhandle_t *zh, const char *path, + watcher_fn watcher, void* watcherCtx, + data_completion_t completion, const void *data); + +/** + * \brief sets the data associated with a node. + * + * \param zh the zookeeper handle obtained by a call to \ref zookeeper_init + * \param path the name of the node. Expressed as a file name with slashes + * separating ancestors of the node. + * \param buffer the buffer holding data to be written to the node. + * \param buflen the number of bytes from buffer to write. + * \param version the expected version of the node. The function will fail if + * the actual version of the node does not match the expected version. If -1 is + * used the version check will not take place. * completion: If null, + * the function will execute synchronously. Otherwise, the function will return + * immediately and invoke the completion routine when the request completes. + * \param completion the routine to invoke when the request completes. The completion + * will be triggered with one of the following codes passed in as the rc argument: + * ZOK operation completed successfully + * ZNONODE the node does not exist. + * ZNOAUTH the client does not have permission. + * ZBADVERSION expected version does not match actual version. + * \param data the data that will be passed to the completion routine when + * the function completes. + * \return ZOK on success or one of the following errcodes on failure: + * ZBADARGUMENTS - invalid input parameters + * ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE + * ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory + */ +ZOOAPI int zoo_aset(zhandle_t *zh, const char *path, const char *buffer, int buflen, + int version, stat_completion_t completion, const void *data); + +/** + * \brief lists the children of a node. + * + * \param zh the zookeeper handle obtained by a call to \ref zookeeper_init + * \param path the name of the node. Expressed as a file name with slashes + * separating ancestors of the node. + * \param watch if nonzero, a watch will be set at the server to notify + * the client if the node changes. + * \param completion the routine to invoke when the request completes. The completion + * will be triggered with one of the following codes passed in as the rc argument: + * ZOK operation completed successfully + * ZNONODE the node does not exist. + * ZNOAUTH the client does not have permission. + * \param data the data that will be passed to the completion routine when + * the function completes. + * \return ZOK on success or one of the following errcodes on failure: + * ZBADARGUMENTS - invalid input parameters + * ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE + * ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory + */ +ZOOAPI int zoo_aget_children(zhandle_t *zh, const char *path, int watch, + strings_completion_t completion, const void *data); + +/** + * \brief lists the children of a node. + * + * This function is similar to \ref zoo_aget_children except it allows one specify + * a watcher object rather than a boolean watch flag. + * + * \param zh the zookeeper handle obtained by a call to \ref zookeeper_init + * \param path the name of the node. Expressed as a file name with slashes + * separating ancestors of the node. + * \param watcher if non-null, a watch will be set at the server to notify + * the client if the node changes. + * \param watcherCtx user specific data, will be passed to the watcher callback. + * Unlike the global context set by \ref zookeeper_init, this watcher context + * is associated with the given instance of the watcher only. + * \param completion the routine to invoke when the request completes. The completion + * will be triggered with one of the following codes passed in as the rc argument: + * ZOK operation completed successfully + * ZNONODE the node does not exist. + * ZNOAUTH the client does not have permission. + * \param data the data that will be passed to the completion routine when + * the function completes. + * \return ZOK on success or one of the following errcodes on failure: + * ZBADARGUMENTS - invalid input parameters + * ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE + * ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory + */ +ZOOAPI int zoo_awget_children(zhandle_t *zh, const char *path, + watcher_fn watcher, void* watcherCtx, + strings_completion_t completion, const void *data); + +/** + * \brief lists the children of a node, and get the parent stat. + * + * This function is new in version 3.3.0 + * + * \param zh the zookeeper handle obtained by a call to \ref zookeeper_init + * \param path the name of the node. Expressed as a file name with slashes + * separating ancestors of the node. + * \param watch if nonzero, a watch will be set at the server to notify + * the client if the node changes. + * \param completion the routine to invoke when the request completes. The completion + * will be triggered with one of the following codes passed in as the rc argument: + * ZOK operation completed successfully + * ZNONODE the node does not exist. + * ZNOAUTH the client does not have permission. + * \param data the data that will be passed to the completion routine when + * the function completes. + * \return ZOK on success or one of the following errcodes on failure: + * ZBADARGUMENTS - invalid input parameters + * ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE + * ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory + */ +ZOOAPI int zoo_aget_children2(zhandle_t *zh, const char *path, int watch, + strings_stat_completion_t completion, const void *data); + +/** + * \brief lists the children of a node, and get the parent stat. + * + * This function is similar to \ref zoo_aget_children2 except it allows one specify + * a watcher object rather than a boolean watch flag. + * + * This function is new in version 3.3.0 + * + * \param zh the zookeeper handle obtained by a call to \ref zookeeper_init + * \param path the name of the node. Expressed as a file name with slashes + * separating ancestors of the node. + * \param watcher if non-null, a watch will be set at the server to notify + * the client if the node changes. + * \param watcherCtx user specific data, will be passed to the watcher callback. + * Unlike the global context set by \ref zookeeper_init, this watcher context + * is associated with the given instance of the watcher only. + * \param completion the routine to invoke when the request completes. The completion + * will be triggered with one of the following codes passed in as the rc argument: + * ZOK operation completed successfully + * ZNONODE the node does not exist. + * ZNOAUTH the client does not have permission. + * \param data the data that will be passed to the completion routine when + * the function completes. + * \return ZOK on success or one of the following errcodes on failure: + * ZBADARGUMENTS - invalid input parameters + * ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE + * ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory + */ +ZOOAPI int zoo_awget_children2(zhandle_t *zh, const char *path, + watcher_fn watcher, void* watcherCtx, + strings_stat_completion_t completion, const void *data); + +/** + * \brief Flush leader channel. + * + * \param zh the zookeeper handle obtained by a call to \ref zookeeper_init + * \param path the name of the node. Expressed as a file name with slashes + * separating ancestors of the node. + * \param completion the routine to invoke when the request completes. The completion + * will be triggered with one of the following codes passed in as the rc argument: + * ZOK operation completed successfully + * ZNONODE the node does not exist. + * ZNOAUTH the client does not have permission. + * \param data the data that will be passed to the completion routine when + * the function completes. + * \return ZOK on success or one of the following errcodes on failure: + * ZBADARGUMENTS - invalid input parameters + * ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE + * ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory + */ + +ZOOAPI int zoo_async(zhandle_t *zh, const char *path, + string_completion_t completion, const void *data); + + +/** + * \brief gets the acl associated with a node. + * + * \param zh the zookeeper handle obtained by a call to \ref zookeeper_init + * \param path the name of the node. Expressed as a file name with slashes + * separating ancestors of the node. + * \param completion the routine to invoke when the request completes. The completion + * will be triggered with one of the following codes passed in as the rc argument: + * ZOK operation completed successfully + * ZNONODE the node does not exist. + * ZNOAUTH the client does not have permission. + * \param data the data that will be passed to the completion routine when + * the function completes. + * \return ZOK on success or one of the following errcodes on failure: + * ZBADARGUMENTS - invalid input parameters + * ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE + * ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory + */ +ZOOAPI int zoo_aget_acl(zhandle_t *zh, const char *path, acl_completion_t completion, + const void *data); + +/** + * \brief sets the acl associated with a node. + * + * \param zh the zookeeper handle obtained by a call to \ref zookeeper_init + * \param path the name of the node. Expressed as a file name with slashes + * separating ancestors of the node. + * \param buffer the buffer holding the acls to be written to the node. + * \param buflen the number of bytes from buffer to write. + * \param completion the routine to invoke when the request completes. The completion + * will be triggered with one of the following codes passed in as the rc argument: + * ZOK operation completed successfully + * ZNONODE the node does not exist. + * ZNOAUTH the client does not have permission. + * ZINVALIDACL invalid ACL specified + * ZBADVERSION expected version does not match actual version. + * \param data the data that will be passed to the completion routine when + * the function completes. + * \return ZOK on success or one of the following errcodes on failure: + * ZBADARGUMENTS - invalid input parameters + * ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE + * ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory + */ +ZOOAPI int zoo_aset_acl(zhandle_t *zh, const char *path, int version, + struct ACL_vector *acl, void_completion_t, const void *data); + +/** + * \brief atomically commits multiple zookeeper operations. + * + * \param zh the zookeeper handle obtained by a call to \ref zookeeper_init + * \param count the number of operations + * \param ops an array of operations to commit + * \param results an array to hold the results of the operations + * \param completion the routine to invoke when the request completes. The completion + * will be triggered with any of the error codes that can that can be returned by the + * ops supported by a multi op (see \ref zoo_acreate, \ref zoo_adelete, \ref zoo_aset). + * \param data the data that will be passed to the completion routine when + * the function completes. + * \return the return code for the function call. This can be any of the + * values that can be returned by the ops supported by a multi op (see + * \ref zoo_acreate, \ref zoo_adelete, \ref zoo_aset). + */ +ZOOAPI int zoo_amulti(zhandle_t *zh, int count, const zoo_op_t *ops, + zoo_op_result_t *results, void_completion_t, const void *data); + +/** + * \brief return an error string. + * + * \param return code + * \return string corresponding to the return code + */ +ZOOAPI const char* zerror(int c); + +/** + * \brief specify application credentials. + * + * The application calls this function to specify its credentials for purposes + * of authentication. The server will use the security provider specified by + * the scheme parameter to authenticate the client connection. If the + * authentication request has failed: + * - the server connection is dropped + * - the watcher is called with the ZOO_AUTH_FAILED_STATE value as the state + * parameter. + * \param zh the zookeeper handle obtained by a call to \ref zookeeper_init + * \param scheme the id of authentication scheme. Natively supported: + * "digest" password-based authentication + * \param cert application credentials. The actual value depends on the scheme. + * \param certLen the length of the data parameter + * \param completion the routine to invoke when the request completes. One of + * the following result codes may be passed into the completion callback: + * ZOK operation completed successfully + * ZAUTHFAILED authentication failed + * \param data the data that will be passed to the completion routine when the + * function completes. + * \return ZOK on success or one of the following errcodes on failure: + * ZBADARGUMENTS - invalid input parameters + * ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE + * ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory + * ZSYSTEMERROR - a system error occurred + */ +ZOOAPI int zoo_add_auth(zhandle_t *zh,const char* scheme,const char* cert, + int certLen, void_completion_t completion, const void *data); + +/** + * \brief checks if the current zookeeper connection state can't be recovered. + * + * The application must close the zhandle and try to reconnect. + * + * \param zh the zookeeper handle (see \ref zookeeper_init) + * \return ZINVALIDSTATE if connection is unrecoverable + */ +ZOOAPI int is_unrecoverable(zhandle_t *zh); + +/** + * \brief sets the debugging level for the library + */ +ZOOAPI void zoo_set_debug_level(ZooLogLevel logLevel); + +/** + * \brief sets the stream to be used by the library for logging + * + * The zookeeper library uses stderr as its default log stream. Application + * must make sure the stream is writable. Passing in NULL resets the stream + * to its default value (stderr). + */ +ZOOAPI void zoo_set_log_stream(FILE* logStream); + +/** + * \brief enable/disable quorum endpoint order randomization + * + * Note: typically this method should NOT be used outside of testing. + * + * If passed a non-zero value, will make the client connect to quorum peers + * in the order as specified in the zookeeper_init() call. + * A zero value causes zookeeper_init() to permute the peer endpoints + * which is good for more even client connection distribution among the + * quorum peers. + */ +ZOOAPI void zoo_deterministic_conn_order(int yesOrNo); + +/** + * \brief create a node synchronously. + * + * This method will create a node in ZooKeeper. A node can only be created if + * it does not already exists. The Create Flags affect the creation of nodes. + * If ZOO_EPHEMERAL flag is set, the node will automatically get removed if the + * client session goes away. If the ZOO_SEQUENCE flag is set, a unique + * monotonically increasing sequence number is appended to the path name. + * + * \param zh the zookeeper handle obtained by a call to \ref zookeeper_init + * \param path The name of the node. Expressed as a file name with slashes + * separating ancestors of the node. + * \param value The data to be stored in the node. + * \param valuelen The number of bytes in data. To set the data to be NULL use + * value as NULL and valuelen as -1. + * \param acl The initial ACL of the node. The ACL must not be null or empty. + * \param flags this parameter can be set to 0 for normal create or an OR + * of the Create Flags + * \param path_buffer Buffer which will be filled with the path of the + * new node (this might be different than the supplied path + * because of the ZOO_SEQUENCE flag). The path string will always be + * null-terminated. This parameter may be NULL if path_buffer_len = 0. + * \param path_buffer_len Size of path buffer; if the path of the new + * node (including space for the null terminator) exceeds the buffer size, + * the path string will be truncated to fit. The actual path of the + * new node in the server will not be affected by the truncation. + * The path string will always be null-terminated. + * \return one of the following codes are returned: + * ZOK operation completed successfully + * ZNONODE the parent node does not exist. + * ZNODEEXISTS the node already exists + * ZNOAUTH the client does not have permission. + * ZNOCHILDRENFOREPHEMERALS cannot create children of ephemeral nodes. + * ZBADARGUMENTS - invalid input parameters + * ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE + * ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory + */ +ZOOAPI int zoo_create(zhandle_t *zh, const char *path, const char *value, + int valuelen, const struct ACL_vector *acl, int flags, + char *path_buffer, int path_buffer_len); + +/** + * \brief delete a node in zookeeper synchronously. + * + * \param zh the zookeeper handle obtained by a call to \ref zookeeper_init + * \param path the name of the node. Expressed as a file name with slashes + * separating ancestors of the node. + * \param version the expected version of the node. The function will fail if the + * actual version of the node does not match the expected version. + * If -1 is used the version check will not take place. + * \return one of the following values is returned. + * ZOK operation completed successfully + * ZNONODE the node does not exist. + * ZNOAUTH the client does not have permission. + * ZBADVERSION expected version does not match actual version. + * ZNOTEMPTY children are present; node cannot be deleted. + * ZBADARGUMENTS - invalid input parameters + * ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE + * ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory + */ +ZOOAPI int zoo_delete(zhandle_t *zh, const char *path, int version); + + +/** + * \brief checks the existence of a node in zookeeper synchronously. + * + * \param zh the zookeeper handle obtained by a call to \ref zookeeper_init + * \param path the name of the node. Expressed as a file name with slashes + * separating ancestors of the node. + * \param watch if nonzero, a watch will be set at the server to notify the + * client if the node changes. The watch will be set even if the node does not + * exist. This allows clients to watch for nodes to appear. + * \param the return stat value of the node. + * \return return code of the function call. + * ZOK operation completed successfully + * ZNONODE the node does not exist. + * ZNOAUTH the client does not have permission. + * ZBADARGUMENTS - invalid input parameters + * ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE + * ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory + */ +ZOOAPI int zoo_exists(zhandle_t *zh, const char *path, int watch, struct Stat *stat); + +/** + * \brief checks the existence of a node in zookeeper synchronously. + * + * This function is similar to \ref zoo_exists except it allows one specify + * a watcher object rather than a boolean watch flag. + * + * \param zh the zookeeper handle obtained by a call to \ref zookeeper_init + * \param path the name of the node. Expressed as a file name with slashes + * separating ancestors of the node. + * \param watcher if non-null a watch will set on the specified znode on the server. + * The watch will be set even if the node does not exist. This allows clients + * to watch for nodes to appear. + * \param watcherCtx user specific data, will be passed to the watcher callback. + * Unlike the global context set by \ref zookeeper_init, this watcher context + * is associated with the given instance of the watcher only. + * \param the return stat value of the node. + * \return return code of the function call. + * ZOK operation completed successfully + * ZNONODE the node does not exist. + * ZNOAUTH the client does not have permission. + * ZBADARGUMENTS - invalid input parameters + * ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE + * ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory + */ +ZOOAPI int zoo_wexists(zhandle_t *zh, const char *path, + watcher_fn watcher, void* watcherCtx, struct Stat *stat); + +/** + * \brief gets the data associated with a node synchronously. + * + * \param zh the zookeeper handle obtained by a call to \ref zookeeper_init + * \param path the name of the node. Expressed as a file name with slashes + * separating ancestors of the node. + * \param watch if nonzero, a watch will be set at the server to notify + * the client if the node changes. + * \param buffer the buffer holding the node data returned by the server + * \param buffer_len is the size of the buffer pointed to by the buffer parameter. + * It'll be set to the actual data length upon return. If the data is NULL, length is -1. + * \param stat if not NULL, will hold the value of stat for the path on return. + * \return return value of the function call. + * ZOK operation completed successfully + * ZNONODE the node does not exist. + * ZNOAUTH the client does not have permission. + * ZBADARGUMENTS - invalid input parameters + * ZINVALIDSTATE - zhandle state is either in ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE + * ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory + */ +ZOOAPI int zoo_get(zhandle_t *zh, const char *path, int watch, char *buffer, + int* buffer_len, struct Stat *stat); + +/** + * \brief gets the data associated with a node synchronously. + * + * This function is similar to \ref zoo_get except it allows one specify + * a watcher object rather than a boolean watch flag. + * + * \param zh the zookeeper handle obtained by a call to \ref zookeeper_init + * \param path the name of the node. Expressed as a file name with slashes + * separating ancestors of the node. + * \param watcher if non-null, a watch will be set at the server to notify + * the client if the node changes. + * \param watcherCtx user specific data, will be passed to the watcher callback. + * Unlike the global context set by \ref zookeeper_init, this watcher context + * is associated with the given instance of the watcher only. + * \param buffer the buffer holding the node data returned by the server + * \param buffer_len is the size of the buffer pointed to by the buffer parameter. + * It'll be set to the actual data length upon return. If the data is NULL, length is -1. + * \param stat if not NULL, will hold the value of stat for the path on return. + * \return return value of the function call. + * ZOK operation completed successfully + * ZNONODE the node does not exist. + * ZNOAUTH the client does not have permission. + * ZBADARGUMENTS - invalid input parameters + * ZINVALIDSTATE - zhandle state is either in ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE + * ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory + */ +ZOOAPI int zoo_wget(zhandle_t *zh, const char *path, + watcher_fn watcher, void* watcherCtx, + char *buffer, int* buffer_len, struct Stat *stat); + +/** + * \brief sets the data associated with a node. See zoo_set2 function if + * you require access to the stat information associated with the znode. + * + * \param zh the zookeeper handle obtained by a call to \ref zookeeper_init + * \param path the name of the node. Expressed as a file name with slashes + * separating ancestors of the node. + * \param buffer the buffer holding data to be written to the node. + * \param buflen the number of bytes from buffer to write. To set NULL as data + * use buffer as NULL and buflen as -1. + * \param version the expected version of the node. The function will fail if + * the actual version of the node does not match the expected version. If -1 is + * used the version check will not take place. + * \return the return code for the function call. + * ZOK operation completed successfully + * ZNONODE the node does not exist. + * ZNOAUTH the client does not have permission. + * ZBADVERSION expected version does not match actual version. + * ZBADARGUMENTS - invalid input parameters + * ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE + * ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory + */ +ZOOAPI int zoo_set(zhandle_t *zh, const char *path, const char *buffer, + int buflen, int version); + +/** + * \brief sets the data associated with a node. This function is the same + * as zoo_set except that it also provides access to stat information + * associated with the znode. + * + * \param zh the zookeeper handle obtained by a call to \ref zookeeper_init + * \param path the name of the node. Expressed as a file name with slashes + * separating ancestors of the node. + * \param buffer the buffer holding data to be written to the node. + * \param buflen the number of bytes from buffer to write. To set NULL as data + * use buffer as NULL and buflen as -1. + * \param version the expected version of the node. The function will fail if + * the actual version of the node does not match the expected version. If -1 is + * used the version check will not take place. + * \param stat if not NULL, will hold the value of stat for the path on return. + * \return the return code for the function call. + * ZOK operation completed successfully + * ZNONODE the node does not exist. + * ZNOAUTH the client does not have permission. + * ZBADVERSION expected version does not match actual version. + * ZBADARGUMENTS - invalid input parameters + * ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE + * ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory + */ +ZOOAPI int zoo_set2(zhandle_t *zh, const char *path, const char *buffer, + int buflen, int version, struct Stat *stat); + +/** + * \brief lists the children of a node synchronously. + * + * \param zh the zookeeper handle obtained by a call to \ref zookeeper_init + * \param path the name of the node. Expressed as a file name with slashes + * separating ancestors of the node. + * \param watch if nonzero, a watch will be set at the server to notify + * the client if the node changes. + * \param strings return value of children paths. + * \return the return code of the function. + * ZOK operation completed successfully + * ZNONODE the node does not exist. + * ZNOAUTH the client does not have permission. + * ZBADARGUMENTS - invalid input parameters + * ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE + * ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory + */ +ZOOAPI int zoo_get_children(zhandle_t *zh, const char *path, int watch, + struct String_vector *strings); + +/** + * \brief lists the children of a node synchronously. + * + * This function is similar to \ref zoo_get_children except it allows one specify + * a watcher object rather than a boolean watch flag. + * + * \param zh the zookeeper handle obtained by a call to \ref zookeeper_init + * \param path the name of the node. Expressed as a file name with slashes + * separating ancestors of the node. + * \param watcher if non-null, a watch will be set at the server to notify + * the client if the node changes. + * \param watcherCtx user specific data, will be passed to the watcher callback. + * Unlike the global context set by \ref zookeeper_init, this watcher context + * is associated with the given instance of the watcher only. + * \param strings return value of children paths. + * \return the return code of the function. + * ZOK operation completed successfully + * ZNONODE the node does not exist. + * ZNOAUTH the client does not have permission. + * ZBADARGUMENTS - invalid input parameters + * ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE + * ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory + */ +ZOOAPI int zoo_wget_children(zhandle_t *zh, const char *path, + watcher_fn watcher, void* watcherCtx, + struct String_vector *strings); + +/** + * \brief lists the children of a node and get its stat synchronously. + * + * This function is new in version 3.3.0 + * + * \param zh the zookeeper handle obtained by a call to \ref zookeeper_init + * \param path the name of the node. Expressed as a file name with slashes + * separating ancestors of the node. + * \param watch if nonzero, a watch will be set at the server to notify + * the client if the node changes. + * \param strings return value of children paths. + * \param stat return value of node stat. + * \return the return code of the function. + * ZOK operation completed successfully + * ZNONODE the node does not exist. + * ZNOAUTH the client does not have permission. + * ZBADARGUMENTS - invalid input parameters + * ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE + * ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory + */ +ZOOAPI int zoo_get_children2(zhandle_t *zh, const char *path, int watch, + struct String_vector *strings, struct Stat *stat); + +/** + * \brief lists the children of a node and get its stat synchronously. + * + * This function is similar to \ref zoo_get_children except it allows one specify + * a watcher object rather than a boolean watch flag. + * + * This function is new in version 3.3.0 + * + * \param zh the zookeeper handle obtained by a call to \ref zookeeper_init + * \param path the name of the node. Expressed as a file name with slashes + * separating ancestors of the node. + * \param watcher if non-null, a watch will be set at the server to notify + * the client if the node changes. + * \param watcherCtx user specific data, will be passed to the watcher callback. + * Unlike the global context set by \ref zookeeper_init, this watcher context + * is associated with the given instance of the watcher only. + * \param strings return value of children paths. + * \param stat return value of node stat. + * \return the return code of the function. + * ZOK operation completed successfully + * ZNONODE the node does not exist. + * ZNOAUTH the client does not have permission. + * ZBADARGUMENTS - invalid input parameters + * ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE + * ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory + */ +ZOOAPI int zoo_wget_children2(zhandle_t *zh, const char *path, + watcher_fn watcher, void* watcherCtx, + struct String_vector *strings, struct Stat *stat); + +/** + * \brief gets the acl associated with a node synchronously. + * + * \param zh the zookeeper handle obtained by a call to \ref zookeeper_init + * \param path the name of the node. Expressed as a file name with slashes + * separating ancestors of the node. + * \param acl the return value of acls on the path. + * \param stat returns the stat of the path specified. + * \return the return code for the function call. + * ZOK operation completed successfully + * ZNONODE the node does not exist. + * ZNOAUTH the client does not have permission. + * ZBADARGUMENTS - invalid input parameters + * ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE + * ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory + */ +ZOOAPI int zoo_get_acl(zhandle_t *zh, const char *path, struct ACL_vector *acl, + struct Stat *stat); + +/** + * \brief sets the acl associated with a node synchronously. + * + * \param zh the zookeeper handle obtained by a call to \ref zookeeper_init + * \param path the name of the node. Expressed as a file name with slashes + * separating ancestors of the node. + * \param version the expected version of the path. + * \param acl the acl to be set on the path. + * \return the return code for the function call. + * ZOK operation completed successfully + * ZNONODE the node does not exist. + * ZNOAUTH the client does not have permission. + * ZINVALIDACL invalid ACL specified + * ZBADVERSION expected version does not match actual version. + * ZBADARGUMENTS - invalid input parameters + * ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE + * ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory + */ +ZOOAPI int zoo_set_acl(zhandle_t *zh, const char *path, int version, + const struct ACL_vector *acl); + +/** + * \brief atomically commits multiple zookeeper operations synchronously. + * + * \param zh the zookeeper handle obtained by a call to \ref zookeeper_init + * \param count the number of operations + * \param ops an array of operations to commit + * \param results an array to hold the results of the operations + * \return the return code for the function call. This can be any of the + * values that can be returned by the ops supported by a multi op (see + * \ref zoo_acreate, \ref zoo_adelete, \ref zoo_aset). + */ +ZOOAPI int zoo_multi(zhandle_t *zh, int count, const zoo_op_t *ops, zoo_op_result_t *results); + +#ifdef __cplusplus +} +#endif + +#endif /*ZOOKEEPER_H_*/ diff --git a/src/c/include/zookeeper_log.h b/src/c/include/zookeeper_log.h new file mode 100644 index 0000000..e5917cb --- /dev/null +++ b/src/c/include/zookeeper_log.h @@ -0,0 +1,51 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ZK_LOG_H_ +#define ZK_LOG_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +extern ZOOAPI ZooLogLevel logLevel; +#define LOGSTREAM getLogStream() + +#define LOG_ERROR(x) if(logLevel>=ZOO_LOG_LEVEL_ERROR) \ + log_message(ZOO_LOG_LEVEL_ERROR,__LINE__,__func__,format_log_message x) +#define LOG_WARN(x) if(logLevel>=ZOO_LOG_LEVEL_WARN) \ + log_message(ZOO_LOG_LEVEL_WARN,__LINE__,__func__,format_log_message x) +#define LOG_INFO(x) if(logLevel>=ZOO_LOG_LEVEL_INFO) \ + log_message(ZOO_LOG_LEVEL_INFO,__LINE__,__func__,format_log_message x) +#define LOG_DEBUG(x) if(logLevel==ZOO_LOG_LEVEL_DEBUG) \ + log_message(ZOO_LOG_LEVEL_DEBUG,__LINE__,__func__,format_log_message x) + +ZOOAPI void log_message(ZooLogLevel curLevel, int line,const char* funcName, + const char* message); + +ZOOAPI const char* format_log_message(const char* format,...); + +FILE* getLogStream(); + +#ifdef __cplusplus +} +#endif + +#endif /*ZK_LOG_H_*/ diff --git a/src/c/include/zookeeper_version.h b/src/c/include/zookeeper_version.h new file mode 100644 index 0000000..518f7e6 --- /dev/null +++ b/src/c/include/zookeeper_version.h @@ -0,0 +1,33 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef ZOOKEEPER_VERSION_H_ +#define ZOOKEEPER_VERSION_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#define ZOO_MAJOR_VERSION 3 +#define ZOO_MINOR_VERSION 4 +#define ZOO_PATCH_VERSION 12 + +#ifdef __cplusplus +} +#endif + +#endif /* ZOOKEEPER_VERSION_H_ */ diff --git a/src/c/src/cli.c b/src/c/src/cli.c new file mode 100644 index 0000000..ef32a10 --- /dev/null +++ b/src/c/src/cli.c @@ -0,0 +1,697 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * cli.c is a example/sample C client shell for ZooKeeper. It contains + * basic shell functionality which exercises some of the features of + * the ZooKeeper C client API. It is not a full fledged client and is + * not meant for production usage - see the Java client shell for a + * fully featured shell. + */ + +#include +#include +#include +#include +#include + +#ifndef WIN32 +#include +#include +#include +#else +#include "winport.h" +//#include <-- can't include, conflicting definitions of close() +int read(int _FileHandle, void * _DstBuf, unsigned int _MaxCharCount); +int write(int _Filehandle, const void * _Buf, unsigned int _MaxCharCount); +#define ctime_r(tctime, buffer) ctime_s (buffer, 40, tctime) +#endif + +#include +#include +#include + +#ifdef YCA +#include +#endif + +#define _LL_CAST_ (long long) + +static zhandle_t *zh; +static clientid_t myid; +static const char *clientIdFile = 0; +struct timeval startTime; +static char cmd[1024]; +static int batchMode=0; + +static int to_send=0; +static int sent=0; +static int recvd=0; + +static int shutdownThisThing=0; + +static __attribute__ ((unused)) void +printProfileInfo(struct timeval start, struct timeval end, int thres, + const char* msg) +{ + int delay=(end.tv_sec*1000+end.tv_usec/1000)- + (start.tv_sec*1000+start.tv_usec/1000); + if(delay>thres) + fprintf(stderr,"%s: execution time=%dms\n",msg,delay); +} + +static const char* state2String(int state){ + if (state == 0) + return "CLOSED_STATE"; + if (state == ZOO_CONNECTING_STATE) + return "CONNECTING_STATE"; + if (state == ZOO_ASSOCIATING_STATE) + return "ASSOCIATING_STATE"; + if (state == ZOO_CONNECTED_STATE) + return "CONNECTED_STATE"; + if (state == ZOO_EXPIRED_SESSION_STATE) + return "EXPIRED_SESSION_STATE"; + if (state == ZOO_AUTH_FAILED_STATE) + return "AUTH_FAILED_STATE"; + + return "INVALID_STATE"; +} + +static const char* type2String(int state){ + if (state == ZOO_CREATED_EVENT) + return "CREATED_EVENT"; + if (state == ZOO_DELETED_EVENT) + return "DELETED_EVENT"; + if (state == ZOO_CHANGED_EVENT) + return "CHANGED_EVENT"; + if (state == ZOO_CHILD_EVENT) + return "CHILD_EVENT"; + if (state == ZOO_SESSION_EVENT) + return "SESSION_EVENT"; + if (state == ZOO_NOTWATCHING_EVENT) + return "NOTWATCHING_EVENT"; + + return "UNKNOWN_EVENT_TYPE"; +} + +void watcher(zhandle_t *zzh, int type, int state, const char *path, + void* context) +{ + /* Be careful using zh here rather than zzh - as this may be mt code + * the client lib may call the watcher before zookeeper_init returns */ + + fprintf(stderr, "Watcher %s state = %s", type2String(type), state2String(state)); + if (path && strlen(path) > 0) { + fprintf(stderr, " for path %s", path); + } + fprintf(stderr, "\n"); + + if (type == ZOO_SESSION_EVENT) { + if (state == ZOO_CONNECTED_STATE) { + const clientid_t *id = zoo_client_id(zzh); + if (myid.client_id == 0 || myid.client_id != id->client_id) { + myid = *id; + fprintf(stderr, "Got a new session id: 0x%llx\n", + _LL_CAST_ myid.client_id); + if (clientIdFile) { + FILE *fh = fopen(clientIdFile, "w"); + if (!fh) { + perror(clientIdFile); + } else { + int rc = fwrite(&myid, sizeof(myid), 1, fh); + if (rc != sizeof(myid)) { + perror("writing client id"); + } + fclose(fh); + } + } + } + } else if (state == ZOO_AUTH_FAILED_STATE) { + fprintf(stderr, "Authentication failure. Shutting down...\n"); + zookeeper_close(zzh); + shutdownThisThing=1; + zh=0; + } else if (state == ZOO_EXPIRED_SESSION_STATE) { + fprintf(stderr, "Session expired. Shutting down...\n"); + zookeeper_close(zzh); + shutdownThisThing=1; + zh=0; + } + } +} + +void dumpStat(const struct Stat *stat) { + char tctimes[40]; + char tmtimes[40]; + time_t tctime; + time_t tmtime; + + if (!stat) { + fprintf(stderr,"null\n"); + return; + } + tctime = stat->ctime/1000; + tmtime = stat->mtime/1000; + + ctime_r(&tmtime, tmtimes); + ctime_r(&tctime, tctimes); + + fprintf(stderr, "\tctime = %s\tczxid=%llx\n" + "\tmtime=%s\tmzxid=%llx\n" + "\tversion=%x\taversion=%x\n" + "\tephemeralOwner = %llx\n", + tctimes, _LL_CAST_ stat->czxid, tmtimes, + _LL_CAST_ stat->mzxid, + (unsigned int)stat->version, (unsigned int)stat->aversion, + _LL_CAST_ stat->ephemeralOwner); +} + +void my_string_completion(int rc, const char *name, const void *data) { + fprintf(stderr, "[%s]: rc = %d\n", (char*)(data==0?"null":data), rc); + if (!rc) { + fprintf(stderr, "\tname = %s\n", name); + } + if(batchMode) + shutdownThisThing=1; +} + +void my_string_completion_free_data(int rc, const char *name, const void *data) { + my_string_completion(rc, name, data); + free((void*)data); +} + +void my_data_completion(int rc, const char *value, int value_len, + const struct Stat *stat, const void *data) { + struct timeval tv; + int sec; + int usec; + gettimeofday(&tv, 0); + sec = tv.tv_sec - startTime.tv_sec; + usec = tv.tv_usec - startTime.tv_usec; + fprintf(stderr, "time = %d msec\n", sec*1000 + usec/1000); + fprintf(stderr, "%s: rc = %d\n", (char*)data, rc); + if (value) { + fprintf(stderr, " value_len = %d\n", value_len); + assert(write(2, value, value_len) == value_len); + } + fprintf(stderr, "\nStat:\n"); + dumpStat(stat); + free((void*)data); + if(batchMode) + shutdownThisThing=1; +} + +void my_silent_data_completion(int rc, const char *value, int value_len, + const struct Stat *stat, const void *data) { + recvd++; + fprintf(stderr, "Data completion %s rc = %d\n",(char*)data,rc); + free((void*)data); + if (recvd==to_send) { + fprintf(stderr,"Recvd %d responses for %d requests sent\n",recvd,to_send); + if(batchMode) + shutdownThisThing=1; + } +} + +void my_strings_completion(int rc, const struct String_vector *strings, + const void *data) { + struct timeval tv; + int sec; + int usec; + int i; + + gettimeofday(&tv, 0); + sec = tv.tv_sec - startTime.tv_sec; + usec = tv.tv_usec - startTime.tv_usec; + fprintf(stderr, "time = %d msec\n", sec*1000 + usec/1000); + fprintf(stderr, "%s: rc = %d\n", (char*)data, rc); + if (strings) + for (i=0; i < strings->count; i++) { + fprintf(stderr, "\t%s\n", strings->data[i]); + } + free((void*)data); + gettimeofday(&tv, 0); + sec = tv.tv_sec - startTime.tv_sec; + usec = tv.tv_usec - startTime.tv_usec; + fprintf(stderr, "time = %d msec\n", sec*1000 + usec/1000); + if(batchMode) + shutdownThisThing=1; +} + +void my_strings_stat_completion(int rc, const struct String_vector *strings, + const struct Stat *stat, const void *data) { + my_strings_completion(rc, strings, data); + dumpStat(stat); + if(batchMode) + shutdownThisThing=1; +} + +void my_void_completion(int rc, const void *data) { + fprintf(stderr, "%s: rc = %d\n", (char*)data, rc); + free((void*)data); + if(batchMode) + shutdownThisThing=1; +} + +void my_stat_completion(int rc, const struct Stat *stat, const void *data) { + fprintf(stderr, "%s: rc = %d Stat:\n", (char*)data, rc); + dumpStat(stat); + free((void*)data); + if(batchMode) + shutdownThisThing=1; +} + +void my_silent_stat_completion(int rc, const struct Stat *stat, + const void *data) { + // fprintf(stderr, "State completion: [%s] rc = %d\n", (char*)data, rc); + sent++; + free((void*)data); +} + +static void sendRequest(const char* data) { + zoo_aset(zh, "/od", data, strlen(data), -1, my_silent_stat_completion, + strdup("/od")); + zoo_aget(zh, "/od", 1, my_silent_data_completion, strdup("/od")); +} + +void od_completion(int rc, const struct Stat *stat, const void *data) { + int i; + fprintf(stderr, "od command response: rc = %d Stat:\n", rc); + dumpStat(stat); + // send a whole bunch of requests + recvd=0; + sent=0; + to_send=200; + for (i=0; i\n"); + fprintf(stderr, " delete \n"); + fprintf(stderr, " set \n"); + fprintf(stderr, " get \n"); + fprintf(stderr, " ls \n"); + fprintf(stderr, " ls2 \n"); + fprintf(stderr, " sync \n"); + fprintf(stderr, " exists \n"); + fprintf(stderr, " wexists \n"); + fprintf(stderr, " myid\n"); + fprintf(stderr, " verbose\n"); + fprintf(stderr, " addauth \n"); + fprintf(stderr, " quit\n"); + fprintf(stderr, "\n"); + fprintf(stderr, " prefix the command with the character 'a' to run the command asynchronously.\n"); + fprintf(stderr, " run the 'verbose' command to toggle verbose logging.\n"); + fprintf(stderr, " i.e. 'aget /foo' to get /foo asynchronously\n"); + } else if (startsWith(line, "verbose")) { + if (verbose) { + verbose = 0; + zoo_set_debug_level(ZOO_LOG_LEVEL_WARN); + fprintf(stderr, "logging level set to WARN\n"); + } else { + verbose = 1; + zoo_set_debug_level(ZOO_LOG_LEVEL_DEBUG); + fprintf(stderr, "logging level set to DEBUG\n"); + } + } else if (startsWith(line, "get ")) { + line += 4; + if (line[0] != '/') { + fprintf(stderr, "Path must start with /, found: %s\n", line); + return; + } + + rc = zoo_aget(zh, line, 1, my_data_completion, strdup(line)); + if (rc) { + fprintf(stderr, "Error %d for %s\n", rc, line); + } + } else if (startsWith(line, "set ")) { + char *ptr; + line += 4; + if (line[0] != '/') { + fprintf(stderr, "Path must start with /, found: %s\n", line); + return; + } + ptr = strchr(line, ' '); + if (!ptr) { + fprintf(stderr, "No data found after path\n"); + return; + } + *ptr = '\0'; + ptr++; + if (async) { + rc = zoo_aset(zh, line, ptr, strlen(ptr), -1, my_stat_completion, + strdup(line)); + } else { + struct Stat stat; + rc = zoo_set2(zh, line, ptr, strlen(ptr), -1, &stat); + } + if (rc) { + fprintf(stderr, "Error %d for %s\n", rc, line); + } + } else if (startsWith(line, "ls ")) { + line += 3; + if (line[0] != '/') { + fprintf(stderr, "Path must start with /, found: %s\n", line); + return; + } + gettimeofday(&startTime, 0); + rc= zoo_aget_children(zh, line, 1, my_strings_completion, strdup(line)); + if (rc) { + fprintf(stderr, "Error %d for %s\n", rc, line); + } + } else if (startsWith(line, "ls2 ")) { + line += 4; + if (line[0] != '/') { + fprintf(stderr, "Path must start with /, found: %s\n", line); + return; + } + gettimeofday(&startTime, 0); + rc= zoo_aget_children2(zh, line, 1, my_strings_stat_completion, strdup(line)); + if (rc) { + fprintf(stderr, "Error %d for %s\n", rc, line); + } + } else if (startsWith(line, "create ")) { + int flags = 0; + line += 7; + if (line[0] == '+') { + line++; + if (line[0] == 'e') { + flags |= ZOO_EPHEMERAL; + line++; + } + if (line[0] == 's') { + flags |= ZOO_SEQUENCE; + line++; + } + line++; + } + if (line[0] != '/') { + fprintf(stderr, "Path must start with /, found: %s\n", line); + return; + } + fprintf(stderr, "Creating [%s] node\n", line); +// { +// struct ACL _CREATE_ONLY_ACL_ACL[] = {{ZOO_PERM_CREATE, ZOO_ANYONE_ID_UNSAFE}}; +// struct ACL_vector CREATE_ONLY_ACL = {1,_CREATE_ONLY_ACL_ACL}; +// rc = zoo_acreate(zh, line, "new", 3, &CREATE_ONLY_ACL, flags, +// my_string_completion, strdup(line)); +// } + rc = zoo_acreate(zh, line, "new", 3, &ZOO_OPEN_ACL_UNSAFE, flags, + my_string_completion_free_data, strdup(line)); + if (rc) { + fprintf(stderr, "Error %d for %s\n", rc, line); + } + } else if (startsWith(line, "delete ")) { + line += 7; + if (line[0] != '/') { + fprintf(stderr, "Path must start with /, found: %s\n", line); + return; + } + if (async) { + rc = zoo_adelete(zh, line, -1, my_void_completion, strdup(line)); + } else { + rc = zoo_delete(zh, line, -1); + } + if (rc) { + fprintf(stderr, "Error %d for %s\n", rc, line); + } + } else if (startsWith(line, "sync ")) { + line += 5; + if (line[0] != '/') { + fprintf(stderr, "Path must start with /, found: %s\n", line); + return; + } + rc = zoo_async(zh, line, my_string_completion_free_data, strdup(line)); + if (rc) { + fprintf(stderr, "Error %d for %s\n", rc, line); + } + } else if (startsWith(line, "wexists ")) { +#ifdef THREADED + struct Stat stat; +#endif + line += 8; + if (line[0] != '/') { + fprintf(stderr, "Path must start with /, found: %s\n", line); + return; + } +#ifndef THREADED + rc = zoo_awexists(zh, line, watcher, (void*) 0, my_stat_completion, strdup(line)); +#else + rc = zoo_wexists(zh, line, watcher, (void*) 0, &stat); +#endif + if (rc) { + fprintf(stderr, "Error %d for %s\n", rc, line); + } + } else if (startsWith(line, "exists ")) { +#ifdef THREADED + struct Stat stat; +#endif + line += 7; + if (line[0] != '/') { + fprintf(stderr, "Path must start with /, found: %s\n", line); + return; + } +#ifndef THREADED + rc = zoo_aexists(zh, line, 1, my_stat_completion, strdup(line)); +#else + rc = zoo_exists(zh, line, 1, &stat); +#endif + if (rc) { + fprintf(stderr, "Error %d for %s\n", rc, line); + } + } else if (strcmp(line, "myid") == 0) { + printf("session Id = %llx\n", _LL_CAST_ zoo_client_id(zh)->client_id); + } else if (strcmp(line, "reinit") == 0) { + zookeeper_close(zh); + // we can't send myid to the server here -- zookeeper_close() removes + // the session on the server. We must start anew. + zh = zookeeper_init(hostPort, watcher, 30000, 0, 0, 0); + } else if (startsWith(line, "quit")) { + fprintf(stderr, "Quitting...\n"); + shutdownThisThing=1; + } else if (startsWith(line, "od")) { + const char val[]="fire off"; + fprintf(stderr, "Overdosing...\n"); + rc = zoo_aset(zh, "/od", val, sizeof(val)-1, -1, od_completion, 0); + if (rc) + fprintf(stderr, "od command failed: %d\n", rc); + } else if (startsWith(line, "addauth ")) { + char *ptr; + line += 8; + ptr = strchr(line, ' '); + if (ptr) { + *ptr = '\0'; + ptr++; + } + zoo_add_auth(zh, line, ptr, ptr ? strlen(ptr) : 0, NULL, NULL); + } +} + +int main(int argc, char **argv) { +#ifndef THREADED + fd_set rfds, wfds, efds; + int processed=0; +#endif + char buffer[4096]; + char p[2048]; +#ifdef YCA + char *cert=0; + char appId[64]; +#endif + int bufoff = 0; + FILE *fh; + + if (argc < 2) { + fprintf(stderr, + "USAGE %s zookeeper_host_list [clientid_file|cmd:(ls|ls2|create|od|...)]\n", + argv[0]); + fprintf(stderr, + "Version: ZooKeeper cli (c client) version %d.%d.%d\n", + ZOO_MAJOR_VERSION, + ZOO_MINOR_VERSION, + ZOO_PATCH_VERSION); + return 2; + } + if (argc > 2) { + if(strncmp("cmd:",argv[2],4)==0){ + size_t cmdlen = strlen(argv[2]); + if (cmdlen > sizeof(cmd)) { + fprintf(stderr, + "Command length %zu exceeds max length of %zu\n", + cmdlen, + sizeof(cmd)); + return 2; + } + strncpy(cmd, argv[2]+4, sizeof(cmd)); + batchMode=1; + fprintf(stderr,"Batch mode: %s\n",cmd); + }else{ + clientIdFile = argv[2]; + fh = fopen(clientIdFile, "r"); + if (fh) { + if (fread(&myid, sizeof(myid), 1, fh) != sizeof(myid)) { + memset(&myid, 0, sizeof(myid)); + } + fclose(fh); + } + } + } +#ifdef YCA + strcpy(appId,"yahoo.example.yca_test"); + cert = yca_get_cert_once(appId); + if(cert!=0) { + fprintf(stderr,"Certificate for appid [%s] is [%s]\n",appId,cert); + strncpy(p,cert,sizeof(p)-1); + free(cert); + } else { + fprintf(stderr,"Certificate for appid [%s] not found\n",appId); + strcpy(p,"dummy"); + } +#else + strcpy(p, "dummy"); +#endif + verbose = 0; + zoo_set_debug_level(ZOO_LOG_LEVEL_WARN); + zoo_deterministic_conn_order(1); // enable deterministic order + hostPort = argv[1]; + zh = zookeeper_init(hostPort, watcher, 30000, &myid, 0, 0); + if (!zh) { + return errno; + } + +#ifdef YCA + if(zoo_add_auth(zh,"yca",p,strlen(p),0,0)!=ZOK) + return 2; +#endif + +#ifdef THREADED + while(!shutdownThisThing) { + int rc; + int len = sizeof(buffer) - bufoff -1; + if (len <= 0) { + fprintf(stderr, "Can't handle lines that long!\n"); + exit(2); + } + rc = read(0, buffer+bufoff, len); + if (rc <= 0) { + fprintf(stderr, "bye\n"); + shutdownThisThing=1; + break; + } + bufoff += rc; + buffer[bufoff] = '\0'; + while (strchr(buffer, '\n')) { + char *ptr = strchr(buffer, '\n'); + *ptr = '\0'; + processline(buffer); + ptr++; + memmove(buffer, ptr, strlen(ptr)+1); + bufoff = 0; + } + } +#else + FD_ZERO(&rfds); + FD_ZERO(&wfds); + FD_ZERO(&efds); + while (!shutdownThisThing) { + int fd; + int interest; + int events; + struct timeval tv; + int rc; + zookeeper_interest(zh, &fd, &interest, &tv); + if (fd != -1) { + if (interest&ZOOKEEPER_READ) { + FD_SET(fd, &rfds); + } else { + FD_CLR(fd, &rfds); + } + if (interest&ZOOKEEPER_WRITE) { + FD_SET(fd, &wfds); + } else { + FD_CLR(fd, &wfds); + } + } else { + fd = 0; + } + FD_SET(0, &rfds); + rc = select(fd+1, &rfds, &wfds, &efds, &tv); + events = 0; + if (rc > 0) { + if (FD_ISSET(fd, &rfds)) { + events |= ZOOKEEPER_READ; + } + if (FD_ISSET(fd, &wfds)) { + events |= ZOOKEEPER_WRITE; + } + } + if(batchMode && processed==0){ + //batch mode + processline(cmd); + processed=1; + } + if (FD_ISSET(0, &rfds)) { + int rc; + int len = sizeof(buffer) - bufoff -1; + if (len <= 0) { + fprintf(stderr, "Can't handle lines that long!\n"); + exit(2); + } + rc = read(0, buffer+bufoff, len); + if (rc <= 0) { + fprintf(stderr, "bye\n"); + break; + } + bufoff += rc; + buffer[bufoff] = '\0'; + while (strchr(buffer, '\n')) { + char *ptr = strchr(buffer, '\n'); + *ptr = '\0'; + processline(buffer); + ptr++; + memmove(buffer, ptr, strlen(ptr)+1); + bufoff = 0; + } + } + zookeeper_process(zh, events); + } +#endif + if (to_send!=0) + fprintf(stderr,"Recvd %d responses for %d requests sent\n",recvd,sent); + zookeeper_close(zh); + return 0; +} diff --git a/src/c/src/hashtable/LICENSE.txt b/src/c/src/hashtable/LICENSE.txt new file mode 100644 index 0000000..674a624 --- /dev/null +++ b/src/c/src/hashtable/LICENSE.txt @@ -0,0 +1,30 @@ +Copyright (c) 2002, 2004, Christopher Clark +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + + * Neither the name of the original author; nor the names of any contributors +may be used to endorse or promote products derived from this software +without specific prior written permission. + + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/src/c/src/hashtable/hashtable.c b/src/c/src/hashtable/hashtable.c new file mode 100644 index 0000000..763357e --- /dev/null +++ b/src/c/src/hashtable/hashtable.c @@ -0,0 +1,274 @@ +/* Copyright (C) 2004 Christopher Clark */ + +#include "hashtable.h" +#include "hashtable_private.h" +#include +#include +#include +#include + +/* +Credit for primes table: Aaron Krowne + http://br.endernet.org/~akrowne/ + http://planetmath.org/encyclopedia/GoodHashTablePrimes.html +*/ +static const unsigned int primes[] = { +53, 97, 193, 389, +769, 1543, 3079, 6151, +12289, 24593, 49157, 98317, +196613, 393241, 786433, 1572869, +3145739, 6291469, 12582917, 25165843, +50331653, 100663319, 201326611, 402653189, +805306457, 1610612741 +}; +const unsigned int prime_table_length = sizeof(primes)/sizeof(primes[0]); +const float max_load_factor = 0.65; + +/*****************************************************************************/ +struct hashtable * +create_hashtable(unsigned int minsize, + unsigned int (*hashf) (void*), + int (*eqf) (void*,void*)) +{ + struct hashtable *h; + unsigned int pindex, size = primes[0]; + /* Check requested hashtable isn't too large */ + if (minsize > (1u << 30)) return NULL; + /* Enforce size as prime */ + for (pindex=0; pindex < prime_table_length; pindex++) { + if (primes[pindex] > minsize) { size = primes[pindex]; break; } + } + h = (struct hashtable *)malloc(sizeof(struct hashtable)); + if (NULL == h) return NULL; /*oom*/ + h->table = (struct entry **)malloc(sizeof(struct entry*) * size); + if (NULL == h->table) { free(h); return NULL; } /*oom*/ + memset(h->table, 0, size * sizeof(struct entry *)); + h->tablelength = size; + h->primeindex = pindex; + h->entrycount = 0; + h->hashfn = hashf; + h->eqfn = eqf; + h->loadlimit = (unsigned int) ceil(size * max_load_factor); + return h; +} + +/*****************************************************************************/ +unsigned int +hash(struct hashtable *h, void *k) +{ + /* Aim to protect against poor hash functions by adding logic here + * - logic taken from java 1.4 hashtable source */ + unsigned int i = h->hashfn(k); + i += ~(i << 9); + i ^= ((i >> 14) | (i << 18)); /* >>> */ + i += (i << 4); + i ^= ((i >> 10) | (i << 22)); /* >>> */ + return i; +} + +/*****************************************************************************/ +static int +hashtable_expand(struct hashtable *h) +{ + /* Double the size of the table to accomodate more entries */ + struct entry **newtable; + struct entry *e; + struct entry **pE; + unsigned int newsize, i, index; + /* Check we're not hitting max capacity */ + if (h->primeindex == (prime_table_length - 1)) return 0; + newsize = primes[++(h->primeindex)]; + + newtable = (struct entry **)malloc(sizeof(struct entry*) * newsize); + if (NULL != newtable) + { + memset(newtable, 0, newsize * sizeof(struct entry *)); + /* This algorithm is not 'stable'. ie. it reverses the list + * when it transfers entries between the tables */ + for (i = 0; i < h->tablelength; i++) { + while (NULL != (e = h->table[i])) { + h->table[i] = e->next; + index = indexFor(newsize,e->h); + e->next = newtable[index]; + newtable[index] = e; + } + } + free(h->table); + h->table = newtable; + } + /* Plan B: realloc instead */ + else + { + newtable = (struct entry **) + realloc(h->table, newsize * sizeof(struct entry *)); + if (NULL == newtable) { (h->primeindex)--; return 0; } + h->table = newtable; + memset(newtable[h->tablelength], 0, newsize - h->tablelength); + for (i = 0; i < h->tablelength; i++) { + for (pE = &(newtable[i]), e = *pE; e != NULL; e = *pE) { + index = indexFor(newsize,e->h); + if (index == i) + { + pE = &(e->next); + } + else + { + *pE = e->next; + e->next = newtable[index]; + newtable[index] = e; + } + } + } + } + h->tablelength = newsize; + h->loadlimit = (unsigned int) ceil(newsize * max_load_factor); + return -1; +} + +/*****************************************************************************/ +unsigned int +hashtable_count(struct hashtable *h) +{ + return h->entrycount; +} + +/*****************************************************************************/ +int +hashtable_insert(struct hashtable *h, void *k, void *v) +{ + /* This method allows duplicate keys - but they shouldn't be used */ + unsigned int index; + struct entry *e; + if (++(h->entrycount) > h->loadlimit) + { + /* Ignore the return value. If expand fails, we should + * still try cramming just this value into the existing table + * -- we may not have memory for a larger table, but one more + * element may be ok. Next time we insert, we'll try expanding again.*/ + hashtable_expand(h); + } + e = (struct entry *)malloc(sizeof(struct entry)); + if (NULL == e) { --(h->entrycount); return 0; } /*oom*/ + e->h = hash(h,k); + index = indexFor(h->tablelength,e->h); + e->k = k; + e->v = v; + e->next = h->table[index]; + h->table[index] = e; + return -1; +} + +/*****************************************************************************/ +void * /* returns value associated with key */ +hashtable_search(struct hashtable *h, void *k) +{ + struct entry *e; + unsigned int hashvalue, index; + hashvalue = hash(h,k); + index = indexFor(h->tablelength,hashvalue); + e = h->table[index]; + while (NULL != e) + { + /* Check hash value to short circuit heavier comparison */ + if ((hashvalue == e->h) && (h->eqfn(k, e->k))) return e->v; + e = e->next; + } + return NULL; +} + +/*****************************************************************************/ +void * /* returns value associated with key */ +hashtable_remove(struct hashtable *h, void *k) +{ + /* TODO: consider compacting the table when the load factor drops enough, + * or provide a 'compact' method. */ + + struct entry *e; + struct entry **pE; + void *v; + unsigned int hashvalue, index; + + hashvalue = hash(h,k); + index = indexFor(h->tablelength,hash(h,k)); + pE = &(h->table[index]); + e = *pE; + while (NULL != e) + { + /* Check hash value to short circuit heavier comparison */ + if ((hashvalue == e->h) && (h->eqfn(k, e->k))) + { + *pE = e->next; + h->entrycount--; + v = e->v; + freekey(e->k); + free(e); + return v; + } + pE = &(e->next); + e = e->next; + } + return NULL; +} + +/*****************************************************************************/ +/* destroy */ +void +hashtable_destroy(struct hashtable *h, int free_values) +{ + unsigned int i; + struct entry *e, *f; + struct entry **table = h->table; + if (free_values) + { + for (i = 0; i < h->tablelength; i++) + { + e = table[i]; + while (NULL != e) + { f = e; e = e->next; freekey(f->k); free(f->v); free(f); } + } + } + else + { + for (i = 0; i < h->tablelength; i++) + { + e = table[i]; + while (NULL != e) + { f = e; e = e->next; freekey(f->k); free(f); } + } + } + free(h->table); + free(h); +} + +/* + * Copyright (c) 2002, Christopher Clark + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of the original author; nor the names of any contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ diff --git a/src/c/src/hashtable/hashtable.h b/src/c/src/hashtable/hashtable.h new file mode 100644 index 0000000..cbead18 --- /dev/null +++ b/src/c/src/hashtable/hashtable.h @@ -0,0 +1,209 @@ +/* Copyright (C) 2002 Christopher Clark */ + +#ifndef __HASHTABLE_CWC22_H__ +#define __HASHTABLE_CWC22_H__ +#ifdef WIN32 +#include "winconfig.h" +#endif +#ifdef __cplusplus +extern "C" { +#endif + +struct hashtable; + +/* Example of use: + * + * struct hashtable *h; + * struct some_key *k; + * struct some_value *v; + * + * static unsigned int hash_from_key_fn( void *k ); + * static int keys_equal_fn ( void *key1, void *key2 ); + * + * h = create_hashtable(16, hash_from_key_fn, keys_equal_fn); + * k = (struct some_key *) malloc(sizeof(struct some_key)); + * v = (struct some_value *) malloc(sizeof(struct some_value)); + * + * (initialise k and v to suitable values) + * + * if (! hashtable_insert(h,k,v) ) + * { exit(-1); } + * + * if (NULL == (found = hashtable_search(h,k) )) + * { printf("not found!"); } + * + * if (NULL == (found = hashtable_remove(h,k) )) + * { printf("Not found\n"); } + * + */ + +/* Macros may be used to define type-safe(r) hashtable access functions, with + * methods specialized to take known key and value types as parameters. + * + * Example: + * + * Insert this at the start of your file: + * + * DEFINE_HASHTABLE_INSERT(insert_some, struct some_key, struct some_value); + * DEFINE_HASHTABLE_SEARCH(search_some, struct some_key, struct some_value); + * DEFINE_HASHTABLE_REMOVE(remove_some, struct some_key, struct some_value); + * + * This defines the functions 'insert_some', 'search_some' and 'remove_some'. + * These operate just like hashtable_insert etc., with the same parameters, + * but their function signatures have 'struct some_key *' rather than + * 'void *', and hence can generate compile time errors if your program is + * supplying incorrect data as a key (and similarly for value). + * + * Note that the hash and key equality functions passed to create_hashtable + * still take 'void *' parameters instead of 'some key *'. This shouldn't be + * a difficult issue as they're only defined and passed once, and the other + * functions will ensure that only valid keys are supplied to them. + * + * The cost for this checking is increased code size and runtime overhead + * - if performance is important, it may be worth switching back to the + * unsafe methods once your program has been debugged with the safe methods. + * This just requires switching to some simple alternative defines - eg: + * #define insert_some hashtable_insert + * + */ + +/***************************************************************************** + * create_hashtable + + * @name create_hashtable + * @param minsize minimum initial size of hashtable + * @param hashfunction function for hashing keys + * @param key_eq_fn function for determining key equality + * @return newly created hashtable or NULL on failure + */ + +struct hashtable * +create_hashtable(unsigned int minsize, + unsigned int (*hashfunction) (void*), + int (*key_eq_fn) (void*,void*)); + +/***************************************************************************** + * hashtable_insert + + * @name hashtable_insert + * @param h the hashtable to insert into + * @param k the key - hashtable claims ownership and will free on removal + * @param v the value - does not claim ownership + * @return non-zero for successful insertion + * + * This function will cause the table to expand if the insertion would take + * the ratio of entries to table size over the maximum load factor. + * + * This function does not check for repeated insertions with a duplicate key. + * The value returned when using a duplicate key is undefined -- when + * the hashtable changes size, the order of retrieval of duplicate key + * entries is reversed. + * If in doubt, remove before insert. + */ + +int +hashtable_insert(struct hashtable *h, void *k, void *v); + +#define DEFINE_HASHTABLE_INSERT(fnname, keytype, valuetype) \ +int fnname (struct hashtable *h, keytype *k, valuetype *v) \ +{ \ + return hashtable_insert(h,k,v); \ +} + +/***************************************************************************** + * hashtable_search + + * @name hashtable_search + * @param h the hashtable to search + * @param k the key to search for - does not claim ownership + * @return the value associated with the key, or NULL if none found + */ + +void * +hashtable_search(struct hashtable *h, void *k); + +#define DEFINE_HASHTABLE_SEARCH(fnname, keytype, valuetype) \ +valuetype * fnname (struct hashtable *h, keytype *k) \ +{ \ + return (valuetype *) (hashtable_search(h,k)); \ +} + +/***************************************************************************** + * hashtable_remove + + * @name hashtable_remove + * @param h the hashtable to remove the item from + * @param k the key to search for - does not claim ownership + * @return the value associated with the key, or NULL if none found + */ + +void * /* returns value */ +hashtable_remove(struct hashtable *h, void *k); + +#define DEFINE_HASHTABLE_REMOVE(fnname, keytype, valuetype) \ +valuetype * fnname (struct hashtable *h, keytype *k) \ +{ \ + return (valuetype *) (hashtable_remove(h,k)); \ +} + + +/***************************************************************************** + * hashtable_count + + * @name hashtable_count + * @param h the hashtable + * @return the number of items stored in the hashtable + */ +unsigned int +hashtable_count(struct hashtable *h); + + +/***************************************************************************** + * hashtable_destroy + + * @name hashtable_destroy + * @param h the hashtable + * @param free_values whether to call 'free' on the remaining values + */ + +void +hashtable_destroy(struct hashtable *h, int free_values); + +#ifdef __cplusplus +} +#endif + +#endif /* __HASHTABLE_CWC22_H__ */ + +/* + * Copyright (c) 2002, Christopher Clark + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of the original author; nor the names of any contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ diff --git a/src/c/src/hashtable/hashtable_itr.c b/src/c/src/hashtable/hashtable_itr.c new file mode 100644 index 0000000..defac69 --- /dev/null +++ b/src/c/src/hashtable/hashtable_itr.c @@ -0,0 +1,176 @@ +/* Copyright (C) 2002, 2004 Christopher Clark */ + +#include "hashtable.h" +#include "hashtable_private.h" +#include "hashtable_itr.h" +#include /* defines NULL */ + +/*****************************************************************************/ +/* hashtable_iterator - iterator constructor */ + +struct hashtable_itr * +hashtable_iterator(struct hashtable *h) +{ + unsigned int i, tablelength; + struct hashtable_itr *itr = (struct hashtable_itr *) + malloc(sizeof(struct hashtable_itr)); + if (NULL == itr) return NULL; + itr->h = h; + itr->e = NULL; + itr->parent = NULL; + tablelength = h->tablelength; + itr->index = tablelength; + if (0 == h->entrycount) return itr; + + for (i = 0; i < tablelength; i++) + { + if (NULL != h->table[i]) + { + itr->e = h->table[i]; + itr->index = i; + break; + } + } + return itr; +} + +/*****************************************************************************/ +/* advance - advance the iterator to the next element + * returns zero if advanced to end of table */ + +int +hashtable_iterator_advance(struct hashtable_itr *itr) +{ + unsigned int j,tablelength; + struct entry **table; + struct entry *next; + if (NULL == itr->e) return 0; /* stupidity check */ + + next = itr->e->next; + if (NULL != next) + { + itr->parent = itr->e; + itr->e = next; + return -1; + } + tablelength = itr->h->tablelength; + itr->parent = NULL; + if (tablelength <= (j = ++(itr->index))) + { + itr->e = NULL; + return 0; + } + table = itr->h->table; + while (NULL == (next = table[j])) + { + if (++j >= tablelength) + { + itr->index = tablelength; + itr->e = NULL; + return 0; + } + } + itr->index = j; + itr->e = next; + return -1; +} + +/*****************************************************************************/ +/* remove - remove the entry at the current iterator position + * and advance the iterator, if there is a successive + * element. + * If you want the value, read it before you remove: + * beware memory leaks if you don't. + * Returns zero if end of iteration. */ + +int +hashtable_iterator_remove(struct hashtable_itr *itr) +{ + struct entry *remember_e, *remember_parent; + int ret; + + /* Do the removal */ + if (NULL == (itr->parent)) + { + /* element is head of a chain */ + itr->h->table[itr->index] = itr->e->next; + } else { + /* element is mid-chain */ + itr->parent->next = itr->e->next; + } + /* itr->e is now outside the hashtable */ + remember_e = itr->e; + itr->h->entrycount--; + freekey(remember_e->k); + + /* Advance the iterator, correcting the parent */ + remember_parent = itr->parent; + ret = hashtable_iterator_advance(itr); + if (itr->parent == remember_e) { itr->parent = remember_parent; } + free(remember_e); + return ret; +} + +/*****************************************************************************/ +int /* returns zero if not found */ +hashtable_iterator_search(struct hashtable_itr *itr, + struct hashtable *h, void *k) +{ + struct entry *e, *parent; + unsigned int hashvalue, index; + + hashvalue = hash(h,k); + index = indexFor(h->tablelength,hashvalue); + + e = h->table[index]; + parent = NULL; + while (NULL != e) + { + /* Check hash value to short circuit heavier comparison */ + if ((hashvalue == e->h) && (h->eqfn(k, e->k))) + { + itr->index = index; + itr->e = e; + itr->parent = parent; + itr->h = h; + return -1; + } + parent = e; + e = e->next; + } + return 0; +} + + +/* + * Copyright (c) 2002, 2004, Christopher Clark + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of the original author; nor the names of any contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ diff --git a/src/c/src/hashtable/hashtable_itr.h b/src/c/src/hashtable/hashtable_itr.h new file mode 100644 index 0000000..30379c7 --- /dev/null +++ b/src/c/src/hashtable/hashtable_itr.h @@ -0,0 +1,119 @@ +/* Copyright (C) 2002, 2004 Christopher Clark */ + +#ifndef __HASHTABLE_ITR_CWC22__ +#define __HASHTABLE_ITR_CWC22__ +#include "hashtable.h" +#include "hashtable_private.h" /* needed to enable inlining */ + +#ifdef __cplusplus +extern "C" { +#endif + +/*****************************************************************************/ +/* This struct is only concrete here to allow the inlining of two of the + * accessor functions. */ +struct hashtable_itr +{ + struct hashtable *h; + struct entry *e; + struct entry *parent; + unsigned int index; +}; + + +/*****************************************************************************/ +/* hashtable_iterator + */ + +struct hashtable_itr * +hashtable_iterator(struct hashtable *h); + +/*****************************************************************************/ +/* hashtable_iterator_key + * - return the value of the (key,value) pair at the current position */ + +static inline void * +hashtable_iterator_key(struct hashtable_itr *i) +{ + return i->e->k; +} + +/*****************************************************************************/ +/* value - return the value of the (key,value) pair at the current position */ + +static inline void * +hashtable_iterator_value(struct hashtable_itr *i) +{ + return i->e->v; +} + +/*****************************************************************************/ +/* advance - advance the iterator to the next element + * returns zero if advanced to end of table */ + +int +hashtable_iterator_advance(struct hashtable_itr *itr); + +/*****************************************************************************/ +/* remove - remove current element and advance the iterator to the next element + * NB: if you need the value to free it, read it before + * removing. ie: beware memory leaks! + * returns zero if advanced to end of table */ + +int +hashtable_iterator_remove(struct hashtable_itr *itr); + +/*****************************************************************************/ +/* search - overwrite the supplied iterator, to point to the entry + * matching the supplied key. + h points to the hashtable to be searched. + * returns zero if not found. */ +int +hashtable_iterator_search(struct hashtable_itr *itr, + struct hashtable *h, void *k); + +#define DEFINE_HASHTABLE_ITERATOR_SEARCH(fnname, keytype) \ +int fnname (struct hashtable_itr *i, struct hashtable *h, keytype *k) \ +{ \ + return (hashtable_iterator_search(i,h,k)); \ +} + + +#ifdef __cplusplus +} +#endif + +#endif /* __HASHTABLE_ITR_CWC22__*/ + +/* + * Copyright (c) 2002, 2004, Christopher Clark + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of the original author; nor the names of any contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ diff --git a/src/c/src/hashtable/hashtable_private.h b/src/c/src/hashtable/hashtable_private.h new file mode 100644 index 0000000..3e95f60 --- /dev/null +++ b/src/c/src/hashtable/hashtable_private.h @@ -0,0 +1,85 @@ +/* Copyright (C) 2002, 2004 Christopher Clark */ + +#ifndef __HASHTABLE_PRIVATE_CWC22_H__ +#define __HASHTABLE_PRIVATE_CWC22_H__ + +#include "hashtable.h" + +/*****************************************************************************/ +struct entry +{ + void *k, *v; + unsigned int h; + struct entry *next; +}; + +struct hashtable { + unsigned int tablelength; + struct entry **table; + unsigned int entrycount; + unsigned int loadlimit; + unsigned int primeindex; + unsigned int (*hashfn) (void *k); + int (*eqfn) (void *k1, void *k2); +}; + +/*****************************************************************************/ +unsigned int +hash(struct hashtable *h, void *k); + +/*****************************************************************************/ +/* indexFor */ +static inline unsigned int +indexFor(unsigned int tablelength, unsigned int hashvalue) { + return (hashvalue % tablelength); +}; + +/* Only works if tablelength == 2^N */ +/*static inline unsigned int +indexFor(unsigned int tablelength, unsigned int hashvalue) +{ + return (hashvalue & (tablelength - 1u)); +} +*/ + +/*****************************************************************************/ +#define freekey(X) free(X) +/*define freekey(X) ; */ + + +/*****************************************************************************/ + +#endif /* __HASHTABLE_PRIVATE_CWC22_H__*/ + +/* + * Copyright (c) 2002, Christopher Clark + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of the original author; nor the names of any contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ diff --git a/src/c/src/load_gen.c b/src/c/src/load_gen.c new file mode 100644 index 0000000..546d5d1 --- /dev/null +++ b/src/c/src/load_gen.c @@ -0,0 +1,282 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include "zookeeper_log.h" +#include +#ifdef THREADED +#include +#endif +#include +#include + +static zhandle_t *zh; + +static int shutdownThisThing=0; + +// ***************************************************************************** +// +static pthread_cond_t cond=PTHREAD_COND_INITIALIZER; +static pthread_mutex_t lock=PTHREAD_MUTEX_INITIALIZER; + +static pthread_cond_t counterCond=PTHREAD_COND_INITIALIZER; +static pthread_mutex_t counterLock=PTHREAD_MUTEX_INITIALIZER; +static int counter; + + + +void ensureConnected(){ + pthread_mutex_lock(&lock); + while (zoo_state(zh)!=ZOO_CONNECTED_STATE) { + pthread_cond_wait(&cond,&lock); + } + pthread_mutex_unlock(&lock); +} + +void incCounter(int delta){ + pthread_mutex_lock(&counterLock); + counter+=delta; + pthread_cond_broadcast(&counterCond); + pthread_mutex_unlock(&counterLock); + +} +void setCounter(int cnt){ + pthread_mutex_lock(&counterLock); + counter=cnt; + pthread_cond_broadcast(&counterCond); + pthread_mutex_unlock(&counterLock); + +} +void waitCounter(){ + pthread_mutex_lock(&counterLock); + while (counter>0) { + pthread_cond_wait(&counterCond,&counterLock); + } + pthread_mutex_unlock(&counterLock); +} + +void listener(zhandle_t *zzh, int type, int state, const char *path,void* ctx) { + if(type == ZOO_SESSION_EVENT){ + if(state == ZOO_CONNECTED_STATE){ + pthread_mutex_lock(&lock); + pthread_cond_broadcast(&cond); + pthread_mutex_unlock(&lock); + } + setCounter(0); + } +} + +void create_completion(int rc, const char *name, const void *data) { + incCounter(-1); + if(rc!=ZOK){ + LOG_ERROR(("Failed to create a node rc=%d",rc)); + } +} + +int doCreateNodes(const char* root, int count){ + char nodeName[1024]; + int i; + for(i=0; idata) { + int32_t i; + for(i=0;icount; i++) { + free(v->data[i]); + } + free(v->data); + v->data = 0; + } + return 0; +} + +static int deletedCounter; + +int recursiveDelete(const char* root){ + struct String_vector children; + int i; + int rc=zoo_get_children(zh,root,0,&children); + if(rc!=ZNONODE){ + if(rc!=ZOK){ + LOG_ERROR(("Failed to get children of %s, rc=%d",root,rc)); + return rc; + } + for(i=0;i +#include +#include +#include +#include +#include + +#ifndef WIN32 +#include +#include +#include +#include +#endif + +int zoo_lock_auth(zhandle_t *zh) +{ + return pthread_mutex_lock(&zh->auth_h.lock); +} +int zoo_unlock_auth(zhandle_t *zh) +{ + return pthread_mutex_unlock(&zh->auth_h.lock); +} +int lock_buffer_list(buffer_head_t *l) +{ + return pthread_mutex_lock(&l->lock); +} +int unlock_buffer_list(buffer_head_t *l) +{ + return pthread_mutex_unlock(&l->lock); +} +int lock_completion_list(completion_head_t *l) +{ + return pthread_mutex_lock(&l->lock); +} +int unlock_completion_list(completion_head_t *l) +{ + pthread_cond_broadcast(&l->cond); + return pthread_mutex_unlock(&l->lock); +} +struct sync_completion *alloc_sync_completion(void) +{ + struct sync_completion *sc = (struct sync_completion*)calloc(1, sizeof(struct sync_completion)); + if (sc) { + pthread_cond_init(&sc->cond, 0); + pthread_mutex_init(&sc->lock, 0); + } + return sc; +} +int wait_sync_completion(struct sync_completion *sc) +{ + pthread_mutex_lock(&sc->lock); + while (!sc->complete) { + pthread_cond_wait(&sc->cond, &sc->lock); + } + pthread_mutex_unlock(&sc->lock); + return 0; +} + +void free_sync_completion(struct sync_completion *sc) +{ + if (sc) { + pthread_mutex_destroy(&sc->lock); + pthread_cond_destroy(&sc->cond); + free(sc); + } +} + +void notify_sync_completion(struct sync_completion *sc) +{ + pthread_mutex_lock(&sc->lock); + sc->complete = 1; + pthread_cond_broadcast(&sc->cond); + pthread_mutex_unlock(&sc->lock); +} + +int process_async(int outstanding_sync) +{ + return 0; +} + +#ifdef WIN32 +unsigned __stdcall do_io( void * ); +unsigned __stdcall do_completion( void * ); + +int handle_error(SOCKET sock, char* message) +{ + LOG_ERROR(("%s. %d",message, WSAGetLastError())); + closesocket (sock); + return -1; +} + +//--create socket pair for interupting selects. +int create_socket_pair(SOCKET fds[2]) +{ + struct sockaddr_in inaddr; + struct sockaddr addr; + int yes=1; + int len=0; + + SOCKET lst=socket(AF_INET, SOCK_STREAM,IPPROTO_TCP); + if (lst == INVALID_SOCKET ){ + LOG_ERROR(("Error creating socket. %d",WSAGetLastError())); + return -1; + } + memset(&inaddr, 0, sizeof(inaddr)); + memset(&addr, 0, sizeof(addr)); + inaddr.sin_family = AF_INET; + inaddr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); + inaddr.sin_port = 0; //--system assigns the port + + if ( setsockopt(lst,SOL_SOCKET,SO_REUSEADDR,(char*)&yes,sizeof(yes)) == SOCKET_ERROR ) { + return handle_error(lst,"Error trying to set socket option."); + } + if (bind(lst,(struct sockaddr *)&inaddr,sizeof(inaddr)) == SOCKET_ERROR){ + return handle_error(lst,"Error trying to bind socket."); + } + if (listen(lst,1) == SOCKET_ERROR){ + return handle_error(lst,"Error trying to listen on socket."); + } + len=sizeof(inaddr); + getsockname(lst, &addr,&len); + fds[0]=socket(AF_INET, SOCK_STREAM,0); + if (connect(fds[0],&addr,len) == SOCKET_ERROR){ + return handle_error(lst, "Error while connecting to socket."); + } + if ((fds[1]=accept(lst,0,0)) == INVALID_SOCKET){ + closesocket(fds[0]); + return handle_error(lst, "Error while accepting socket connection."); + } + closesocket(lst); + return 0; +} +#else +void *do_io(void *); +void *do_completion(void *); +#endif + + +int wakeup_io_thread(zhandle_t *zh); + +#ifdef WIN32 +static int set_nonblock(SOCKET fd){ + ULONG nonblocking_flag = 1; + if (ioctlsocket(fd, FIONBIO, &nonblocking_flag) == 0) + return 1; + else + return -1; +} +#else +static int set_nonblock(int fd){ + long l = fcntl(fd, F_GETFL); + if(l & O_NONBLOCK) return 0; + return fcntl(fd, F_SETFL, l | O_NONBLOCK); +} +#endif + +void wait_for_others(zhandle_t* zh) +{ + struct adaptor_threads* adaptor=zh->adaptor_priv; + pthread_mutex_lock(&adaptor->lock); + while(adaptor->threadsToWait>0) + pthread_cond_wait(&adaptor->cond,&adaptor->lock); + pthread_mutex_unlock(&adaptor->lock); +} + +void notify_thread_ready(zhandle_t* zh) +{ + struct adaptor_threads* adaptor=zh->adaptor_priv; + pthread_mutex_lock(&adaptor->lock); + adaptor->threadsToWait--; + pthread_cond_broadcast(&adaptor->cond); + while(adaptor->threadsToWait>0) + pthread_cond_wait(&adaptor->cond,&adaptor->lock); + pthread_mutex_unlock(&adaptor->lock); +} + + +void start_threads(zhandle_t* zh) +{ + int rc = 0; + struct adaptor_threads* adaptor=zh->adaptor_priv; + pthread_cond_init(&adaptor->cond,0); + pthread_mutex_init(&adaptor->lock,0); + adaptor->threadsToWait=2; // wait for 2 threads before opening the barrier + + // use api_prolog() to make sure zhandle doesn't get destroyed + // while initialization is in progress + api_prolog(zh); + LOG_DEBUG(("starting threads...")); + rc=pthread_create(&adaptor->io, 0, do_io, zh); + assert("pthread_create() failed for the IO thread"&&!rc); + rc=pthread_create(&adaptor->completion, 0, do_completion, zh); + assert("pthread_create() failed for the completion thread"&&!rc); + wait_for_others(zh); + api_epilog(zh, 0); +} + +int adaptor_init(zhandle_t *zh) +{ + pthread_mutexattr_t recursive_mx_attr; + struct adaptor_threads *adaptor_threads = calloc(1, sizeof(*adaptor_threads)); + if (!adaptor_threads) { + LOG_ERROR(("Out of memory")); + return -1; + } + + /* We use a pipe for interrupting select() in unix/sol and socketpair in windows. */ +#ifdef WIN32 + if (create_socket_pair(adaptor_threads->self_pipe) == -1){ + LOG_ERROR(("Can't make a socket.")); +#else + if(pipe(adaptor_threads->self_pipe)==-1) { + LOG_ERROR(("Can't make a pipe %d",errno)); +#endif + free(adaptor_threads); + return -1; + } + set_nonblock(adaptor_threads->self_pipe[1]); + set_nonblock(adaptor_threads->self_pipe[0]); + + pthread_mutex_init(&zh->auth_h.lock,0); + + zh->adaptor_priv = adaptor_threads; + pthread_mutex_init(&zh->to_process.lock,0); + pthread_mutex_init(&adaptor_threads->zh_lock,0); + // to_send must be recursive mutex + pthread_mutexattr_init(&recursive_mx_attr); + pthread_mutexattr_settype(&recursive_mx_attr, PTHREAD_MUTEX_RECURSIVE); + pthread_mutex_init(&zh->to_send.lock,&recursive_mx_attr); + pthread_mutexattr_destroy(&recursive_mx_attr); + + pthread_mutex_init(&zh->sent_requests.lock,0); + pthread_cond_init(&zh->sent_requests.cond,0); + pthread_mutex_init(&zh->completions_to_process.lock,0); + pthread_cond_init(&zh->completions_to_process.cond,0); + start_threads(zh); + return 0; +} + +void adaptor_finish(zhandle_t *zh) +{ + struct adaptor_threads *adaptor_threads; + // make sure zh doesn't get destroyed until after we're done here + api_prolog(zh); + adaptor_threads = zh->adaptor_priv; + if(adaptor_threads==0) { + api_epilog(zh,0); + return; + } + + if(!pthread_equal(adaptor_threads->io,pthread_self())){ + wakeup_io_thread(zh); + pthread_join(adaptor_threads->io, 0); + }else + pthread_detach(adaptor_threads->io); + + if(!pthread_equal(adaptor_threads->completion,pthread_self())){ + pthread_mutex_lock(&zh->completions_to_process.lock); + pthread_cond_broadcast(&zh->completions_to_process.cond); + pthread_mutex_unlock(&zh->completions_to_process.lock); + pthread_join(adaptor_threads->completion, 0); + }else + pthread_detach(adaptor_threads->completion); + + api_epilog(zh,0); +} + +void adaptor_destroy(zhandle_t *zh) +{ + struct adaptor_threads *adaptor = zh->adaptor_priv; + if(adaptor==0) return; + + pthread_cond_destroy(&adaptor->cond); + pthread_mutex_destroy(&adaptor->lock); + pthread_mutex_destroy(&zh->to_process.lock); + pthread_mutex_destroy(&zh->to_send.lock); + pthread_mutex_destroy(&zh->sent_requests.lock); + pthread_cond_destroy(&zh->sent_requests.cond); + pthread_mutex_destroy(&zh->completions_to_process.lock); + pthread_cond_destroy(&zh->completions_to_process.cond); + pthread_mutex_destroy(&adaptor->zh_lock); + + pthread_mutex_destroy(&zh->auth_h.lock); + + close(adaptor->self_pipe[0]); + close(adaptor->self_pipe[1]); + free(adaptor); + zh->adaptor_priv=0; +} + +int wakeup_io_thread(zhandle_t *zh) +{ + struct adaptor_threads *adaptor_threads = zh->adaptor_priv; + char c=0; +#ifndef WIN32 + return write(adaptor_threads->self_pipe[1],&c,1)==1? ZOK: ZSYSTEMERROR; +#else + return send(adaptor_threads->self_pipe[1], &c, 1, 0)==1? ZOK: ZSYSTEMERROR; +#endif +} + +int adaptor_send_queue(zhandle_t *zh, int timeout) +{ + if(!zh->close_requested) + return wakeup_io_thread(zh); + // don't rely on the IO thread to send the messages if the app has + // requested to close + return flush_send_queue(zh, timeout); +} + +/* These two are declared here because we will run the event loop + * and not the client */ +#ifdef WIN32 +int zookeeper_interest(zhandle_t *zh, SOCKET *fd, int *interest, + struct timeval *tv); +#else +int zookeeper_interest(zhandle_t *zh, int *fd, int *interest, + struct timeval *tv); +#endif +int zookeeper_process(zhandle_t *zh, int events); + +#ifdef WIN32 +unsigned __stdcall do_io( void * v) +#else +void *do_io(void *v) +#endif +{ + zhandle_t *zh = (zhandle_t*)v; +#ifndef WIN32 + struct pollfd fds[2]; + struct adaptor_threads *adaptor_threads = zh->adaptor_priv; + + api_prolog(zh); + notify_thread_ready(zh); + LOG_DEBUG(("started IO thread")); + fds[0].fd=adaptor_threads->self_pipe[0]; + fds[0].events=POLLIN; + while(!zh->close_requested) { + struct timeval tv; + int fd; + int interest; + int timeout; + int maxfd=1; + + zookeeper_interest(zh, &fd, &interest, &tv); + if (fd != -1) { + fds[1].fd=fd; + fds[1].events=(interest&ZOOKEEPER_READ)?POLLIN:0; + fds[1].events|=(interest&ZOOKEEPER_WRITE)?POLLOUT:0; + maxfd=2; + } + timeout=tv.tv_sec * 1000 + (tv.tv_usec/1000); + + poll(fds,maxfd,timeout); + if (fd != -1) { + interest=(fds[1].revents&POLLIN)?ZOOKEEPER_READ:0; + interest|=((fds[1].revents&POLLOUT)||(fds[1].revents&POLLHUP))?ZOOKEEPER_WRITE:0; + } + if(fds[0].revents&POLLIN){ + // flush the pipe + char b[128]; + while(read(adaptor_threads->self_pipe[0],b,sizeof(b))==sizeof(b)){} + } +#else + fd_set rfds, wfds, efds; + struct adaptor_threads *adaptor_threads = zh->adaptor_priv; + api_prolog(zh); + notify_thread_ready(zh); + LOG_DEBUG(("started IO thread")); + FD_ZERO(&rfds); FD_ZERO(&wfds); FD_ZERO(&efds); + while(!zh->close_requested) { + struct timeval tv; + SOCKET fd; + SOCKET maxfd=adaptor_threads->self_pipe[0]; + int interest; + int rc; + + zookeeper_interest(zh, &fd, &interest, &tv); + if (fd != -1) { + if (interest&ZOOKEEPER_READ) { + FD_SET(fd, &rfds); + } else { + FD_CLR(fd, &rfds); + } + if (interest&ZOOKEEPER_WRITE) { + FD_SET(fd, &wfds); + } else { + FD_CLR(fd, &wfds); + } + } + FD_SET( adaptor_threads->self_pipe[0] ,&rfds ); + rc = select((int)maxfd, &rfds, &wfds, &efds, &tv); + if (fd != -1) + { + interest = (FD_ISSET(fd, &rfds))? ZOOKEEPER_READ:0; + interest|= (FD_ISSET(fd, &wfds))? ZOOKEEPER_WRITE:0; + } + + if (FD_ISSET(adaptor_threads->self_pipe[0], &rfds)){ + // flush the pipe/socket + char b[128]; + while(recv(adaptor_threads->self_pipe[0],b,sizeof(b), 0)==sizeof(b)){} + } +#endif + // dispatch zookeeper events + zookeeper_process(zh, interest); + // check the current state of the zhandle and terminate + // if it is_unrecoverable() + if(is_unrecoverable(zh)) + break; + } + api_epilog(zh, 0); + LOG_DEBUG(("IO thread terminated")); + return 0; +} + +#ifdef WIN32 +unsigned __stdcall do_completion( void * v) +#else +void *do_completion(void *v) +#endif +{ + zhandle_t *zh = v; + api_prolog(zh); + notify_thread_ready(zh); + LOG_DEBUG(("started completion thread")); + while(!zh->close_requested) { + pthread_mutex_lock(&zh->completions_to_process.lock); + while(!zh->completions_to_process.head && !zh->close_requested) { + pthread_cond_wait(&zh->completions_to_process.cond, &zh->completions_to_process.lock); + } + pthread_mutex_unlock(&zh->completions_to_process.lock); + process_completions(zh); + } + api_epilog(zh, 0); + LOG_DEBUG(("completion thread terminated")); + return 0; +} + +int32_t inc_ref_counter(zhandle_t* zh,int i) +{ + int incr=(i<0?-1:(i>0?1:0)); + // fetch_and_add implements atomic post-increment + int v=fetch_and_add(&zh->ref_counter,incr); + // inc_ref_counter wants pre-increment + v+=incr; // simulate pre-increment + return v; +} + +int32_t fetch_and_add(volatile int32_t* operand, int incr) +{ +#ifndef WIN32 + return __sync_fetch_and_add(operand, incr); +#else + return InterlockedExchangeAdd(operand, incr); +#endif +} + +// make sure the static xid is initialized before any threads started +__attribute__((constructor)) int32_t get_xid() +{ + static int32_t xid = -1; + if (xid == -1) { + xid = time(0); + } + return fetch_and_add(&xid,1); +} + +int enter_critical(zhandle_t* zh) +{ + struct adaptor_threads *adaptor = zh->adaptor_priv; + if (adaptor) { + return pthread_mutex_lock(&adaptor->zh_lock); + } else { + return 0; + } +} + +int leave_critical(zhandle_t* zh) +{ + struct adaptor_threads *adaptor = zh->adaptor_priv; + if (adaptor) { + return pthread_mutex_unlock(&adaptor->zh_lock); + } else { + return 0; + } +} diff --git a/src/c/src/recordio.c b/src/c/src/recordio.c new file mode 100644 index 0000000..0fcf48e --- /dev/null +++ b/src/c/src/recordio.c @@ -0,0 +1,366 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include +#include +#include +#ifndef WIN32 +#include +#else +#include /* for _htonl and _ntohl */ +#endif + +void deallocate_String(char **s) +{ + if (*s) + free(*s); + *s = 0; +} + +void deallocate_Buffer(struct buffer *b) +{ + if (b->buff) + free(b->buff); + b->buff = 0; +} + +struct buff_struct { + int32_t len; + int32_t off; + char *buffer; +}; + +static int resize_buffer(struct buff_struct *s, int newlen) +{ + char *buffer= NULL; + while (s->len < newlen) { + s->len *= 2; + } + buffer = (char*)realloc(s->buffer, s->len); + if (!buffer) { + s->buffer = 0; + return -ENOMEM; + } + s->buffer = buffer; + return 0; +} + +int oa_start_record(struct oarchive *oa, const char *tag) +{ + return 0; +} +int oa_end_record(struct oarchive *oa, const char *tag) +{ + return 0; +} +int oa_serialize_int(struct oarchive *oa, const char *tag, const int32_t *d) +{ + struct buff_struct *priv = oa->priv; + int32_t i = htonl(*d); + if ((priv->len - priv->off) < sizeof(i)) { + int rc = resize_buffer(priv, priv->len + sizeof(i)); + if (rc < 0) return rc; + } + memcpy(priv->buffer+priv->off, &i, sizeof(i)); + priv->off+=sizeof(i); + return 0; +} +int64_t zoo_htonll(int64_t v) +{ + int i = 0; + char *s = (char *)&v; + if (htonl(1) == 1) { + return v; + } + for (i = 0; i < 4; i++) { + int tmp = s[i]; + s[i] = s[8-i-1]; + s[8-i-1] = tmp; + } + + return v; +} + +int oa_serialize_long(struct oarchive *oa, const char *tag, const int64_t *d) +{ + const int64_t i = zoo_htonll(*d); + struct buff_struct *priv = oa->priv; + if ((priv->len - priv->off) < sizeof(i)) { + int rc = resize_buffer(priv, priv->len + sizeof(i)); + if (rc < 0) return rc; + } + memcpy(priv->buffer+priv->off, &i, sizeof(i)); + priv->off+=sizeof(i); + return 0; +} +int oa_start_vector(struct oarchive *oa, const char *tag, const int32_t *count) +{ + return oa_serialize_int(oa, tag, count); +} +int oa_end_vector(struct oarchive *oa, const char *tag) +{ + return 0; +} +int oa_serialize_bool(struct oarchive *oa, const char *name, const int32_t *i) +{ + //return oa_serialize_int(oa, name, i); + struct buff_struct *priv = oa->priv; + if ((priv->len - priv->off) < 1) { + int rc = resize_buffer(priv, priv->len + 1); + if (rc < 0) + return rc; + } + priv->buffer[priv->off] = (*i == 0 ? '\0' : '\1'); + priv->off++; + return 0; +} +static const int32_t negone = -1; +int oa_serialize_buffer(struct oarchive *oa, const char *name, + const struct buffer *b) +{ + struct buff_struct *priv = oa->priv; + int rc; + if (!b) { + return oa_serialize_int(oa, "len", &negone); + } + rc = oa_serialize_int(oa, "len", &b->len); + if (rc < 0) + return rc; + // this means a buffer of NUll + // with size of -1. This is + // waht we use in java serialization for NULL + if (b->len == -1) { + return rc; + } + if ((priv->len - priv->off) < b->len) { + rc = resize_buffer(priv, priv->len + b->len); + if (rc < 0) + return rc; + } + memcpy(priv->buffer+priv->off, b->buff, b->len); + priv->off += b->len; + return 0; +} +int oa_serialize_string(struct oarchive *oa, const char *name, char **s) +{ + struct buff_struct *priv = oa->priv; + int32_t len; + int rc; + if (!*s) { + oa_serialize_int(oa, "len", &negone); + return 0; + } + len = strlen(*s); + rc = oa_serialize_int(oa, "len", &len); + if (rc < 0) + return rc; + if ((priv->len - priv->off) < len) { + rc = resize_buffer(priv, priv->len + len); + if (rc < 0) + return rc; + } + memcpy(priv->buffer+priv->off, *s, len); + priv->off += len; + return 0; +} +int ia_start_record(struct iarchive *ia, const char *tag) +{ + return 0; +} +int ia_end_record(struct iarchive *ia, const char *tag) +{ + return 0; +} +int ia_deserialize_int(struct iarchive *ia, const char *tag, int32_t *count) +{ + struct buff_struct *priv = ia->priv; + if ((priv->len - priv->off) < sizeof(*count)) { + return -E2BIG; + } + memcpy(count, priv->buffer+priv->off, sizeof(*count)); + priv->off+=sizeof(*count); + *count = ntohl(*count); + return 0; +} + +int ia_deserialize_long(struct iarchive *ia, const char *tag, int64_t *count) +{ + struct buff_struct *priv = ia->priv; + int64_t v = 0; + if ((priv->len - priv->off) < sizeof(*count)) { + return -E2BIG; + } + memcpy(count, priv->buffer+priv->off, sizeof(*count)); + priv->off+=sizeof(*count); + v = zoo_htonll(*count); // htonll and ntohll do the same + *count = v; + return 0; +} +int ia_start_vector(struct iarchive *ia, const char *tag, int32_t *count) +{ + return ia_deserialize_int(ia, tag, count); +} +int ia_end_vector(struct iarchive *ia, const char *tag) +{ + return 0; +} +int ia_deserialize_bool(struct iarchive *ia, const char *name, int32_t *v) +{ + struct buff_struct *priv = ia->priv; + //fprintf(stderr, "Deserializing bool %d\n", priv->off); + //return ia_deserialize_int(ia, name, v); + if ((priv->len - priv->off) < 1) { + return -E2BIG; + } + *v = priv->buffer[priv->off]; + priv->off+=1; + //fprintf(stderr, "Deserializing bool end %d\n", priv->off); + return 0; +} +int ia_deserialize_buffer(struct iarchive *ia, const char *name, + struct buffer *b) +{ + struct buff_struct *priv = ia->priv; + int rc = ia_deserialize_int(ia, "len", &b->len); + if (rc < 0) + return rc; + if ((priv->len - priv->off) < b->len) { + return -E2BIG; + } + // set the buffer to null + if (b->len == -1) { + b->buff = NULL; + return rc; + } + b->buff = malloc(b->len); + if (!b->buff) { + return -ENOMEM; + } + memcpy(b->buff, priv->buffer+priv->off, b->len); + priv->off += b->len; + return 0; +} +int ia_deserialize_string(struct iarchive *ia, const char *name, char **s) +{ + struct buff_struct *priv = ia->priv; + int32_t len; + int rc = ia_deserialize_int(ia, "len", &len); + if (rc < 0) + return rc; + if ((priv->len - priv->off) < len) { + return -E2BIG; + } + if (len < 0) { + return -EINVAL; + } + *s = malloc(len+1); + if (!*s) { + return -ENOMEM; + } + memcpy(*s, priv->buffer+priv->off, len); + (*s)[len] = '\0'; + priv->off += len; + return 0; +} + +static struct iarchive ia_default = { STRUCT_INITIALIZER (start_record ,ia_start_record), + STRUCT_INITIALIZER (end_record ,ia_end_record), STRUCT_INITIALIZER (start_vector , ia_start_vector), + STRUCT_INITIALIZER (end_vector ,ia_end_vector), STRUCT_INITIALIZER (deserialize_Bool , ia_deserialize_bool), + STRUCT_INITIALIZER (deserialize_Int ,ia_deserialize_int), + STRUCT_INITIALIZER (deserialize_Long , ia_deserialize_long) , + STRUCT_INITIALIZER (deserialize_Buffer, ia_deserialize_buffer), + STRUCT_INITIALIZER (deserialize_String, ia_deserialize_string) }; + +static struct oarchive oa_default = { STRUCT_INITIALIZER (start_record , oa_start_record), + STRUCT_INITIALIZER (end_record , oa_end_record), STRUCT_INITIALIZER (start_vector , oa_start_vector), + STRUCT_INITIALIZER (end_vector , oa_end_vector), STRUCT_INITIALIZER (serialize_Bool , oa_serialize_bool), + STRUCT_INITIALIZER (serialize_Int , oa_serialize_int), + STRUCT_INITIALIZER (serialize_Long , oa_serialize_long) , + STRUCT_INITIALIZER (serialize_Buffer , oa_serialize_buffer), + STRUCT_INITIALIZER (serialize_String , oa_serialize_string) }; + +struct iarchive *create_buffer_iarchive(char *buffer, int len) +{ + struct iarchive *ia; + struct buff_struct *buff; + ia = malloc(sizeof(*ia)); + if (!ia) return 0; + buff = malloc(sizeof(struct buff_struct)); + if (!buff) { + free(ia); + return 0; + } + *ia = ia_default; + buff->off = 0; + buff->buffer = buffer; + buff->len = len; + ia->priv = buff; + return ia; +} + +struct oarchive *create_buffer_oarchive() +{ + struct oarchive *oa; + struct buff_struct *buff; + oa = malloc(sizeof(*oa)); + if (!oa) return 0; + buff = malloc(sizeof(struct buff_struct)); + if (!buff) { + free(oa); + return 0; + } + *oa = oa_default; + buff->off = 0; + buff->buffer = malloc(128); + buff->len = 128; + oa->priv = buff; + return oa; +} + +void close_buffer_iarchive(struct iarchive **ia) +{ + free((*ia)->priv); + free(*ia); + *ia = 0; +} + +void close_buffer_oarchive(struct oarchive **oa, int free_buffer) +{ + if (free_buffer) { + struct buff_struct *buff = (struct buff_struct *)(*oa)->priv; + if (buff->buffer) { + free(buff->buffer); + } + } + free((*oa)->priv); + free(*oa); + *oa = 0; +} + +char *get_buffer(struct oarchive *oa) +{ + struct buff_struct *buff = oa->priv; + return buff->buffer; +} +int get_buffer_len(struct oarchive *oa) +{ + struct buff_struct *buff = oa->priv; + return buff->off; +} diff --git a/src/c/src/st_adaptor.c b/src/c/src/st_adaptor.c new file mode 100644 index 0000000..23573b3 --- /dev/null +++ b/src/c/src/st_adaptor.c @@ -0,0 +1,113 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef DLL_EXPORT +# define USE_STATIC_LIB +#endif + +#include "zk_adaptor.h" +#include +#include + +int zoo_lock_auth(zhandle_t *zh) +{ + return 0; +} +int zoo_unlock_auth(zhandle_t *zh) +{ + return 0; +} +int lock_buffer_list(buffer_head_t *l) +{ + return 0; +} +int unlock_buffer_list(buffer_head_t *l) +{ + return 0; +} +int lock_completion_list(completion_head_t *l) +{ + return 0; +} +int unlock_completion_list(completion_head_t *l) +{ + return 0; +} +struct sync_completion *alloc_sync_completion(void) +{ + return (struct sync_completion*)calloc(1, sizeof(struct sync_completion)); +} +int wait_sync_completion(struct sync_completion *sc) +{ + return 0; +} + +void free_sync_completion(struct sync_completion *sc) +{ + free(sc); +} + +void notify_sync_completion(struct sync_completion *sc) +{ +} + +int process_async(int outstanding_sync) +{ + return outstanding_sync == 0; +} + +int adaptor_init(zhandle_t *zh) +{ + return 0; +} + +void adaptor_finish(zhandle_t *zh){} + +void adaptor_destroy(zhandle_t *zh){} + +int flush_send_queue(zhandle_t *, int); + +int adaptor_send_queue(zhandle_t *zh, int timeout) +{ + return flush_send_queue(zh, timeout); +} + +int32_t inc_ref_counter(zhandle_t* zh,int i) +{ + zh->ref_counter+=(i<0?-1:(i>0?1:0)); + return zh->ref_counter; +} + +int32_t get_xid() +{ + static int32_t xid = -1; + if (xid == -1) { + xid = time(0); + } + return xid++; +} + +int enter_critical(zhandle_t* zh) +{ + return 0; +} + +int leave_critical(zhandle_t* zh) +{ + return 0; +} diff --git a/src/c/src/winport.c b/src/c/src/winport.c new file mode 100644 index 0000000..3592ea1 --- /dev/null +++ b/src/c/src/winport.c @@ -0,0 +1,302 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifdef WIN32 +#include "winport.h" +#include +#include /* for int64_t */ +#include /* must always be included before ws2tcpip.h */ +#include /* for SOCKET */ + +int pthread_mutex_lock(pthread_mutex_t* _mutex ){ + int rc = WaitForSingleObject( *_mutex, // handle to mutex + INFINITE); // no time-out interval + return ((rc == WAIT_OBJECT_0) ? 0: rc); +} + +int pthread_mutex_unlock( pthread_mutex_t* _mutex ){ + int rc = ReleaseMutex(*_mutex); + return ((rc != 0)? 0: GetLastError()); +} + +int pthread_mutex_init(pthread_mutex_t* _mutex, void* ignoredAttr){ + //use CreateMutex as we are using the HANDLES in pthread_cond + *_mutex = CreateMutex( + NULL, // default security attributes + FALSE, // initially not owned + NULL); // unnamed mutex + return ((*_mutex == NULL) ? GetLastError() : 0); +} + +int pthread_mutex_destroy(pthread_mutex_t* _mutex) +{ + int rc = CloseHandle(*_mutex); + return ((rc != 0)? 0: GetLastError()); +} + +int pthread_create(pthread_t *thread, const pthread_attr_t *attr, unsigned (__stdcall* start_routine)(void* a), void *arg) +{ + int _intThreadId; + (*thread).thread_handle = (HANDLE)_beginthreadex( NULL, 0, start_routine , arg, 0, (unsigned int*)&_intThreadId ); + (*thread).thread_id = _intThreadId; + return (((*thread).thread_handle == 0 ) ? errno : 0 ); +} + + +int pthread_equal(pthread_t t1, pthread_t t2){ +//Is there a better way to do this? GetThreadId(handle) is only supported Windows 2003 n above. + return ((t1.thread_id == t2.thread_id) ? 1:0); +} + +pthread_t pthread_self(){ + pthread_t thread_self; + thread_self.thread_handle = GetCurrentThread(); + thread_self.thread_id = GetCurrentThreadId(); + return thread_self; +} + +int pthread_join(pthread_t _thread, void** ignore) +{ + int rc = WaitForSingleObject( _thread.thread_handle, INFINITE ); + return ((rc == WAIT_OBJECT_0) ? 0: rc); +} + +int pthread_detach(pthread_t _thread) +{ + int rc = CloseHandle(_thread.thread_handle) ; + return (rc != 0) ? 0: GetLastError(); +} + +void pthread_mutexattr_init(pthread_mutexattr_t* ignore){} +void pthread_mutexattr_settype(pthread_mutexattr_t* ingore_attr, int ignore){} +void pthread_mutexattr_destroy(pthread_mutexattr_t* ignore_attr){} + +int +pthread_cond_init (pthread_cond_t *cv, + const pthread_condattr_t * ignore) +{ + cv->waiters_count_ = 0; + cv->was_broadcast_ = 0; + cv->sema_ = CreateSemaphore (NULL, // no security + 0, // initially 0 + 0x7fffffff, // max count + NULL); // unnamed + if (cv->sema_ == NULL ) + return GetLastError(); + InitializeCriticalSection (&cv->waiters_count_lock_); + cv->waiters_done_ = CreateEvent (NULL, // no security + FALSE, // auto-reset + FALSE, // non-signaled initially + NULL); // unnamed + return (cv->waiters_done_ == NULL) ? GetLastError() : 0; + +} + + +int pthread_cond_destroy(pthread_cond_t *cond) +{ + CloseHandle( cond->sema_); + DeleteCriticalSection(&cond->waiters_count_lock_); + return (CloseHandle( cond->waiters_done_ ) == 0)? GetLastError(): 0 ; +} + + +int +pthread_cond_signal (pthread_cond_t *cv) +{ + int have_waiters; + EnterCriticalSection (& (cv->waiters_count_lock_)); + have_waiters = cv->waiters_count_ > 0; + LeaveCriticalSection (&cv->waiters_count_lock_); + + // If there aren't any waiters, then this is a no-op. + if (have_waiters){ + return (ReleaseSemaphore (cv->sema_, 1, 0) == 0 ) ? GetLastError() : 0 ; + }else + return 0; +} + + +int +pthread_cond_broadcast (pthread_cond_t *cv) +{ + // This is needed to ensure that and are + // consistent relative to each other. + int have_waiters = 0; + EnterCriticalSection (&cv->waiters_count_lock_); + + if (cv->waiters_count_ > 0) { + // We are broadcasting, even if there is just one waiter... + // Record that we are broadcasting, which helps optimize + // for the non-broadcast case. + cv->was_broadcast_ = 1; + have_waiters = 1; + } + + if (have_waiters) { + // Wake up all the waiters atomically. + ReleaseSemaphore (cv->sema_, cv->waiters_count_, 0); + + LeaveCriticalSection (&cv->waiters_count_lock_); + + // Wait for all the awakened threads to acquire the counting + // semaphore. + WaitForSingleObject (cv->waiters_done_, INFINITE); + // This assignment is okay, even without the held + // because no other waiter threads can wake up to access it. + cv->was_broadcast_ = 0; + } + else + LeaveCriticalSection (&cv->waiters_count_lock_); +} + + +int +pthread_cond_wait (pthread_cond_t *cv, + pthread_mutex_t *external_mutex) +{ + int last_waiter; + // Avoid race conditions. + EnterCriticalSection (&cv->waiters_count_lock_); + cv->waiters_count_++; + LeaveCriticalSection (&cv->waiters_count_lock_); + + // This call atomically releases the mutex and waits on the + // semaphore until or + // are called by another thread. + SignalObjectAndWait (*external_mutex, cv->sema_, INFINITE, FALSE); + + // Reacquire lock to avoid race conditions. + EnterCriticalSection (&cv->waiters_count_lock_); + + // We're no longer waiting... + cv->waiters_count_--; + + // Check to see if we're the last waiter after . + last_waiter = cv->was_broadcast_ && cv->waiters_count_ == 0; + + LeaveCriticalSection (&cv->waiters_count_lock_); + + // If we're the last waiter thread during this particular broadcast + // then let all the other threads proceed. + if (last_waiter) + // This call atomically signals the event and waits until + // it can acquire the . This is required to ensure fairness. + SignalObjectAndWait (cv->waiters_done_, *external_mutex, INFINITE, FALSE); + else + // Always regain the external mutex since that's the guarantee we + // give to our callers. + WaitForSingleObject (*external_mutex, INFINITE); +} + +int pthread_key_create(pthread_key_t *key, void (*destructor)(void *) ) +{ + int result = 0; + pthread_key_t* newkey; + + if ((newkey = (pthread_key_t*) calloc (1, sizeof (pthread_key_t))) == NULL) + { + result = ENOMEM; + } + else if ((newkey->key = TlsAlloc ()) == TLS_OUT_OF_INDEXES) + { + result = EAGAIN; + free (newkey); + newkey = NULL; + } + else if (destructor != NULL) + { + //--we have to store the function pointer for destructor, so that we can call it + //--to free up the user allocated storage-- + newkey->destructor = destructor; + } + key = newkey; + return (result); +} + +int pthread_key_delete(pthread_key_t key) +{ + int rc = 0; + LPVOID lpvData = TlsGetValue(key.key); + rc = TlsFree (key.key); + rc = (rc != 0 ) ? 0 : GetLastError(); + if (key.destructor != NULL && lpvData != 0){ + key.destructor(lpvData); //we take control of calling destructor, instead of calling it on thread exit. + } + free (&key); + return (rc); +} + +void *pthread_getspecific(pthread_key_t key) +{ + LPVOID lpvData = TlsGetValue(key.key); + if ((lpvData == 0) && (GetLastError() != ERROR_SUCCESS)) + return NULL; + else + return lpvData; +} + +int pthread_setspecific(pthread_key_t key, const void *value) +{ + int rc = TlsSetValue (key.key, value); + return ((rc != 0 ) ? 0 : GetLastError()); +} + +int gettimeofday(struct timeval *tp, void *tzp) { + int64_t now = 0; + if (tzp != 0) { errno = EINVAL; return -1; } + GetSystemTimeAsFileTime( (LPFILETIME)&now ); + tp->tv_sec = (long)(now / 10000000 - 11644473600LL); + tp->tv_usec = (now / 10) % 1000000; + return 0; +} + +int close(SOCKET fd) { + return closesocket(fd); +} + +int Win32WSAStartup() +{ + WORD wVersionRq; + WSADATA wsaData; + int err; + + wVersionRq = MAKEWORD(2,0); + err = WSAStartup(wVersionRq, &wsaData); + if (err != 0) + return 1; + + // confirm the version information + if ((LOBYTE(wsaData.wVersion) != 2) || + (HIBYTE(wsaData.wVersion) != 0)) + { + Win32WSACleanup(); + return 1; + } + return 0; +} + +void Win32WSACleanup() +{ + WSACleanup(); +} + +#endif //WIN32 + + + diff --git a/src/c/src/winport.h b/src/c/src/winport.h new file mode 100644 index 0000000..da6028c --- /dev/null +++ b/src/c/src/winport.h @@ -0,0 +1,138 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * This header file is to port pthread lib , sockets and other utility methods on windows. + * Specifically the threads function, mutexes, keys, and socket initialization. + */ + +#ifndef WINPORT_H_ +#define WINPORT_H_ + +#ifdef WIN32 +#include "winconfig.h" + +#define _WINSOCK_DEPRECATED_NO_WARNINGS +#include /* must always be included before ws2tcpip.h */ +#include /* for struct sock_addr used in zookeeper.h */ + +/* POSIX names are deprecated, use ISO conformant names instead. */ +#define strdup _strdup +#define getcwd _getcwd +#define getpid _getpid + +/* Windows "secure" versions of POSIX reentrant functions */ +#define strtok_r strtok_s +#define localtime_r(a,b) localtime_s(b,a) + +/* After this version of MSVC, snprintf became a defined function, + and so cannot be redefined, nor can #ifndef be used to guard it. */ +#if ((defined(_MSC_VER) && _MSC_VER < 1900) || !defined(_MSC_VER)) +#define snprintf _snprintf +#endif + + +#include +#include +#include /* for int64_t */ +#include +#include + + +typedef int ssize_t; +typedef HANDLE pthread_mutex_t; + +struct pthread_t_ +{ + HANDLE thread_handle; + DWORD thread_id; +}; + +typedef struct pthread_t_ pthread_t; +typedef int pthread_mutexattr_t; +typedef int pthread_condattr_t; +typedef int pthread_attr_t; +#define PTHREAD_MUTEX_RECURSIVE 0 + +int pthread_mutex_lock(pthread_mutex_t* _mutex ); +int pthread_mutex_unlock( pthread_mutex_t* _mutex ); +int pthread_mutex_init(pthread_mutex_t* _mutex, void* ignoredAttr); +int pthread_mutex_destroy(pthread_mutex_t* _mutex); +int pthread_create(pthread_t *thread, const pthread_attr_t *attr, unsigned (__stdcall* start_routine)(void* a), void *arg); +int pthread_equal(pthread_t t1, pthread_t t2); +pthread_t pthread_self(); +int pthread_join(pthread_t _thread, void** ignore); +int pthread_detach(pthread_t _thread); + +void pthread_mutexattr_init(pthread_mutexattr_t* ignore); +void pthread_mutexattr_settype(pthread_mutexattr_t* ingore_attr, int ignore); +void pthread_mutexattr_destroy(pthread_mutexattr_t* ignore_attr); + + +// http://www.cs.wustl.edu/~schmidt/win32-cv-1.html + +typedef struct +{ + int waiters_count_; + // Number of waiting threads. + + CRITICAL_SECTION waiters_count_lock_; + // Serialize access to . + + HANDLE sema_; + // Semaphore used to queue up threads waiting for the condition to + // become signaled. + + HANDLE waiters_done_; + // An auto-reset event used by the broadcast/signal thread to wait + // for all the waiting thread(s) to wake up and be released from the + // semaphore. + + size_t was_broadcast_; + // Keeps track of whether we were broadcasting or signaling. This + // allows us to optimize the code if we're just signaling. +}pthread_cond_t; + +int pthread_cond_init (pthread_cond_t *cv,const pthread_condattr_t * ignore); +int pthread_cond_destroy(pthread_cond_t *cond); +int pthread_cond_signal (pthread_cond_t *cv); +int pthread_cond_broadcast (pthread_cond_t *cv); +int pthread_cond_wait (pthread_cond_t *cv, pthread_mutex_t *external_mutex); + + +struct pthread_key_t_ +{ + DWORD key; + void (*destructor) (void *); +}; + +typedef struct pthread_key_t_ pthread_key_t; +int pthread_key_create(pthread_key_t *key, void (*destructor)(void *) ); +int pthread_key_delete(pthread_key_t key); +void *pthread_getspecific(pthread_key_t key); +int pthread_setspecific(pthread_key_t key, const void *value); + +int gettimeofday(struct timeval *tp, void *tzp); +int close(SOCKET fd); +int Win32WSAStartup(); +void Win32WSACleanup(); +#endif //WIN32 + + + +#endif //WINPORT_H_ diff --git a/src/c/src/zk_adaptor.h b/src/c/src/zk_adaptor.h new file mode 100644 index 0000000..b990779 --- /dev/null +++ b/src/c/src/zk_adaptor.h @@ -0,0 +1,276 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ZK_ADAPTOR_H_ +#define ZK_ADAPTOR_H_ +#include +#ifdef THREADED +#ifndef WIN32 +#include +#else +#include "winport.h" +#endif +#endif +#include "zookeeper.h" +#include "zk_hashtable.h" + +/* predefined xid's values recognized as special by the server */ +#define WATCHER_EVENT_XID -1 +#define PING_XID -2 +#define AUTH_XID -4 +#define SET_WATCHES_XID -8 + +/* zookeeper state constants */ +#define EXPIRED_SESSION_STATE_DEF -112 +#define AUTH_FAILED_STATE_DEF -113 +#define CONNECTING_STATE_DEF 1 +#define ASSOCIATING_STATE_DEF 2 +#define CONNECTED_STATE_DEF 3 +#define NOTCONNECTED_STATE_DEF 999 + +/* zookeeper event type constants */ +#define CREATED_EVENT_DEF 1 +#define DELETED_EVENT_DEF 2 +#define CHANGED_EVENT_DEF 3 +#define CHILD_EVENT_DEF 4 +#define SESSION_EVENT_DEF -1 +#define NOTWATCHING_EVENT_DEF -2 + +#ifdef __cplusplus +extern "C" { +#endif + +struct _buffer_list; +struct _completion_list; + +typedef struct _buffer_head { + struct _buffer_list *volatile head; + struct _buffer_list *last; +#ifdef THREADED + pthread_mutex_t lock; +#endif +} buffer_head_t; + +typedef struct _completion_head { + struct _completion_list *volatile head; + struct _completion_list *last; +#ifdef THREADED + pthread_cond_t cond; + pthread_mutex_t lock; +#endif +} completion_head_t; + +int lock_buffer_list(buffer_head_t *l); +int unlock_buffer_list(buffer_head_t *l); +int lock_completion_list(completion_head_t *l); +int unlock_completion_list(completion_head_t *l); + +struct sync_completion { + int rc; + union { + struct { + char *str; + int str_len; + } str; + struct Stat stat; + struct { + char *buffer; + int buff_len; + struct Stat stat; + } data; + struct { + struct ACL_vector acl; + struct Stat stat; + } acl; + struct String_vector strs2; + struct { + struct String_vector strs2; + struct Stat stat2; + } strs_stat; + } u; + int complete; +#ifdef THREADED + pthread_cond_t cond; + pthread_mutex_t lock; +#endif +}; + +typedef struct _auth_info { + int state; /* 0=>inactive, >0 => active */ + char* scheme; + struct buffer auth; + void_completion_t completion; + const char* data; + struct _auth_info *next; +} auth_info; + +/** + * This structure represents a packet being read or written. + */ +typedef struct _buffer_list { + char *buffer; + int len; /* This represents the length of sizeof(header) + length of buffer */ + int curr_offset; /* This is the offset into the header followed by offset into the buffer */ + struct _buffer_list *next; +} buffer_list_t; + +/* the size of connect request */ +#define HANDSHAKE_REQ_SIZE 44 +/* connect request */ +struct connect_req { + int32_t protocolVersion; + int64_t lastZxidSeen; + int32_t timeOut; + int64_t sessionId; + int32_t passwd_len; + char passwd[16]; +}; + +/* the connect response */ +struct prime_struct { + int32_t len; + int32_t protocolVersion; + int32_t timeOut; + int64_t sessionId; + int32_t passwd_len; + char passwd[16]; +}; + +#ifdef THREADED +/* this is used by mt_adaptor internally for thread management */ +struct adaptor_threads { + pthread_t io; + pthread_t completion; + int threadsToWait; // barrier + pthread_cond_t cond; // barrier's conditional + pthread_mutex_t lock; // ... and a lock + pthread_mutex_t zh_lock; // critical section lock +#ifdef WIN32 + SOCKET self_pipe[2]; +#else + int self_pipe[2]; +#endif +}; +#endif + +/** the auth list for adding auth */ +typedef struct _auth_list_head { + auth_info *auth; +#ifdef THREADED + pthread_mutex_t lock; +#endif +} auth_list_head_t; + +/** + * This structure represents the connection to zookeeper. + */ + +struct _zhandle { +#ifdef WIN32 + SOCKET fd; /* the descriptor used to talk to zookeeper */ +#else + int fd; /* the descriptor used to talk to zookeeper */ +#endif + char *hostname; /* the hostname of zookeeper */ + struct sockaddr_storage *addrs; /* the addresses that correspond to the hostname */ + int addrs_count; /* The number of addresses in the addrs array */ + watcher_fn watcher; /* the registered watcher */ + struct timeval last_recv; /* The time that the last message was received */ + struct timeval last_send; /* The time that the last message was sent */ + struct timeval last_ping; /* The time that the last PING was sent */ + struct timeval next_deadline; /* The time of the next deadline */ + int recv_timeout; /* The maximum amount of time that can go by without + receiving anything from the zookeeper server */ + buffer_list_t *input_buffer; /* the current buffer being read in */ + buffer_head_t to_process; /* The buffers that have been read and are ready to be processed. */ + buffer_head_t to_send; /* The packets queued to send */ + completion_head_t sent_requests; /* The outstanding requests */ + completion_head_t completions_to_process; /* completions that are ready to run */ + int connect_index; /* The index of the address to connect to */ + clientid_t client_id; + long long last_zxid; + int outstanding_sync; /* Number of outstanding synchronous requests */ + struct _buffer_list primer_buffer; /* The buffer used for the handshake at the start of a connection */ + struct prime_struct primer_storage; /* the connect response */ + char primer_storage_buffer[40]; /* the true size of primer_storage */ + volatile int state; + void *context; + auth_list_head_t auth_h; /* authentication data list */ + /* zookeeper_close is not reentrant because it de-allocates the zhandler. + * This guard variable is used to defer the destruction of zhandle till + * right before top-level API call returns to the caller */ + int32_t ref_counter; + volatile int close_requested; + void *adaptor_priv; + /* Used for debugging only: non-zero value indicates the time when the zookeeper_process + * call returned while there was at least one unprocessed server response + * available in the socket recv buffer */ + struct timeval socket_readable; + + zk_hashtable* active_node_watchers; + zk_hashtable* active_exist_watchers; + zk_hashtable* active_child_watchers; + /** used for chroot path at the client side **/ + char *chroot; +}; + + +int adaptor_init(zhandle_t *zh); +void adaptor_finish(zhandle_t *zh); +void adaptor_destroy(zhandle_t *zh); +struct sync_completion *alloc_sync_completion(void); +int wait_sync_completion(struct sync_completion *sc); +void free_sync_completion(struct sync_completion *sc); +void notify_sync_completion(struct sync_completion *sc); +int adaptor_send_queue(zhandle_t *zh, int timeout); +int process_async(int outstanding_sync); +void process_completions(zhandle_t *zh); +int flush_send_queue(zhandle_t*zh, int timeout); +char* sub_string(zhandle_t *zh, const char* server_path); +void free_duplicate_path(const char* free_path, const char* path); +int zoo_lock_auth(zhandle_t *zh); +int zoo_unlock_auth(zhandle_t *zh); + +// critical section guards +int enter_critical(zhandle_t* zh); +int leave_critical(zhandle_t* zh); +// zhandle object reference counting +void api_prolog(zhandle_t* zh); +int api_epilog(zhandle_t *zh, int rc); +int32_t get_xid(); +// returns the new value of the ref counter +int32_t inc_ref_counter(zhandle_t* zh,int i); + +#ifdef THREADED +// atomic post-increment +int32_t fetch_and_add(volatile int32_t* operand, int incr); +// in mt mode process session event asynchronously by the completion thread +#define PROCESS_SESSION_EVENT(zh,newstate) queue_session_event(zh,newstate) +#else +// in single-threaded mode process session event immediately +//#define PROCESS_SESSION_EVENT(zh,newstate) deliverWatchers(zh,ZOO_SESSION_EVENT,newstate,0) +#define PROCESS_SESSION_EVENT(zh,newstate) queue_session_event(zh,newstate) +#endif + +#ifdef __cplusplus +} +#endif + +#endif /*ZK_ADAPTOR_H_*/ + + diff --git a/src/c/src/zk_hashtable.c b/src/c/src/zk_hashtable.c new file mode 100644 index 0000000..0efc5aa --- /dev/null +++ b/src/c/src/zk_hashtable.c @@ -0,0 +1,337 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "zk_hashtable.h" +#include "zk_adaptor.h" +#include "hashtable/hashtable.h" +#include "hashtable/hashtable_itr.h" +#include +#include +#include + +typedef struct _watcher_object { + watcher_fn watcher; + void* context; + struct _watcher_object* next; +} watcher_object_t; + + +struct _zk_hashtable { + struct hashtable* ht; +}; + +struct watcher_object_list { + watcher_object_t* head; +}; + +/* the following functions are for testing only */ +typedef struct hashtable hashtable_impl; + +hashtable_impl* getImpl(zk_hashtable* ht){ + return ht->ht; +} + +watcher_object_t* getFirstWatcher(zk_hashtable* ht,const char* path) +{ + watcher_object_list_t* wl=hashtable_search(ht->ht,(void*)path); + if(wl!=0) + return wl->head; + return 0; +} +/* end of testing functions */ + +watcher_object_t* clone_watcher_object(watcher_object_t* wo) +{ + watcher_object_t* res=calloc(1,sizeof(watcher_object_t)); + assert(res); + res->watcher=wo->watcher; + res->context=wo->context; + return res; +} + +static unsigned int string_hash_djb2(void *str) +{ + unsigned int hash = 5381; + int c; + const char* cstr = (const char*)str; + while ((c = *cstr++)) + hash = ((hash << 5) + hash) + c; /* hash * 33 + c */ + + return hash; +} + +static int string_equal(void *key1,void *key2) +{ + return strcmp((const char*)key1,(const char*)key2)==0; +} + +static watcher_object_t* create_watcher_object(watcher_fn watcher,void* ctx) +{ + watcher_object_t* wo=calloc(1,sizeof(watcher_object_t)); + assert(wo); + wo->watcher=watcher; + wo->context=ctx; + return wo; +} + +static watcher_object_list_t* create_watcher_object_list(watcher_object_t* head) +{ + watcher_object_list_t* wl=calloc(1,sizeof(watcher_object_list_t)); + assert(wl); + wl->head=head; + return wl; +} + +static void destroy_watcher_object_list(watcher_object_list_t* list) +{ + watcher_object_t* e = NULL; + + if(list==0) + return; + e=list->head; + while(e!=0){ + watcher_object_t* this=e; + e=e->next; + free(this); + } + free(list); +} + +zk_hashtable* create_zk_hashtable() +{ + struct _zk_hashtable *ht=calloc(1,sizeof(struct _zk_hashtable)); + assert(ht); + ht->ht=create_hashtable(32,string_hash_djb2,string_equal); + return ht; +} + +static void do_clean_hashtable(zk_hashtable* ht) +{ + struct hashtable_itr *it; + int hasMore; + if(hashtable_count(ht->ht)==0) + return; + it=hashtable_iterator(ht->ht); + do { + watcher_object_list_t* w=hashtable_iterator_value(it); + destroy_watcher_object_list(w); + hasMore=hashtable_iterator_remove(it); + } while(hasMore); + free(it); +} + +void destroy_zk_hashtable(zk_hashtable* ht) +{ + if(ht!=0){ + do_clean_hashtable(ht); + hashtable_destroy(ht->ht,0); + free(ht); + } +} + +// searches for a watcher object instance in a watcher object list; +// two watcher objects are equal if their watcher function and context pointers +// are equal +static watcher_object_t* search_watcher(watcher_object_list_t** wl,watcher_object_t* wo) +{ + watcher_object_t* wobj=(*wl)->head; + while(wobj!=0){ + if(wobj->watcher==wo->watcher && wobj->context==wo->context) + return wobj; + wobj=wobj->next; + } + return 0; +} + +static int add_to_list(watcher_object_list_t **wl, watcher_object_t *wo, + int clone) +{ + if (search_watcher(wl, wo)==0) { + watcher_object_t* cloned=wo; + if (clone) { + cloned = clone_watcher_object(wo); + assert(cloned); + } + cloned->next = (*wl)->head; + (*wl)->head = cloned; + return 1; + } else if (!clone) { + // If it's here and we aren't supposed to clone, we must destroy + free(wo); + } + return 0; +} + +static int do_insert_watcher_object(zk_hashtable *ht, const char *path, watcher_object_t* wo) +{ + int res=1; + watcher_object_list_t* wl; + + wl=hashtable_search(ht->ht,(void*)path); + if(wl==0){ + int res; + /* inserting a new path element */ + res=hashtable_insert(ht->ht,strdup(path),create_watcher_object_list(wo)); + assert(res); + }else{ + /* + * Path already exists; check if the watcher already exists. + * Don't clone the watcher since it's allocated on the heap --- avoids + * a memory leak and saves a clone operation (calloc + copy). + */ + res = add_to_list(&wl, wo, 0); + } + return res; +} + + +char **collect_keys(zk_hashtable *ht, int *count) +{ + char **list; + struct hashtable_itr *it; + int i; + + *count = hashtable_count(ht->ht); + list = calloc(*count, sizeof(char*)); + it=hashtable_iterator(ht->ht); + for(i = 0; i < *count; i++) { + list[i] = strdup(hashtable_iterator_key(it)); + hashtable_iterator_advance(it); + } + free(it); + return list; +} + +static int insert_watcher_object(zk_hashtable *ht, const char *path, + watcher_object_t* wo) +{ + int res; + res=do_insert_watcher_object(ht,path,wo); + return res; +} + +static void copy_watchers(watcher_object_list_t *from, watcher_object_list_t *to, int clone) +{ + watcher_object_t* wo=from->head; + while(wo){ + watcher_object_t *next = wo->next; + add_to_list(&to, wo, clone); + wo=next; + } +} + +static void copy_table(zk_hashtable *from, watcher_object_list_t *to) { + struct hashtable_itr *it; + int hasMore; + if(hashtable_count(from->ht)==0) + return; + it=hashtable_iterator(from->ht); + do { + watcher_object_list_t *w = hashtable_iterator_value(it); + copy_watchers(w, to, 1); + hasMore=hashtable_iterator_advance(it); + } while(hasMore); + free(it); +} + +static void collect_session_watchers(zhandle_t *zh, + watcher_object_list_t **list) +{ + copy_table(zh->active_node_watchers, *list); + copy_table(zh->active_exist_watchers, *list); + copy_table(zh->active_child_watchers, *list); +} + +static void add_for_event(zk_hashtable *ht, char *path, watcher_object_list_t **list) +{ + watcher_object_list_t* wl; + wl = (watcher_object_list_t*)hashtable_remove(ht->ht, path); + if (wl) { + copy_watchers(wl, *list, 0); + // Since we move, not clone the watch_objects, we just need to free the + // head pointer + free(wl); + } +} + +static void do_foreach_watcher(watcher_object_t* wo,zhandle_t* zh, + const char* path,int type,int state) +{ + // session event's don't have paths + const char *client_path = + (type != ZOO_SESSION_EVENT ? sub_string(zh, path) : path); + while(wo!=0){ + wo->watcher(zh,type,state,client_path,wo->context); + wo=wo->next; + } + free_duplicate_path(client_path, path); +} + +watcher_object_list_t *collectWatchers(zhandle_t *zh,int type, char *path) +{ + struct watcher_object_list *list = create_watcher_object_list(0); + + if(type==ZOO_SESSION_EVENT){ + watcher_object_t defWatcher; + defWatcher.watcher=zh->watcher; + defWatcher.context=zh->context; + add_to_list(&list, &defWatcher, 1); + collect_session_watchers(zh, &list); + return list; + } + switch(type){ + case CREATED_EVENT_DEF: + case CHANGED_EVENT_DEF: + // look up the watchers for the path and move them to a delivery list + add_for_event(zh->active_node_watchers,path,&list); + add_for_event(zh->active_exist_watchers,path,&list); + break; + case CHILD_EVENT_DEF: + // look up the watchers for the path and move them to a delivery list + add_for_event(zh->active_child_watchers,path,&list); + break; + case DELETED_EVENT_DEF: + // look up the watchers for the path and move them to a delivery list + add_for_event(zh->active_node_watchers,path,&list); + add_for_event(zh->active_exist_watchers,path,&list); + add_for_event(zh->active_child_watchers,path,&list); + break; + } + return list; +} + +void deliverWatchers(zhandle_t *zh, int type,int state, char *path, watcher_object_list_t **list) +{ + if (!list || !(*list)) return; + do_foreach_watcher((*list)->head, zh, path, type, state); + destroy_watcher_object_list(*list); + *list = 0; +} + +void activateWatcher(zhandle_t *zh, watcher_registration_t* reg, int rc) +{ + if(reg){ + /* in multithreaded lib, this code is executed + * by the IO thread */ + zk_hashtable *ht = reg->checker(zh, rc); + if(ht){ + insert_watcher_object(ht,reg->path, + create_watcher_object(reg->watcher, reg->context)); + } + } +} diff --git a/src/c/src/zk_hashtable.h b/src/c/src/zk_hashtable.h new file mode 100644 index 0000000..31109c1 --- /dev/null +++ b/src/c/src/zk_hashtable.h @@ -0,0 +1,69 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ZK_HASHTABLE_H_ +#define ZK_HASHTABLE_H_ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + + typedef struct watcher_object_list watcher_object_list_t; +typedef struct _zk_hashtable zk_hashtable; + +/** + * The function must return a non-zero value if the watcher object can be activated + * as a result of the server response. Normally, a watch can only be activated + * if the server returns a success code (ZOK). However in the case when zoo_exists() + * returns a ZNONODE code the watcher should be activated nevertheless. + */ +typedef zk_hashtable *(*result_checker_fn)(zhandle_t *, int rc); + +/** + * A watcher object gets temporarily stored with the completion entry until + * the server response comes back at which moment the watcher object is moved + * to the active watchers map. + */ +typedef struct _watcher_registration { + watcher_fn watcher; + void* context; + result_checker_fn checker; + const char* path; +} watcher_registration_t; + +zk_hashtable* create_zk_hashtable(); +void destroy_zk_hashtable(zk_hashtable* ht); + +char **collect_keys(zk_hashtable *ht, int *count); + +/** + * check if the completion has a watcher object associated + * with it. If it does, move the watcher object to the map of + * active watchers (only if the checker allows to do so) + */ + void activateWatcher(zhandle_t *zh, watcher_registration_t* reg, int rc); + watcher_object_list_t *collectWatchers(zhandle_t *zh,int type, char *path); + void deliverWatchers(zhandle_t *zh, int type, int state, char *path, struct watcher_object_list **list); + +#ifdef __cplusplus +} +#endif + +#endif /*ZK_HASHTABLE_H_*/ diff --git a/src/c/src/zk_log.c b/src/c/src/zk_log.c new file mode 100644 index 0000000..6b4fdfa --- /dev/null +++ b/src/c/src/zk_log.c @@ -0,0 +1,180 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if !defined(DLL_EXPORT) && !defined(USE_STATIC_LIB) +# define USE_STATIC_LIB +#endif + +#include "zookeeper_log.h" +#ifndef WIN32 +#include +#else +typedef DWORD pid_t; +#include /* for getpid */ +#endif + +#include +#include + +#define TIME_NOW_BUF_SIZE 1024 +#define FORMAT_LOG_BUF_SIZE 4096 + +#ifdef THREADED +#ifndef WIN32 +#include +#else +#include "winport.h" +#endif + +static pthread_key_t time_now_buffer; +static pthread_key_t format_log_msg_buffer; + +void freeBuffer(void* p){ + if(p) free(p); +} + +__attribute__((constructor)) void prepareTSDKeys() { + pthread_key_create (&time_now_buffer, freeBuffer); + pthread_key_create (&format_log_msg_buffer, freeBuffer); +} + +char* getTSData(pthread_key_t key,int size){ + char* p=pthread_getspecific(key); + if(p==0){ + int res; + p=calloc(1,size); + res=pthread_setspecific(key,p); + if(res!=0){ + fprintf(stderr,"Failed to set TSD key: %d",res); + } + } + return p; +} + +char* get_time_buffer(){ + return getTSData(time_now_buffer,TIME_NOW_BUF_SIZE); +} + +char* get_format_log_buffer(){ + return getTSData(format_log_msg_buffer,FORMAT_LOG_BUF_SIZE); +} +#else +char* get_time_buffer(){ + static char buf[TIME_NOW_BUF_SIZE]; + return buf; +} + +char* get_format_log_buffer(){ + static char buf[FORMAT_LOG_BUF_SIZE]; + return buf; +} + +#endif + +ZooLogLevel logLevel=ZOO_LOG_LEVEL_INFO; + +static FILE* logStream=0; +FILE* getLogStream(){ + if(logStream==0) + logStream=stderr; + return logStream; +} + +void zoo_set_log_stream(FILE* stream){ + logStream=stream; +} + +static const char* time_now(char* now_str){ + struct timeval tv; + struct tm lt; + time_t now = 0; + size_t len = 0; + + gettimeofday(&tv,0); + + now = tv.tv_sec; + localtime_r(&now, <); + + // clone the format used by log4j ISO8601DateFormat + // specifically: "yyyy-MM-dd HH:mm:ss,SSS" + + len = strftime(now_str, TIME_NOW_BUF_SIZE, + "%Y-%m-%d %H:%M:%S", + <); + + len += snprintf(now_str + len, + TIME_NOW_BUF_SIZE - len, + ",%03d", + (int)(tv.tv_usec/1000)); + + return now_str; +} + +void log_message(ZooLogLevel curLevel,int line,const char* funcName, + const char* message) +{ + static const char* dbgLevelStr[]={"ZOO_INVALID","ZOO_ERROR","ZOO_WARN", + "ZOO_INFO","ZOO_DEBUG"}; + static pid_t pid=0; +#ifdef WIN32 + char timebuf [TIME_NOW_BUF_SIZE]; +#endif + if(pid==0)pid=getpid(); +#ifndef THREADED + // pid_t is long on Solaris + fprintf(LOGSTREAM, "%s:%ld:%s@%s@%d: %s\n", time_now(get_time_buffer()),(long)pid, + dbgLevelStr[curLevel],funcName,line,message); +#else +#ifdef WIN32 + fprintf(LOGSTREAM, "%s:%d(0x%lx):%s@%s@%d: %s\n", time_now(timebuf),pid, + (unsigned long int)(pthread_self().thread_id), + dbgLevelStr[curLevel],funcName,line,message); +#else + fprintf(LOGSTREAM, "%s:%ld(0x%lx):%s@%s@%d: %s\n", time_now(get_time_buffer()),(long)pid, + (unsigned long int)pthread_self(), + dbgLevelStr[curLevel],funcName,line,message); +#endif +#endif + fflush(LOGSTREAM); +} + +const char* format_log_message(const char* format,...) +{ + va_list va; + char* buf=get_format_log_buffer(); + if(!buf) + return "format_log_message: Unable to allocate memory buffer"; + + va_start(va,format); + vsnprintf(buf, FORMAT_LOG_BUF_SIZE-1,format,va); + va_end(va); + return buf; +} + +void zoo_set_debug_level(ZooLogLevel level) +{ + if(level==0){ + // disable logging (unit tests do this) + logLevel=(ZooLogLevel)0; + return; + } + if(levelZOO_LOG_LEVEL_DEBUG)level=ZOO_LOG_LEVEL_DEBUG; + logLevel=level; +} + diff --git a/src/c/src/zookeeper.c b/src/c/src/zookeeper.c new file mode 100644 index 0000000..c087864 --- /dev/null +++ b/src/c/src/zookeeper.c @@ -0,0 +1,3767 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if !defined(DLL_EXPORT) && !defined(USE_STATIC_LIB) +# define USE_STATIC_LIB +#endif + +#if defined(__CYGWIN__) +#define USE_IPV6 +#endif + +#include "config.h" +#include +#include +#include +#include "zk_adaptor.h" +#include "zookeeper_log.h" +#include "zk_hashtable.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef HAVE_SYS_TIME_H +#include +#endif + +#ifdef HAVE_SYS_SOCKET_H +#include +#endif + +#ifdef HAVE_POLL +#include +#endif + +#ifdef HAVE_NETINET_IN_H +#include +#include +#endif + +#ifdef HAVE_ARPA_INET_H +#include +#endif + +#ifdef HAVE_NETDB_H +#include +#endif + +#ifdef HAVE_UNISTD_H +#include // needed for _POSIX_MONOTONIC_CLOCK +#endif + +#ifdef HAVE_SYS_UTSNAME_H +#include +#endif + +#ifdef HAVE_GETPWUID_R +#include +#endif + +#ifdef WIN32 +#define random rand /* replace POSIX random with Windows rand */ +#include /* for getpid */ +#include /* for getcwd */ +#define EAI_ADDRFAMILY WSAEINVAL /* is this still needed? */ +#define EHOSTDOWN EPIPE +#define ESTALE ENODEV +#endif + +#define IF_DEBUG(x) if(logLevel==ZOO_LOG_LEVEL_DEBUG) {x;} + +const int ZOOKEEPER_WRITE = 1 << 0; +const int ZOOKEEPER_READ = 1 << 1; + +const int ZOO_EPHEMERAL = 1 << 0; +const int ZOO_SEQUENCE = 1 << 1; + +const int ZOO_EXPIRED_SESSION_STATE = EXPIRED_SESSION_STATE_DEF; +const int ZOO_AUTH_FAILED_STATE = AUTH_FAILED_STATE_DEF; +const int ZOO_CONNECTING_STATE = CONNECTING_STATE_DEF; +const int ZOO_ASSOCIATING_STATE = ASSOCIATING_STATE_DEF; +const int ZOO_CONNECTED_STATE = CONNECTED_STATE_DEF; +static __attribute__ ((unused)) const char* state2String(int state){ + switch(state){ + case 0: + return "ZOO_CLOSED_STATE"; + case CONNECTING_STATE_DEF: + return "ZOO_CONNECTING_STATE"; + case ASSOCIATING_STATE_DEF: + return "ZOO_ASSOCIATING_STATE"; + case CONNECTED_STATE_DEF: + return "ZOO_CONNECTED_STATE"; + case EXPIRED_SESSION_STATE_DEF: + return "ZOO_EXPIRED_SESSION_STATE"; + case AUTH_FAILED_STATE_DEF: + return "ZOO_AUTH_FAILED_STATE"; + } + return "INVALID_STATE"; +} + +const int ZOO_CREATED_EVENT = CREATED_EVENT_DEF; +const int ZOO_DELETED_EVENT = DELETED_EVENT_DEF; +const int ZOO_CHANGED_EVENT = CHANGED_EVENT_DEF; +const int ZOO_CHILD_EVENT = CHILD_EVENT_DEF; +const int ZOO_SESSION_EVENT = SESSION_EVENT_DEF; +const int ZOO_NOTWATCHING_EVENT = NOTWATCHING_EVENT_DEF; +static __attribute__ ((unused)) const char* watcherEvent2String(int ev){ + switch(ev){ + case 0: + return "ZOO_ERROR_EVENT"; + case CREATED_EVENT_DEF: + return "ZOO_CREATED_EVENT"; + case DELETED_EVENT_DEF: + return "ZOO_DELETED_EVENT"; + case CHANGED_EVENT_DEF: + return "ZOO_CHANGED_EVENT"; + case CHILD_EVENT_DEF: + return "ZOO_CHILD_EVENT"; + case SESSION_EVENT_DEF: + return "ZOO_SESSION_EVENT"; + case NOTWATCHING_EVENT_DEF: + return "ZOO_NOTWATCHING_EVENT"; + } + return "INVALID_EVENT"; +} + +const int ZOO_PERM_READ = 1 << 0; +const int ZOO_PERM_WRITE = 1 << 1; +const int ZOO_PERM_CREATE = 1 << 2; +const int ZOO_PERM_DELETE = 1 << 3; +const int ZOO_PERM_ADMIN = 1 << 4; +const int ZOO_PERM_ALL = 0x1f; +struct Id ZOO_ANYONE_ID_UNSAFE = {"world", "anyone"}; +struct Id ZOO_AUTH_IDS = {"auth", ""}; +static struct ACL _OPEN_ACL_UNSAFE_ACL[] = {{0x1f, {"world", "anyone"}}}; +static struct ACL _READ_ACL_UNSAFE_ACL[] = {{0x01, {"world", "anyone"}}}; +static struct ACL _CREATOR_ALL_ACL_ACL[] = {{0x1f, {"auth", ""}}}; +struct ACL_vector ZOO_OPEN_ACL_UNSAFE = { 1, _OPEN_ACL_UNSAFE_ACL}; +struct ACL_vector ZOO_READ_ACL_UNSAFE = { 1, _READ_ACL_UNSAFE_ACL}; +struct ACL_vector ZOO_CREATOR_ALL_ACL = { 1, _CREATOR_ALL_ACL_ACL}; + +#define COMPLETION_WATCH -1 +#define COMPLETION_VOID 0 +#define COMPLETION_STAT 1 +#define COMPLETION_DATA 2 +#define COMPLETION_STRINGLIST 3 +#define COMPLETION_STRINGLIST_STAT 4 +#define COMPLETION_ACLLIST 5 +#define COMPLETION_STRING 6 +#define COMPLETION_MULTI 7 + +typedef struct _auth_completion_list { + void_completion_t completion; + const char *auth_data; + struct _auth_completion_list *next; +} auth_completion_list_t; + +typedef struct completion { + int type; /* one of COMPLETION_* values above */ + union { + void_completion_t void_result; + stat_completion_t stat_result; + data_completion_t data_result; + strings_completion_t strings_result; + strings_stat_completion_t strings_stat_result; + acl_completion_t acl_result; + string_completion_t string_result; + struct watcher_object_list *watcher_result; + }; + completion_head_t clist; /* For multi-op */ +} completion_t; + +typedef struct _completion_list { + int xid; + completion_t c; + const void *data; + buffer_list_t *buffer; + struct _completion_list *next; + watcher_registration_t* watcher; +} completion_list_t; + +const char*err2string(int err); +static int queue_session_event(zhandle_t *zh, int state); +static const char* format_endpoint_info(const struct sockaddr_storage* ep); +static const char* format_current_endpoint_info(zhandle_t* zh); + +/* deserialize forward declarations */ +static void deserialize_response(int type, int xid, int failed, int rc, completion_list_t *cptr, struct iarchive *ia); +static int deserialize_multi(int xid, completion_list_t *cptr, struct iarchive *ia); + +/* completion routine forward declarations */ +static int add_completion(zhandle_t *zh, int xid, int completion_type, + const void *dc, const void *data, int add_to_front, + watcher_registration_t* wo, completion_head_t *clist); +static completion_list_t* create_completion_entry(int xid, int completion_type, + const void *dc, const void *data, watcher_registration_t* wo, + completion_head_t *clist); +static void destroy_completion_entry(completion_list_t* c); +static void queue_completion_nolock(completion_head_t *list, completion_list_t *c, + int add_to_front); +static void queue_completion(completion_head_t *list, completion_list_t *c, + int add_to_front); +static int handle_socket_error_msg(zhandle_t *zh, int line, int rc, + const char* format,...); +static void cleanup_bufs(zhandle_t *zh,int callCompletion,int rc); + +static int disable_conn_permute=0; // permute enabled by default + +static __attribute__((unused)) void print_completion_queue(zhandle_t *zh); + +static void *SYNCHRONOUS_MARKER = (void*)&SYNCHRONOUS_MARKER; +static int isValidPath(const char* path, const int flags); + +#ifdef _WINDOWS +static int zookeeper_send(SOCKET s, const char* buf, int len) +#else +static ssize_t zookeeper_send(int s, const void* buf, size_t len) +#endif +{ +#ifdef __linux__ + return send(s, buf, len, MSG_NOSIGNAL); +#else + return send(s, buf, len, 0); +#endif +} + +const void *zoo_get_context(zhandle_t *zh) +{ + return zh->context; +} + +void zoo_set_context(zhandle_t *zh, void *context) +{ + if (zh != NULL) { + zh->context = context; + } +} + +int zoo_recv_timeout(zhandle_t *zh) +{ + return zh->recv_timeout; +} + +/** these functions are thread unsafe, so make sure that + zoo_lock_auth is called before you access them **/ +static auth_info* get_last_auth(auth_list_head_t *auth_list) { + auth_info *element; + element = auth_list->auth; + if (element == NULL) { + return NULL; + } + while (element->next != NULL) { + element = element->next; + } + return element; +} + +static void free_auth_completion(auth_completion_list_t *a_list) { + auth_completion_list_t *tmp, *ftmp; + if (a_list == NULL) { + return; + } + tmp = a_list->next; + while (tmp != NULL) { + ftmp = tmp; + tmp = tmp->next; + ftmp->completion = NULL; + ftmp->auth_data = NULL; + free(ftmp); + } + a_list->completion = NULL; + a_list->auth_data = NULL; + a_list->next = NULL; + return; +} + +static void add_auth_completion(auth_completion_list_t* a_list, void_completion_t* completion, + const char *data) { + auth_completion_list_t *element; + auth_completion_list_t *n_element; + element = a_list; + if (a_list->completion == NULL) { + //this is the first element + a_list->completion = *completion; + a_list->next = NULL; + a_list->auth_data = data; + return; + } + while (element->next != NULL) { + element = element->next; + } + n_element = (auth_completion_list_t*) malloc(sizeof(auth_completion_list_t)); + n_element->next = NULL; + n_element->completion = *completion; + n_element->auth_data = data; + element->next = n_element; + return; +} + +static void get_auth_completions(auth_list_head_t *auth_list, auth_completion_list_t *a_list) { + auth_info *element; + element = auth_list->auth; + if (element == NULL) { + return; + } + while (element) { + if (element->completion) { + add_auth_completion(a_list, &element->completion, element->data); + } + element->completion = NULL; + element = element->next; + } + return; +} + +static void add_last_auth(auth_list_head_t *auth_list, auth_info *add_el) { + auth_info *element; + element = auth_list->auth; + if (element == NULL) { + //first element in the list + auth_list->auth = add_el; + return; + } + while (element->next != NULL) { + element = element->next; + } + element->next = add_el; + return; +} + +static void init_auth_info(auth_list_head_t *auth_list) +{ + auth_list->auth = NULL; +} + +static void mark_active_auth(zhandle_t *zh) { + auth_list_head_t auth_h = zh->auth_h; + auth_info *element; + if (auth_h.auth == NULL) { + return; + } + element = auth_h.auth; + while (element != NULL) { + element->state = 1; + element = element->next; + } +} + +static void free_auth_info(auth_list_head_t *auth_list) +{ + auth_info *auth = auth_list->auth; + while (auth != NULL) { + auth_info* old_auth = NULL; + if(auth->scheme!=NULL) + free(auth->scheme); + deallocate_Buffer(&auth->auth); + old_auth = auth; + auth = auth->next; + free(old_auth); + } + init_auth_info(auth_list); +} + +int is_unrecoverable(zhandle_t *zh) +{ + return (zh->state<0)? ZINVALIDSTATE: ZOK; +} + +zk_hashtable *exists_result_checker(zhandle_t *zh, int rc) +{ + if (rc == ZOK) { + return zh->active_node_watchers; + } else if (rc == ZNONODE) { + return zh->active_exist_watchers; + } + return 0; +} + +zk_hashtable *data_result_checker(zhandle_t *zh, int rc) +{ + return rc==ZOK ? zh->active_node_watchers : 0; +} + +zk_hashtable *child_result_checker(zhandle_t *zh, int rc) +{ + return rc==ZOK ? zh->active_child_watchers : 0; +} + +/** + * Frees and closes everything associated with a handle, + * including the handle itself. + */ +static void destroy(zhandle_t *zh) +{ + if (zh == NULL) { + return; + } + /* call any outstanding completions with a special error code */ + cleanup_bufs(zh,1,ZCLOSING); + if (zh->hostname != 0) { + free(zh->hostname); + zh->hostname = NULL; + } + if (zh->fd != -1) { + close(zh->fd); + zh->fd = -1; + zh->state = 0; + } + if (zh->addrs != 0) { + free(zh->addrs); + zh->addrs = NULL; + } + + if (zh->chroot != 0) { + free(zh->chroot); + zh->chroot = NULL; + } + + free_auth_info(&zh->auth_h); + destroy_zk_hashtable(zh->active_node_watchers); + destroy_zk_hashtable(zh->active_exist_watchers); + destroy_zk_hashtable(zh->active_child_watchers); +} + +static void setup_random() +{ +#ifndef WIN32 // TODO: better seed + int seed; + int fd = open("/dev/urandom", O_RDONLY); + if (fd == -1) { + seed = getpid(); + } else { + int seed_len = 0; + + /* Enter a loop to fill in seed with random data from /dev/urandom. + * This is done in a loop so that we can safely handle short reads + * which can happen due to signal interruptions. + */ + while (seed_len < sizeof(seed)) { + /* Assert we either read something or we were interrupted due to a + * signal (errno == EINTR) in which case we need to retry. + */ + int rc = read(fd, &seed + seed_len, sizeof(seed) - seed_len); + assert(rc > 0 || errno == EINTR); + if (rc > 0) { + seed_len += rc; + } + } + close(fd); + } + srandom(seed); +#endif +} + +#ifndef __CYGWIN__ +/** + * get the errno from the return code + * of get addrinfo. Errno is not set + * with the call to getaddrinfo, so thats + * why we have to do this. + */ +static int getaddrinfo_errno(int rc) { + switch(rc) { + case EAI_NONAME: +// ZOOKEEPER-1323 EAI_NODATA and EAI_ADDRFAMILY are deprecated in FreeBSD. +#if defined EAI_NODATA && EAI_NODATA != EAI_NONAME + case EAI_NODATA: +#endif + return ENOENT; + case EAI_MEMORY: + return ENOMEM; + default: + return EINVAL; + } +} +#endif + +/** + * fill in the addrs array of the zookeeper servers in the zhandle. after filling + * them in, we will permute them for load balancing. + */ +int getaddrs(zhandle_t *zh) +{ + char *hosts = strdup(zh->hostname); + char *host; + char *strtok_last; + struct sockaddr_storage *addr; + int i; + int rc; + int alen = 0; /* the allocated length of the addrs array */ + + zh->addrs_count = 0; + if (zh->addrs) { + free(zh->addrs); + zh->addrs = 0; + } + if (!hosts) { + LOG_ERROR(("out of memory")); + errno=ENOMEM; + return ZSYSTEMERROR; + } + zh->addrs = 0; + host=strtok_r(hosts, ",", &strtok_last); + while(host) { + char *port_spec = strrchr(host, ':'); + char *end_port_spec; + int port; + if (!port_spec) { + LOG_ERROR(("no port in %s", host)); + errno=EINVAL; + rc=ZBADARGUMENTS; + goto fail; + } + *port_spec = '\0'; + port_spec++; + port = strtol(port_spec, &end_port_spec, 0); + if (!*port_spec || *end_port_spec || port == 0) { + LOG_ERROR(("invalid port in %s", host)); + errno=EINVAL; + rc=ZBADARGUMENTS; + goto fail; + } +#if defined(__CYGWIN__) + // sadly CYGWIN doesn't have getaddrinfo + // but happily gethostbyname is threadsafe in windows + { + struct hostent *he; + char **ptr; + struct sockaddr_in *addr4; + + he = gethostbyname(host); + if (!he) { + LOG_ERROR(("could not resolve %s", host)); + errno=ENOENT; + rc=ZBADARGUMENTS; + goto fail; + } + + /* Setup the address array */ + for(ptr = he->h_addr_list;*ptr != 0; ptr++) { + if (zh->addrs_count == alen) { + alen += 16; + zh->addrs = realloc(zh->addrs, sizeof(*zh->addrs)*alen); + if (zh->addrs == 0) { + LOG_ERROR(("out of memory")); + errno=ENOMEM; + rc=ZSYSTEMERROR; + goto fail; + } + } + addr = &zh->addrs[zh->addrs_count]; + addr4 = (struct sockaddr_in*)addr; + addr->ss_family = he->h_addrtype; + if (addr->ss_family == AF_INET) { + addr4->sin_port = htons(port); + memset(&addr4->sin_zero, 0, sizeof(addr4->sin_zero)); + memcpy(&addr4->sin_addr, *ptr, he->h_length); + zh->addrs_count++; + } +#if defined(AF_INET6) + else if (addr->ss_family == AF_INET6) { + struct sockaddr_in6 *addr6; + + addr6 = (struct sockaddr_in6*)addr; + addr6->sin6_port = htons(port); + addr6->sin6_scope_id = 0; + addr6->sin6_flowinfo = 0; + memcpy(&addr6->sin6_addr, *ptr, he->h_length); + zh->addrs_count++; + } +#endif + else { + LOG_WARN(("skipping unknown address family %x for %s", + addr->ss_family, zh->hostname)); + } + } + host = strtok_r(0, ",", &strtok_last); + } +#else + { + struct addrinfo hints, *res, *res0; + + memset(&hints, 0, sizeof(hints)); +#ifdef AI_ADDRCONFIG + hints.ai_flags = AI_ADDRCONFIG; +#else + hints.ai_flags = 0; +#endif + hints.ai_family = AF_UNSPEC; + hints.ai_socktype = SOCK_STREAM; + hints.ai_protocol = IPPROTO_TCP; + + while(isspace(*host) && host != strtok_last) + host++; + + if ((rc = getaddrinfo(host, port_spec, &hints, &res0)) != 0) { + //bug in getaddrinfo implementation when it returns + //EAI_BADFLAGS or EAI_ADDRFAMILY with AF_UNSPEC and + // ai_flags as AI_ADDRCONFIG +#ifdef AI_ADDRCONFIG + if ((hints.ai_flags == AI_ADDRCONFIG) && +// ZOOKEEPER-1323 EAI_NODATA and EAI_ADDRFAMILY are deprecated in FreeBSD. +#ifdef EAI_ADDRFAMILY + ((rc ==EAI_BADFLAGS) || (rc == EAI_ADDRFAMILY))) { +#else + (rc == EAI_BADFLAGS)) { +#endif + //reset ai_flags to null + hints.ai_flags = 0; + //retry getaddrinfo + rc = getaddrinfo(host, port_spec, &hints, &res0); + } +#endif + if (rc != 0) { + errno = getaddrinfo_errno(rc); +#ifdef WIN32 + LOG_ERROR(("Win32 message: %s\n", gai_strerror(rc))); +#else + LOG_ERROR(("getaddrinfo: %s\n", strerror(errno))); +#endif + rc=ZSYSTEMERROR; + goto fail; + } + } + + for (res = res0; res; res = res->ai_next) { + // Expand address list if needed + if (zh->addrs_count == alen) { + void *tmpaddr; + alen += 16; + tmpaddr = realloc(zh->addrs, sizeof(*zh->addrs)*alen); + if (tmpaddr == 0) { + LOG_ERROR(("out of memory")); + errno=ENOMEM; + rc=ZSYSTEMERROR; + goto fail; + } + zh->addrs=tmpaddr; + } + + // Copy addrinfo into address list + addr = &zh->addrs[zh->addrs_count]; + switch (res->ai_family) { + case AF_INET: +#if defined(AF_INET6) + case AF_INET6: +#endif + memcpy(addr, res->ai_addr, res->ai_addrlen); + ++zh->addrs_count; + break; + default: + LOG_WARN(("skipping unknown address family %x for %s", + res->ai_family, zh->hostname)); + break; + } + } + + freeaddrinfo(res0); + + host = strtok_r(0, ",", &strtok_last); + } +#endif + } + free(hosts); + + if(!disable_conn_permute){ + setup_random(); + /* Permute */ + for (i = zh->addrs_count - 1; i > 0; --i) { + long int j = random()%(i+1); + if (i != j) { + struct sockaddr_storage t = zh->addrs[i]; + zh->addrs[i] = zh->addrs[j]; + zh->addrs[j] = t; + } + } + } + return ZOK; +fail: + if (zh->addrs) { + free(zh->addrs); + zh->addrs=0; + } + if (hosts) { + free(hosts); + } + return rc; +} + +const clientid_t *zoo_client_id(zhandle_t *zh) +{ + return &zh->client_id; +} + +static void null_watcher_fn(zhandle_t* p1, int p2, int p3,const char* p4,void*p5){} + +watcher_fn zoo_set_watcher(zhandle_t *zh,watcher_fn newFn) +{ + watcher_fn oldWatcher=zh->watcher; + if (newFn) { + zh->watcher = newFn; + } else { + zh->watcher = null_watcher_fn; + } + return oldWatcher; +} + +struct sockaddr* zookeeper_get_connected_host(zhandle_t *zh, + struct sockaddr *addr, socklen_t *addr_len) +{ + if (zh->state!=ZOO_CONNECTED_STATE) { + return NULL; + } + if (getpeername(zh->fd, addr, addr_len)==-1) { + return NULL; + } + return addr; +} + +static void log_env() { + char buf[2048]; +#ifdef HAVE_SYS_UTSNAME_H + struct utsname utsname; +#endif + +#if defined(HAVE_GETUID) && defined(HAVE_GETPWUID_R) + struct passwd pw; + struct passwd *pwp = NULL; + uid_t uid = 0; +#endif + + LOG_INFO(("Client environment:zookeeper.version=%s", PACKAGE_STRING)); + +#ifdef HAVE_GETHOSTNAME + gethostname(buf, sizeof(buf)); + LOG_INFO(("Client environment:host.name=%s", buf)); +#else + LOG_INFO(("Client environment:host.name=")); +#endif + +#ifdef HAVE_SYS_UTSNAME_H + uname(&utsname); + LOG_INFO(("Client environment:os.name=%s", utsname.sysname)); + LOG_INFO(("Client environment:os.arch=%s", utsname.release)); + LOG_INFO(("Client environment:os.version=%s", utsname.version)); +#else + LOG_INFO(("Client environment:os.name=")); + LOG_INFO(("Client environment:os.arch=")); + LOG_INFO(("Client environment:os.version=")); +#endif + +#ifdef HAVE_GETLOGIN + LOG_INFO(("Client environment:user.name=%s", getlogin())); +#else + LOG_INFO(("Client environment:user.name=")); +#endif + +#if defined(HAVE_GETUID) && defined(HAVE_GETPWUID_R) + uid = getuid(); + if (!getpwuid_r(uid, &pw, buf, sizeof(buf), &pwp)) { + LOG_INFO(("Client environment:user.home=%s", pw.pw_dir)); + } else { + LOG_INFO(("Client environment:user.home=")); + } +#else + LOG_INFO(("Client environment:user.home=")); +#endif + +#ifdef HAVE_GETCWD + if (!getcwd(buf, sizeof(buf))) { + LOG_INFO(("Client environment:user.dir=")); + } else { + LOG_INFO(("Client environment:user.dir=%s", buf)); + } +#else + LOG_INFO(("Client environment:user.dir=")); +#endif +} + +/** + * Create a zookeeper handle associated with the given host and port. + */ +zhandle_t *zookeeper_init(const char *host, watcher_fn watcher, + int recv_timeout, const clientid_t *clientid, void *context, int flags) +{ + int errnosave = 0; + zhandle_t *zh = NULL; + char *index_chroot = NULL; + + log_env(); +#ifdef WIN32 + if (Win32WSAStartup()){ + LOG_ERROR(("Error initializing ws2_32.dll")); + return 0; + } +#endif + LOG_INFO(("Initiating client connection, host=%s sessionTimeout=%d watcher=%p" + " sessionId=%#llx sessionPasswd=%s context=%p flags=%d", + host, + recv_timeout, + watcher, + (clientid == 0 ? 0 : clientid->client_id), + ((clientid == 0) || (clientid->passwd[0] == 0) ? + "" : ""), + context, + flags)); + + zh = calloc(1, sizeof(*zh)); + if (!zh) { + return 0; + } + zh->fd = -1; + zh->state = NOTCONNECTED_STATE_DEF; + zh->context = context; + zh->recv_timeout = recv_timeout; + init_auth_info(&zh->auth_h); + if (watcher) { + zh->watcher = watcher; + } else { + zh->watcher = null_watcher_fn; + } + if (host == 0 || *host == 0) { // what we shouldn't dup + errno=EINVAL; + goto abort; + } + //parse the host to get the chroot if + //available + index_chroot = strchr(host, '/'); + if (index_chroot) { + zh->chroot = strdup(index_chroot); + if (zh->chroot == NULL) { + goto abort; + } + // if chroot is just / set it to null + if (strlen(zh->chroot) == 1) { + free(zh->chroot); + zh->chroot = NULL; + } + // cannot use strndup so allocate and strcpy + zh->hostname = (char *) malloc(index_chroot - host + 1); + zh->hostname = strncpy(zh->hostname, host, (index_chroot - host)); + //strncpy does not null terminate + *(zh->hostname + (index_chroot - host)) = '\0'; + + } else { + zh->chroot = NULL; + zh->hostname = strdup(host); + } + if (zh->chroot && !isValidPath(zh->chroot, 0)) { + errno = EINVAL; + goto abort; + } + if (zh->hostname == 0) { + goto abort; + } + if(getaddrs(zh)!=0) { + goto abort; + } + zh->connect_index = 0; + if (clientid) { + memcpy(&zh->client_id, clientid, sizeof(zh->client_id)); + } else { + memset(&zh->client_id, 0, sizeof(zh->client_id)); + } + zh->primer_buffer.buffer = zh->primer_storage_buffer; + zh->primer_buffer.curr_offset = 0; + zh->primer_buffer.len = sizeof(zh->primer_storage_buffer); + zh->primer_buffer.next = 0; + zh->last_zxid = 0; + zh->next_deadline.tv_sec=zh->next_deadline.tv_usec=0; + zh->socket_readable.tv_sec=zh->socket_readable.tv_usec=0; + zh->active_node_watchers=create_zk_hashtable(); + zh->active_exist_watchers=create_zk_hashtable(); + zh->active_child_watchers=create_zk_hashtable(); + + if (adaptor_init(zh) == -1) { + goto abort; + } + + return zh; +abort: + errnosave=errno; + destroy(zh); + free(zh); + errno=errnosave; + return 0; +} + +/** + * deallocated the free_path only its beeen allocated + * and not equal to path + */ +void free_duplicate_path(const char *free_path, const char* path) { + if (free_path != path) { + free((void*)free_path); + } +} + +/** + prepend the chroot path if available else return the path +*/ +static char* prepend_string(zhandle_t *zh, const char* client_path) { + char *ret_str; + if (zh == NULL || zh->chroot == NULL) + return (char *) client_path; + // handle the chroot itself, client_path = "/" + if (strlen(client_path) == 1) { + return strdup(zh->chroot); + } + ret_str = (char *) malloc(strlen(zh->chroot) + strlen(client_path) + 1); + strcpy(ret_str, zh->chroot); + return strcat(ret_str, client_path); +} + +/** + strip off the chroot string from the server path + if there is one else return the exact path + */ +char* sub_string(zhandle_t *zh, const char* server_path) { + char *ret_str; + if (zh->chroot == NULL) + return (char *) server_path; + //ZOOKEEPER-1027 + if (strncmp(server_path, zh->chroot, strlen(zh->chroot)) != 0) { + LOG_ERROR(("server path %s does not include chroot path %s", + server_path, zh->chroot)); + return (char *) server_path; + } + if (strlen(server_path) == strlen(zh->chroot)) { + //return "/" + ret_str = strdup("/"); + return ret_str; + } + ret_str = strdup(server_path + strlen(zh->chroot)); + return ret_str; +} + +static buffer_list_t *allocate_buffer(char *buff, int len) +{ + buffer_list_t *buffer = calloc(1, sizeof(*buffer)); + if (buffer == 0) + return 0; + + buffer->len = len==0?sizeof(*buffer):len; + buffer->curr_offset = 0; + buffer->buffer = buff; + buffer->next = 0; + return buffer; +} + +static void free_buffer(buffer_list_t *b) +{ + if (!b) { + return; + } + if (b->buffer) { + free(b->buffer); + } + free(b); +} + +static buffer_list_t *dequeue_buffer(buffer_head_t *list) +{ + buffer_list_t *b; + lock_buffer_list(list); + b = list->head; + if (b) { + list->head = b->next; + if (!list->head) { + assert(b == list->last); + list->last = 0; + } + } + unlock_buffer_list(list); + return b; +} + +static int remove_buffer(buffer_head_t *list) +{ + buffer_list_t *b = dequeue_buffer(list); + if (!b) { + return 0; + } + free_buffer(b); + return 1; +} + +static void queue_buffer(buffer_head_t *list, buffer_list_t *b, int add_to_front) +{ + b->next = 0; + lock_buffer_list(list); + if (list->head) { + assert(list->last); + // The list is not empty + if (add_to_front) { + b->next = list->head; + list->head = b; + } else { + list->last->next = b; + list->last = b; + } + }else{ + // The list is empty + assert(!list->head); + list->head = b; + list->last = b; + } + unlock_buffer_list(list); +} + +static int queue_buffer_bytes(buffer_head_t *list, char *buff, int len) +{ + buffer_list_t *b = allocate_buffer(buff,len); + if (!b) + return ZSYSTEMERROR; + queue_buffer(list, b, 0); + return ZOK; +} + +static int queue_front_buffer_bytes(buffer_head_t *list, char *buff, int len) +{ + buffer_list_t *b = allocate_buffer(buff,len); + if (!b) + return ZSYSTEMERROR; + queue_buffer(list, b, 1); + return ZOK; +} + +static __attribute__ ((unused)) int get_queue_len(buffer_head_t *list) +{ + int i; + buffer_list_t *ptr; + lock_buffer_list(list); + ptr = list->head; + for (i=0; ptr!=0; ptr=ptr->next, i++) + ; + unlock_buffer_list(list); + return i; +} +/* returns: + * -1 if send failed, + * 0 if send would block while sending the buffer (or a send was incomplete), + * 1 if success + */ +#ifdef WIN32 +static int send_buffer(SOCKET fd, buffer_list_t *buff) +#else +static int send_buffer(int fd, buffer_list_t *buff) +#endif +{ + int len = buff->len; + int off = buff->curr_offset; + int rc = -1; + + if (off < 4) { + /* we need to send the length at the beginning */ + int nlen = htonl(len); + char *b = (char*)&nlen; + rc = zookeeper_send(fd, b + off, sizeof(nlen) - off); + if (rc == -1) { +#ifndef _WINDOWS + if (errno != EAGAIN) { +#else + if (WSAGetLastError() != WSAEWOULDBLOCK) { +#endif + return -1; + } else { + return 0; + } + } else { + buff->curr_offset += rc; + } + off = buff->curr_offset; + } + if (off >= 4) { + /* want off to now represent the offset into the buffer */ + off -= sizeof(buff->len); + rc = zookeeper_send(fd, buff->buffer + off, len - off); + if (rc == -1) { +#ifndef _WINDOWS + if (errno != EAGAIN) { +#else + if (WSAGetLastError() != WSAEWOULDBLOCK) { +#endif + return -1; + } + } else { + buff->curr_offset += rc; + } + } + return buff->curr_offset == len + sizeof(buff->len); +} + +/* returns: + * -1 if recv call failed, + * 0 if recv would block, + * 1 if success + */ +#ifdef WIN32 +static int recv_buffer(SOCKET fd, buffer_list_t *buff) +#else +static int recv_buffer(int fd, buffer_list_t *buff) +#endif +{ + int off = buff->curr_offset; + int rc = 0; + //fprintf(LOGSTREAM, "rc = %d, off = %d, line %d\n", rc, off, __LINE__); + + /* if buffer is less than 4, we are reading in the length */ + if (off < 4) { + char *buffer = (char*)&(buff->len); + rc = recv(fd, buffer+off, sizeof(int)-off, 0); + //fprintf(LOGSTREAM, "rc = %d, off = %d, line %d\n", rc, off, __LINE__); + switch(rc) { + case 0: + errno = EHOSTDOWN; + case -1: +#ifndef _WINDOWS + if (errno == EAGAIN) { +#else + if (WSAGetLastError() == WSAEWOULDBLOCK) { +#endif + return 0; + } + return -1; + default: + buff->curr_offset += rc; + } + off = buff->curr_offset; + if (buff->curr_offset == sizeof(buff->len)) { + buff->len = ntohl(buff->len); + buff->buffer = calloc(1, buff->len); + } + } + if (buff->buffer) { + /* want off to now represent the offset into the buffer */ + off -= sizeof(buff->len); + + rc = recv(fd, buff->buffer+off, buff->len-off, 0); + switch(rc) { + case 0: + errno = EHOSTDOWN; + case -1: +#ifndef _WINDOWS + if (errno == EAGAIN) { +#else + if (WSAGetLastError() == WSAEWOULDBLOCK) { +#endif + break; + } + return -1; + default: + buff->curr_offset += rc; + } + } + return buff->curr_offset == buff->len + sizeof(buff->len); +} + +void free_buffers(buffer_head_t *list) +{ + while (remove_buffer(list)) + ; +} + +void free_completions(zhandle_t *zh,int callCompletion,int reason) +{ + completion_head_t tmp_list; + struct oarchive *oa; + struct ReplyHeader h; + void_completion_t auth_completion = NULL; + auth_completion_list_t a_list, *a_tmp; + + if (lock_completion_list(&zh->sent_requests) == 0) { + tmp_list = zh->sent_requests; + zh->sent_requests.head = 0; + zh->sent_requests.last = 0; + unlock_completion_list(&zh->sent_requests); + + while (tmp_list.head) { + completion_list_t *cptr = tmp_list.head; + + tmp_list.head = cptr->next; + if (cptr->c.data_result == SYNCHRONOUS_MARKER) { + struct sync_completion + *sc = (struct sync_completion*)cptr->data; + sc->rc = reason; + notify_sync_completion(sc); + zh->outstanding_sync--; + destroy_completion_entry(cptr); + } else if (callCompletion) { + // Fake the response + buffer_list_t *bptr; + h.xid = cptr->xid; + h.zxid = -1; + h.err = reason; + oa = create_buffer_oarchive(); + serialize_ReplyHeader(oa, "header", &h); + bptr = calloc(sizeof(*bptr), 1); + assert(bptr); + bptr->len = get_buffer_len(oa); + bptr->buffer = get_buffer(oa); + close_buffer_oarchive(&oa, 0); + cptr->buffer = bptr; + queue_completion(&zh->completions_to_process, cptr, 0); + } + } + } + if (zoo_lock_auth(zh) == 0) { + a_list.completion = NULL; + a_list.next = NULL; + + get_auth_completions(&zh->auth_h, &a_list); + zoo_unlock_auth(zh); + + a_tmp = &a_list; + // chain call user's completion function + while (a_tmp->completion != NULL) { + auth_completion = a_tmp->completion; + auth_completion(reason, a_tmp->auth_data); + a_tmp = a_tmp->next; + if (a_tmp == NULL) + break; + } + } + free_auth_completion(&a_list); +} + +static void cleanup_bufs(zhandle_t *zh,int callCompletion,int rc) +{ + enter_critical(zh); + free_buffers(&zh->to_send); + free_buffers(&zh->to_process); + free_completions(zh,callCompletion,rc); + leave_critical(zh); + if (zh->input_buffer && zh->input_buffer != &zh->primer_buffer) { + free_buffer(zh->input_buffer); + zh->input_buffer = 0; + } +} + +static void handle_error(zhandle_t *zh,int rc) +{ + close(zh->fd); + if (is_unrecoverable(zh)) { + LOG_DEBUG(("Calling a watcher for a ZOO_SESSION_EVENT and the state=%s", + state2String(zh->state))); + PROCESS_SESSION_EVENT(zh, zh->state); + } else if (zh->state == ZOO_CONNECTED_STATE) { + LOG_DEBUG(("Calling a watcher for a ZOO_SESSION_EVENT and the state=CONNECTING_STATE")); + PROCESS_SESSION_EVENT(zh, ZOO_CONNECTING_STATE); + } + cleanup_bufs(zh,1,rc); + zh->fd = -1; + zh->connect_index++; + if (!is_unrecoverable(zh)) { + zh->state = 0; + } + if (process_async(zh->outstanding_sync)) { + process_completions(zh); + } +} + +static int handle_socket_error_msg(zhandle_t *zh, int line, int rc, + const char* format, ...) +{ + if(logLevel>=ZOO_LOG_LEVEL_ERROR){ + va_list va; + char buf[1024]; + va_start(va,format); + vsnprintf(buf, sizeof(buf)-1,format,va); + log_message(ZOO_LOG_LEVEL_ERROR,line,__func__, + format_log_message("Socket [%s] zk retcode=%d, errno=%d(%s): %s", + format_current_endpoint_info(zh),rc,errno,strerror(errno),buf)); + va_end(va); + } + handle_error(zh,rc); + return rc; +} + +static void auth_completion_func(int rc, zhandle_t* zh) +{ + void_completion_t auth_completion = NULL; + auth_completion_list_t a_list; + auth_completion_list_t *a_tmp; + + if(zh==NULL) + return; + + zoo_lock_auth(zh); + + if(rc!=0){ + zh->state=ZOO_AUTH_FAILED_STATE; + }else{ + //change state for all auths + mark_active_auth(zh); + } + a_list.completion = NULL; + a_list.next = NULL; + get_auth_completions(&zh->auth_h, &a_list); + zoo_unlock_auth(zh); + if (rc) { + LOG_ERROR(("Authentication scheme %s failed. Connection closed.", + zh->auth_h.auth->scheme)); + } + else { + LOG_INFO(("Authentication scheme %s succeeded", zh->auth_h.auth->scheme)); + } + a_tmp = &a_list; + // chain call user's completion function + while (a_tmp->completion != NULL) { + auth_completion = a_tmp->completion; + auth_completion(rc, a_tmp->auth_data); + a_tmp = a_tmp->next; + if (a_tmp == NULL) + break; + } + free_auth_completion(&a_list); +} + +static int send_info_packet(zhandle_t *zh, auth_info* auth) { + struct oarchive *oa; + struct RequestHeader h = { STRUCT_INITIALIZER(xid , AUTH_XID), STRUCT_INITIALIZER(type , ZOO_SETAUTH_OP)}; + struct AuthPacket req; + int rc; + oa = create_buffer_oarchive(); + rc = serialize_RequestHeader(oa, "header", &h); + req.type=0; // ignored by the server + req.scheme = auth->scheme; + req.auth = auth->auth; + rc = rc < 0 ? rc : serialize_AuthPacket(oa, "req", &req); + /* add this buffer to the head of the send queue */ + rc = rc < 0 ? rc : queue_front_buffer_bytes(&zh->to_send, get_buffer(oa), + get_buffer_len(oa)); + /* We queued the buffer, so don't free it */ + close_buffer_oarchive(&oa, 0); + + return rc; +} + +/** send all auths, not just the last one **/ +static int send_auth_info(zhandle_t *zh) { + int rc = 0; + auth_info *auth = NULL; + + zoo_lock_auth(zh); + auth = zh->auth_h.auth; + if (auth == NULL) { + zoo_unlock_auth(zh); + return ZOK; + } + while (auth != NULL) { + rc = send_info_packet(zh, auth); + auth = auth->next; + } + zoo_unlock_auth(zh); + LOG_DEBUG(("Sending all auth info request to %s", format_current_endpoint_info(zh))); + return (rc <0) ? ZMARSHALLINGERROR:ZOK; +} + +static int send_last_auth_info(zhandle_t *zh) +{ + int rc = 0; + auth_info *auth = NULL; + + zoo_lock_auth(zh); + auth = get_last_auth(&zh->auth_h); + if(auth==NULL) { + zoo_unlock_auth(zh); + return ZOK; // there is nothing to send + } + rc = send_info_packet(zh, auth); + zoo_unlock_auth(zh); + LOG_DEBUG(("Sending auth info request to %s",format_current_endpoint_info(zh))); + return (rc < 0)?ZMARSHALLINGERROR:ZOK; +} + +static void free_key_list(char **list, int count) +{ + int i; + + for(i = 0; i < count; i++) { + free(list[i]); + } + free(list); +} + +static int send_set_watches(zhandle_t *zh) +{ + struct oarchive *oa; + struct RequestHeader h = { STRUCT_INITIALIZER(xid , SET_WATCHES_XID), STRUCT_INITIALIZER(type , ZOO_SETWATCHES_OP)}; + struct SetWatches req; + int rc; + + req.relativeZxid = zh->last_zxid; + req.dataWatches.data = collect_keys(zh->active_node_watchers, (int*)&req.dataWatches.count); + req.existWatches.data = collect_keys(zh->active_exist_watchers, (int*)&req.existWatches.count); + req.childWatches.data = collect_keys(zh->active_child_watchers, (int*)&req.childWatches.count); + + // return if there are no pending watches + if (!req.dataWatches.count && !req.existWatches.count && + !req.childWatches.count) { + free_key_list(req.dataWatches.data, req.dataWatches.count); + free_key_list(req.existWatches.data, req.existWatches.count); + free_key_list(req.childWatches.data, req.childWatches.count); + return ZOK; + } + + + oa = create_buffer_oarchive(); + rc = serialize_RequestHeader(oa, "header", &h); + rc = rc < 0 ? rc : serialize_SetWatches(oa, "req", &req); + /* add this buffer to the head of the send queue */ + rc = rc < 0 ? rc : queue_front_buffer_bytes(&zh->to_send, get_buffer(oa), + get_buffer_len(oa)); + /* We queued the buffer, so don't free it */ + close_buffer_oarchive(&oa, 0); + free_key_list(req.dataWatches.data, req.dataWatches.count); + free_key_list(req.existWatches.data, req.existWatches.count); + free_key_list(req.childWatches.data, req.childWatches.count); + LOG_DEBUG(("Sending set watches request to %s",format_current_endpoint_info(zh))); + return (rc < 0)?ZMARSHALLINGERROR:ZOK; +} + +static int serialize_prime_connect(struct connect_req *req, char* buffer){ + //this should be the order of serialization + int offset = 0; + req->protocolVersion = htonl(req->protocolVersion); + memcpy(buffer + offset, &req->protocolVersion, sizeof(req->protocolVersion)); + offset = offset + sizeof(req->protocolVersion); + + req->lastZxidSeen = zoo_htonll(req->lastZxidSeen); + memcpy(buffer + offset, &req->lastZxidSeen, sizeof(req->lastZxidSeen)); + offset = offset + sizeof(req->lastZxidSeen); + + req->timeOut = htonl(req->timeOut); + memcpy(buffer + offset, &req->timeOut, sizeof(req->timeOut)); + offset = offset + sizeof(req->timeOut); + + req->sessionId = zoo_htonll(req->sessionId); + memcpy(buffer + offset, &req->sessionId, sizeof(req->sessionId)); + offset = offset + sizeof(req->sessionId); + + req->passwd_len = htonl(req->passwd_len); + memcpy(buffer + offset, &req->passwd_len, sizeof(req->passwd_len)); + offset = offset + sizeof(req->passwd_len); + + memcpy(buffer + offset, req->passwd, sizeof(req->passwd)); + + return 0; +} + + static int deserialize_prime_response(struct prime_struct *req, char* buffer){ + //this should be the order of deserialization + int offset = 0; + memcpy(&req->len, buffer + offset, sizeof(req->len)); + offset = offset + sizeof(req->len); + + req->len = ntohl(req->len); + memcpy(&req->protocolVersion, buffer + offset, sizeof(req->protocolVersion)); + offset = offset + sizeof(req->protocolVersion); + + req->protocolVersion = ntohl(req->protocolVersion); + memcpy(&req->timeOut, buffer + offset, sizeof(req->timeOut)); + offset = offset + sizeof(req->timeOut); + + req->timeOut = ntohl(req->timeOut); + memcpy(&req->sessionId, buffer + offset, sizeof(req->sessionId)); + offset = offset + sizeof(req->sessionId); + + req->sessionId = zoo_htonll(req->sessionId); + memcpy(&req->passwd_len, buffer + offset, sizeof(req->passwd_len)); + offset = offset + sizeof(req->passwd_len); + + req->passwd_len = ntohl(req->passwd_len); + memcpy(req->passwd, buffer + offset, sizeof(req->passwd)); + return 0; + } + +static int prime_connection(zhandle_t *zh) +{ + int rc; + /*this is the size of buffer to serialize req into*/ + char buffer_req[HANDSHAKE_REQ_SIZE]; + int len = sizeof(buffer_req); + int hlen = 0; + struct connect_req req; + req.protocolVersion = 0; + req.sessionId = zh->client_id.client_id; + req.passwd_len = sizeof(req.passwd); + memcpy(req.passwd, zh->client_id.passwd, sizeof(zh->client_id.passwd)); + req.timeOut = zh->recv_timeout; + req.lastZxidSeen = zh->last_zxid; + hlen = htonl(len); + /* We are running fast and loose here, but this string should fit in the initial buffer! */ + rc=zookeeper_send(zh->fd, &hlen, sizeof(len)); + serialize_prime_connect(&req, buffer_req); + rc=rc<0 ? rc : zookeeper_send(zh->fd, buffer_req, len); + if (rc<0) { + return handle_socket_error_msg(zh, __LINE__, ZCONNECTIONLOSS, + "failed to send a handshake packet: %s", strerror(errno)); + } + zh->state = ZOO_ASSOCIATING_STATE; + + zh->input_buffer = &zh->primer_buffer; + /* This seems a bit weird to to set the offset to 4, but we already have a + * length, so we skip reading the length (and allocating the buffer) by + * saying that we are already at offset 4 */ + zh->input_buffer->curr_offset = 4; + + return ZOK; +} + +static inline int calculate_interval(const struct timeval *start, + const struct timeval *end) +{ + int interval; + struct timeval i = *end; + i.tv_sec -= start->tv_sec; + i.tv_usec -= start->tv_usec; + interval = i.tv_sec * 1000 + (i.tv_usec/1000); + return interval; +} + +static struct timeval get_timeval(int interval) +{ + struct timeval tv; + if (interval < 0) { + interval = 0; + } + tv.tv_sec = interval/1000; + tv.tv_usec = (interval%1000)*1000; + return tv; +} + + static int add_void_completion(zhandle_t *zh, int xid, void_completion_t dc, + const void *data); + static int add_string_completion(zhandle_t *zh, int xid, + string_completion_t dc, const void *data); + + int send_ping(zhandle_t* zh) + { + int rc; + struct oarchive *oa = create_buffer_oarchive(); + struct RequestHeader h = { STRUCT_INITIALIZER(xid ,PING_XID), STRUCT_INITIALIZER (type , ZOO_PING_OP) }; + + rc = serialize_RequestHeader(oa, "header", &h); + enter_critical(zh); + gettimeofday(&zh->last_ping, 0); + rc = rc < 0 ? rc : queue_buffer_bytes(&zh->to_send, get_buffer(oa), + get_buffer_len(oa)); + leave_critical(zh); + close_buffer_oarchive(&oa, 0); + return rc<0 ? rc : adaptor_send_queue(zh, 0); +} + +#ifdef WIN32 +int zookeeper_interest(zhandle_t *zh, SOCKET *fd, int *interest, + struct timeval *tv) +{ + + ULONG nonblocking_flag = 1; +#else +int zookeeper_interest(zhandle_t *zh, int *fd, int *interest, + struct timeval *tv) +{ +#endif + struct timeval now; + if(zh==0 || fd==0 ||interest==0 || tv==0) + return ZBADARGUMENTS; + if (is_unrecoverable(zh)) + return ZINVALIDSTATE; + gettimeofday(&now, 0); + if(zh->next_deadline.tv_sec!=0 || zh->next_deadline.tv_usec!=0){ + int time_left = calculate_interval(&zh->next_deadline, &now); + if (time_left > 10) + LOG_WARN(("Exceeded deadline by %dms", time_left)); + } + api_prolog(zh); + *fd = zh->fd; + *interest = 0; + tv->tv_sec = 0; + tv->tv_usec = 0; + if (*fd == -1) { + if (zh->connect_index == zh->addrs_count) { + /* Wait a bit before trying again so that we don't spin */ + zh->connect_index = 0; + }else { + int rc; +#ifdef WIN32 + char enable_tcp_nodelay = 1; +#else + int enable_tcp_nodelay = 1; +#endif + int ssoresult; + + zh->fd = socket(zh->addrs[zh->connect_index].ss_family, SOCK_STREAM, 0); + if (zh->fd < 0) { + return api_epilog(zh,handle_socket_error_msg(zh,__LINE__, + ZSYSTEMERROR, "socket() call failed")); + } + ssoresult = setsockopt(zh->fd, IPPROTO_TCP, TCP_NODELAY, &enable_tcp_nodelay, sizeof(enable_tcp_nodelay)); + if (ssoresult != 0) { + LOG_WARN(("Unable to set TCP_NODELAY, operation latency may be effected")); + } +#ifdef WIN32 + ioctlsocket(zh->fd, FIONBIO, &nonblocking_flag); +#else + fcntl(zh->fd, F_SETFL, O_NONBLOCK|fcntl(zh->fd, F_GETFL, 0)); +#endif +#if defined(AF_INET6) + if (zh->addrs[zh->connect_index].ss_family == AF_INET6) { + rc = connect(zh->fd, (struct sockaddr*) &zh->addrs[zh->connect_index], sizeof(struct sockaddr_in6)); + } else { +#else + LOG_DEBUG(("[zk] connect()\n")); + { +#endif + rc = connect(zh->fd, (struct sockaddr*) &zh->addrs[zh->connect_index], sizeof(struct sockaddr_in)); +#ifdef WIN32 + errno = GetLastError(); + +#ifndef EWOULDBLOCK +#define EWOULDBLOCK WSAEWOULDBLOCK +#endif + +#ifndef EINPROGRESS +#define EINPROGRESS WSAEINPROGRESS +#endif + +#if _MSC_VER >= 1600 + switch (errno) { + case WSAEWOULDBLOCK: + errno = EWOULDBLOCK; + break; + case WSAEINPROGRESS: + errno = EINPROGRESS; + break; + } +#endif +#endif + } + if (rc == -1) { + /* we are handling the non-blocking connect according to + * the description in section 16.3 "Non-blocking connect" + * in UNIX Network Programming vol 1, 3rd edition */ + if (errno == EWOULDBLOCK || errno == EINPROGRESS) + zh->state = ZOO_CONNECTING_STATE; + else + return api_epilog(zh,handle_socket_error_msg(zh,__LINE__, + ZCONNECTIONLOSS,"connect() call failed")); + } else { + if((rc=prime_connection(zh))!=0) + return api_epilog(zh,rc); + + LOG_INFO(("Initiated connection to server [%s]", + format_endpoint_info(&zh->addrs[zh->connect_index]))); + } + } + *fd = zh->fd; + *tv = get_timeval(zh->recv_timeout/3); + zh->last_recv = now; + zh->last_send = now; + zh->last_ping = now; + } + if (zh->fd != -1) { + int idle_recv = calculate_interval(&zh->last_recv, &now); + int idle_send = calculate_interval(&zh->last_send, &now); + int recv_to = zh->recv_timeout*2/3 - idle_recv; + int send_to = zh->recv_timeout/3; + // have we exceeded the receive timeout threshold? + if (recv_to <= 0) { + // We gotta cut our losses and connect to someone else +#ifdef WIN32 + errno = WSAETIMEDOUT; +#else + errno = ETIMEDOUT; +#endif + *interest=0; + *tv = get_timeval(0); + return api_epilog(zh,handle_socket_error_msg(zh, + __LINE__,ZOPERATIONTIMEOUT, + "connection to %s timed out (exceeded timeout by %dms)", + format_endpoint_info(&zh->addrs[zh->connect_index]), + -recv_to)); + + } + // We only allow 1/3 of our timeout time to expire before sending + // a PING + if (zh->state==ZOO_CONNECTED_STATE) { + send_to = zh->recv_timeout/3 - idle_send; + if (send_to <= 0) { + if (zh->sent_requests.head==0) { +// LOG_DEBUG(("Sending PING to %s (exceeded idle by %dms)", +// format_current_endpoint_info(zh),-send_to)); + int rc=send_ping(zh); + if (rc < 0){ + LOG_ERROR(("failed to send PING request (zk retcode=%d)",rc)); + return api_epilog(zh,rc); + } + } + send_to = zh->recv_timeout/3; + } + } + // choose the lesser value as the timeout + *tv = get_timeval(recv_to < send_to? recv_to:send_to); + zh->next_deadline.tv_sec = now.tv_sec + tv->tv_sec; + zh->next_deadline.tv_usec = now.tv_usec + tv->tv_usec; + if (zh->next_deadline.tv_usec > 1000000) { + zh->next_deadline.tv_sec += zh->next_deadline.tv_usec / 1000000; + zh->next_deadline.tv_usec = zh->next_deadline.tv_usec % 1000000; + } + *interest = ZOOKEEPER_READ; + /* we are interested in a write if we are connected and have something + * to send, or we are waiting for a connect to finish. */ + if ((zh->to_send.head && (zh->state == ZOO_CONNECTED_STATE)) + || zh->state == ZOO_CONNECTING_STATE) { + *interest |= ZOOKEEPER_WRITE; + } + } + return api_epilog(zh,ZOK); +} + +static int check_events(zhandle_t *zh, int events) +{ + if (zh->fd == -1) + return ZINVALIDSTATE; + if ((events&ZOOKEEPER_WRITE)&&(zh->state == ZOO_CONNECTING_STATE)) { + int rc, error; + socklen_t len = sizeof(error); + rc = getsockopt(zh->fd, SOL_SOCKET, SO_ERROR, &error, &len); + /* the description in section 16.4 "Non-blocking connect" + * in UNIX Network Programming vol 1, 3rd edition, points out + * that sometimes the error is in errno and sometimes in error */ + if (rc < 0 || error) { + if (rc == 0) + errno = error; + return handle_socket_error_msg(zh, __LINE__,ZCONNECTIONLOSS, + "server refused to accept the client"); + } + if((rc=prime_connection(zh))!=0) + return rc; + LOG_INFO(("initiated connection to server [%s]", + format_endpoint_info(&zh->addrs[zh->connect_index]))); + return ZOK; + } + if (zh->to_send.head && (events&ZOOKEEPER_WRITE)) { + /* make the flush call non-blocking by specifying a 0 timeout */ + int rc=flush_send_queue(zh,0); + if (rc < 0) + return handle_socket_error_msg(zh,__LINE__,ZCONNECTIONLOSS, + "failed while flushing send queue"); + } + if (events&ZOOKEEPER_READ) { + int rc; + if (zh->input_buffer == 0) { + zh->input_buffer = allocate_buffer(0,0); + } + + rc = recv_buffer(zh->fd, zh->input_buffer); + if (rc < 0) { + return handle_socket_error_msg(zh, __LINE__,ZCONNECTIONLOSS, + "failed while receiving a server response"); + } + if (rc > 0) { + gettimeofday(&zh->last_recv, 0); + if (zh->input_buffer != &zh->primer_buffer) { + queue_buffer(&zh->to_process, zh->input_buffer, 0); + } else { + int64_t oldid,newid; + //deserialize + deserialize_prime_response(&zh->primer_storage, zh->primer_buffer.buffer); + /* We are processing the primer_buffer, so we need to finish + * the connection handshake */ + oldid = zh->client_id.client_id; + newid = zh->primer_storage.sessionId; + if (oldid != 0 && oldid != newid) { + zh->state = ZOO_EXPIRED_SESSION_STATE; + errno = ESTALE; + return handle_socket_error_msg(zh,__LINE__,ZSESSIONEXPIRED, + "sessionId=%#llx has expired.",oldid); + } else { + zh->recv_timeout = zh->primer_storage.timeOut; + zh->client_id.client_id = newid; + + memcpy(zh->client_id.passwd, &zh->primer_storage.passwd, + sizeof(zh->client_id.passwd)); + zh->state = ZOO_CONNECTED_STATE; + LOG_INFO(("session establishment complete on server [%s], sessionId=%#llx, negotiated timeout=%d", + format_endpoint_info(&zh->addrs[zh->connect_index]), + newid, zh->recv_timeout)); + /* we want the auth to be sent for, but since both call push to front + we need to call send_watch_set first */ + send_set_watches(zh); + /* send the authentication packet now */ + send_auth_info(zh); + LOG_DEBUG(("Calling a watcher for a ZOO_SESSION_EVENT and the state=ZOO_CONNECTED_STATE")); + zh->input_buffer = 0; // just in case the watcher calls zookeeper_process() again + PROCESS_SESSION_EVENT(zh, ZOO_CONNECTED_STATE); + } + } + zh->input_buffer = 0; + } else { + // zookeeper_process was called but there was nothing to read + // from the socket + return ZNOTHING; + } + } + return ZOK; +} + +void api_prolog(zhandle_t* zh) +{ + inc_ref_counter(zh,1); +} + +int api_epilog(zhandle_t *zh,int rc) +{ + if(inc_ref_counter(zh,-1)==0 && zh->close_requested!=0) + zookeeper_close(zh); + return rc; +} + +static __attribute__((unused)) void print_completion_queue(zhandle_t *zh) +{ + completion_list_t* cptr; + + if(logLevelsent_requests.head==0) { + fprintf(LOGSTREAM,"empty\n"); + return; + } + + cptr=zh->sent_requests.head; + while(cptr){ + fprintf(LOGSTREAM,"%d,",cptr->xid); + cptr=cptr->next; + } + fprintf(LOGSTREAM,"end\n"); +} + +//#ifdef THREADED +// IO thread queues session events to be processed by the completion thread +static int queue_session_event(zhandle_t *zh, int state) +{ + int rc; + struct WatcherEvent evt = { ZOO_SESSION_EVENT, state, "" }; + struct ReplyHeader hdr = { WATCHER_EVENT_XID, 0, 0 }; + struct oarchive *oa; + completion_list_t *cptr; + + if ((oa=create_buffer_oarchive())==NULL) { + LOG_ERROR(("out of memory")); + goto error; + } + rc = serialize_ReplyHeader(oa, "hdr", &hdr); + rc = rc<0?rc: serialize_WatcherEvent(oa, "event", &evt); + if(rc<0){ + close_buffer_oarchive(&oa, 1); + goto error; + } + cptr = create_completion_entry(WATCHER_EVENT_XID,-1,0,0,0,0); + cptr->buffer = allocate_buffer(get_buffer(oa), get_buffer_len(oa)); + cptr->buffer->curr_offset = get_buffer_len(oa); + if (!cptr->buffer) { + free(cptr); + close_buffer_oarchive(&oa, 1); + goto error; + } + /* We queued the buffer, so don't free it */ + close_buffer_oarchive(&oa, 0); + cptr->c.watcher_result = collectWatchers(zh, ZOO_SESSION_EVENT, ""); + queue_completion(&zh->completions_to_process, cptr, 0); + if (process_async(zh->outstanding_sync)) { + process_completions(zh); + } + return ZOK; +error: + errno=ENOMEM; + return ZSYSTEMERROR; +} +//#endif + +completion_list_t *dequeue_completion(completion_head_t *list) +{ + completion_list_t *cptr; + lock_completion_list(list); + cptr = list->head; + if (cptr) { + list->head = cptr->next; + if (!list->head) { + assert(list->last == cptr); + list->last = 0; + } + } + unlock_completion_list(list); + return cptr; +} + +static void process_sync_completion( + completion_list_t *cptr, + struct sync_completion *sc, + struct iarchive *ia, + zhandle_t *zh) +{ + LOG_DEBUG(("Processing sync_completion with type=%d xid=%#x rc=%d", + cptr->c.type, cptr->xid, sc->rc)); + + switch(cptr->c.type) { + case COMPLETION_DATA: + if (sc->rc==0) { + struct GetDataResponse res; + int len; + deserialize_GetDataResponse(ia, "reply", &res); + if (res.data.len <= sc->u.data.buff_len) { + len = res.data.len; + } else { + len = sc->u.data.buff_len; + } + sc->u.data.buff_len = len; + // check if len is negative + // just of NULL which is -1 int + if (len == -1) { + sc->u.data.buffer = NULL; + } else { + memcpy(sc->u.data.buffer, res.data.buff, len); + } + sc->u.data.stat = res.stat; + deallocate_GetDataResponse(&res); + } + break; + case COMPLETION_STAT: + if (sc->rc==0) { + struct SetDataResponse res; + deserialize_SetDataResponse(ia, "reply", &res); + sc->u.stat = res.stat; + deallocate_SetDataResponse(&res); + } + break; + case COMPLETION_STRINGLIST: + if (sc->rc==0) { + struct GetChildrenResponse res; + deserialize_GetChildrenResponse(ia, "reply", &res); + sc->u.strs2 = res.children; + /* We don't deallocate since we are passing it back */ + // deallocate_GetChildrenResponse(&res); + } + break; + case COMPLETION_STRINGLIST_STAT: + if (sc->rc==0) { + struct GetChildren2Response res; + deserialize_GetChildren2Response(ia, "reply", &res); + sc->u.strs_stat.strs2 = res.children; + sc->u.strs_stat.stat2 = res.stat; + /* We don't deallocate since we are passing it back */ + // deallocate_GetChildren2Response(&res); + } + break; + case COMPLETION_STRING: + if (sc->rc==0) { + struct CreateResponse res; + int len; + const char * client_path; + deserialize_CreateResponse(ia, "reply", &res); + //ZOOKEEPER-1027 + client_path = sub_string(zh, res.path); + len = strlen(client_path) + 1;if (len > sc->u.str.str_len) { + len = sc->u.str.str_len; + } + if (len > 0) { + memcpy(sc->u.str.str, client_path, len - 1); + sc->u.str.str[len - 1] = '\0'; + } + free_duplicate_path(client_path, res.path); + deallocate_CreateResponse(&res); + } + break; + case COMPLETION_ACLLIST: + if (sc->rc==0) { + struct GetACLResponse res; + deserialize_GetACLResponse(ia, "reply", &res); + sc->u.acl.acl = res.acl; + sc->u.acl.stat = res.stat; + /* We don't deallocate since we are passing it back */ + //deallocate_GetACLResponse(&res); + } + break; + case COMPLETION_VOID: + break; + case COMPLETION_MULTI: + sc->rc = deserialize_multi(cptr->xid, cptr, ia); + break; + default: + LOG_DEBUG(("Unsupported completion type=%d", cptr->c.type)); + break; + } +} + +static int deserialize_multi(int xid, completion_list_t *cptr, struct iarchive *ia) +{ + int rc = 0; + completion_head_t *clist = &cptr->c.clist; + struct MultiHeader mhdr = { STRUCT_INITIALIZER(type , 0), STRUCT_INITIALIZER(done , 0), STRUCT_INITIALIZER(err , 0) }; + assert(clist); + deserialize_MultiHeader(ia, "multiheader", &mhdr); + while (!mhdr.done) { + completion_list_t *entry = dequeue_completion(clist); + assert(entry); + + if (mhdr.type == -1) { + struct ErrorResponse er; + deserialize_ErrorResponse(ia, "error", &er); + mhdr.err = er.err ; + if (rc == 0 && er.err != 0 && er.err != ZRUNTIMEINCONSISTENCY) { + rc = er.err; + } + } + + deserialize_response(entry->c.type, xid, mhdr.type == -1, mhdr.err, entry, ia); + deserialize_MultiHeader(ia, "multiheader", &mhdr); + //While deserializing the response we must destroy completion entry for each operation in + //the zoo_multi transaction. Otherwise this results in memory leak when client invokes zoo_multi + //operation. + destroy_completion_entry(entry); + } + + return rc; +} + +static void deserialize_response(int type, int xid, int failed, int rc, completion_list_t *cptr, struct iarchive *ia) +{ + switch (type) { + case COMPLETION_DATA: + LOG_DEBUG(("Calling COMPLETION_DATA for xid=%#x failed=%d rc=%d", + cptr->xid, failed, rc)); + if (failed) { + cptr->c.data_result(rc, 0, 0, 0, cptr->data); + } else { + struct GetDataResponse res; + deserialize_GetDataResponse(ia, "reply", &res); + cptr->c.data_result(rc, res.data.buff, res.data.len, + &res.stat, cptr->data); + deallocate_GetDataResponse(&res); + } + break; + case COMPLETION_STAT: + LOG_DEBUG(("Calling COMPLETION_STAT for xid=%#x failed=%d rc=%d", + cptr->xid, failed, rc)); + if (failed) { + cptr->c.stat_result(rc, 0, cptr->data); + } else { + struct SetDataResponse res; + deserialize_SetDataResponse(ia, "reply", &res); + cptr->c.stat_result(rc, &res.stat, cptr->data); + deallocate_SetDataResponse(&res); + } + break; + case COMPLETION_STRINGLIST: + LOG_DEBUG(("Calling COMPLETION_STRINGLIST for xid=%#x failed=%d rc=%d", + cptr->xid, failed, rc)); + if (failed) { + cptr->c.strings_result(rc, 0, cptr->data); + } else { + struct GetChildrenResponse res; + deserialize_GetChildrenResponse(ia, "reply", &res); + cptr->c.strings_result(rc, &res.children, cptr->data); + deallocate_GetChildrenResponse(&res); + } + break; + case COMPLETION_STRINGLIST_STAT: + LOG_DEBUG(("Calling COMPLETION_STRINGLIST_STAT for xid=%#x failed=%d rc=%d", + cptr->xid, failed, rc)); + if (failed) { + cptr->c.strings_stat_result(rc, 0, 0, cptr->data); + } else { + struct GetChildren2Response res; + deserialize_GetChildren2Response(ia, "reply", &res); + cptr->c.strings_stat_result(rc, &res.children, &res.stat, cptr->data); + deallocate_GetChildren2Response(&res); + } + break; + case COMPLETION_STRING: + LOG_DEBUG(("Calling COMPLETION_STRING for xid=%#x failed=%d, rc=%d", + cptr->xid, failed, rc)); + if (failed) { + cptr->c.string_result(rc, 0, cptr->data); + } else { + struct CreateResponse res; + memset(&res, 0, sizeof(res)); + deserialize_CreateResponse(ia, "reply", &res); + cptr->c.string_result(rc, res.path, cptr->data); + deallocate_CreateResponse(&res); + } + break; + case COMPLETION_ACLLIST: + LOG_DEBUG(("Calling COMPLETION_ACLLIST for xid=%#x failed=%d rc=%d", + cptr->xid, failed, rc)); + if (failed) { + cptr->c.acl_result(rc, 0, 0, cptr->data); + } else { + struct GetACLResponse res; + deserialize_GetACLResponse(ia, "reply", &res); + cptr->c.acl_result(rc, &res.acl, &res.stat, cptr->data); + deallocate_GetACLResponse(&res); + } + break; + case COMPLETION_VOID: + LOG_DEBUG(("Calling COMPLETION_VOID for xid=%#x failed=%d rc=%d", + cptr->xid, failed, rc)); + assert(cptr->c.void_result); + cptr->c.void_result(rc, cptr->data); + break; + case COMPLETION_MULTI: + LOG_DEBUG(("Calling COMPLETION_MULTI for xid=%#x failed=%d rc=%d", + cptr->xid, failed, rc)); + rc = deserialize_multi(xid, cptr, ia); + assert(cptr->c.void_result); + cptr->c.void_result(rc, cptr->data); + break; + default: + LOG_DEBUG(("Unsupported completion type=%d", cptr->c.type)); + } +} + + +/* handles async completion (both single- and multithreaded) */ +void process_completions(zhandle_t *zh) +{ + completion_list_t *cptr; + while ((cptr = dequeue_completion(&zh->completions_to_process)) != 0) { + struct ReplyHeader hdr; + buffer_list_t *bptr = cptr->buffer; + struct iarchive *ia = create_buffer_iarchive(bptr->buffer, + bptr->len); + deserialize_ReplyHeader(ia, "hdr", &hdr); + + if (hdr.xid == WATCHER_EVENT_XID) { + int type, state; + struct WatcherEvent evt; + deserialize_WatcherEvent(ia, "event", &evt); + /* We are doing a notification, so there is no pending request */ + type = evt.type; + state = evt.state; + /* This is a notification so there aren't any pending requests */ + LOG_DEBUG(("Calling a watcher for node [%s], type = %d event=%s", + (evt.path==NULL?"NULL":evt.path), cptr->c.type, + watcherEvent2String(type))); + deliverWatchers(zh,type,state,evt.path, &cptr->c.watcher_result); + deallocate_WatcherEvent(&evt); + } else { + deserialize_response(cptr->c.type, hdr.xid, hdr.err != 0, hdr.err, cptr, ia); + } + destroy_completion_entry(cptr); + close_buffer_iarchive(&ia); + } +} + +static void isSocketReadable(zhandle_t* zh) +{ +#ifndef WIN32 + struct pollfd fds; + fds.fd = zh->fd; + fds.events = POLLIN; + if (poll(&fds,1,0)<=0) { + // socket not readable -- no more responses to process + zh->socket_readable.tv_sec=zh->socket_readable.tv_usec=0; + } +#else + fd_set rfds; + struct timeval waittime = {0, 0}; + FD_ZERO(&rfds); + FD_SET( zh->fd , &rfds); + if (select(0, &rfds, NULL, NULL, &waittime) <= 0){ + // socket not readable -- no more responses to process + zh->socket_readable.tv_sec=zh->socket_readable.tv_usec=0; + } +#endif + else{ + gettimeofday(&zh->socket_readable,0); + } +} + +static void checkResponseLatency(zhandle_t* zh) +{ + int delay; + struct timeval now; + + if(zh->socket_readable.tv_sec==0) + return; + + gettimeofday(&now,0); + delay=calculate_interval(&zh->socket_readable, &now); + if(delay>20) + LOG_DEBUG(("The following server response has spent at least %dms sitting in the client socket recv buffer",delay)); + + zh->socket_readable.tv_sec=zh->socket_readable.tv_usec=0; +} + +int zookeeper_process(zhandle_t *zh, int events) +{ + buffer_list_t *bptr; + int rc; + + if (zh==NULL) + return ZBADARGUMENTS; + if (is_unrecoverable(zh)) + return ZINVALIDSTATE; + api_prolog(zh); + IF_DEBUG(checkResponseLatency(zh)); + rc = check_events(zh, events); + if (rc!=ZOK) + return api_epilog(zh, rc); + + IF_DEBUG(isSocketReadable(zh)); + + while (rc >= 0 && (bptr=dequeue_buffer(&zh->to_process))) { + struct ReplyHeader hdr; + struct iarchive *ia = create_buffer_iarchive( + bptr->buffer, bptr->curr_offset); + deserialize_ReplyHeader(ia, "hdr", &hdr); + if (hdr.zxid > 0) { + zh->last_zxid = hdr.zxid; + } else { + // fprintf(stderr, "Got %#x for %#x\n", hdr.zxid, hdr.xid); + } + + if (hdr.xid == PING_XID) { + // Ping replies can arrive out-of-order + int elapsed = 0; + struct timeval now; + gettimeofday(&now, 0); + elapsed = calculate_interval(&zh->last_ping, &now); + LOG_DEBUG(("Got ping response in %d ms", elapsed)); + free_buffer(bptr); + } else if (hdr.xid == WATCHER_EVENT_XID) { + struct WatcherEvent evt; + int type = 0; + char *path = NULL; + completion_list_t *c = NULL; + + LOG_DEBUG(("Processing WATCHER_EVENT")); + + deserialize_WatcherEvent(ia, "event", &evt); + type = evt.type; + path = evt.path; + /* We are doing a notification, so there is no pending request */ + c = create_completion_entry(WATCHER_EVENT_XID,-1,0,0,0,0); + c->buffer = bptr; + c->c.watcher_result = collectWatchers(zh, type, path); + + // We cannot free until now, otherwise path will become invalid + deallocate_WatcherEvent(&evt); + queue_completion(&zh->completions_to_process, c, 0); + } else if (hdr.xid == SET_WATCHES_XID) { + LOG_DEBUG(("Processing SET_WATCHES")); + free_buffer(bptr); + } else if (hdr.xid == AUTH_XID){ + LOG_DEBUG(("Processing AUTH_XID")); + + /* special handling for the AUTH response as it may come back + * out-of-band */ + auth_completion_func(hdr.err,zh); + free_buffer(bptr); + /* authentication completion may change the connection state to + * unrecoverable */ + if(is_unrecoverable(zh)){ + handle_error(zh, ZAUTHFAILED); + close_buffer_iarchive(&ia); + return api_epilog(zh, ZAUTHFAILED); + } + } else { + int rc = hdr.err; + /* Find the request corresponding to the response */ + completion_list_t *cptr = dequeue_completion(&zh->sent_requests); + + /* [ZOOKEEPER-804] Don't assert if zookeeper_close has been called. */ + if (zh->close_requested == 1 && cptr == NULL) { + LOG_DEBUG(("Completion queue has been cleared by zookeeper_close()")); + close_buffer_iarchive(&ia); + free_buffer(bptr); + return api_epilog(zh,ZINVALIDSTATE); + } + assert(cptr); + /* The requests are going to come back in order */ + if (cptr->xid != hdr.xid) { + LOG_DEBUG(("Processing unexpected or out-of-order response!")); + + // received unexpected (or out-of-order) response + close_buffer_iarchive(&ia); + free_buffer(bptr); + // put the completion back on the queue (so it gets properly + // signaled and deallocated) and disconnect from the server + queue_completion(&zh->sent_requests,cptr,1); + return api_epilog(zh, + handle_socket_error_msg(zh, __LINE__,ZRUNTIMEINCONSISTENCY, + "unexpected server response: expected %#x, but received %#x", + hdr.xid,cptr->xid)); + } + + activateWatcher(zh, cptr->watcher, rc); + + if (cptr->c.void_result != SYNCHRONOUS_MARKER) { + LOG_DEBUG(("Queueing asynchronous response")); + cptr->buffer = bptr; + queue_completion(&zh->completions_to_process, cptr, 0); + } else { + struct sync_completion + *sc = (struct sync_completion*)cptr->data; + sc->rc = rc; + + process_sync_completion(cptr, sc, ia, zh); + + notify_sync_completion(sc); + free_buffer(bptr); + zh->outstanding_sync--; + destroy_completion_entry(cptr); + } + } + + close_buffer_iarchive(&ia); + + } + if (process_async(zh->outstanding_sync)) { + process_completions(zh); + } + return api_epilog(zh,ZOK);} + +int zoo_state(zhandle_t *zh) +{ + if(zh!=0) + return zh->state; + return 0; +} + +static watcher_registration_t* create_watcher_registration(const char* path, + result_checker_fn checker,watcher_fn watcher,void* ctx){ + watcher_registration_t* wo; + if(watcher==0) + return 0; + wo=calloc(1,sizeof(watcher_registration_t)); + wo->path=strdup(path); + wo->watcher=watcher; + wo->context=ctx; + wo->checker=checker; + return wo; +} + +static void destroy_watcher_registration(watcher_registration_t* wo){ + if(wo!=0){ + free((void*)wo->path); + free(wo); + } +} + +static completion_list_t* create_completion_entry(int xid, int completion_type, + const void *dc, const void *data,watcher_registration_t* wo, completion_head_t *clist) +{ + completion_list_t *c = calloc(1,sizeof(completion_list_t)); + if (!c) { + LOG_ERROR(("out of memory")); + return 0; + } + c->c.type = completion_type; + c->data = data; + switch(c->c.type) { + case COMPLETION_VOID: + c->c.void_result = (void_completion_t)dc; + break; + case COMPLETION_STRING: + c->c.string_result = (string_completion_t)dc; + break; + case COMPLETION_DATA: + c->c.data_result = (data_completion_t)dc; + break; + case COMPLETION_STAT: + c->c.stat_result = (stat_completion_t)dc; + break; + case COMPLETION_STRINGLIST: + c->c.strings_result = (strings_completion_t)dc; + break; + case COMPLETION_STRINGLIST_STAT: + c->c.strings_stat_result = (strings_stat_completion_t)dc; + break; + case COMPLETION_ACLLIST: + c->c.acl_result = (acl_completion_t)dc; + break; + case COMPLETION_MULTI: + assert(clist); + c->c.void_result = (void_completion_t)dc; + c->c.clist = *clist; + break; + } + c->xid = xid; + c->watcher = wo; + + return c; +} + +static void destroy_completion_entry(completion_list_t* c){ + if(c!=0){ + destroy_watcher_registration(c->watcher); + if(c->buffer!=0) + free_buffer(c->buffer); + free(c); + } +} + +static void queue_completion_nolock(completion_head_t *list, + completion_list_t *c, + int add_to_front) +{ + c->next = 0; + /* appending a new entry to the back of the list */ + if (list->last) { + assert(list->head); + // List is not empty + if (!add_to_front) { + list->last->next = c; + list->last = c; + } else { + c->next = list->head; + list->head = c; + } + } else { + // List is empty + assert(!list->head); + list->head = c; + list->last = c; + } +} + +static void queue_completion(completion_head_t *list, completion_list_t *c, + int add_to_front) +{ + + lock_completion_list(list); + queue_completion_nolock(list, c, add_to_front); + unlock_completion_list(list); +} + +static int add_completion(zhandle_t *zh, int xid, int completion_type, + const void *dc, const void *data, int add_to_front, + watcher_registration_t* wo, completion_head_t *clist) +{ + completion_list_t *c =create_completion_entry(xid, completion_type, dc, + data, wo, clist); + int rc = 0; + if (!c) + return ZSYSTEMERROR; + lock_completion_list(&zh->sent_requests); + if (zh->close_requested != 1) { + queue_completion_nolock(&zh->sent_requests, c, add_to_front); + if (dc == SYNCHRONOUS_MARKER) { + zh->outstanding_sync++; + } + rc = ZOK; + } else { + free(c); + rc = ZINVALIDSTATE; + } + unlock_completion_list(&zh->sent_requests); + return rc; +} + +static int add_data_completion(zhandle_t *zh, int xid, data_completion_t dc, + const void *data,watcher_registration_t* wo) +{ + return add_completion(zh, xid, COMPLETION_DATA, dc, data, 0, wo, 0); +} + +static int add_stat_completion(zhandle_t *zh, int xid, stat_completion_t dc, + const void *data,watcher_registration_t* wo) +{ + return add_completion(zh, xid, COMPLETION_STAT, dc, data, 0, wo, 0); +} + +static int add_strings_completion(zhandle_t *zh, int xid, + strings_completion_t dc, const void *data,watcher_registration_t* wo) +{ + return add_completion(zh, xid, COMPLETION_STRINGLIST, dc, data, 0, wo, 0); +} + +static int add_strings_stat_completion(zhandle_t *zh, int xid, + strings_stat_completion_t dc, const void *data,watcher_registration_t* wo) +{ + return add_completion(zh, xid, COMPLETION_STRINGLIST_STAT, dc, data, 0, wo, 0); +} + +static int add_acl_completion(zhandle_t *zh, int xid, acl_completion_t dc, + const void *data) +{ + return add_completion(zh, xid, COMPLETION_ACLLIST, dc, data, 0, 0, 0); +} + +static int add_void_completion(zhandle_t *zh, int xid, void_completion_t dc, + const void *data) +{ + return add_completion(zh, xid, COMPLETION_VOID, dc, data, 0, 0, 0); +} + +static int add_string_completion(zhandle_t *zh, int xid, + string_completion_t dc, const void *data) +{ + return add_completion(zh, xid, COMPLETION_STRING, dc, data, 0, 0, 0); +} + +static int add_multi_completion(zhandle_t *zh, int xid, void_completion_t dc, + const void *data, completion_head_t *clist) +{ + return add_completion(zh, xid, COMPLETION_MULTI, dc, data, 0,0, clist); +} + +int zookeeper_close(zhandle_t *zh) +{ + int rc=ZOK; + if (zh==0) + return ZBADARGUMENTS; + + zh->close_requested=1; + if (inc_ref_counter(zh,1)>1) { + /* We have incremented the ref counter to prevent the + * completions from calling zookeeper_close before we have + * completed the adaptor_finish call below. */ + + /* Signal any syncronous completions before joining the threads */ + enter_critical(zh); + free_completions(zh,1,ZCLOSING); + leave_critical(zh); + + adaptor_finish(zh); + /* Now we can allow the handle to be cleaned up, if the completion + * threads finished during the adaptor_finish call. */ + api_epilog(zh, 0); + return ZOK; + } + /* No need to decrement the counter since we're just going to + * destroy the handle later. */ + if(zh->state==ZOO_CONNECTED_STATE){ + struct oarchive *oa; + struct RequestHeader h = { STRUCT_INITIALIZER (xid , get_xid()), STRUCT_INITIALIZER (type , ZOO_CLOSE_OP)}; + LOG_INFO(("Closing zookeeper sessionId=%#llx to [%s]\n", + zh->client_id.client_id,format_current_endpoint_info(zh))); + oa = create_buffer_oarchive(); + rc = serialize_RequestHeader(oa, "header", &h); + rc = rc < 0 ? rc : queue_buffer_bytes(&zh->to_send, get_buffer(oa), + get_buffer_len(oa)); + /* We queued the buffer, so don't free it */ + close_buffer_oarchive(&oa, 0); + if (rc < 0) { + rc = ZMARSHALLINGERROR; + goto finish; + } + + /* make sure the close request is sent; we set timeout to an arbitrary + * (but reasonable) number of milliseconds since we want the call to block*/ + rc=adaptor_send_queue(zh, 3000); + }else{ + LOG_INFO(("Freeing zookeeper resources for sessionId=%#llx\n", + zh->client_id.client_id)); + rc = ZOK; + } + +finish: + destroy(zh); + adaptor_destroy(zh); + free(zh); +#ifdef WIN32 + Win32WSACleanup(); +#endif + return rc; +} + +static int isValidPath(const char* path, const int flags) { + int len = 0; + char lastc = '/'; + char c; + int i = 0; + + if (path == 0) + return 0; + len = strlen(path); + if (len == 0) + return 0; + if (path[0] != '/') + return 0; + if (len == 1) // done checking - it's the root + return 1; + if (path[len - 1] == '/' && !(flags & ZOO_SEQUENCE)) + return 0; + + i = 1; + for (; i < len; lastc = path[i], i++) { + c = path[i]; + + if (c == 0) { + return 0; + } else if (c == '/' && lastc == '/') { + return 0; + } else if (c == '.' && lastc == '.') { + if (path[i-2] == '/' && (((i + 1 == len) && !(flags & ZOO_SEQUENCE)) + || path[i+1] == '/')) { + return 0; + } + } else if (c == '.') { + if ((path[i-1] == '/') && (((i + 1 == len) && !(flags & ZOO_SEQUENCE)) + || path[i+1] == '/')) { + return 0; + } + } else if (c > 0x00 && c < 0x1f) { + return 0; + } + } + + return 1; +} + +/*---------------------------------------------------------------------------* + * REQUEST INIT HELPERS + *---------------------------------------------------------------------------*/ +/* Common Request init helper functions to reduce code duplication */ +static int Request_path_init(zhandle_t *zh, int flags, + char **path_out, const char *path) +{ + assert(path_out); + + *path_out = prepend_string(zh, path); + if (zh == NULL || !isValidPath(*path_out, flags)) { + free_duplicate_path(*path_out, path); + return ZBADARGUMENTS; + } + if (is_unrecoverable(zh)) { + free_duplicate_path(*path_out, path); + return ZINVALIDSTATE; + } + + return ZOK; +} + +static int Request_path_watch_init(zhandle_t *zh, int flags, + char **path_out, const char *path, + int32_t *watch_out, uint32_t watch) +{ + int rc = Request_path_init(zh, flags, path_out, path); + if (rc != ZOK) { + return rc; + } + *watch_out = watch; + return ZOK; +} + +/*---------------------------------------------------------------------------* + * ASYNC API + *---------------------------------------------------------------------------*/ +int zoo_aget(zhandle_t *zh, const char *path, int watch, data_completion_t dc, + const void *data) +{ + return zoo_awget(zh,path,watch?zh->watcher:0,zh->context,dc,data); +} + +int zoo_awget(zhandle_t *zh, const char *path, + watcher_fn watcher, void* watcherCtx, + data_completion_t dc, const void *data) +{ + struct oarchive *oa; + char *server_path = prepend_string(zh, path); + struct RequestHeader h = { STRUCT_INITIALIZER (xid , get_xid()), STRUCT_INITIALIZER (type ,ZOO_GETDATA_OP)}; + struct GetDataRequest req = { (char*)server_path, watcher!=0 }; + int rc; + + if (zh==0 || !isValidPath(server_path, 0)) { + free_duplicate_path(server_path, path); + return ZBADARGUMENTS; + } + if (is_unrecoverable(zh)) { + free_duplicate_path(server_path, path); + return ZINVALIDSTATE; + } + oa=create_buffer_oarchive(); + rc = serialize_RequestHeader(oa, "header", &h); + rc = rc < 0 ? rc : serialize_GetDataRequest(oa, "req", &req); + enter_critical(zh); + rc = rc < 0 ? rc : add_data_completion(zh, h.xid, dc, data, + create_watcher_registration(server_path,data_result_checker,watcher,watcherCtx)); + rc = rc < 0 ? rc : queue_buffer_bytes(&zh->to_send, get_buffer(oa), + get_buffer_len(oa)); + leave_critical(zh); + free_duplicate_path(server_path, path); + /* We queued the buffer, so don't free it */ + close_buffer_oarchive(&oa, 0); + + LOG_DEBUG(("Sending request xid=%#x for path [%s] to %s",h.xid,path, + format_current_endpoint_info(zh))); + /* make a best (non-blocking) effort to send the requests asap */ + adaptor_send_queue(zh, 0); + return (rc < 0)?ZMARSHALLINGERROR:ZOK; +} + +static int SetDataRequest_init(zhandle_t *zh, struct SetDataRequest *req, + const char *path, const char *buffer, int buflen, int version) +{ + int rc; + assert(req); + rc = Request_path_init(zh, 0, &req->path, path); + if (rc != ZOK) { + return rc; + } + req->data.buff = (char*)buffer; + req->data.len = buflen; + req->version = version; + + return ZOK; +} + +int zoo_aset(zhandle_t *zh, const char *path, const char *buffer, int buflen, + int version, stat_completion_t dc, const void *data) +{ + struct oarchive *oa; + struct RequestHeader h = { STRUCT_INITIALIZER(xid , get_xid()), STRUCT_INITIALIZER (type , ZOO_SETDATA_OP)}; + struct SetDataRequest req; + int rc = SetDataRequest_init(zh, &req, path, buffer, buflen, version); + if (rc != ZOK) { + return rc; + } + oa = create_buffer_oarchive(); + rc = serialize_RequestHeader(oa, "header", &h); + rc = rc < 0 ? rc : serialize_SetDataRequest(oa, "req", &req); + enter_critical(zh); + rc = rc < 0 ? rc : add_stat_completion(zh, h.xid, dc, data,0); + rc = rc < 0 ? rc : queue_buffer_bytes(&zh->to_send, get_buffer(oa), + get_buffer_len(oa)); + leave_critical(zh); + free_duplicate_path(req.path, path); + /* We queued the buffer, so don't free it */ + close_buffer_oarchive(&oa, 0); + + LOG_DEBUG(("Sending request xid=%#x for path [%s] to %s",h.xid,path, + format_current_endpoint_info(zh))); + /* make a best (non-blocking) effort to send the requests asap */ + adaptor_send_queue(zh, 0); + return (rc < 0)?ZMARSHALLINGERROR:ZOK; +} + +static int CreateRequest_init(zhandle_t *zh, struct CreateRequest *req, + const char *path, const char *value, + int valuelen, const struct ACL_vector *acl_entries, int flags) +{ + int rc; + assert(req); + rc = Request_path_init(zh, flags, &req->path, path); + assert(req); + if (rc != ZOK) { + return rc; + } + req->flags = flags; + req->data.buff = (char*)value; + req->data.len = valuelen; + if (acl_entries == 0) { + req->acl.count = 0; + req->acl.data = 0; + } else { + req->acl = *acl_entries; + } + + return ZOK; +} + +int zoo_acreate(zhandle_t *zh, const char *path, const char *value, + int valuelen, const struct ACL_vector *acl_entries, int flags, + string_completion_t completion, const void *data) +{ + struct oarchive *oa; + struct RequestHeader h = { STRUCT_INITIALIZER (xid , get_xid()), STRUCT_INITIALIZER (type ,ZOO_CREATE_OP) }; + struct CreateRequest req; + + int rc = CreateRequest_init(zh, &req, + path, value, valuelen, acl_entries, flags); + if (rc != ZOK) { + return rc; + } + oa = create_buffer_oarchive(); + rc = serialize_RequestHeader(oa, "header", &h); + rc = rc < 0 ? rc : serialize_CreateRequest(oa, "req", &req); + enter_critical(zh); + rc = rc < 0 ? rc : add_string_completion(zh, h.xid, completion, data); + rc = rc < 0 ? rc : queue_buffer_bytes(&zh->to_send, get_buffer(oa), + get_buffer_len(oa)); + leave_critical(zh); + free_duplicate_path(req.path, path); + /* We queued the buffer, so don't free it */ + close_buffer_oarchive(&oa, 0); + + LOG_DEBUG(("Sending request xid=%#x for path [%s] to %s",h.xid,path, + format_current_endpoint_info(zh))); + /* make a best (non-blocking) effort to send the requests asap */ + adaptor_send_queue(zh, 0); + return (rc < 0)?ZMARSHALLINGERROR:ZOK; +} + +int DeleteRequest_init(zhandle_t *zh, struct DeleteRequest *req, + const char *path, int version) +{ + int rc = Request_path_init(zh, 0, &req->path, path); + if (rc != ZOK) { + return rc; + } + req->version = version; + return ZOK; +} + +int zoo_adelete(zhandle_t *zh, const char *path, int version, + void_completion_t completion, const void *data) +{ + struct oarchive *oa; + struct RequestHeader h = { STRUCT_INITIALIZER (xid , get_xid()), STRUCT_INITIALIZER (type , ZOO_DELETE_OP)}; + struct DeleteRequest req; + int rc = DeleteRequest_init(zh, &req, path, version); + if (rc != ZOK) { + return rc; + } + oa = create_buffer_oarchive(); + rc = serialize_RequestHeader(oa, "header", &h); + rc = rc < 0 ? rc : serialize_DeleteRequest(oa, "req", &req); + enter_critical(zh); + rc = rc < 0 ? rc : add_void_completion(zh, h.xid, completion, data); + rc = rc < 0 ? rc : queue_buffer_bytes(&zh->to_send, get_buffer(oa), + get_buffer_len(oa)); + leave_critical(zh); + free_duplicate_path(req.path, path); + /* We queued the buffer, so don't free it */ + close_buffer_oarchive(&oa, 0); + + LOG_DEBUG(("Sending request xid=%#x for path [%s] to %s",h.xid,path, + format_current_endpoint_info(zh))); + /* make a best (non-blocking) effort to send the requests asap */ + adaptor_send_queue(zh, 0); + return (rc < 0)?ZMARSHALLINGERROR:ZOK; +} + +int zoo_aexists(zhandle_t *zh, const char *path, int watch, + stat_completion_t sc, const void *data) +{ + return zoo_awexists(zh,path,watch?zh->watcher:0,zh->context,sc,data); +} + +int zoo_awexists(zhandle_t *zh, const char *path, + watcher_fn watcher, void* watcherCtx, + stat_completion_t completion, const void *data) +{ + struct oarchive *oa; + struct RequestHeader h = { STRUCT_INITIALIZER (xid ,get_xid()), STRUCT_INITIALIZER (type , ZOO_EXISTS_OP) }; + struct ExistsRequest req; + int rc = Request_path_watch_init(zh, 0, &req.path, path, + &req.watch, watcher != NULL); + if (rc != ZOK) { + return rc; + } + oa = create_buffer_oarchive(); + rc = serialize_RequestHeader(oa, "header", &h); + rc = rc < 0 ? rc : serialize_ExistsRequest(oa, "req", &req); + enter_critical(zh); + rc = rc < 0 ? rc : add_stat_completion(zh, h.xid, completion, data, + create_watcher_registration(req.path,exists_result_checker, + watcher,watcherCtx)); + rc = rc < 0 ? rc : queue_buffer_bytes(&zh->to_send, get_buffer(oa), + get_buffer_len(oa)); + leave_critical(zh); + free_duplicate_path(req.path, path); + /* We queued the buffer, so don't free it */ + close_buffer_oarchive(&oa, 0); + + LOG_DEBUG(("Sending request xid=%#x for path [%s] to %s",h.xid,path, + format_current_endpoint_info(zh))); + /* make a best (non-blocking) effort to send the requests asap */ + adaptor_send_queue(zh, 0); + return (rc < 0)?ZMARSHALLINGERROR:ZOK; +} + +static int zoo_awget_children_(zhandle_t *zh, const char *path, + watcher_fn watcher, void* watcherCtx, + strings_completion_t sc, + const void *data) +{ + struct oarchive *oa; + struct RequestHeader h = { STRUCT_INITIALIZER (xid , get_xid()), STRUCT_INITIALIZER (type , ZOO_GETCHILDREN_OP)}; + struct GetChildrenRequest req ; + int rc = Request_path_watch_init(zh, 0, &req.path, path, + &req.watch, watcher != NULL); + if (rc != ZOK) { + return rc; + } + oa = create_buffer_oarchive(); + rc = serialize_RequestHeader(oa, "header", &h); + rc = rc < 0 ? rc : serialize_GetChildrenRequest(oa, "req", &req); + enter_critical(zh); + rc = rc < 0 ? rc : add_strings_completion(zh, h.xid, sc, data, + create_watcher_registration(req.path,child_result_checker,watcher,watcherCtx)); + rc = rc < 0 ? rc : queue_buffer_bytes(&zh->to_send, get_buffer(oa), + get_buffer_len(oa)); + leave_critical(zh); + free_duplicate_path(req.path, path); + /* We queued the buffer, so don't free it */ + close_buffer_oarchive(&oa, 0); + + LOG_DEBUG(("Sending request xid=%#x for path [%s] to %s",h.xid,path, + format_current_endpoint_info(zh))); + /* make a best (non-blocking) effort to send the requests asap */ + adaptor_send_queue(zh, 0); + return (rc < 0)?ZMARSHALLINGERROR:ZOK; +} + +int zoo_aget_children(zhandle_t *zh, const char *path, int watch, + strings_completion_t dc, const void *data) +{ + return zoo_awget_children_(zh,path,watch?zh->watcher:0,zh->context,dc,data); +} + +int zoo_awget_children(zhandle_t *zh, const char *path, + watcher_fn watcher, void* watcherCtx, + strings_completion_t dc, + const void *data) +{ + return zoo_awget_children_(zh,path,watcher,watcherCtx,dc,data); +} + +static int zoo_awget_children2_(zhandle_t *zh, const char *path, + watcher_fn watcher, void* watcherCtx, + strings_stat_completion_t ssc, + const void *data) +{ + /* invariant: (sc == NULL) != (sc == NULL) */ + struct oarchive *oa; + struct RequestHeader h = { STRUCT_INITIALIZER( xid, get_xid()), STRUCT_INITIALIZER (type ,ZOO_GETCHILDREN2_OP)}; + struct GetChildren2Request req ; + int rc = Request_path_watch_init(zh, 0, &req.path, path, + &req.watch, watcher != NULL); + if (rc != ZOK) { + return rc; + } + oa = create_buffer_oarchive(); + rc = serialize_RequestHeader(oa, "header", &h); + rc = rc < 0 ? rc : serialize_GetChildren2Request(oa, "req", &req); + enter_critical(zh); + rc = rc < 0 ? rc : add_strings_stat_completion(zh, h.xid, ssc, data, + create_watcher_registration(req.path,child_result_checker,watcher,watcherCtx)); + rc = rc < 0 ? rc : queue_buffer_bytes(&zh->to_send, get_buffer(oa), + get_buffer_len(oa)); + leave_critical(zh); + free_duplicate_path(req.path, path); + /* We queued the buffer, so don't free it */ + close_buffer_oarchive(&oa, 0); + + LOG_DEBUG(("Sending request xid=%#x for path [%s] to %s",h.xid,path, + format_current_endpoint_info(zh))); + /* make a best (non-blocking) effort to send the requests asap */ + adaptor_send_queue(zh, 0); + return (rc < 0)?ZMARSHALLINGERROR:ZOK; +} + +int zoo_aget_children2(zhandle_t *zh, const char *path, int watch, + strings_stat_completion_t dc, const void *data) +{ + return zoo_awget_children2_(zh,path,watch?zh->watcher:0,zh->context,dc,data); +} + +int zoo_awget_children2(zhandle_t *zh, const char *path, + watcher_fn watcher, void* watcherCtx, + strings_stat_completion_t dc, + const void *data) +{ + return zoo_awget_children2_(zh,path,watcher,watcherCtx,dc,data); +} + +int zoo_async(zhandle_t *zh, const char *path, + string_completion_t completion, const void *data) +{ + struct oarchive *oa; + struct RequestHeader h = { STRUCT_INITIALIZER (xid , get_xid()), STRUCT_INITIALIZER (type , ZOO_SYNC_OP)}; + struct SyncRequest req; + int rc = Request_path_init(zh, 0, &req.path, path); + if (rc != ZOK) { + return rc; + } + oa = create_buffer_oarchive(); + rc = serialize_RequestHeader(oa, "header", &h); + rc = rc < 0 ? rc : serialize_SyncRequest(oa, "req", &req); + enter_critical(zh); + rc = rc < 0 ? rc : add_string_completion(zh, h.xid, completion, data); + rc = rc < 0 ? rc : queue_buffer_bytes(&zh->to_send, get_buffer(oa), + get_buffer_len(oa)); + leave_critical(zh); + free_duplicate_path(req.path, path); + /* We queued the buffer, so don't free it */ + close_buffer_oarchive(&oa, 0); + + LOG_DEBUG(("Sending request xid=%#x for path [%s] to %s",h.xid,path, + format_current_endpoint_info(zh))); + /* make a best (non-blocking) effort to send the requests asap */ + adaptor_send_queue(zh, 0); + return (rc < 0)?ZMARSHALLINGERROR:ZOK; +} + + +int zoo_aget_acl(zhandle_t *zh, const char *path, acl_completion_t completion, + const void *data) +{ + struct oarchive *oa; + struct RequestHeader h = { STRUCT_INITIALIZER (xid , get_xid()), STRUCT_INITIALIZER(type ,ZOO_GETACL_OP)}; + struct GetACLRequest req; + int rc = Request_path_init(zh, 0, &req.path, path) ; + if (rc != ZOK) { + return rc; + } + oa = create_buffer_oarchive(); + rc = serialize_RequestHeader(oa, "header", &h); + rc = rc < 0 ? rc : serialize_GetACLRequest(oa, "req", &req); + enter_critical(zh); + rc = rc < 0 ? rc : add_acl_completion(zh, h.xid, completion, data); + rc = rc < 0 ? rc : queue_buffer_bytes(&zh->to_send, get_buffer(oa), + get_buffer_len(oa)); + leave_critical(zh); + free_duplicate_path(req.path, path); + /* We queued the buffer, so don't free it */ + close_buffer_oarchive(&oa, 0); + + LOG_DEBUG(("Sending request xid=%#x for path [%s] to %s",h.xid,path, + format_current_endpoint_info(zh))); + /* make a best (non-blocking) effort to send the requests asap */ + adaptor_send_queue(zh, 0); + return (rc < 0)?ZMARSHALLINGERROR:ZOK; +} + +int zoo_aset_acl(zhandle_t *zh, const char *path, int version, + struct ACL_vector *acl, void_completion_t completion, const void *data) +{ + struct oarchive *oa; + struct RequestHeader h = { STRUCT_INITIALIZER(xid ,get_xid()), STRUCT_INITIALIZER (type , ZOO_SETACL_OP)}; + struct SetACLRequest req; + int rc = Request_path_init(zh, 0, &req.path, path); + if (rc != ZOK) { + return rc; + } + oa = create_buffer_oarchive(); + req.acl = *acl; + req.version = version; + rc = serialize_RequestHeader(oa, "header", &h); + rc = rc < 0 ? rc : serialize_SetACLRequest(oa, "req", &req); + enter_critical(zh); + rc = rc < 0 ? rc : add_void_completion(zh, h.xid, completion, data); + rc = rc < 0 ? rc : queue_buffer_bytes(&zh->to_send, get_buffer(oa), + get_buffer_len(oa)); + leave_critical(zh); + free_duplicate_path(req.path, path); + /* We queued the buffer, so don't free it */ + close_buffer_oarchive(&oa, 0); + + LOG_DEBUG(("Sending request xid=%#x for path [%s] to %s",h.xid,path, + format_current_endpoint_info(zh))); + /* make a best (non-blocking) effort to send the requests asap */ + adaptor_send_queue(zh, 0); + return (rc < 0)?ZMARSHALLINGERROR:ZOK; +} + +/* Completions for multi-op results */ +static void op_result_string_completion(int err, const char *value, const void *data) +{ + struct zoo_op_result *result = (struct zoo_op_result *)data; + assert(result); + result->err = err; + + if (result->value && value) { + int len = strlen(value) + 1; + if (len > result->valuelen) { + len = result->valuelen; + } + if (len > 0) { + memcpy(result->value, value, len - 1); + result->value[len - 1] = '\0'; + } + } else { + result->value = NULL; + } +} + +static void op_result_void_completion(int err, const void *data) +{ + struct zoo_op_result *result = (struct zoo_op_result *)data; + assert(result); + result->err = err; +} + +static void op_result_stat_completion(int err, const struct Stat *stat, const void *data) +{ + struct zoo_op_result *result = (struct zoo_op_result *)data; + assert(result); + result->err = err; + + if (result->stat && err == 0 && stat) { + *result->stat = *stat; + } else { + result->stat = NULL ; + } +} + +static int CheckVersionRequest_init(zhandle_t *zh, struct CheckVersionRequest *req, + const char *path, int version) +{ + int rc ; + assert(req); + rc = Request_path_init(zh, 0, &req->path, path); + if (rc != ZOK) { + return rc; + } + req->version = version; + + return ZOK; +} + +int zoo_amulti(zhandle_t *zh, int count, const zoo_op_t *ops, + zoo_op_result_t *results, void_completion_t completion, const void *data) +{ + struct RequestHeader h = { STRUCT_INITIALIZER(xid, get_xid()), STRUCT_INITIALIZER(type, ZOO_MULTI_OP) }; + struct MultiHeader mh = { STRUCT_INITIALIZER(type, -1), STRUCT_INITIALIZER(done, 1), STRUCT_INITIALIZER(err, -1) }; + struct oarchive *oa = create_buffer_oarchive(); + completion_head_t clist = { 0 }; + + int rc = serialize_RequestHeader(oa, "header", &h); + + int index = 0; + for (index=0; index < count; index++) { + const zoo_op_t *op = ops+index; + zoo_op_result_t *result = results+index; + completion_list_t *entry = NULL; + + struct MultiHeader mh = { STRUCT_INITIALIZER(type, op->type), STRUCT_INITIALIZER(done, 0), STRUCT_INITIALIZER(err, -1) }; + rc = rc < 0 ? rc : serialize_MultiHeader(oa, "multiheader", &mh); + + switch(op->type) { + case ZOO_CREATE_OP: { + struct CreateRequest req; + + rc = rc < 0 ? rc : CreateRequest_init(zh, &req, + op->create_op.path, op->create_op.data, + op->create_op.datalen, op->create_op.acl, + op->create_op.flags); + rc = rc < 0 ? rc : serialize_CreateRequest(oa, "req", &req); + result->value = op->create_op.buf; + result->valuelen = op->create_op.buflen; + + enter_critical(zh); + entry = create_completion_entry(h.xid, COMPLETION_STRING, op_result_string_completion, result, 0, 0); + leave_critical(zh); + free_duplicate_path(req.path, op->create_op.path); + break; + } + + case ZOO_DELETE_OP: { + struct DeleteRequest req; + rc = rc < 0 ? rc : DeleteRequest_init(zh, &req, op->delete_op.path, op->delete_op.version); + rc = rc < 0 ? rc : serialize_DeleteRequest(oa, "req", &req); + + enter_critical(zh); + entry = create_completion_entry(h.xid, COMPLETION_VOID, op_result_void_completion, result, 0, 0); + leave_critical(zh); + free_duplicate_path(req.path, op->delete_op.path); + break; + } + + case ZOO_SETDATA_OP: { + struct SetDataRequest req; + rc = rc < 0 ? rc : SetDataRequest_init(zh, &req, + op->set_op.path, op->set_op.data, + op->set_op.datalen, op->set_op.version); + rc = rc < 0 ? rc : serialize_SetDataRequest(oa, "req", &req); + result->stat = op->set_op.stat; + + enter_critical(zh); + entry = create_completion_entry(h.xid, COMPLETION_STAT, op_result_stat_completion, result, 0, 0); + leave_critical(zh); + free_duplicate_path(req.path, op->set_op.path); + break; + } + + case ZOO_CHECK_OP: { + struct CheckVersionRequest req; + rc = rc < 0 ? rc : CheckVersionRequest_init(zh, &req, + op->check_op.path, op->check_op.version); + rc = rc < 0 ? rc : serialize_CheckVersionRequest(oa, "req", &req); + + enter_critical(zh); + entry = create_completion_entry(h.xid, COMPLETION_VOID, op_result_void_completion, result, 0, 0); + leave_critical(zh); + free_duplicate_path(req.path, op->check_op.path); + break; + } + + default: + LOG_ERROR(("Unimplemented sub-op type=%d in multi-op", op->type)); + return ZUNIMPLEMENTED; + } + + queue_completion(&clist, entry, 0); + } + + rc = rc < 0 ? rc : serialize_MultiHeader(oa, "multiheader", &mh); + + /* BEGIN: CRTICIAL SECTION */ + enter_critical(zh); + rc = rc < 0 ? rc : add_multi_completion(zh, h.xid, completion, data, &clist); + rc = rc < 0 ? rc : queue_buffer_bytes(&zh->to_send, get_buffer(oa), + get_buffer_len(oa)); + leave_critical(zh); + + /* We queued the buffer, so don't free it */ + close_buffer_oarchive(&oa, 0); + + LOG_DEBUG(("Sending multi request xid=%#x with %d subrequests to %s", + h.xid, index, format_current_endpoint_info(zh))); + /* make a best (non-blocking) effort to send the requests asap */ + adaptor_send_queue(zh, 0); + + return (rc < 0) ? ZMARSHALLINGERROR : ZOK; +} + +void zoo_create_op_init(zoo_op_t *op, const char *path, const char *value, + int valuelen, const struct ACL_vector *acl, int flags, + char *path_buffer, int path_buffer_len) +{ + assert(op); + op->type = ZOO_CREATE_OP; + op->create_op.path = path; + op->create_op.data = value; + op->create_op.datalen = valuelen; + op->create_op.acl = acl; + op->create_op.flags = flags; + op->create_op.buf = path_buffer; + op->create_op.buflen = path_buffer_len; +} + +void zoo_delete_op_init(zoo_op_t *op, const char *path, int version) +{ + assert(op); + op->type = ZOO_DELETE_OP; + op->delete_op.path = path; + op->delete_op.version = version; +} + +void zoo_set_op_init(zoo_op_t *op, const char *path, const char *buffer, + int buflen, int version, struct Stat *stat) +{ + assert(op); + op->type = ZOO_SETDATA_OP; + op->set_op.path = path; + op->set_op.data = buffer; + op->set_op.datalen = buflen; + op->set_op.version = version; + op->set_op.stat = stat; +} + +void zoo_check_op_init(zoo_op_t *op, const char *path, int version) +{ + assert(op); + op->type = ZOO_CHECK_OP; + op->check_op.path = path; + op->check_op.version = version; +} + +int zoo_multi(zhandle_t *zh, int count, const zoo_op_t *ops, zoo_op_result_t *results) +{ + int rc; + + struct sync_completion *sc = alloc_sync_completion(); + if (!sc) { + return ZSYSTEMERROR; + } + + rc = zoo_amulti(zh, count, ops, results, SYNCHRONOUS_MARKER, sc); + if (rc == ZOK) { + wait_sync_completion(sc); + rc = sc->rc; + } + free_sync_completion(sc); + + return rc; +} + +/* specify timeout of 0 to make the function non-blocking */ +/* timeout is in milliseconds */ +int flush_send_queue(zhandle_t*zh, int timeout) +{ + int rc= ZOK; + struct timeval started; +#ifdef WIN32 + fd_set pollSet; + struct timeval wait; +#endif + gettimeofday(&started,0); + // we can't use dequeue_buffer() here because if (non-blocking) send_buffer() + // returns EWOULDBLOCK we'd have to put the buffer back on the queue. + // we use a recursive lock instead and only dequeue the buffer if a send was + // successful + lock_buffer_list(&zh->to_send); + while (zh->to_send.head != 0&& zh->state == ZOO_CONNECTED_STATE) { + if(timeout!=0){ + int elapsed; + struct timeval now; + gettimeofday(&now,0); + elapsed=calculate_interval(&started,&now); + if (elapsed>timeout) { + rc = ZOPERATIONTIMEOUT; + break; + } + +#ifdef WIN32 + wait = get_timeval(timeout-elapsed); + FD_ZERO(&pollSet); + FD_SET(zh->fd, &pollSet); + // Poll the socket + rc = select((int)(zh->fd)+1, NULL, &pollSet, NULL, &wait); +#else + struct pollfd fds; + fds.fd = zh->fd; + fds.events = POLLOUT; + fds.revents = 0; + rc = poll(&fds, 1, timeout-elapsed); +#endif + if (rc<=0) { + /* timed out or an error or POLLERR */ + rc = rc==0 ? ZOPERATIONTIMEOUT : ZSYSTEMERROR; + break; + } + } + + rc = send_buffer(zh->fd, zh->to_send.head); + if(rc==0 && timeout==0){ + /* send_buffer would block while sending this buffer */ + rc = ZOK; + break; + } + if (rc < 0) { + rc = ZCONNECTIONLOSS; + break; + } + // if the buffer has been sent successfully, remove it from the queue + if (rc > 0) + remove_buffer(&zh->to_send); + gettimeofday(&zh->last_send, 0); + rc = ZOK; + } + unlock_buffer_list(&zh->to_send); + return rc; +} + +const char* zerror(int c) +{ + switch (c){ + case ZOK: + return "ok"; + case ZSYSTEMERROR: + return "system error"; + case ZRUNTIMEINCONSISTENCY: + return "run time inconsistency"; + case ZDATAINCONSISTENCY: + return "data inconsistency"; + case ZCONNECTIONLOSS: + return "connection loss"; + case ZMARSHALLINGERROR: + return "marshalling error"; + case ZUNIMPLEMENTED: + return "unimplemented"; + case ZOPERATIONTIMEOUT: + return "operation timeout"; + case ZBADARGUMENTS: + return "bad arguments"; + case ZINVALIDSTATE: + return "invalid zhandle state"; + case ZAPIERROR: + return "api error"; + case ZNONODE: + return "no node"; + case ZNOAUTH: + return "not authenticated"; + case ZBADVERSION: + return "bad version"; + case ZNOCHILDRENFOREPHEMERALS: + return "no children for ephemerals"; + case ZNODEEXISTS: + return "node exists"; + case ZNOTEMPTY: + return "not empty"; + case ZSESSIONEXPIRED: + return "session expired"; + case ZINVALIDCALLBACK: + return "invalid callback"; + case ZINVALIDACL: + return "invalid acl"; + case ZAUTHFAILED: + return "authentication failed"; + case ZCLOSING: + return "zookeeper is closing"; + case ZNOTHING: + return "(not error) no server responses to process"; + case ZSESSIONMOVED: + return "session moved to another server, so operation is ignored"; + } + if (c > 0) { + return strerror(c); + } + return "unknown error"; +} + +int zoo_add_auth(zhandle_t *zh,const char* scheme,const char* cert, + int certLen,void_completion_t completion, const void *data) +{ + struct buffer auth; + auth_info *authinfo; + if(scheme==NULL || zh==NULL) + return ZBADARGUMENTS; + + if (is_unrecoverable(zh)) + return ZINVALIDSTATE; + + // [ZOOKEEPER-800] zoo_add_auth should return ZINVALIDSTATE if + // the connection is closed. + if (zoo_state(zh) == 0) { + return ZINVALIDSTATE; + } + + if(cert!=NULL && certLen!=0){ + auth.buff=calloc(1,certLen); + if(auth.buff==0) { + return ZSYSTEMERROR; + } + memcpy(auth.buff,cert,certLen); + auth.len=certLen; + } else { + auth.buff = 0; + auth.len = 0; + } + + zoo_lock_auth(zh); + authinfo = (auth_info*) malloc(sizeof(auth_info)); + authinfo->scheme=strdup(scheme); + authinfo->auth=auth; + authinfo->completion=completion; + authinfo->data=data; + authinfo->next = NULL; + add_last_auth(&zh->auth_h, authinfo); + zoo_unlock_auth(zh); + + if(zh->state == ZOO_CONNECTED_STATE || zh->state == ZOO_ASSOCIATING_STATE) + return send_last_auth_info(zh); + + return ZOK; +} + +static const char* format_endpoint_info(const struct sockaddr_storage* ep) +{ + static char buf[128]; + char addrstr[128]; + void *inaddr; +#ifdef WIN32 + char * addrstring; +#endif + int port; + if(ep==0) + return "null"; + +#if defined(AF_INET6) + if(ep->ss_family==AF_INET6){ + inaddr=&((struct sockaddr_in6*)ep)->sin6_addr; + port=((struct sockaddr_in6*)ep)->sin6_port; + } else { +#endif + inaddr=&((struct sockaddr_in*)ep)->sin_addr; + port=((struct sockaddr_in*)ep)->sin_port; +#if defined(AF_INET6) + } +#endif +#ifdef WIN32 + addrstring = inet_ntoa (*(struct in_addr*)inaddr); + sprintf(buf,"%s:%d",addrstring,ntohs(port)); +#else + inet_ntop(ep->ss_family,inaddr,addrstr,sizeof(addrstr)-1); + sprintf(buf,"%s:%d",addrstr,ntohs(port)); +#endif + return buf; +} + +static const char* format_current_endpoint_info(zhandle_t* zh) +{ + return format_endpoint_info(&zh->addrs[zh->connect_index]); +} + +void zoo_deterministic_conn_order(int yesOrNo) +{ + disable_conn_permute=yesOrNo; +} + +/*---------------------------------------------------------------------------* + * SYNC API + *---------------------------------------------------------------------------*/ +int zoo_create(zhandle_t *zh, const char *path, const char *value, + int valuelen, const struct ACL_vector *acl, int flags, + char *path_buffer, int path_buffer_len) +{ + struct sync_completion *sc = alloc_sync_completion(); + int rc; + if (!sc) { + return ZSYSTEMERROR; + } + sc->u.str.str = path_buffer; + sc->u.str.str_len = path_buffer_len; + rc=zoo_acreate(zh, path, value, valuelen, acl, flags, SYNCHRONOUS_MARKER, sc); + if(rc==ZOK){ + wait_sync_completion(sc); + rc = sc->rc; + } + free_sync_completion(sc); + return rc; +} + +int zoo_delete(zhandle_t *zh, const char *path, int version) +{ + struct sync_completion *sc = alloc_sync_completion(); + int rc; + if (!sc) { + return ZSYSTEMERROR; + } + rc=zoo_adelete(zh, path, version, SYNCHRONOUS_MARKER, sc); + if(rc==ZOK){ + wait_sync_completion(sc); + rc = sc->rc; + } + free_sync_completion(sc); + return rc; +} + +int zoo_exists(zhandle_t *zh, const char *path, int watch, struct Stat *stat) +{ + return zoo_wexists(zh,path,watch?zh->watcher:0,zh->context,stat); +} + +int zoo_wexists(zhandle_t *zh, const char *path, + watcher_fn watcher, void* watcherCtx, struct Stat *stat) +{ + struct sync_completion *sc = alloc_sync_completion(); + int rc; + if (!sc) { + return ZSYSTEMERROR; + } + rc=zoo_awexists(zh,path,watcher,watcherCtx,SYNCHRONOUS_MARKER, sc); + if(rc==ZOK){ + wait_sync_completion(sc); + rc = sc->rc; + if (rc == 0&& stat) { + *stat = sc->u.stat; + } + } + free_sync_completion(sc); + return rc; +} + +int zoo_get(zhandle_t *zh, const char *path, int watch, char *buffer, + int* buffer_len, struct Stat *stat) +{ + return zoo_wget(zh,path,watch?zh->watcher:0,zh->context, + buffer,buffer_len,stat); +} + +int zoo_wget(zhandle_t *zh, const char *path, + watcher_fn watcher, void* watcherCtx, + char *buffer, int* buffer_len, struct Stat *stat) +{ + struct sync_completion *sc; + int rc=0; + + if(buffer_len==NULL) + return ZBADARGUMENTS; + if((sc=alloc_sync_completion())==NULL) + return ZSYSTEMERROR; + + sc->u.data.buffer = buffer; + sc->u.data.buff_len = *buffer_len; + rc=zoo_awget(zh, path, watcher, watcherCtx, SYNCHRONOUS_MARKER, sc); + if(rc==ZOK){ + wait_sync_completion(sc); + rc = sc->rc; + if (rc == 0) { + if(stat) + *stat = sc->u.data.stat; + *buffer_len = sc->u.data.buff_len; + } + } + free_sync_completion(sc); + return rc; +} + +int zoo_set(zhandle_t *zh, const char *path, const char *buffer, int buflen, + int version) +{ + return zoo_set2(zh, path, buffer, buflen, version, 0); +} + +int zoo_set2(zhandle_t *zh, const char *path, const char *buffer, int buflen, + int version, struct Stat *stat) +{ + struct sync_completion *sc = alloc_sync_completion(); + int rc; + if (!sc) { + return ZSYSTEMERROR; + } + rc=zoo_aset(zh, path, buffer, buflen, version, SYNCHRONOUS_MARKER, sc); + if(rc==ZOK){ + wait_sync_completion(sc); + rc = sc->rc; + if (rc == 0 && stat) { + *stat = sc->u.stat; + } + } + free_sync_completion(sc); + return rc; +} + +static int zoo_wget_children_(zhandle_t *zh, const char *path, + watcher_fn watcher, void* watcherCtx, + struct String_vector *strings) +{ + struct sync_completion *sc = alloc_sync_completion(); + int rc; + if (!sc) { + return ZSYSTEMERROR; + } + rc= zoo_awget_children (zh, path, watcher, watcherCtx, SYNCHRONOUS_MARKER, sc); + if(rc==ZOK){ + wait_sync_completion(sc); + rc = sc->rc; + if (rc == 0) { + if (strings) { + *strings = sc->u.strs2; + } else { + deallocate_String_vector(&sc->u.strs2); + } + } + } + free_sync_completion(sc); + return rc; +} + +static int zoo_wget_children2_(zhandle_t *zh, const char *path, + watcher_fn watcher, void* watcherCtx, + struct String_vector *strings, struct Stat *stat) +{ + struct sync_completion *sc = alloc_sync_completion(); + int rc; + if (!sc) { + return ZSYSTEMERROR; + } + rc= zoo_awget_children2(zh, path, watcher, watcherCtx, SYNCHRONOUS_MARKER, sc); + + if(rc==ZOK){ + wait_sync_completion(sc); + rc = sc->rc; + if (rc == 0) { + *stat = sc->u.strs_stat.stat2; + if (strings) { + *strings = sc->u.strs_stat.strs2; + } else { + deallocate_String_vector(&sc->u.strs_stat.strs2); + } + } + } + free_sync_completion(sc); + return rc; +} + +int zoo_get_children(zhandle_t *zh, const char *path, int watch, + struct String_vector *strings) +{ + return zoo_wget_children_(zh,path,watch?zh->watcher:0,zh->context,strings); +} + +int zoo_wget_children(zhandle_t *zh, const char *path, + watcher_fn watcher, void* watcherCtx, + struct String_vector *strings) +{ + return zoo_wget_children_(zh,path,watcher,watcherCtx,strings); +} + +int zoo_get_children2(zhandle_t *zh, const char *path, int watch, + struct String_vector *strings, struct Stat *stat) +{ + return zoo_wget_children2_(zh,path,watch?zh->watcher:0,zh->context,strings,stat); +} + +int zoo_wget_children2(zhandle_t *zh, const char *path, + watcher_fn watcher, void* watcherCtx, + struct String_vector *strings, struct Stat *stat) +{ + return zoo_wget_children2_(zh,path,watcher,watcherCtx,strings,stat); +} + +int zoo_get_acl(zhandle_t *zh, const char *path, struct ACL_vector *acl, + struct Stat *stat) +{ + struct sync_completion *sc = alloc_sync_completion(); + int rc; + if (!sc) { + return ZSYSTEMERROR; + } + rc=zoo_aget_acl(zh, path, SYNCHRONOUS_MARKER, sc); + if(rc==ZOK){ + wait_sync_completion(sc); + rc = sc->rc; + if (rc == 0&& stat) { + *stat = sc->u.acl.stat; + } + if (rc == 0) { + if (acl) { + *acl = sc->u.acl.acl; + } else { + deallocate_ACL_vector(&sc->u.acl.acl); + } + } + } + free_sync_completion(sc); + return rc; +} + +int zoo_set_acl(zhandle_t *zh, const char *path, int version, + const struct ACL_vector *acl) +{ + struct sync_completion *sc = alloc_sync_completion(); + int rc; + if (!sc) { + return ZSYSTEMERROR; + } + rc=zoo_aset_acl(zh, path, version, (struct ACL_vector*)acl, + SYNCHRONOUS_MARKER, sc); + if(rc==ZOK){ + wait_sync_completion(sc); + rc = sc->rc; + } + free_sync_completion(sc); + return rc; +} diff --git a/src/c/tests/CollectionUtil.h b/src/c/tests/CollectionUtil.h new file mode 100644 index 0000000..dd34811 --- /dev/null +++ b/src/c/tests/CollectionUtil.h @@ -0,0 +1,195 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef _COLLECTION_UTIL_H_ +#define _COLLECTION_UTIL_H_ + +/** + * \file + * CollectionBuilder and DictionaryBuilder classes and collection utility functions + */ + +namespace Util +{ + +// ********************************************************* +/** A shortcut to use for building collections. + * This class is a wrapper around standard STL collection containers such as vector. + * It allows one to conveniently build collections at the variable initialization time: + * \code + * #include "CollectionUtil.h" + * #include "Vector.h" // for ostream << operator overload for STL vector + * using Util; + * + * int main() + * { + * typedef vector MyVector; + * MyVector myVector=CollectionBuilder()("str1")("str2")("str3"); + * cout< +class CollectionBuilder +{ +public: + /// Type of the collection container. + typedef CONT CollectionType; + /// Container's value type. + typedef typename CollectionType::value_type value_type; + /// Container's constant iterator type. + typedef typename CollectionType::const_iterator const_iterator; + /// Container's size type. + typedef typename CollectionType::size_type size_type; + + /** Operator function call overload to allow call chaining. + * \param value the value to be inserted into the container + */ + CollectionBuilder& operator()(const value_type& value){ + return push_back(value); + } + /** Same as regular STL push_back() but allows call chaining. + * \param value the value to be inserted into the container + */ + CollectionBuilder& push_back(const value_type& value){ + collection_.push_back(value); + return *this; + } + /// \name Standard STL container interface + /// @{ + const_iterator begin() const{return collection_.begin();} + const_iterator end() const{return collection_.end();} + size_type size() const{return collection_.size();} + void clear() {collection_.clear();} + ///@} + /// Explicit typecast operator. + operator const CollectionType&() const {return collection_;} +private: + /// \cond PRIVATE + CollectionType collection_; + /// \endcond +}; + + +// ********************************************************* +/** A shortcut to use for building dictionaries. + * This class is a wrapper around standard STL associative containers such as map. + * It allows one to conveniently build dictionaries at the variable initialization time: + * \code + * #include "CollectionUtil.h" + * #include "Map.h" // for ostream << operator overload for STL map + * using Util; + * + * int main() + * { + * typedef map MyMap; + * MyMap myMap=DictionaryBuilder()("str1",1)("str2",2)("str3",3); + * cout< +class DictionaryBuilder +{ +public: + /// The type of the associative container + typedef CONT DictionaryType; + /// Container's element type (usually a pair) + typedef typename DictionaryType::value_type value_type; + /// Container's key type + typedef typename DictionaryType::key_type key_type; + /// Container's value type + typedef typename DictionaryType::mapped_type mapped_type; + /// Container's constant iterator type + typedef typename DictionaryType::const_iterator const_iterator; + /// Container's writable iterator type + typedef typename DictionaryType::iterator iterator; + /// Container's size type + typedef typename DictionaryType::size_type size_type; + + /** Operator function call overload to allow call chaining. + * \param key the value key to be inserted + * \param value the value to be inserted into the container + * \return a non-const reference to self + */ + DictionaryBuilder& operator()(const key_type& key,const mapped_type& value){ + dict_.insert(value_type(key,value)); + return *this; + } + /** Lookup value by key. + * \param key the key associated with the value. + * \return a non-const iterator pointing to the element whose key matched the \a key parameter + */ + iterator find(const key_type& key){ + return dict_.find(key); + } + /** Lookup value by key. + * \param key the key associated with the value. + * \return a const iterator pointing to the element whose key matched the \a key parameter + */ + const_iterator find(const key_type& key) const{ + return dict_.find(key); + } + + /// \name Standard STL container interface + /// @{ + const_iterator begin() const{return dict_.begin();} + const_iterator end() const{return dict_.end();} + size_type size() const{return dict_.size();} + void clear() {dict_.clear();} + ///@} + /// Explicit typecast operator. + operator const DictionaryType&() const {return dict_;} +private: + DictionaryType dict_; +}; + + +// *********************************************************** +/** Deletes all dynamically allocated elements of a collection. + * C::value_type is expected to be a pointer to a dynamically allocated object, or it won't compile. + * The function will iterate over all container elements and call delete for each of them. + * \param c a collection (vector,set) whose elements are being deleted. + */ +template +void clearCollection(C& c){ + for(typename C::const_iterator it=c.begin();it!=c.end();++it) + delete *it; + c.clear(); +} + +/** Deletes all dynamically allocated values of the assotiative container. + * The function expects the M::value_type to be a pair<..., ptr_to_type>, or it won't compile. + * It first deletes the objects pointed to by ptr_to_type + * and then clears (calls m.clear()) the container. + * \param m an associative container (map,hash_map) whose elements are being deleted. + */ +template +void clearMap(M& m){ + for(typename M::const_iterator it=m.begin();it!=m.end();++it) + delete it->second; + m.clear(); +} + +} // namespace Util + + +#endif // _COLLECTION_UTIL_H_ diff --git a/src/c/tests/CppAssertHelper.h b/src/c/tests/CppAssertHelper.h new file mode 100644 index 0000000..3926f51 --- /dev/null +++ b/src/c/tests/CppAssertHelper.h @@ -0,0 +1,37 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef CPPASSERTHELPER_H_ +#define CPPASSERTHELPER_H_ + +#include + +// make it possible to specify location of the ASSERT call +#define CPPUNIT_ASSERT_EQUAL_LOC(expected,actual,file,line) \ + ( CPPUNIT_NS::assertEquals( (expected), \ + (actual), \ + CPPUNIT_NS::SourceLine(file,line), \ + "" ) ) + +#define CPPUNIT_ASSERT_EQUAL_MESSAGE_LOC(message,expected,actual,file,line) \ + ( CPPUNIT_NS::assertEquals( (expected), \ + (actual), \ + CPPUNIT_NS::SourceLine(file,line), \ + (message) ) ) + +#endif /*CPPASSERTHELPER_H_*/ diff --git a/src/c/tests/LibCMocks.cc b/src/c/tests/LibCMocks.cc new file mode 100644 index 0000000..5db4553 --- /dev/null +++ b/src/c/tests/LibCMocks.cc @@ -0,0 +1,333 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include +#include + +#include "Util.h" +#include "LibCMocks.h" + +#undef USING_DUMA + +using namespace std; + +// ***************************************************************************** +// gethostbyname + +struct hostent* gethostbyname(const char *name) { + if(!Mock_gethostbyname::mock_) + return LIBC_SYMBOLS.gethostbyname(name); + return Mock_gethostbyname::mock_->call(name); +} + +Mock_gethostbyname* Mock_gethostbyname::mock_=0; + +Mock_gethostbyname::~Mock_gethostbyname(){ + mock_=0; + for(unsigned int i=0;icall(p1,p2); +} +#endif + +void* Mock_calloc::call(size_t p1, size_t p2){ +#ifndef USING_DUMA + if(counter++ ==callsBeforeFailure){ + counter=0; + errno=errnoOnFailure; + return 0; + } + return CALL_REAL(calloc,(p1,p2)); +#else + return 0; +#endif +} + +Mock_calloc* Mock_calloc::mock_=0; + +// ***************************************************************************** +// realloc + +#ifndef USING_DUMA +DECLARE_WRAPPER(void*,realloc,(void* p, size_t s)){ + if(!Mock_realloc::mock_) + return LIBC_SYMBOLS.realloc(p,s); + return Mock_realloc::mock_->call(p,s); +} +#endif + +Mock_realloc* Mock_realloc::mock_=0; + +void* Mock_realloc::call(void* p, size_t s){ + if(counter++ ==callsBeforeFailure){ + counter=0; + errno=errnoOnFailure; + return 0; + } + return LIBC_SYMBOLS.realloc(p,s); +} + +// ***************************************************************************** +// random +RANDOM_RET_TYPE random(){ + if(!Mock_random::mock_) + return LIBC_SYMBOLS.random(); + return Mock_random::mock_->call(); +} + +void srandom(unsigned long seed){ + if (!Mock_random::mock_) + LIBC_SYMBOLS.srandom(seed); + else + Mock_random::mock_->setSeed(seed); +} + +Mock_random* Mock_random::mock_=0; + +int Mock_random::call(){ + assert("Must specify one or more random integers"&&(randomReturns.size()!=0)); + return randomReturns[currentIdx++ % randomReturns.size()]; +} + +// ***************************************************************************** +// free +#ifndef USING_DUMA +DECLARE_WRAPPER(void,free,(void* p)){ + if(Mock_free_noop::mock_ && !Mock_free_noop::mock_->nested) + Mock_free_noop::mock_->call(p); + else + CALL_REAL(free,(p)); +} +#endif + +void Mock_free_noop::call(void* p){ + // on cygwin libc++ is linked statically + // push_back() may call free(), hence the nesting guards + synchronized(mx); + nested++; + callCounter++; + requested.push_back(p); + nested--; +} +void Mock_free_noop::freeRequested(){ +#ifndef USING_DUMA + synchronized(mx); + for(unsigned i=0; icallSocket(domain,type,protocol); +} + +int close(int fd){ + if (!Mock_socket::mock_) + return LIBC_SYMBOLS.close(fd); + return Mock_socket::mock_->callClose(fd); +} + +int getsockopt(int s,int level,int optname,void *optval,socklen_t *optlen){ + if (!Mock_socket::mock_) + return LIBC_SYMBOLS.getsockopt(s,level,optname,optval,optlen); + return Mock_socket::mock_->callGet(s,level,optname,optval,optlen); +} + +int setsockopt(int s,int level,int optname,const void *optval,socklen_t optlen){ + if (!Mock_socket::mock_) + return LIBC_SYMBOLS.setsockopt(s,level,optname,optval,optlen); + return Mock_socket::mock_->callSet(s,level,optname,optval,optlen); +} +int connect(int s,const struct sockaddr *addr,socklen_t len){ + if (!Mock_socket::mock_) + return LIBC_SYMBOLS.connect(s,addr,len); + return Mock_socket::mock_->callConnect(s,addr,len); +} +ssize_t send(int s,const void *buf,size_t len,int flags){ + if (!Mock_socket::mock_) + return LIBC_SYMBOLS.send(s,buf,len,flags); + return Mock_socket::mock_->callSend(s,buf,len,flags); +} + +ssize_t recv(int s,void *buf,size_t len,int flags){ + if (!Mock_socket::mock_) + return LIBC_SYMBOLS.recv(s,buf,len,flags); + return Mock_socket::mock_->callRecv(s,buf,len,flags); +} + +Mock_socket* Mock_socket::mock_=0; + +// ***************************************************************************** +// fcntl +extern "C" int fcntl(int fd,int cmd,...){ + va_list va; + va_start(va,cmd); + void* arg = va_arg(va, void *); + va_end (va); + if (!Mock_fcntl::mock_) + return LIBC_SYMBOLS.fcntl(fd,cmd,arg); + return Mock_fcntl::mock_->call(fd,cmd,arg); +} + +Mock_fcntl* Mock_fcntl::mock_=0; + +// ***************************************************************************** +// select +int select(int nfds,fd_set *rfds,fd_set *wfds,fd_set *efds,struct timeval *timeout){ + if (!Mock_select::mock_) + return LIBC_SYMBOLS.select(nfds,rfds,wfds,efds,timeout); + return Mock_select::mock_->call(nfds,rfds,wfds,efds,timeout); +} + +Mock_select* Mock_select::mock_=0; + +// ***************************************************************************** +// poll +Mock_poll* Mock_poll::mock_=0; +int poll(struct pollfd *fds, POLL_NFDS_TYPE nfds, int timeout){ + if (!Mock_poll::mock_) + return LIBC_SYMBOLS.poll(fds,nfds,timeout); + return Mock_poll::mock_->call(fds,nfds,timeout); + +} + +/* + * Recent gcc with -O2 and glibc FORTIFY feature may cause our poll + * mock to be ignored. + */ +#if __USE_FORTIFY_LEVEL > 0 +int __poll_chk (struct pollfd *__fds, nfds_t __nfds, int __timeout, + __SIZE_TYPE__ __fdslen) { + return poll(__fds, __nfds, __timeout); +} +#endif + +// ***************************************************************************** +// gettimeofday +int gettimeofday(struct timeval *tp, GETTIMEOFDAY_ARG2_TYPE tzp){ + if (!Mock_gettimeofday::mock_) + return LIBC_SYMBOLS.gettimeofday(tp,tzp); + return Mock_gettimeofday::mock_->call(tp,tzp); +} + +Mock_gettimeofday* Mock_gettimeofday::mock_=0; + diff --git a/src/c/tests/LibCMocks.h b/src/c/tests/LibCMocks.h new file mode 100644 index 0000000..5b07cda --- /dev/null +++ b/src/c/tests/LibCMocks.h @@ -0,0 +1,408 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef LIBCMOCKS_H_ +#define LIBCMOCKS_H_ + +#include +#include +#include + +#include +#include + +#include "MocksBase.h" +#include "LibCSymTable.h" +#include "ThreadingUtil.h" + +// ***************************************************************************** +// gethostbyname + +class Mock_gethostbyname: public Mock +{ +public: + struct HostEntry: public hostent { + HostEntry(const char* hostName,short addrtype); + ~HostEntry(); + HostEntry& addAlias(const char* alias); + HostEntry& addAddress(const char* addr4); + }; + + Mock_gethostbyname():current(0){mock_=this;} + virtual ~Mock_gethostbyname(); + HostEntry& addHostEntry(const char* hostName,short addrtype=AF_INET); + virtual hostent* call(const char* name); + + typedef std::vector HostEntryCollection; + HostEntryCollection gethostbynameReturns; + int current; + static Mock_gethostbyname* mock_; +}; + +class MockFailed_gethostbyname: public Mock_gethostbyname +{ +public: + MockFailed_gethostbyname():h_errnoReturn(HOST_NOT_FOUND) {} + + int h_errnoReturn; + virtual hostent* call(const char* name) { + h_errno=h_errnoReturn; + return 0; + } +}; + +// ***************************************************************************** +// calloc + +class Mock_calloc: public Mock +{ +public: + Mock_calloc():errnoOnFailure(ENOMEM),callsBeforeFailure(-1),counter(0) { + mock_=this; + } + virtual ~Mock_calloc() {mock_=0;} + + int errnoOnFailure; + int callsBeforeFailure; + int counter; + virtual void* call(size_t p1, size_t p2); + + static Mock_calloc* mock_; +}; + +// ***************************************************************************** +// realloc + +class Mock_realloc: public Mock +{ +public: + Mock_realloc():errnoOnFailure(ENOMEM),callsBeforeFailure(-1),counter(0) { + mock_=this; + } + virtual ~Mock_realloc() {mock_=0;} + + int errnoOnFailure; + int callsBeforeFailure; + int counter; + virtual void* call(void* p, size_t s); + + static Mock_realloc* mock_; +}; + +// ***************************************************************************** +// random + +class Mock_random: public Mock +{ +public: + Mock_random():currentIdx(0) {mock_=this;} + virtual ~Mock_random() {mock_=0;} + + int currentIdx; + std::vector randomReturns; + virtual int call(); + void setSeed(unsigned long){currentIdx=0;} + + static Mock_random* mock_; +}; + +// ***************************************************************************** +// no-op free; keeps track of all deallocation requests +class Mock_free_noop: public Mock +{ + Mutex mx; + std::vector requested; +public: + Mock_free_noop():nested(0),callCounter(0){mock_=this;} + virtual ~Mock_free_noop(){ + mock_=0; + freeRequested(); + } + + int nested; + int callCounter; + virtual void call(void* p); + void freeRequested(); + void disable(){mock_=0;} + // returns number of times the pointer was freed + int getFreeCount(void*); + bool isFreed(void*); + + static Mock_free_noop* mock_; +}; + +// ***************************************************************************** +// socket and related system calls + +class Mock_socket: public Mock +{ +public: + static const int FD=63; + Mock_socket():socketReturns(FD),closeReturns(0),getsocketoptReturns(0), + optvalSO_ERROR(0), + setsockoptReturns(0),connectReturns(0),connectErrno(0), + sendErrno(0),recvErrno(0) + { + mock_=this; + } + virtual ~Mock_socket(){mock_=0;} + + int socketReturns; + virtual int callSocket(int domain, int type, int protocol){ + return socketReturns; + } + int closeReturns; + virtual int callClose(int fd){ + return closeReturns; + } + int getsocketoptReturns; + int optvalSO_ERROR; + virtual int callGet(int s,int level,int optname,void *optval,socklen_t *len){ + if(level==SOL_SOCKET && optname==SO_ERROR){ + setSO_ERROR(optval,*len); + } + return getsocketoptReturns; + } + virtual void setSO_ERROR(void *optval,socklen_t len){ + memcpy(optval,&optvalSO_ERROR,len); + } + + int setsockoptReturns; + virtual int callSet(int s,int level,int optname,const void *optval,socklen_t len){ + return setsockoptReturns; + } + int connectReturns; + int connectErrno; + virtual int callConnect(int s,const struct sockaddr *addr,socklen_t len){ + errno=connectErrno; + return connectReturns; + } + + virtual void notifyBufferSent(const std::string& buffer){} + + int sendErrno; + std::string sendBuffer; + virtual ssize_t callSend(int s,const void *buf,size_t len,int flags){ + if(sendErrno!=0){ + errno=sendErrno; + return -1; + } + // first call to send() is always the length of the buffer to follow + bool sendingLength=sendBuffer.size()==0; + // overwrite the length bytes + sendBuffer.assign((const char*)buf,len); + if(!sendingLength){ + notifyBufferSent(sendBuffer); + sendBuffer.erase(); + } + return len; + } + + int recvErrno; + std::string recvReturnBuffer; + virtual ssize_t callRecv(int s,void *buf,size_t len,int flags){ + if(recvErrno!=0){ + errno=recvErrno; + return -1; + } + int k=std::min(len,recvReturnBuffer.length()); + if(k==0) + return 0; + memcpy(buf,recvReturnBuffer.data(),k); + recvReturnBuffer.erase(0,k); + return k; + } + virtual bool hasMoreRecv() const{ + return recvReturnBuffer.size()!=0; + } + static Mock_socket* mock_; +}; + +// ***************************************************************************** +// fcntl +class Mock_fcntl: public Mock +{ +public: + Mock_fcntl():callReturns(0),trapFD(-1){mock_=this;} + ~Mock_fcntl(){mock_=0;} + + int callReturns; + int trapFD; + virtual int call(int fd, int cmd, void* arg){ + if(trapFD==-1) + return LIBC_SYMBOLS.fcntl(fd,cmd,arg); + return callReturns; + } + + static Mock_fcntl* mock_; +}; + +// ***************************************************************************** +// select +class Mock_select: public Mock +{ +public: + Mock_select(Mock_socket* s,int fd):sock(s), + callReturns(0),myFD(fd),timeout(50) + { + mock_=this; + } + ~Mock_select(){mock_=0;} + + Mock_socket* sock; + int callReturns; + int myFD; + int timeout; //in millis + virtual int call(int nfds,fd_set *rfds,fd_set *wfds,fd_set *efds,struct timeval *tv){ + bool isWritableRequested=(wfds && FD_ISSET(myFD,wfds)); + if(rfds) FD_CLR(myFD,rfds); + if(wfds) FD_CLR(myFD,wfds); + // this timeout is only to prevent a tight loop + timeval myTimeout={0,0}; + if(!isWritableRequested && !isFDReadable()){ + myTimeout.tv_sec=timeout/1000; + myTimeout.tv_usec=(timeout%1000)*1000; + } + LIBC_SYMBOLS.select(nfds,rfds,wfds,efds,&myTimeout); + // myFD is always writable + if(isWritableRequested) FD_SET(myFD,wfds); + // myFD is only readable if the socket has anything to read + if(isFDReadable() && rfds) FD_SET(myFD,rfds); + return callReturns; + } + + virtual bool isFDReadable() const { + return sock->hasMoreRecv(); + } + + static Mock_select* mock_; +}; + +// ***************************************************************************** +// poll +// the last element of the pollfd array is expected to be test FD +class Mock_poll: public Mock +{ +public: + Mock_poll(Mock_socket* s,int fd):sock(s), + callReturns(1),myFD(fd),timeout(50) + { + mock_=this; + } + ~Mock_poll(){mock_=0;} + + Mock_socket* sock; + int callReturns; + int myFD; + int timeout; //in millis + virtual int call(struct pollfd *fds, POLL_NFDS_TYPE nfds, int to) { + pollfd* myPoll=0; + if(fds[nfds-1].fd==myFD) + myPoll=&fds[nfds-1]; + bool isWritableRequested=false; + if(myPoll!=0){ + isWritableRequested=myPoll->events&POLLOUT; + nfds--; + } + LIBC_SYMBOLS.poll(fds,nfds,(!isWritableRequested&&!isFDReadable())?timeout:0); + if(myPoll!=0){ + // myFD is always writable if requested + myPoll->revents=isWritableRequested?POLLOUT:0; + // myFD is only readable if the socket has anything to read + myPoll->revents|=isFDReadable()?POLLIN:0; + } + return callReturns; + } + + virtual bool isFDReadable() const { + return sock->hasMoreRecv(); + } + + static Mock_poll* mock_; +}; + +// ***************************************************************************** +// gettimeofday +class Mock_gettimeofday: public Mock +{ +public: + Mock_gettimeofday(){ + LIBC_SYMBOLS.gettimeofday(&tv,0); + mock_=this; + } + Mock_gettimeofday(const Mock_gettimeofday& other):tv(other.tv){} + Mock_gettimeofday(int32_t sec,int32_t usec){ + tv.tv_sec=sec; + tv.tv_usec=usec; + } + ~Mock_gettimeofday(){mock_=0;} + + timeval tv; + virtual int call(struct timeval *tp, GETTIMEOFDAY_ARG2_TYPE tzp){ + *tp=tv; + return 0; + } + operator timeval() const{ + return tv; + } + // advance secs + virtual void tick(int howmuch=1){tv.tv_sec+=howmuch;} + // advance milliseconds + // can move the clock forward as well as backward by providing a negative + // number + virtual void millitick(int howmuch=1){ + int ms=tv.tv_usec/1000+howmuch; + tv.tv_sec+=ms/1000; + // going backward? + if(ms<0){ + ms=1000-(-ms%1000); //wrap millis around + } + tv.tv_usec=(ms%1000)*1000; + } + virtual void tick(const timeval& howmuch){ + // add milliseconds (discarding microsecond portion) + long ms=tv.tv_usec/1000+howmuch.tv_usec/1000; + tv.tv_sec+=howmuch.tv_sec+ms/1000; + tv.tv_usec=(ms%1000)*1000; + } + static Mock_gettimeofday* mock_; +}; + +// discard microseconds! +inline bool operator==(const timeval& lhs, const timeval& rhs){ + return rhs.tv_sec==lhs.tv_sec && rhs.tv_usec/1000==lhs.tv_usec/1000; +} + +// simplistic implementation: no normalization, assume lhs >= rhs, +// discarding microseconds +inline timeval operator-(const timeval& lhs, const timeval& rhs){ + timeval res; + res.tv_sec=lhs.tv_sec-rhs.tv_sec; + res.tv_usec=(lhs.tv_usec/1000-rhs.tv_usec/1000)*1000; + if(res.tv_usec<0){ + res.tv_sec--; + res.tv_usec=1000000+res.tv_usec%1000000; // wrap the millis around + } + return res; +} + +inline int32_t toMilliseconds(const timeval& tv){ + return tv.tv_sec*1000+tv.tv_usec/1000; +} + +#endif /*LIBCMOCKS_H_*/ diff --git a/src/c/tests/LibCSymTable.cc b/src/c/tests/LibCSymTable.cc new file mode 100644 index 0000000..5378579 --- /dev/null +++ b/src/c/tests/LibCSymTable.cc @@ -0,0 +1,83 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "LibCSymTable.h" + +#define LOAD_SYM(sym) \ + sym=(sym##_sig)dlsym(handle,#sym); \ + assert("Unable to load "#sym" from libc"&&sym) + + +LibCSymTable& LibCSymTable::instance(){ + static LibCSymTable tbl; + return tbl; +} + +//****************************************************************************** +// preload original libc symbols +LibCSymTable::LibCSymTable() +{ + void* handle=getHandle(); + LOAD_SYM(gethostbyname); + LOAD_SYM(calloc); + LOAD_SYM(realloc); + LOAD_SYM(free); + LOAD_SYM(random); + LOAD_SYM(srandom); + LOAD_SYM(printf); + LOAD_SYM(socket); + LOAD_SYM(close); + LOAD_SYM(getsockopt); + LOAD_SYM(setsockopt); + LOAD_SYM(fcntl); + LOAD_SYM(connect); + LOAD_SYM(send); + LOAD_SYM(recv); + LOAD_SYM(select); + LOAD_SYM(poll); + LOAD_SYM(gettimeofday); +#ifdef THREADED + LOAD_SYM(pthread_create); + LOAD_SYM(pthread_detach); + LOAD_SYM(pthread_cond_broadcast); + LOAD_SYM(pthread_cond_destroy); + LOAD_SYM(pthread_cond_init); + LOAD_SYM(pthread_cond_signal); + LOAD_SYM(pthread_cond_timedwait); + LOAD_SYM(pthread_cond_wait); + LOAD_SYM(pthread_join); + LOAD_SYM(pthread_mutex_destroy); + LOAD_SYM(pthread_mutex_init); + LOAD_SYM(pthread_mutex_lock); + LOAD_SYM(pthread_mutex_trylock); + LOAD_SYM(pthread_mutex_unlock); +#endif +} + +void* LibCSymTable::getHandle(){ + static void* handle=0; + if(!handle){ +#ifdef __CYGWIN__ + handle=dlopen("cygwin1.dll",RTLD_LAZY); + assert("Unable to dlopen global sym table"&&handle); +#else + handle=RTLD_NEXT; +#endif + } + return handle; +} diff --git a/src/c/tests/LibCSymTable.h b/src/c/tests/LibCSymTable.h new file mode 100644 index 0000000..2f7e0c2 --- /dev/null +++ b/src/c/tests/LibCSymTable.h @@ -0,0 +1,107 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef LIBCSYMTABLE_H_ +#define LIBCSYMTABLE_H_ + +#include +#include +#include +#include +#include +#include +#include + +#ifdef THREADED +#include +#endif + +#include "config.h" + +// TODO: move all these macros to config.h (generated by autoconf) +#ifdef __CYGWIN__ +#if (CYGWIN_VERSION_DLL_MAJOR < 1007) +#define RANDOM_RET_TYPE int +#else +#define RANDOM_RET_TYPE long int +#endif +#define GETTIMEOFDAY_ARG2_TYPE void* +#else +#define RANDOM_RET_TYPE long int +#define GETTIMEOFDAY_ARG2_TYPE struct timezone* +#endif + +#define DECLARE_SYM(ret,sym,sig) \ + typedef ret (*sym##_sig)sig; \ + static sym##_sig preload_##sym () { \ + static sym##_sig ptr=0;\ + if(!ptr){ void* h=getHandle(); ptr=(sym##_sig)dlsym(h,#sym); } \ + assert("Unable to load "#sym" from libc"&&ptr); \ + return ptr; \ + } \ + sym##_sig sym + +#define LIBC_SYMBOLS LibCSymTable::instance() + +//****************************************************************************** +// preload original libc symbols +struct LibCSymTable +{ + DECLARE_SYM(hostent*,gethostbyname,(const char*)); + DECLARE_SYM(void*,calloc,(size_t, size_t)); + DECLARE_SYM(void*,realloc,(void*, size_t)); + DECLARE_SYM(void,free,(void*)); + DECLARE_SYM(RANDOM_RET_TYPE,random,(void)); + DECLARE_SYM(void,srandom,(unsigned long)); + DECLARE_SYM(int,printf,(const char*, ...)); + DECLARE_SYM(int,socket,(int,int,int)); + DECLARE_SYM(int,close,(int)); + DECLARE_SYM(int,getsockopt,(int,int,int,void*,socklen_t*)); + DECLARE_SYM(int,setsockopt,(int,int,int,const void*,socklen_t)); + DECLARE_SYM(int,fcntl,(int,int,...)); + DECLARE_SYM(int,connect,(int,const struct sockaddr*,socklen_t)); + DECLARE_SYM(ssize_t,send,(int,const void*,size_t,int)); + DECLARE_SYM(ssize_t,recv,(int,const void*,size_t,int)); + DECLARE_SYM(int,select,(int,fd_set*,fd_set*,fd_set*,struct timeval*)); + DECLARE_SYM(int,poll,(struct pollfd*,POLL_NFDS_TYPE,int)); + DECLARE_SYM(int,gettimeofday,(struct timeval*,GETTIMEOFDAY_ARG2_TYPE)); +#ifdef THREADED + DECLARE_SYM(int,pthread_create,(pthread_t *, const pthread_attr_t *, + void *(*)(void *), void *)); + DECLARE_SYM(int,pthread_detach,(pthread_t)); + DECLARE_SYM(int,pthread_cond_broadcast,(pthread_cond_t *)); + DECLARE_SYM(int,pthread_cond_destroy,(pthread_cond_t *)); + DECLARE_SYM(int,pthread_cond_init,(pthread_cond_t *, const pthread_condattr_t *)); + DECLARE_SYM(int,pthread_cond_signal,(pthread_cond_t *)); + DECLARE_SYM(int,pthread_cond_timedwait,(pthread_cond_t *, + pthread_mutex_t *, const struct timespec *)); + DECLARE_SYM(int,pthread_cond_wait,(pthread_cond_t *, pthread_mutex_t *)); + DECLARE_SYM(int,pthread_join,(pthread_t, void **)); + DECLARE_SYM(int,pthread_mutex_destroy,(pthread_mutex_t *)); + DECLARE_SYM(int,pthread_mutex_init,(pthread_mutex_t *, const pthread_mutexattr_t *)); + DECLARE_SYM(int,pthread_mutex_lock,(pthread_mutex_t *)); + DECLARE_SYM(int,pthread_mutex_trylock,(pthread_mutex_t *)); + DECLARE_SYM(int,pthread_mutex_unlock,(pthread_mutex_t *)); +#endif + LibCSymTable(); + + static void* getHandle(); + static LibCSymTable& instance(); +}; + +#endif /*LIBCSYMTABLE_H_*/ diff --git a/src/c/tests/MocksBase.cc b/src/c/tests/MocksBase.cc new file mode 100644 index 0000000..60b2c75 --- /dev/null +++ b/src/c/tests/MocksBase.cc @@ -0,0 +1,36 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +#include "MocksBase.h" +#include "LibCSymTable.h" + +// ***************************************************************************** +// Mock base +void* Mock::operator new(std::size_t s){ + void* p=malloc(s); + if(!p) + throw std::bad_alloc(); + return p; +} + +void Mock::operator delete(void* p){ + LIBC_SYMBOLS.free(p); +} diff --git a/src/c/tests/MocksBase.h b/src/c/tests/MocksBase.h new file mode 100644 index 0000000..5b54251 --- /dev/null +++ b/src/c/tests/MocksBase.h @@ -0,0 +1,36 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef MOCKSBASE_H_ +#define MOCKSBASE_H_ + +#include + +// ***************************************************************************** +// Mock base + +class Mock +{ +public: + virtual ~Mock(){} + + static void* operator new(std::size_t s); + static void operator delete(void* p); +}; + +#endif /*MOCKSBASE_H_*/ diff --git a/src/c/tests/PthreadMocks.cc b/src/c/tests/PthreadMocks.cc new file mode 100644 index 0000000..490cebf --- /dev/null +++ b/src/c/tests/PthreadMocks.cc @@ -0,0 +1,106 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "PthreadMocks.h" + +MockPthreadsBase* MockPthreadsBase::mock_=0; + +#undef USING_DUMA + +#ifndef USING_DUMA +int pthread_cond_broadcast (pthread_cond_t *c){ + if(!MockPthreadsBase::mock_) + return LIBC_SYMBOLS.pthread_cond_broadcast(c); + return MockPthreadsBase::mock_->pthread_cond_broadcast(c); +} +int pthread_cond_destroy (pthread_cond_t *c){ + if(!MockPthreadsBase::mock_) + return LIBC_SYMBOLS.pthread_cond_destroy(c); + return MockPthreadsBase::mock_->pthread_cond_destroy(c); +} +int pthread_cond_init (pthread_cond_t *c, const pthread_condattr_t *a){ + if(!MockPthreadsBase::mock_) + return LIBC_SYMBOLS.pthread_cond_init(c,a); + return MockPthreadsBase::mock_->pthread_cond_init(c,a); +} +int pthread_cond_signal (pthread_cond_t *c){ + if(!MockPthreadsBase::mock_) + return LIBC_SYMBOLS.pthread_cond_signal(c); + return MockPthreadsBase::mock_->pthread_cond_signal(c); +} +int pthread_cond_timedwait (pthread_cond_t *c, + pthread_mutex_t *m, const struct timespec *t){ + if(!MockPthreadsBase::mock_) + return LIBC_SYMBOLS.pthread_cond_timedwait(c,m,t); + return MockPthreadsBase::mock_->pthread_cond_timedwait(c,m,t); +} +int pthread_cond_wait (pthread_cond_t *c, pthread_mutex_t *m){ + if(!MockPthreadsBase::mock_) + return LIBC_SYMBOLS.pthread_cond_wait(c,m); + return MockPthreadsBase::mock_->pthread_cond_wait(c,m); +} +int pthread_create (pthread_t *t, const pthread_attr_t *a, + void *(*f)(void *), void *d){ + if(!MockPthreadsBase::mock_) + return LIBC_SYMBOLS.pthread_create(t,a,f,d); + return MockPthreadsBase::mock_->pthread_create(t,a,f,d); +} +int pthread_detach(pthread_t t){ + if(!MockPthreadsBase::mock_) + return LIBC_SYMBOLS.pthread_detach(t); + return MockPthreadsBase::mock_->pthread_detach(t); +} +int pthread_join (pthread_t t, void **r){ + if(!MockPthreadsBase::mock_) + return LIBC_SYMBOLS.pthread_join(t,r); + return MockPthreadsBase::mock_->pthread_join(t,r); +} +int pthread_mutex_destroy (pthread_mutex_t *m){ + if(!MockPthreadsBase::mock_) + return LIBC_SYMBOLS.pthread_mutex_destroy(m); + return MockPthreadsBase::mock_->pthread_mutex_destroy(m); +} +int pthread_mutex_init (pthread_mutex_t *m, const pthread_mutexattr_t *a){ + if(!MockPthreadsBase::mock_) + return LIBC_SYMBOLS.pthread_mutex_init(m,a); + return MockPthreadsBase::mock_->pthread_mutex_init(m,a); +} + +DECLARE_WRAPPER(int,pthread_mutex_lock,(pthread_mutex_t *m)){ + if(!MockPthreadsBase::mock_) + return CALL_REAL(pthread_mutex_lock,(m)); + return MockPthreadsBase::mock_->pthread_mutex_lock(m); +} + +int pthread_mutex_trylock (pthread_mutex_t *m){ + if(!MockPthreadsBase::mock_) + return LIBC_SYMBOLS.pthread_mutex_trylock(m); + return MockPthreadsBase::mock_->pthread_mutex_trylock(m); +} + +DECLARE_WRAPPER(int,pthread_mutex_unlock,(pthread_mutex_t *m)){ + if(!MockPthreadsBase::mock_) + return CALL_REAL(pthread_mutex_unlock,(m)); + return MockPthreadsBase::mock_->pthread_mutex_unlock(m); +} +#endif + +CheckedPthread::ThreadMap CheckedPthread::tmap_; +CheckedPthread::MutexMap CheckedPthread::mmap_; +CheckedPthread::CVMap CheckedPthread::cvmap_; +Mutex CheckedPthread::mx; diff --git a/src/c/tests/PthreadMocks.h b/src/c/tests/PthreadMocks.h new file mode 100644 index 0000000..8db8815 --- /dev/null +++ b/src/c/tests/PthreadMocks.h @@ -0,0 +1,449 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef PTHREADMOCKS_H_ +#define PTHREADMOCKS_H_ + +#include +#include +#include + +#include "src/zk_adaptor.h" + +#include "Util.h" +#include "MocksBase.h" +#include "LibCSymTable.h" +#include "ThreadingUtil.h" + +// an ABC for pthreads +class MockPthreadsBase: public Mock +{ +public: + MockPthreadsBase(){mock_=this;} + virtual ~MockPthreadsBase(){mock_=0;} + + virtual int pthread_create(pthread_t * t, const pthread_attr_t *a, + void *(*f)(void *), void *d) =0; + virtual int pthread_join(pthread_t t, void ** r) =0; + virtual int pthread_detach(pthread_t t) =0; + virtual int pthread_cond_broadcast(pthread_cond_t *c) =0; + virtual int pthread_cond_destroy(pthread_cond_t *c) =0; + virtual int pthread_cond_init(pthread_cond_t *c, const pthread_condattr_t *a) =0; + virtual int pthread_cond_signal(pthread_cond_t *c) =0; + virtual int pthread_cond_timedwait(pthread_cond_t *c, + pthread_mutex_t *m, const struct timespec *t) =0; + virtual int pthread_cond_wait(pthread_cond_t *c, pthread_mutex_t *m) =0; + virtual int pthread_mutex_destroy(pthread_mutex_t *m) =0; + virtual int pthread_mutex_init(pthread_mutex_t *m, const pthread_mutexattr_t *a) =0; + virtual int pthread_mutex_lock(pthread_mutex_t *m) =0; + virtual int pthread_mutex_trylock(pthread_mutex_t *m) =0; + virtual int pthread_mutex_unlock(pthread_mutex_t *m) =0; + + static MockPthreadsBase* mock_; +}; + +// all pthread functions simply return an error code +// and increment their invocation counter. No actual threads are spawned. +class MockPthreadsNull: public MockPthreadsBase +{ +public: + MockPthreadsNull(): + pthread_createReturns(0),pthread_createCounter(0), + pthread_joinReturns(0),pthread_joinCounter(0),pthread_joinResultReturn(0), + pthread_detachReturns(0),pthread_detachCounter(0), + pthread_cond_broadcastReturns(0),pthread_cond_broadcastCounter(0), + pthread_cond_destroyReturns(0),pthread_cond_destroyCounter(0), + pthread_cond_initReturns(0),pthread_cond_initCounter(0), + pthread_cond_signalReturns(0),pthread_cond_signalCounter(0), + pthread_cond_timedwaitReturns(0),pthread_cond_timedwaitCounter(0), + pthread_cond_waitReturns(0),pthread_cond_waitCounter(0), + pthread_mutex_destroyReturns(0),pthread_mutex_destroyCounter(0), + pthread_mutex_initReturns(0),pthread_mutex_initCounter(0), + pthread_mutex_lockReturns(0),pthread_mutex_lockCounter(0), + pthread_mutex_trylockReturns(0),pthread_mutex_trylockCounter(0), + pthread_mutex_unlockReturns(0),pthread_mutex_unlockCounter(0) + { + memset(threads,0,sizeof(threads)); + } + + short threads[512]; + + int pthread_createReturns; + int pthread_createCounter; + virtual int pthread_create(pthread_t * t, const pthread_attr_t *a, + void *(*f)(void *), void *d){ + char* p=(char*)&threads[pthread_createCounter++]; + p[0]='i'; // mark as created + *t=(pthread_t)p; + return pthread_createReturns; + } + int pthread_joinReturns; + int pthread_joinCounter; + void* pthread_joinResultReturn; + virtual int pthread_join(pthread_t t, void ** r){ + pthread_joinCounter++; + if(r!=0) + *r=pthread_joinResultReturn; + char* p=(char*)t; + p[0]='x';p[1]+=1; + return pthread_joinReturns; + } + int pthread_detachReturns; + int pthread_detachCounter; + virtual int pthread_detach(pthread_t t){ + pthread_detachCounter++; + char* p=(char*)t; + p[0]='x';p[1]+=1; + return pthread_detachReturns; + } + + template + static bool isInitialized(const T& t){ + return ((char*)t)[0]=='i'; + } + template + static bool isDestroyed(const T& t){ + return ((char*)t)[0]=='x'; + } + template + static int getDestroyCounter(const T& t){ + return ((char*)t)[1]; + } + template + static int getInvalidAccessCounter(const T& t){ + return ((char*)t)[2]; + } + int pthread_cond_broadcastReturns; + int pthread_cond_broadcastCounter; + virtual int pthread_cond_broadcast(pthread_cond_t *c){ + pthread_cond_broadcastCounter++; + if(isDestroyed(c))((char*)c)[2]++; + return pthread_cond_broadcastReturns; + } + int pthread_cond_destroyReturns; + int pthread_cond_destroyCounter; + virtual int pthread_cond_destroy(pthread_cond_t *c){ + pthread_cond_destroyCounter++; + char* p=(char*)c; + p[0]='x';p[1]+=1; + return pthread_cond_destroyReturns; + } + int pthread_cond_initReturns; + int pthread_cond_initCounter; + virtual int pthread_cond_init(pthread_cond_t *c, const pthread_condattr_t *a){ + pthread_cond_initCounter++; + char* p=(char*)c; + p[0]='i'; // mark as created + p[1]=0; // destruction counter + p[2]=0; // access after destruction counter + return pthread_cond_initReturns; + } + int pthread_cond_signalReturns; + int pthread_cond_signalCounter; + virtual int pthread_cond_signal(pthread_cond_t *c){ + pthread_cond_signalCounter++; + if(isDestroyed(c))((char*)c)[2]++; + return pthread_cond_signalReturns; + } + int pthread_cond_timedwaitReturns; + int pthread_cond_timedwaitCounter; + virtual int pthread_cond_timedwait(pthread_cond_t *c, + pthread_mutex_t *m, const struct timespec *t){ + pthread_cond_timedwaitCounter++; + if(isDestroyed(c))((char*)c)[2]++; + return pthread_cond_timedwaitReturns; + } + int pthread_cond_waitReturns; + int pthread_cond_waitCounter; + virtual int pthread_cond_wait(pthread_cond_t *c, pthread_mutex_t *m){ + pthread_cond_waitCounter++; + if(isDestroyed(c))((char*)c)[2]++; + return pthread_cond_waitReturns; + } + int pthread_mutex_destroyReturns; + int pthread_mutex_destroyCounter; + virtual int pthread_mutex_destroy(pthread_mutex_t *m){ + pthread_mutex_destroyCounter++; + char* p=(char*)m; + p[0]='x';p[1]+=1; + return pthread_mutex_destroyReturns; + } + int pthread_mutex_initReturns; + int pthread_mutex_initCounter; + virtual int pthread_mutex_init(pthread_mutex_t *m, const pthread_mutexattr_t *a){ + pthread_mutex_initCounter++; + char* p=(char*)m; + p[0]='i'; // mark as created + p[1]=0; // destruction counter + p[2]=0; // access after destruction counter + return pthread_mutex_initReturns; + } + int pthread_mutex_lockReturns; + int pthread_mutex_lockCounter; + virtual int pthread_mutex_lock(pthread_mutex_t *m){ + pthread_mutex_lockCounter++; + if(isDestroyed(m))((char*)m)[2]++; + return pthread_mutex_lockReturns; + } + int pthread_mutex_trylockReturns; + int pthread_mutex_trylockCounter; + virtual int pthread_mutex_trylock(pthread_mutex_t *m){ + pthread_mutex_trylockCounter++; + if(isDestroyed(m))((char*)m)[2]++; + return pthread_mutex_trylockReturns; + } + int pthread_mutex_unlockReturns; + int pthread_mutex_unlockCounter; + virtual int pthread_mutex_unlock(pthread_mutex_t *m){ + pthread_mutex_unlockCounter++; + if(isDestroyed(m))((char*)m)[2]++; + return pthread_mutex_unlockReturns; + } +}; + +// simulates the way zookeeper threads make use of api_prolog/epilog and +// +class MockPthreadZKNull: public MockPthreadsNull +{ + typedef std::map Map; + Map map_; +public: + virtual int pthread_create(pthread_t * t, const pthread_attr_t *a, + void *(*f)(void *), void *d){ + int ret=MockPthreadsNull::pthread_create(t,a,f,d); + zhandle_t* zh=(zhandle_t*)d; + adaptor_threads* ad=(adaptor_threads*)zh->adaptor_priv; + api_prolog(zh); + ad->threadsToWait--; + putValue(map_,*t,zh); + return ret; + } + virtual int pthread_join(pthread_t t, void ** r){ + zhandle_t* zh=0; + if(getValue(map_,t,zh)) + api_epilog(zh,0); + return MockPthreadsNull::pthread_join(t,r); + } +}; + +struct ThreadInfo{ + typedef enum {RUNNING,TERMINATED} ThreadState; + + ThreadInfo(): + destructionCounter_(0),invalidAccessCounter_(0),state_(RUNNING) + { + } + + ThreadInfo& incDestroyed() { + destructionCounter_++; + return *this; + } + ThreadInfo& incInvalidAccess(){ + invalidAccessCounter_++; + return *this; + } + ThreadInfo& setTerminated(){ + state_=TERMINATED; + return *this; + } + int destructionCounter_; + int invalidAccessCounter_; + ThreadState state_; +}; + +class CheckedPthread: public MockPthreadsBase +{ + // first => destruction counter + // second => invalid access counter + //typedef std::pair Entry; + typedef ThreadInfo Entry; + typedef std::map ThreadMap; + static ThreadMap tmap_; + static ThreadMap& getMap(const TypeOp::BareT&){return tmap_;} + typedef std::map MutexMap; + static MutexMap mmap_; + static MutexMap& getMap(const TypeOp::BareT&){return mmap_;} + typedef std::map CVMap; + static CVMap cvmap_; + static CVMap& getMap(const TypeOp::BareT&){return cvmap_;} + + static Mutex mx; + + template + static void markDestroyed(T& t){ + typedef typename TypeOp::BareT Type; + Entry e; + synchronized(mx); + if(getValue(getMap(Type()),t,e)){ + putValue(getMap(Type()),t,Entry(e).incDestroyed()); + }else{ + putValue(getMap(Type()),t,Entry().incDestroyed()); + } + } + template + static void markCreated(T& t){ + typedef typename TypeOp::BareT Type; + Entry e; + synchronized(mx); + if(!getValue(getMap(Type()),t,e)) + putValue(getMap(Type()),t,Entry()); + } + template + static void checkAccessed(T& t){ + typedef typename TypeOp::BareT Type; + Entry e; + synchronized(mx); + if(getValue(getMap(Type()),t,e) && e.destructionCounter_>0) + putValue(getMap(Type()),t,Entry(e).incInvalidAccess()); + } + static void setTerminated(pthread_t t){ + Entry e; + synchronized(mx); + if(getValue(tmap_,t,e)) + putValue(tmap_,t,Entry(e).setTerminated()); + } +public: + bool verbose; + CheckedPthread():verbose(false){ + tmap_.clear(); + mmap_.clear(); + cvmap_.clear(); + mx.release(); + } + template + static bool isInitialized(const T& t){ + typedef typename TypeOp::BareT Type; + Entry e; + synchronized(mx); + return getValue(getMap(Type()),t,e) && e.destructionCounter_==0; + } + template + static bool isDestroyed(const T& t){ + typedef typename TypeOp::BareT Type; + Entry e; + synchronized(mx); + return getValue(getMap(Type()),t,e) && e.destructionCounter_>0; + } + static bool isTerminated(pthread_t t){ + Entry e; + synchronized(mx); + return getValue(tmap_,t,e) && e.state_==ThreadInfo::TERMINATED; + } + template + static int getDestroyCounter(const T& t){ + typedef typename TypeOp::BareT Type; + Entry e; + synchronized(mx); + return getValue(getMap(Type()),t,e)?e.destructionCounter_:-1; + } + template + static int getInvalidAccessCounter(const T& t){ + typedef typename TypeOp::BareT Type; + Entry e; + synchronized(mx); + return getValue(getMap(Type()),t,e)?e.invalidAccessCounter_:-1; + } + + struct ThreadContext{ + typedef void *(*ThreadFunc)(void *); + + ThreadContext(ThreadFunc func,void* param):func_(func),param_(param){} + ThreadFunc func_; + void* param_; + }; + static void* threadFuncWrapper(void* v){ + ThreadContext* ctx=(ThreadContext*)v; + pthread_t t=pthread_self(); + markCreated(t); + void* res=ctx->func_(ctx->param_); + setTerminated(pthread_self()); + delete ctx; + return res; + } + virtual int pthread_create(pthread_t * t, const pthread_attr_t *a, + void *(*f)(void *), void *d) + { + int ret=LIBC_SYMBOLS.pthread_create(t,a,threadFuncWrapper, + new ThreadContext(f,d)); + if(verbose) + TEST_TRACE(("thread created %p",*t)); + return ret; + } + virtual int pthread_join(pthread_t t, void ** r){ + if(verbose) TEST_TRACE(("thread joined %p",t)); + int ret=LIBC_SYMBOLS.pthread_join(t,r); + if(ret==0) + markDestroyed(t); + return ret; + } + virtual int pthread_detach(pthread_t t){ + if(verbose) TEST_TRACE(("thread detached %p",t)); + int ret=LIBC_SYMBOLS.pthread_detach(t); + if(ret==0) + markDestroyed(t); + return ret; + } + virtual int pthread_cond_broadcast(pthread_cond_t *c){ + checkAccessed(c); + return LIBC_SYMBOLS.pthread_cond_broadcast(c); + } + virtual int pthread_cond_destroy(pthread_cond_t *c){ + markDestroyed(c); + return LIBC_SYMBOLS.pthread_cond_destroy(c); + } + virtual int pthread_cond_init(pthread_cond_t *c, const pthread_condattr_t *a){ + markCreated(c); + return LIBC_SYMBOLS.pthread_cond_init(c,a); + } + virtual int pthread_cond_signal(pthread_cond_t *c){ + checkAccessed(c); + return LIBC_SYMBOLS.pthread_cond_signal(c); + } + virtual int pthread_cond_timedwait(pthread_cond_t *c, + pthread_mutex_t *m, const struct timespec *t){ + checkAccessed(c); + return LIBC_SYMBOLS.pthread_cond_timedwait(c,m,t); + } + virtual int pthread_cond_wait(pthread_cond_t *c, pthread_mutex_t *m){ + checkAccessed(c); + return LIBC_SYMBOLS.pthread_cond_wait(c,m); + } + virtual int pthread_mutex_destroy(pthread_mutex_t *m){ + markDestroyed(m); + return LIBC_SYMBOLS.pthread_mutex_destroy(m); + } + virtual int pthread_mutex_init(pthread_mutex_t *m, const pthread_mutexattr_t *a){ + markCreated(m); + return LIBC_SYMBOLS.pthread_mutex_init(m,a); + } + virtual int pthread_mutex_lock(pthread_mutex_t *m){ + checkAccessed(m); + return LIBC_SYMBOLS.pthread_mutex_lock(m); + } + virtual int pthread_mutex_trylock(pthread_mutex_t *m){ + checkAccessed(m); + return LIBC_SYMBOLS.pthread_mutex_trylock(m); + } + virtual int pthread_mutex_unlock(pthread_mutex_t *m){ + checkAccessed(m); + return LIBC_SYMBOLS.pthread_mutex_unlock(m); + } +}; + +#endif /*PTHREADMOCKS_H_*/ + diff --git a/src/c/tests/TestClient.cc b/src/c/tests/TestClient.cc new file mode 100644 index 0000000..154fbed --- /dev/null +++ b/src/c/tests/TestClient.cc @@ -0,0 +1,1135 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include "CppAssertHelper.h" + +#include +#include +#include +#include + +#include "CollectionUtil.h" +#include "ThreadingUtil.h" + +using namespace Util; + +#include "Vector.h" +using namespace std; + +#include +#include + +#include +#include +#include +#include "Util.h" + +struct buff_struct_2 { + int32_t len; + int32_t off; + char *buffer; +}; + +static int Stat_eq(struct Stat* a, struct Stat* b) +{ + if (a->czxid != b->czxid) return 0; + if (a->mzxid != b->mzxid) return 0; + if (a->ctime != b->ctime) return 0; + if (a->mtime != b->mtime) return 0; + if (a->version != b->version) return 0; + if (a->cversion != b->cversion) return 0; + if (a->aversion != b->aversion) return 0; + if (a->ephemeralOwner != b->ephemeralOwner) return 0; + if (a->dataLength != b->dataLength) return 0; + if (a->numChildren != b->numChildren) return 0; + if (a->pzxid != b->pzxid) return 0; + return 1; +} +#ifdef THREADED + static void yield(zhandle_t *zh, int i) + { + sleep(i); + } +#else + static void yield(zhandle_t *zh, int seconds) + { + int fd; + int interest; + int events; + struct timeval tv; + int rc; + time_t expires = time(0) + seconds; + time_t timeLeft = seconds; + fd_set rfds, wfds, efds; + FD_ZERO(&rfds); + FD_ZERO(&wfds); + FD_ZERO(&efds); + + while(timeLeft >= 0) { + zookeeper_interest(zh, &fd, &interest, &tv); + if (fd != -1) { + if (interest&ZOOKEEPER_READ) { + FD_SET(fd, &rfds); + } else { + FD_CLR(fd, &rfds); + } + if (interest&ZOOKEEPER_WRITE) { + FD_SET(fd, &wfds); + } else { + FD_CLR(fd, &wfds); + } + } else { + fd = 0; + } + FD_SET(0, &rfds); + if (tv.tv_sec > timeLeft) { + tv.tv_sec = timeLeft; + } + rc = select(fd+1, &rfds, &wfds, &efds, &tv); + timeLeft = expires - time(0); + events = 0; + if (FD_ISSET(fd, &rfds)) { + events |= ZOOKEEPER_READ; + } + if (FD_ISSET(fd, &wfds)) { + events |= ZOOKEEPER_WRITE; + } + zookeeper_process(zh, events); + } + } +#endif + +typedef struct evt { + string path; + int type; +} evt_t; + +typedef struct watchCtx { +private: + list events; + watchCtx(const watchCtx&); + watchCtx& operator=(const watchCtx&); +public: + bool connected; + zhandle_t *zh; + Mutex mutex; + + watchCtx() { + connected = false; + zh = 0; + } + ~watchCtx() { + if (zh) { + zookeeper_close(zh); + zh = 0; + } + } + + evt_t getEvent() { + evt_t evt; + mutex.acquire(); + CPPUNIT_ASSERT( events.size() > 0); + evt = events.front(); + events.pop_front(); + mutex.release(); + return evt; + } + + int countEvents() { + int count; + mutex.acquire(); + count = events.size(); + mutex.release(); + return count; + } + + void putEvent(evt_t evt) { + mutex.acquire(); + events.push_back(evt); + mutex.release(); + } + + bool waitForConnected(zhandle_t *zh) { + time_t expires = time(0) + 10; + while(!connected && time(0) < expires) { + yield(zh, 1); + } + return connected; + } + bool waitForDisconnected(zhandle_t *zh) { + time_t expires = time(0) + 15; + while(connected && time(0) < expires) { + yield(zh, 1); + } + return !connected; + } +} watchctx_t; + +class Zookeeper_simpleSystem : public CPPUNIT_NS::TestFixture +{ + CPPUNIT_TEST_SUITE(Zookeeper_simpleSystem); + CPPUNIT_TEST(testAsyncWatcherAutoReset); + CPPUNIT_TEST(testDeserializeString); + CPPUNIT_TEST(testFirstServerDown); +#ifdef THREADED + CPPUNIT_TEST(testNullData); +#ifdef ZOO_IPV6_ENABLED + CPPUNIT_TEST(testIPV6); +#endif + CPPUNIT_TEST(testPath); + CPPUNIT_TEST(testPathValidation); + CPPUNIT_TEST(testPing); + CPPUNIT_TEST(testAcl); + CPPUNIT_TEST(testChroot); + CPPUNIT_TEST(testAuth); + CPPUNIT_TEST(testHangingClient); + CPPUNIT_TEST(testWatcherAutoResetWithGlobal); + CPPUNIT_TEST(testWatcherAutoResetWithLocal); + CPPUNIT_TEST(testGetChildren2); +#endif + CPPUNIT_TEST_SUITE_END(); + + static void watcher(zhandle_t *, int type, int state, const char *path,void*v){ + watchctx_t *ctx = (watchctx_t*)v; + + if (state == ZOO_CONNECTED_STATE) { + ctx->connected = true; + } else { + ctx->connected = false; + } + if (type != ZOO_SESSION_EVENT) { + evt_t evt; + evt.path = path; + evt.type = type; + ctx->putEvent(evt); + } + } + + static const char hostPorts[]; + + const char *getHostPorts() { + return hostPorts; + } + + zhandle_t *createClient(watchctx_t *ctx) { + return createClient(hostPorts, ctx); + } + + zhandle_t *createClient(const char *hp, watchctx_t *ctx) { + zhandle_t *zk = zookeeper_init(hp, watcher, 10000, 0, ctx, 0); + ctx->zh = zk; + sleep(1); + return zk; + } + + zhandle_t *createchClient(watchctx_t *ctx, const char* chroot) { + zhandle_t *zk = zookeeper_init(chroot, watcher, 10000, 0, ctx, 0); + ctx->zh = zk; + sleep(1); + return zk; + } + + FILE *logfile; +public: + + Zookeeper_simpleSystem() { + logfile = openlogfile("Zookeeper_simpleSystem"); + } + + ~Zookeeper_simpleSystem() { + if (logfile) { + fflush(logfile); + fclose(logfile); + logfile = 0; + } + } + + void setUp() + { + zoo_set_log_stream(logfile); + } + + + void startServer() { + char cmd[1024]; + sprintf(cmd, "%s start %s", ZKSERVER_CMD, getHostPorts()); + CPPUNIT_ASSERT(system(cmd) == 0); + } + + void stopServer() { + char cmd[1024]; + sprintf(cmd, "%s stop %s", ZKSERVER_CMD, getHostPorts()); + CPPUNIT_ASSERT(system(cmd) == 0); + } + + void tearDown() + { + } + + /** have a callback in the default watcher **/ + static void default_zoo_watcher(zhandle_t *zzh, int type, int state, const char *path, void *context){ + int zrc = 0; + struct String_vector str_vec = {0, NULL}; + zrc = zoo_wget_children(zzh, "/mytest", default_zoo_watcher, NULL, &str_vec); + } + + /** ZOOKEEPER-1057 This checks that the client connects to the second server when the first is not reachable **/ + void testFirstServerDown() { + watchctx_t ctx; + + zoo_deterministic_conn_order(true); + + zhandle_t* zk = createClient("127.0.0.1:22182,127.0.0.1:22181", &ctx); + CPPUNIT_ASSERT(zk != 0); + CPPUNIT_ASSERT(ctx.waitForConnected(zk)); + } + + /** this checks for a deadlock in calling zookeeper_close and calls from a default watcher that might get triggered just when zookeeper_close() is in progress **/ + void testHangingClient() { + int zrc = 0; + char buff[10] = "testall"; + char path[512]; + watchctx_t *ctx; + struct String_vector str_vec = {0, NULL}; + zhandle_t *zh = zookeeper_init(hostPorts, NULL, 10000, 0, ctx, 0); + sleep(1); + zrc = zoo_create(zh, "/mytest", buff, 10, &ZOO_OPEN_ACL_UNSAFE, 0, path, 512); + zrc = zoo_wget_children(zh, "/mytest", default_zoo_watcher, NULL, &str_vec); + zrc = zoo_create(zh, "/mytest/test1", buff, 10, &ZOO_OPEN_ACL_UNSAFE, 0, path, 512); + zrc = zoo_wget_children(zh, "/mytest", default_zoo_watcher, NULL, &str_vec); + zrc = zoo_delete(zh, "/mytest/test1", -1); + zookeeper_close(zh); + } + + + void testPing() + { + watchctx_t ctxIdle; + watchctx_t ctxWC; + zhandle_t *zkIdle = createClient(&ctxIdle); + zhandle_t *zkWatchCreator = createClient(&ctxWC); + + CPPUNIT_ASSERT(zkIdle); + CPPUNIT_ASSERT(zkWatchCreator); + + char path[80]; + sprintf(path, "/testping"); + int rc = zoo_create(zkWatchCreator, path, "", 0, &ZOO_OPEN_ACL_UNSAFE, 0, 0, 0); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + + for(int i = 0; i < 30; i++) { + sprintf(path, "/testping/%i", i); + rc = zoo_create(zkWatchCreator, path, "", 0, &ZOO_OPEN_ACL_UNSAFE, 0, 0, 0); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + } + + for(int i = 0; i < 30; i++) { + sprintf(path, "/testping/%i", i); + struct Stat stat; + rc = zoo_exists(zkIdle, path, 1, &stat); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + } + + for(int i = 0; i < 30; i++) { + sprintf(path, "/testping/%i", i); + usleep(500000); + rc = zoo_delete(zkWatchCreator, path, -1); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + } + struct Stat stat; + CPPUNIT_ASSERT_EQUAL((int)ZNONODE, zoo_exists(zkIdle, "/testping/0", 0, &stat)); + } + + bool waitForEvent(zhandle_t *zh, watchctx_t *ctx, int seconds) { + time_t expires = time(0) + seconds; + while(ctx->countEvents() == 0 && time(0) < expires) { + yield(zh, 1); + } + return ctx->countEvents() > 0; + } + +#define COUNT 100 + + static zhandle_t *async_zk; + static volatile int count; + static const char* hp_chroot; + + static void statCompletion(int rc, const struct Stat *stat, const void *data) { + int tmp = (int) (long) data; + CPPUNIT_ASSERT_EQUAL(tmp, rc); + } + + static void stringCompletion(int rc, const char *value, const void *data) { + char *path = (char*)data; + + if (rc == ZCONNECTIONLOSS && path) { + // Try again + rc = zoo_acreate(async_zk, path, "", 0, &ZOO_OPEN_ACL_UNSAFE, 0, stringCompletion, 0); + } else if (rc != ZOK) { + // fprintf(stderr, "rc = %d with path = %s\n", rc, (path ? path : "null")); + } + if (path) { + free(path); + } + } + + static void create_completion_fn(int rc, const char* value, const void *data) { + CPPUNIT_ASSERT_EQUAL((int) ZOK, rc); + count++; + } + + static void waitForCreateCompletion(int seconds) { + time_t expires = time(0) + seconds; + while(count == 0 && time(0) < expires) { + sleep(1); + } + count--; + } + + static void watcher_chroot_fn(zhandle_t *zh, int type, + int state, const char *path,void *watcherCtx) { + // check for path + char *client_path = (char *) watcherCtx; + CPPUNIT_ASSERT(strcmp(client_path, path) == 0); + count ++; + } + + static void waitForChrootWatch(int seconds) { + time_t expires = time(0) + seconds; + while (count == 0 && time(0) < expires) { + sleep(1); + } + count--; + } + + static void waitForVoidCompletion(int seconds) { + time_t expires = time(0) + seconds; + while(count == 0 && time(0) < expires) { + sleep(1); + } + count--; + } + + static void voidCompletion(int rc, const void *data) { + int tmp = (int) (long) data; + CPPUNIT_ASSERT_EQUAL(tmp, rc); + count++; + } + + static void verifyCreateFails(const char *path, zhandle_t *zk) { + CPPUNIT_ASSERT_EQUAL((int)ZBADARGUMENTS, zoo_create(zk, + path, "", 0, &ZOO_OPEN_ACL_UNSAFE, 0, 0, 0)); + } + + static void verifyCreateOk(const char *path, zhandle_t *zk) { + CPPUNIT_ASSERT_EQUAL((int)ZOK, zoo_create(zk, + path, "", 0, &ZOO_OPEN_ACL_UNSAFE, 0, 0, 0)); + } + + static void verifyCreateFailsSeq(const char *path, zhandle_t *zk) { + CPPUNIT_ASSERT_EQUAL((int)ZBADARGUMENTS, zoo_create(zk, + path, "", 0, &ZOO_OPEN_ACL_UNSAFE, ZOO_SEQUENCE, 0, 0)); + } + + static void verifyCreateOkSeq(const char *path, zhandle_t *zk) { + CPPUNIT_ASSERT_EQUAL((int)ZOK, zoo_create(zk, + path, "", 0, &ZOO_OPEN_ACL_UNSAFE, ZOO_SEQUENCE, 0, 0)); + } + + + /** + returns false if the vectors dont match + **/ + bool compareAcl(struct ACL_vector acl1, struct ACL_vector acl2) { + if (acl1.count != acl2.count) { + return false; + } + struct ACL *aclval1 = acl1.data; + struct ACL *aclval2 = acl2.data; + if (aclval1->perms != aclval2->perms) { + return false; + } + struct Id id1 = aclval1->id; + struct Id id2 = aclval2->id; + if (strcmp(id1.scheme, id2.scheme) != 0) { + return false; + } + if (strcmp(id1.id, id2.id) != 0) { + return false; + } + return true; + } + + void testDeserializeString() { + char *val_str; + int rc = 0; + int val = -1; + struct iarchive *ia; + struct buff_struct_2 *b; + struct oarchive *oa = create_buffer_oarchive(); + oa->serialize_Int(oa, "int", &val); + b = (struct buff_struct_2 *) oa->priv; + ia = create_buffer_iarchive(b->buffer, b->len); + rc = ia->deserialize_String(ia, "string", &val_str); + CPPUNIT_ASSERT_EQUAL(-EINVAL, rc); + } + + void testAcl() { + int rc; + struct ACL_vector aclvec; + struct Stat stat; + watchctx_t ctx; + zhandle_t *zk = createClient(&ctx); + rc = zoo_create(zk, "/acl", "", 0, + &ZOO_OPEN_ACL_UNSAFE, 0, 0, 0); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + rc = zoo_get_acl(zk, "/acl", &aclvec, &stat ); + CPPUNIT_ASSERT_EQUAL((int) ZOK, rc); + bool cmp = compareAcl(ZOO_OPEN_ACL_UNSAFE, aclvec); + CPPUNIT_ASSERT_EQUAL(true, cmp); + rc = zoo_set_acl(zk, "/acl", -1, &ZOO_READ_ACL_UNSAFE); + CPPUNIT_ASSERT_EQUAL((int) ZOK, rc); + rc = zoo_get_acl(zk, "/acl", &aclvec, &stat); + CPPUNIT_ASSERT_EQUAL((int) ZOK, rc); + cmp = compareAcl(ZOO_READ_ACL_UNSAFE, aclvec); + CPPUNIT_ASSERT_EQUAL(true, cmp); + } + + + void testAuth() { + int rc; + count = 0; + watchctx_t ctx1, ctx2, ctx3, ctx4, ctx5; + zhandle_t *zk = createClient(&ctx1); + struct ACL_vector nodeAcl; + struct ACL acl_val; + rc = zoo_add_auth(0, "", 0, 0, voidCompletion, (void*)-1); + CPPUNIT_ASSERT_EQUAL((int) ZBADARGUMENTS, rc); + + rc = zoo_add_auth(zk, 0, 0, 0, voidCompletion, (void*)-1); + CPPUNIT_ASSERT_EQUAL((int) ZBADARGUMENTS, rc); + + // auth as pat, create /tauth1, close session + rc = zoo_add_auth(zk, "digest", "pat:passwd", 10, voidCompletion, + (void*)ZOK); + CPPUNIT_ASSERT_EQUAL((int) ZOK, rc); + waitForVoidCompletion(3); + CPPUNIT_ASSERT(count == 0); + + rc = zoo_create(zk, "/tauth1", "", 0, &ZOO_CREATOR_ALL_ACL, 0, 0, 0); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + + { + //create a new client + zk = createClient(&ctx4); + rc = zoo_add_auth(zk, "digest", "", 0, voidCompletion, (void*)ZOK); + CPPUNIT_ASSERT_EQUAL((int) ZOK, rc); + waitForVoidCompletion(3); + CPPUNIT_ASSERT(count == 0); + + rc = zoo_add_auth(zk, "digest", "", 0, voidCompletion, (void*)ZOK); + CPPUNIT_ASSERT_EQUAL((int) ZOK, rc); + waitForVoidCompletion(3); + CPPUNIT_ASSERT(count == 0); + } + + //create a new client + zk = createClient(&ctx2); + + rc = zoo_add_auth(zk, "digest", "pat:passwd2", 11, voidCompletion, + (void*)ZOK); + CPPUNIT_ASSERT_EQUAL((int) ZOK, rc); + waitForVoidCompletion(3); + CPPUNIT_ASSERT(count == 0); + + char buf[1024]; + int blen = sizeof(buf); + struct Stat stat; + rc = zoo_get(zk, "/tauth1", 0, buf, &blen, &stat); + CPPUNIT_ASSERT_EQUAL((int)ZNOAUTH, rc); + // add auth pat w/correct pass verify success + rc = zoo_add_auth(zk, "digest", "pat:passwd", 10, voidCompletion, + (void*)ZOK); + + CPPUNIT_ASSERT_EQUAL((int) ZOK, rc); + rc = zoo_get(zk, "/tauth1", 0, buf, &blen, &stat); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + waitForVoidCompletion(3); + CPPUNIT_ASSERT(count == 0); + //create a new client + zk = createClient(&ctx3); + rc = zoo_add_auth(zk, "digest", "pat:passwd", 10, voidCompletion, (void*) ZOK); + waitForVoidCompletion(3); + CPPUNIT_ASSERT(count == 0); + rc = zoo_add_auth(zk, "ip", "none", 4, voidCompletion, (void*)ZOK); + //make the server forget the auths + waitForVoidCompletion(3); + CPPUNIT_ASSERT(count == 0); + + stopServer(); + CPPUNIT_ASSERT(ctx3.waitForDisconnected(zk)); + startServer(); + CPPUNIT_ASSERT(ctx3.waitForConnected(zk)); + // now try getting the data + rc = zoo_get(zk, "/tauth1", 0, buf, &blen, &stat); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + // also check for get + rc = zoo_get_acl(zk, "/", &nodeAcl, &stat); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + // check if the acl has all the perms + CPPUNIT_ASSERT_EQUAL((int)1, (int)nodeAcl.count); + acl_val = *(nodeAcl.data); + CPPUNIT_ASSERT_EQUAL((int) acl_val.perms, ZOO_PERM_ALL); + // verify on root node + rc = zoo_set_acl(zk, "/", -1, &ZOO_CREATOR_ALL_ACL); + CPPUNIT_ASSERT_EQUAL((int) ZOK, rc); + + rc = zoo_set_acl(zk, "/", -1, &ZOO_OPEN_ACL_UNSAFE); + CPPUNIT_ASSERT_EQUAL((int) ZOK, rc); + + //[ZOOKEEPER-1108], test that auth info is sent to server, if client is not + //connected to server when zoo_add_auth was called. + zhandle_t *zk_auth = zookeeper_init(hostPorts, NULL, 10000, 0, NULL, 0); + rc = zoo_add_auth(zk_auth, "digest", "pat:passwd", 10, voidCompletion, (void*)ZOK); + CPPUNIT_ASSERT_EQUAL((int) ZOK, rc); + sleep(2); + CPPUNIT_ASSERT(count == 1); + count = 0; + CPPUNIT_ASSERT_EQUAL((int) ZOK, zookeeper_close(zk_auth)); + + // [ZOOKEEPER-800] zoo_add_auth should return ZINVALIDSTATE if + // the connection is closed. + zhandle_t *zk2 = zookeeper_init(hostPorts, NULL, 10000, 0, NULL, 0); + sleep(1); + CPPUNIT_ASSERT_EQUAL((int) ZOK, zookeeper_close(zk2)); + CPPUNIT_ASSERT_EQUAL(0, zoo_state(zk2)); // 0 ==> ZOO_CLOSED_STATE + rc = zoo_add_auth(zk2, "digest", "pat:passwd", 10, voidCompletion, (void*)ZOK); + CPPUNIT_ASSERT_EQUAL((int) ZINVALIDSTATE, rc); + + struct sockaddr addr; + socklen_t addr_len = sizeof(addr); + zk = createClient(&ctx5); + stopServer(); + CPPUNIT_ASSERT(ctx5.waitForDisconnected(zk)); + CPPUNIT_ASSERT(zookeeper_get_connected_host(zk, &addr, &addr_len) == NULL); + addr_len = sizeof(addr); + startServer(); + CPPUNIT_ASSERT(ctx5.waitForConnected(zk)); + CPPUNIT_ASSERT(zookeeper_get_connected_host(zk, &addr, &addr_len) != NULL); + } + + void testGetChildren2() { + int rc; + watchctx_t ctx; + zhandle_t *zk = createClient(&ctx); + + rc = zoo_create(zk, "/parent", "", 0, &ZOO_OPEN_ACL_UNSAFE, 0, 0, 0); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + + rc = zoo_create(zk, "/parent/child_a", "", 0, &ZOO_OPEN_ACL_UNSAFE, 0, 0, 0); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + + rc = zoo_create(zk, "/parent/child_b", "", 0, &ZOO_OPEN_ACL_UNSAFE, 0, 0, 0); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + + rc = zoo_create(zk, "/parent/child_c", "", 0, &ZOO_OPEN_ACL_UNSAFE, 0, 0, 0); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + + rc = zoo_create(zk, "/parent/child_d", "", 0, &ZOO_OPEN_ACL_UNSAFE, 0, 0, 0); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + + struct String_vector strings; + struct Stat stat_a, stat_b; + + rc = zoo_get_children2(zk, "/parent", 0, &strings, &stat_a); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + + rc = zoo_exists(zk, "/parent", 0, &stat_b); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + + CPPUNIT_ASSERT(Stat_eq(&stat_a, &stat_b)); + CPPUNIT_ASSERT(stat_a.numChildren == 4); + } + + void testIPV6() { + watchctx_t ctx; + zhandle_t *zk = createClient("::1:22181", &ctx); + CPPUNIT_ASSERT(zk); + int rc = 0; + rc = zoo_create(zk, "/ipv6", NULL, -1, + &ZOO_OPEN_ACL_UNSAFE, 0, 0, 0); + CPPUNIT_ASSERT_EQUAL((int) ZOK, rc); + } + + void testNullData() { + watchctx_t ctx; + zhandle_t *zk = createClient(&ctx); + CPPUNIT_ASSERT(zk); + int rc = 0; + rc = zoo_create(zk, "/mahadev", NULL, -1, + &ZOO_OPEN_ACL_UNSAFE, 0, 0, 0); + CPPUNIT_ASSERT_EQUAL((int) ZOK, rc); + char buffer[512]; + struct Stat stat; + int len = 512; + rc = zoo_wget(zk, "/mahadev", NULL, NULL, buffer, &len, &stat); + CPPUNIT_ASSERT_EQUAL( -1, len); + CPPUNIT_ASSERT_EQUAL((int) ZOK, rc); + rc = zoo_set(zk, "/mahadev", NULL, -1, -1); + CPPUNIT_ASSERT_EQUAL((int) ZOK, rc); + rc = zoo_wget(zk, "/mahadev", NULL, NULL, buffer, &len, &stat); + CPPUNIT_ASSERT_EQUAL( -1, len); + CPPUNIT_ASSERT_EQUAL((int) ZOK, rc); + } + + void testPath() { + watchctx_t ctx; + char pathbuf[20]; + zhandle_t *zk = createClient(&ctx); + CPPUNIT_ASSERT(zk); + int rc = 0; + + memset(pathbuf, 'X', 20); + rc = zoo_create(zk, "/testpathpath0", "", 0, + &ZOO_OPEN_ACL_UNSAFE, 0, pathbuf, 0); + CPPUNIT_ASSERT_EQUAL((int) ZOK, rc); + CPPUNIT_ASSERT_EQUAL('X', pathbuf[0]); + + rc = zoo_create(zk, "/testpathpath1", "", 0, + &ZOO_OPEN_ACL_UNSAFE, 0, pathbuf, 1); + CPPUNIT_ASSERT_EQUAL((int) ZOK, rc); + CPPUNIT_ASSERT(strlen(pathbuf) == 0); + + rc = zoo_create(zk, "/testpathpath2", "", 0, + &ZOO_OPEN_ACL_UNSAFE, 0, pathbuf, 2); + CPPUNIT_ASSERT_EQUAL((int) ZOK, rc); + CPPUNIT_ASSERT(strcmp(pathbuf, "/") == 0); + + rc = zoo_create(zk, "/testpathpath3", "", 0, + &ZOO_OPEN_ACL_UNSAFE, 0, pathbuf, 3); + CPPUNIT_ASSERT_EQUAL((int) ZOK, rc); + CPPUNIT_ASSERT(strcmp(pathbuf, "/t") == 0); + + rc = zoo_create(zk, "/testpathpath7", "", 0, + &ZOO_OPEN_ACL_UNSAFE, 0, pathbuf, 15); + CPPUNIT_ASSERT_EQUAL((int) ZOK, rc); + CPPUNIT_ASSERT(strcmp(pathbuf, "/testpathpath7") == 0); + + rc = zoo_create(zk, "/testpathpath8", "", 0, + &ZOO_OPEN_ACL_UNSAFE, 0, pathbuf, 16); + CPPUNIT_ASSERT_EQUAL((int) ZOK, rc); + CPPUNIT_ASSERT(strcmp(pathbuf, "/testpathpath8") == 0); + } + + void testPathValidation() { + watchctx_t ctx; + zhandle_t *zk = createClient(&ctx); + CPPUNIT_ASSERT(zk); + + verifyCreateFails(0, zk); + verifyCreateFails("", zk); + verifyCreateFails("//", zk); + verifyCreateFails("///", zk); + verifyCreateFails("////", zk); + verifyCreateFails("/.", zk); + verifyCreateFails("/..", zk); + verifyCreateFails("/./", zk); + verifyCreateFails("/../", zk); + verifyCreateFails("/foo/./", zk); + verifyCreateFails("/foo/../", zk); + verifyCreateFails("/foo/.", zk); + verifyCreateFails("/foo/..", zk); + verifyCreateFails("/./.", zk); + verifyCreateFails("/../..", zk); + verifyCreateFails("/foo/bar/", zk); + verifyCreateFails("/foo//bar", zk); + verifyCreateFails("/foo/bar//", zk); + + verifyCreateFails("foo", zk); + verifyCreateFails("a", zk); + + // verify that trailing fails, except for seq which adds suffix + verifyCreateOk("/createseq", zk); + verifyCreateFails("/createseq/", zk); + verifyCreateOkSeq("/createseq/", zk); + verifyCreateOkSeq("/createseq/.", zk); + verifyCreateOkSeq("/createseq/..", zk); + verifyCreateFailsSeq("/createseq//", zk); + verifyCreateFailsSeq("/createseq/./", zk); + verifyCreateFailsSeq("/createseq/../", zk); + + verifyCreateOk("/.foo", zk); + verifyCreateOk("/.f.", zk); + verifyCreateOk("/..f", zk); + verifyCreateOk("/..f..", zk); + verifyCreateOk("/f.c", zk); + verifyCreateOk("/f", zk); + verifyCreateOk("/f/.f", zk); + verifyCreateOk("/f/f.", zk); + verifyCreateOk("/f/..f", zk); + verifyCreateOk("/f/f..", zk); + verifyCreateOk("/f/.f/f", zk); + verifyCreateOk("/f/f./f", zk); + } + + void testChroot() { + // the c client async callbacks do + // not callback with the path, so + // we dont need to test taht for now + // we should fix that though soon! + watchctx_t ctx, ctx_ch; + zhandle_t *zk, *zk_ch; + char buf[60]; + int rc, len; + struct Stat stat; + const char* data = "garbage"; + const char* retStr = "/chroot"; + const char* root= "/"; + zk_ch = createchClient(&ctx_ch, "127.0.0.1:22181/testch1/mahadev"); + CPPUNIT_ASSERT(zk_ch != NULL); + zk = createClient(&ctx); + // first test with a NULL zk handle, make sure client library does not + // dereference a null pointer, but instead returns ZBADARGUMENTS + rc = zoo_create(NULL, "/testch1", "", 0, &ZOO_OPEN_ACL_UNSAFE, 0, 0, 0); + CPPUNIT_ASSERT_EQUAL((int) ZBADARGUMENTS, rc); + rc = zoo_create(zk, "/testch1", "", 0, &ZOO_OPEN_ACL_UNSAFE, 0, 0, 0); + CPPUNIT_ASSERT_EQUAL((int) ZOK, rc); + rc = zoo_create(zk, "/testch1/mahadev", data, 7, &ZOO_OPEN_ACL_UNSAFE, 0, 0, 0); + CPPUNIT_ASSERT_EQUAL((int) ZOK, rc); + // try an exists with / + len = 60; + rc = zoo_get(zk_ch, "/", 0, buf, &len, &stat); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + //check if the data is the same + CPPUNIT_ASSERT(strncmp(buf, data, 7) == 0); + //check for watches + rc = zoo_wexists(zk_ch, "/chroot", watcher_chroot_fn, (void *) retStr, &stat); + //now check if we can do create/delete/get/sets/acls/getChildren and others + //check create + rc = zoo_create(zk_ch, "/chroot", "", 0, &ZOO_OPEN_ACL_UNSAFE, 0, 0,0); + CPPUNIT_ASSERT_EQUAL((int) ZOK, rc); + waitForChrootWatch(3); + CPPUNIT_ASSERT(count == 0); + rc = zoo_create(zk_ch, "/chroot/child", "", 0, &ZOO_OPEN_ACL_UNSAFE, 0, 0, 0); + CPPUNIT_ASSERT_EQUAL((int) ZOK, rc); + rc = zoo_exists(zk, "/testch1/mahadev/chroot/child", 0, &stat); + CPPUNIT_ASSERT_EQUAL((int) ZOK, rc); + + rc = zoo_delete(zk_ch, "/chroot/child", -1); + CPPUNIT_ASSERT_EQUAL((int) ZOK, rc); + rc = zoo_exists(zk, "/testch1/mahadev/chroot/child", 0, &stat); + CPPUNIT_ASSERT_EQUAL((int) ZNONODE, rc); + rc = zoo_wget(zk_ch, "/chroot", watcher_chroot_fn, (char*) retStr, + buf, &len, &stat); + CPPUNIT_ASSERT_EQUAL((int) ZOK, rc); + rc = zoo_set(zk_ch, "/chroot",buf, 3, -1); + CPPUNIT_ASSERT_EQUAL((int) ZOK, rc); + waitForChrootWatch(3); + CPPUNIT_ASSERT(count == 0); + // check for getchildren + struct String_vector children; + rc = zoo_get_children(zk_ch, "/", 0, &children); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + CPPUNIT_ASSERT_EQUAL((int)1, (int)children.count); + //check if te child if chroot + CPPUNIT_ASSERT(strcmp((retStr+1), children.data[0]) == 0); + // check for get/set acl + struct ACL_vector acl; + rc = zoo_get_acl(zk_ch, "/", &acl, &stat); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + CPPUNIT_ASSERT_EQUAL((int)1, (int)acl.count); + CPPUNIT_ASSERT_EQUAL((int)ZOO_PERM_ALL, (int)acl.data->perms); + // set acl + rc = zoo_set_acl(zk_ch, "/chroot", -1, &ZOO_READ_ACL_UNSAFE); + CPPUNIT_ASSERT_EQUAL((int) ZOK, rc); + // see if you add children + rc = zoo_create(zk_ch, "/chroot/child1", "",0, &ZOO_OPEN_ACL_UNSAFE, 0, 0, 0); + CPPUNIT_ASSERT_EQUAL((int)ZNOAUTH, rc); + //add wget children test + rc = zoo_wget_children(zk_ch, "/", watcher_chroot_fn, (char*) root, &children); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + + //now create a node + rc = zoo_create(zk_ch, "/child2", "",0, &ZOO_OPEN_ACL_UNSAFE, 0, 0, 0); + CPPUNIT_ASSERT_EQUAL((int) ZOK, rc); + waitForChrootWatch(3); + CPPUNIT_ASSERT(count == 0); + //check for one async call just to make sure + rc = zoo_acreate(zk_ch, "/child3", "", 0, &ZOO_OPEN_ACL_UNSAFE, 0, + create_completion_fn, 0); + waitForCreateCompletion(3); + CPPUNIT_ASSERT(count == 0); + + //ZOOKEEPER-1027 correctly return path_buffer without prefixed chroot + const char* path = "/zookeeper1027"; + char path_buffer[1024]; + int path_buffer_len=sizeof(path_buffer); + rc = zoo_create(zk_ch, path, "", 0, &ZOO_OPEN_ACL_UNSAFE, 0, path_buffer, path_buffer_len); + CPPUNIT_ASSERT_EQUAL((int) ZOK, rc); + CPPUNIT_ASSERT_EQUAL(string(path), string(path_buffer)); + } + + void testAsyncWatcherAutoReset() + { + watchctx_t ctx; + zhandle_t *zk = createClient(&ctx); + watchctx_t lctx[COUNT]; + int i; + char path[80]; + int rc; + evt_t evt; + + async_zk = zk; + for(i = 0; i < COUNT; i++) { + sprintf(path, "/awar%d", i); + rc = zoo_awexists(zk, path, watcher, &lctx[i], statCompletion, (void*)ZNONODE); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + } + + yield(zk, 0); + + for(i = 0; i < COUNT/2; i++) { + sprintf(path, "/awar%d", i); + rc = zoo_acreate(zk, path, "", 0, &ZOO_OPEN_ACL_UNSAFE, 0, stringCompletion, strdup(path)); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + } + + yield(zk, 3); + for(i = 0; i < COUNT/2; i++) { + sprintf(path, "/awar%d", i); + CPPUNIT_ASSERT_MESSAGE(path, waitForEvent(zk, &lctx[i], 5)); + evt = lctx[i].getEvent(); + CPPUNIT_ASSERT_EQUAL_MESSAGE(evt.path.c_str(), ZOO_CREATED_EVENT, evt.type); + CPPUNIT_ASSERT_EQUAL(string(path), evt.path); + } + + for(i = COUNT/2 + 1; i < COUNT*10; i++) { + sprintf(path, "/awar%d", i); + rc = zoo_acreate(zk, path, "", 0, &ZOO_OPEN_ACL_UNSAFE, 0, stringCompletion, strdup(path)); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + } + + yield(zk, 1); + stopServer(); + CPPUNIT_ASSERT(ctx.waitForDisconnected(zk)); + startServer(); + CPPUNIT_ASSERT(ctx.waitForConnected(zk)); + yield(zk, 3); + for(i = COUNT/2+1; i < COUNT; i++) { + sprintf(path, "/awar%d", i); + CPPUNIT_ASSERT_MESSAGE(path, waitForEvent(zk, &lctx[i], 5)); + evt = lctx[i].getEvent(); + CPPUNIT_ASSERT_EQUAL_MESSAGE(evt.path, ZOO_CREATED_EVENT, evt.type); + CPPUNIT_ASSERT_EQUAL(string(path), evt.path); + } + } + + void testWatcherAutoReset(zhandle_t *zk, watchctx_t *ctxGlobal, + watchctx_t *ctxLocal) + { + bool isGlobal = (ctxGlobal == ctxLocal); + int rc; + struct Stat stat; + char buf[1024]; + int blen; + struct String_vector strings; + const char *testName; + + rc = zoo_create(zk, "/watchtest", "", 0, + &ZOO_OPEN_ACL_UNSAFE, 0, 0, 0); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + rc = zoo_create(zk, "/watchtest/child", "", 0, + &ZOO_OPEN_ACL_UNSAFE, ZOO_EPHEMERAL, 0, 0); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + + if (isGlobal) { + testName = "GlobalTest"; + rc = zoo_get_children(zk, "/watchtest", 1, &strings); + deallocate_String_vector(&strings); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + blen = sizeof(buf); + rc = zoo_get(zk, "/watchtest/child", 1, buf, &blen, &stat); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + rc = zoo_exists(zk, "/watchtest/child2", 1, &stat); + CPPUNIT_ASSERT_EQUAL((int)ZNONODE, rc); + } else { + testName = "LocalTest"; + rc = zoo_wget_children(zk, "/watchtest", watcher, ctxLocal, + &strings); + deallocate_String_vector(&strings); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + blen = sizeof(buf); + rc = zoo_wget(zk, "/watchtest/child", watcher, ctxLocal, + buf, &blen, &stat); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + rc = zoo_wexists(zk, "/watchtest/child2", watcher, ctxLocal, + &stat); + CPPUNIT_ASSERT_EQUAL((int)ZNONODE, rc); + } + + CPPUNIT_ASSERT(ctxLocal->countEvents() == 0); + + stopServer(); + CPPUNIT_ASSERT_MESSAGE(testName, ctxGlobal->waitForDisconnected(zk)); + startServer(); + CPPUNIT_ASSERT_MESSAGE(testName, ctxLocal->waitForConnected(zk)); + + CPPUNIT_ASSERT(ctxLocal->countEvents() == 0); + + rc = zoo_set(zk, "/watchtest/child", "1", 1, -1); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + struct Stat stat1, stat2; + rc = zoo_set2(zk, "/watchtest/child", "1", 1, -1, &stat1); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + CPPUNIT_ASSERT(stat1.version >= 0); + rc = zoo_set2(zk, "/watchtest/child", "1", 1, stat1.version, &stat2); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + rc = zoo_set(zk, "/watchtest/child", "1", 1, stat2.version); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + rc = zoo_create(zk, "/watchtest/child2", "", 0, + &ZOO_OPEN_ACL_UNSAFE, 0, 0, 0); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + + CPPUNIT_ASSERT_MESSAGE(testName, waitForEvent(zk, ctxLocal, 5)); + + evt_t evt = ctxLocal->getEvent(); + CPPUNIT_ASSERT_EQUAL_MESSAGE(evt.path, ZOO_CHANGED_EVENT, evt.type); + CPPUNIT_ASSERT_EQUAL(string("/watchtest/child"), evt.path); + + CPPUNIT_ASSERT_MESSAGE(testName, waitForEvent(zk, ctxLocal, 5)); + // The create will trigget the get children and the + // exists watches + evt = ctxLocal->getEvent(); + CPPUNIT_ASSERT_EQUAL_MESSAGE(evt.path, ZOO_CREATED_EVENT, evt.type); + CPPUNIT_ASSERT_EQUAL(string("/watchtest/child2"), evt.path); + CPPUNIT_ASSERT_MESSAGE(testName, waitForEvent(zk, ctxLocal, 5)); + evt = ctxLocal->getEvent(); + CPPUNIT_ASSERT_EQUAL_MESSAGE(evt.path, ZOO_CHILD_EVENT, evt.type); + CPPUNIT_ASSERT_EQUAL(string("/watchtest"), evt.path); + + // Make sure Pings are giving us problems + sleep(5); + + CPPUNIT_ASSERT(ctxLocal->countEvents() == 0); + + stopServer(); + CPPUNIT_ASSERT_MESSAGE(testName, ctxGlobal->waitForDisconnected(zk)); + startServer(); + CPPUNIT_ASSERT_MESSAGE(testName, ctxGlobal->waitForConnected(zk)); + + if (isGlobal) { + testName = "GlobalTest"; + rc = zoo_get_children(zk, "/watchtest", 1, &strings); + deallocate_String_vector(&strings); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + blen = sizeof(buf); + rc = zoo_get(zk, "/watchtest/child", 1, buf, &blen, &stat); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + rc = zoo_exists(zk, "/watchtest/child2", 1, &stat); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + } else { + testName = "LocalTest"; + rc = zoo_wget_children(zk, "/watchtest", watcher, ctxLocal, + &strings); + deallocate_String_vector(&strings); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + blen = sizeof(buf); + rc = zoo_wget(zk, "/watchtest/child", watcher, ctxLocal, + buf, &blen, &stat); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + rc = zoo_wexists(zk, "/watchtest/child2", watcher, ctxLocal, + &stat); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + } + + zoo_delete(zk, "/watchtest/child2", -1); + + CPPUNIT_ASSERT_MESSAGE(testName, waitForEvent(zk, ctxLocal, 5)); + + evt = ctxLocal->getEvent(); + CPPUNIT_ASSERT_EQUAL_MESSAGE(evt.path, ZOO_DELETED_EVENT, evt.type); + CPPUNIT_ASSERT_EQUAL(string("/watchtest/child2"), evt.path); + + CPPUNIT_ASSERT_MESSAGE(testName, waitForEvent(zk, ctxLocal, 5)); + evt = ctxLocal->getEvent(); + CPPUNIT_ASSERT_EQUAL_MESSAGE(evt.path, ZOO_CHILD_EVENT, evt.type); + CPPUNIT_ASSERT_EQUAL(string("/watchtest"), evt.path); + + stopServer(); + CPPUNIT_ASSERT_MESSAGE(testName, ctxGlobal->waitForDisconnected(zk)); + startServer(); + CPPUNIT_ASSERT_MESSAGE(testName, ctxLocal->waitForConnected(zk)); + + zoo_delete(zk, "/watchtest/child", -1); + zoo_delete(zk, "/watchtest", -1); + + CPPUNIT_ASSERT_MESSAGE(testName, waitForEvent(zk, ctxLocal, 5)); + + evt = ctxLocal->getEvent(); + CPPUNIT_ASSERT_EQUAL_MESSAGE(evt.path, ZOO_DELETED_EVENT, evt.type); + CPPUNIT_ASSERT_EQUAL(string("/watchtest/child"), evt.path); + + // Make sure nothing is straggling + sleep(1); + CPPUNIT_ASSERT(ctxLocal->countEvents() == 0); + } + + void testWatcherAutoResetWithGlobal() + { + { + watchctx_t ctx; + zhandle_t *zk = createClient(&ctx); + int rc = zoo_create(zk, "/testarwg", "", 0, &ZOO_OPEN_ACL_UNSAFE, 0, 0, 0); + CPPUNIT_ASSERT_EQUAL((int) ZOK, rc); + rc = zoo_create(zk, "/testarwg/arwg", "", 0, &ZOO_OPEN_ACL_UNSAFE, 0, 0, 0); + CPPUNIT_ASSERT_EQUAL((int) ZOK, rc); + } + + { + watchctx_t ctx; + zhandle_t *zk = createchClient(&ctx, "127.0.0.1:22181/testarwg/arwg"); + + testWatcherAutoReset(zk, &ctx, &ctx); + } + } + + void testWatcherAutoResetWithLocal() + { + { + watchctx_t ctx; + zhandle_t *zk = createClient(&ctx); + int rc = zoo_create(zk, "/testarwl", "", 0, &ZOO_OPEN_ACL_UNSAFE, 0, 0, 0); + CPPUNIT_ASSERT_EQUAL((int) ZOK, rc); + rc = zoo_create(zk, "/testarwl/arwl", "", 0, &ZOO_OPEN_ACL_UNSAFE, 0, 0, 0); + CPPUNIT_ASSERT_EQUAL((int) ZOK, rc); + } + + { + watchctx_t ctx; + watchctx_t lctx; + zhandle_t *zk = createchClient(&ctx, "127.0.0.1:22181/testarwl/arwl"); + testWatcherAutoReset(zk, &ctx, &lctx); + } + } +}; + +volatile int Zookeeper_simpleSystem::count; +zhandle_t *Zookeeper_simpleSystem::async_zk; +const char Zookeeper_simpleSystem::hostPorts[] = "127.0.0.1:22181"; +CPPUNIT_TEST_SUITE_REGISTRATION(Zookeeper_simpleSystem); diff --git a/src/c/tests/TestClientRetry.cc b/src/c/tests/TestClientRetry.cc new file mode 100644 index 0000000..41d5179 --- /dev/null +++ b/src/c/tests/TestClientRetry.cc @@ -0,0 +1,273 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include "CppAssertHelper.h" + +#include +#include +#include +#include + +#include "CollectionUtil.h" +#include "ThreadingUtil.h" + +using namespace Util; + +#include "Vector.h" +using namespace std; + +#include +#include + +#include + +#include "Util.h" + +#ifdef THREADED + static void yield(zhandle_t *zh, int i) + { + sleep(i); + } +#else + static void yield(zhandle_t *zh, int seconds) + { + int fd; + int interest; + int events; + struct timeval tv; + int rc; + time_t expires = time(0) + seconds; + time_t timeLeft = seconds; + fd_set rfds, wfds, efds; + FD_ZERO(&rfds); + FD_ZERO(&wfds); + FD_ZERO(&efds); + + while(timeLeft >= 0) { + zookeeper_interest(zh, &fd, &interest, &tv); + if (fd != -1) { + if (interest&ZOOKEEPER_READ) { + FD_SET(fd, &rfds); + } else { + FD_CLR(fd, &rfds); + } + if (interest&ZOOKEEPER_WRITE) { + FD_SET(fd, &wfds); + } else { + FD_CLR(fd, &wfds); + } + } else { + fd = 0; + } + FD_SET(0, &rfds); + if (tv.tv_sec > timeLeft) { + tv.tv_sec = timeLeft; + } + rc = select(fd+1, &rfds, &wfds, &efds, &tv); + timeLeft = expires - time(0); + events = 0; + if (FD_ISSET(fd, &rfds)) { + events |= ZOOKEEPER_READ; + } + if (FD_ISSET(fd, &wfds)) { + events |= ZOOKEEPER_WRITE; + } + zookeeper_process(zh, events); + } + } +#endif + +typedef struct evt { + string path; + int type; +} evt_t; + +typedef struct watchCtx { +private: + list events; +public: + bool connected; + zhandle_t *zh; + Mutex mutex; + + watchCtx() { + connected = false; + zh = 0; + } + ~watchCtx() { + if (zh) { + zookeeper_close(zh); + zh = 0; + } + } + + evt_t getEvent() { + evt_t evt; + mutex.acquire(); + CPPUNIT_ASSERT( events.size() > 0); + evt = events.front(); + events.pop_front(); + mutex.release(); + return evt; + } + + int countEvents() { + int count; + mutex.acquire(); + count = events.size(); + mutex.release(); + return count; + } + + void putEvent(evt_t evt) { + mutex.acquire(); + events.push_back(evt); + mutex.release(); + } + + bool waitForConnected(zhandle_t *zh) { + time_t expires = time(0) + 10; + while(!connected && time(0) < expires) { + yield(zh, 1); + } + return connected; + } + bool waitForDisconnected(zhandle_t *zh) { + time_t expires = time(0) + 15; + while(connected && time(0) < expires) { + yield(zh, 1); + } + return !connected; + } +} watchctx_t; + +class Zookeeper_clientretry : public CPPUNIT_NS::TestFixture +{ + CPPUNIT_TEST_SUITE(Zookeeper_clientretry); +#ifdef THREADED + CPPUNIT_TEST(testRetry); +#endif + CPPUNIT_TEST_SUITE_END(); + + static void watcher(zhandle_t *, int type, int state, const char *path,void*v){ + watchctx_t *ctx = (watchctx_t*)v; + + if (state == ZOO_CONNECTED_STATE) { + ctx->connected = true; + } else { + ctx->connected = false; + } + if (type != ZOO_SESSION_EVENT) { + evt_t evt; + evt.path = path; + evt.type = type; + ctx->putEvent(evt); + } + } + + static const char hostPorts[]; + + const char *getHostPorts() { + return hostPorts; + } + + zhandle_t *createClient(watchctx_t *ctx) { + zhandle_t *zk = zookeeper_init(hostPorts, watcher, 10000, 0, + ctx, 0); + ctx->zh = zk; + sleep(1); + return zk; + } + + FILE *logfile; +public: + + Zookeeper_clientretry() { + logfile = openlogfile("Zookeeper_clientretry"); + } + + ~Zookeeper_clientretry() { + if (logfile) { + fflush(logfile); + fclose(logfile); + logfile = 0; + } + } + + void setUp() + { + zoo_set_log_stream(logfile); + + char cmd[1024]; + sprintf(cmd, "%s stop %s", ZKSERVER_CMD, getHostPorts()); + CPPUNIT_ASSERT(system(cmd) == 0); + + /* we are testing that if max cnxns is exceeded the server does the right thing */ + sprintf(cmd, "export ZKMAXCNXNS=1;%s startClean %s", ZKSERVER_CMD, getHostPorts()); + CPPUNIT_ASSERT(system(cmd) == 0); + + struct sigaction act; + act.sa_handler = SIG_IGN; + sigemptyset(&act.sa_mask); + act.sa_flags = 0; + CPPUNIT_ASSERT(sigaction(SIGPIPE, &act, NULL) == 0); + } + + void tearDown() + { + char cmd[1024]; + sprintf(cmd, "%s stop %s", ZKSERVER_CMD, getHostPorts()); + CPPUNIT_ASSERT(system(cmd) == 0); + + /* restart the server in "normal" mode */ + sprintf(cmd, "%s startClean %s", ZKSERVER_CMD, getHostPorts()); + CPPUNIT_ASSERT(system(cmd) == 0); + + struct sigaction act; + act.sa_handler = SIG_IGN; + sigemptyset(&act.sa_mask); + act.sa_flags = 0; + CPPUNIT_ASSERT(sigaction(SIGPIPE, &act, NULL) == 0); + } + + bool waitForEvent(zhandle_t *zh, watchctx_t *ctx, int seconds) { + time_t expires = time(0) + seconds; + while(ctx->countEvents() == 0 && time(0) < expires) { + yield(zh, 1); + } + return ctx->countEvents() > 0; + } + + static zhandle_t *async_zk; + + void testRetry() + { + watchctx_t ctx1, ctx2; + zhandle_t *zk1 = createClient(&ctx1); + CPPUNIT_ASSERT_EQUAL(true, ctx1.waitForConnected(zk1)); + zhandle_t *zk2 = createClient(&ctx2); + zookeeper_close(zk1); + CPPUNIT_ASSERT_EQUAL(true, ctx2.waitForConnected(zk2)); + ctx1.zh = 0; + } +}; + +zhandle_t *Zookeeper_clientretry::async_zk; +const char Zookeeper_clientretry::hostPorts[] = "127.0.0.1:22181"; +CPPUNIT_TEST_SUITE_REGISTRATION(Zookeeper_clientretry); diff --git a/src/c/tests/TestDriver.cc b/src/c/tests/TestDriver.cc new file mode 100644 index 0000000..d60db69 --- /dev/null +++ b/src/c/tests/TestDriver.cc @@ -0,0 +1,173 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "Util.h" +#include "zookeeper_log.h" + +using namespace std; + +CPPUNIT_NS_BEGIN + +class EclipseOutputter: public CompilerOutputter +{ +public: + EclipseOutputter(TestResultCollector *result,ostream &stream): + CompilerOutputter(result,stream,"%p:%l: "),stream_(stream) + { + } + virtual void printFailedTestName( TestFailure *failure ){} + virtual void printFailureMessage( TestFailure *failure ) + { + stream_<<": "; + Message msg = failure->thrownException()->message(); + stream_<< msg.shortDescription(); + + string text; + for(int i=0; i the output must be in the compiler error format. + //bool selfTest = (argc > 1) && (std::string("-ide") == argv[1]); + globalTestConfig.addConfigFromCmdLine(argc,argv); + + ZKServer zkserver; + + // Create the event manager and test controller + CPPUNIT_NS::TestResult controller; + // Add a listener that colllects test result + CPPUNIT_NS::TestResultCollector result; + controller.addListener( &result ); + + // A listener that print dots as tests run. + // CPPUNIT_NS::TextTestProgressListener progress; + // CPPUNIT_NS::BriefTestProgressListener progress; + + // brief + elapsed time + TimingListener progress; + controller.addListener( &progress ); + + CPPUNIT_NS::TestRunner runner; + runner.addTest( CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest() ); + + try { + CPPUNIT_NS::stdCOut() << endl << "Running " << endl; + + zoo_set_debug_level(ZOO_LOG_LEVEL_INFO); + //zoo_set_debug_level(ZOO_LOG_LEVEL_DEBUG); + + runner.run( controller, globalTestConfig.getTestName()); + + // Print test in a compiler compatible format. + CPPUNIT_NS::EclipseOutputter outputter( &result,cout); + outputter.write(); + + // Uncomment this for XML output +#ifdef ENABLE_XML_OUTPUT + std::ofstream file( "tests.xml" ); + CPPUNIT_NS::XmlOutputter xml( &result, file ); + xml.setStyleSheet( "report.xsl" ); + xml.write(); + file.close(); +#endif + } catch ( std::invalid_argument &e ) { + // Test path not resolved + cout<<"\nERROR: "< +#include "CppAssertHelper.h" + +#include +#include +#include +#include + +#include "CollectionUtil.h" +#include "ThreadingUtil.h" + +using namespace Util; + +#include "Vector.h" +using namespace std; + +#include +#include + +#include +#include +#include +#include "Util.h" + +#ifdef THREADED + static void yield(zhandle_t *zh, int i) + { + sleep(i); + } +#else + static void yield(zhandle_t *zh, int seconds) + { + int fd; + int interest; + int events; + struct timeval tv; + int rc; + time_t expires = time(0) + seconds; + time_t timeLeft = seconds; + fd_set rfds, wfds, efds; + FD_ZERO(&rfds); + FD_ZERO(&wfds); + FD_ZERO(&efds); + + while(timeLeft >= 0) { + zookeeper_interest(zh, &fd, &interest, &tv); + if (fd != -1) { + if (interest&ZOOKEEPER_READ) { + FD_SET(fd, &rfds); + } else { + FD_CLR(fd, &rfds); + } + if (interest&ZOOKEEPER_WRITE) { + FD_SET(fd, &wfds); + } else { + FD_CLR(fd, &wfds); + } + } else { + fd = 0; + } + FD_SET(0, &rfds); + if (tv.tv_sec > timeLeft) { + tv.tv_sec = timeLeft; + } + rc = select(fd+1, &rfds, &wfds, &efds, &tv); + timeLeft = expires - time(0); + events = 0; + if (FD_ISSET(fd, &rfds)) { + events |= ZOOKEEPER_READ; + } + if (FD_ISSET(fd, &wfds)) { + events |= ZOOKEEPER_WRITE; + } + zookeeper_process(zh, events); + } + } +#endif + +typedef struct evt { + string path; + int type; +} evt_t; + +typedef struct watchCtx { +private: + list events; + watchCtx(const watchCtx&); + watchCtx& operator=(const watchCtx&); +public: + bool connected; + zhandle_t *zh; + Mutex mutex; + + watchCtx() { + connected = false; + zh = 0; + } + ~watchCtx() { + if (zh) { + zookeeper_close(zh); + zh = 0; + } + } + + evt_t getEvent() { + evt_t evt; + mutex.acquire(); + CPPUNIT_ASSERT( events.size() > 0); + evt = events.front(); + events.pop_front(); + mutex.release(); + return evt; + } + + int countEvents() { + int count; + mutex.acquire(); + count = events.size(); + mutex.release(); + return count; + } + + void putEvent(evt_t evt) { + mutex.acquire(); + events.push_back(evt); + mutex.release(); + } + + bool waitForConnected(zhandle_t *zh) { + time_t expires = time(0) + 10; + while(!connected && time(0) < expires) { + yield(zh, 1); + } + return connected; + } + bool waitForDisconnected(zhandle_t *zh) { + time_t expires = time(0) + 15; + while(connected && time(0) < expires) { + yield(zh, 1); + } + return !connected; + } +} watchctx_t; + +class Zookeeper_multi : public CPPUNIT_NS::TestFixture +{ + CPPUNIT_TEST_SUITE(Zookeeper_multi); +//FIXME: None of these tests pass in single-threaded mode. It seems to be a +//flaw in the test suite setup. +#ifdef THREADED + CPPUNIT_TEST(testCreate); + CPPUNIT_TEST(testCreateDelete); + CPPUNIT_TEST(testInvalidVersion); + CPPUNIT_TEST(testNestedCreate); + CPPUNIT_TEST(testSetData); + CPPUNIT_TEST(testUpdateConflict); + CPPUNIT_TEST(testDeleteUpdateConflict); + CPPUNIT_TEST(testAsyncMulti); + CPPUNIT_TEST(testMultiFail); + CPPUNIT_TEST(testCheck); + CPPUNIT_TEST(testWatch); + CPPUNIT_TEST(testSequentialNodeCreateInAsyncMulti); +#endif + CPPUNIT_TEST_SUITE_END(); + + static void watcher(zhandle_t *, int type, int state, const char *path,void*v){ + watchctx_t *ctx = (watchctx_t*)v; + + if (state == ZOO_CONNECTED_STATE) { + ctx->connected = true; + } else { + ctx->connected = false; + } + if (type != ZOO_SESSION_EVENT) { + evt_t evt; + evt.path = path; + evt.type = type; + ctx->putEvent(evt); + } + } + + static const char hostPorts[]; + + const char *getHostPorts() { + return hostPorts; + } + + zhandle_t *createClient(watchctx_t *ctx) { + return createClient(hostPorts, ctx); + } + + zhandle_t *createClient(const char *hp, watchctx_t *ctx) { + zhandle_t *zk = zookeeper_init(hp, watcher, 10000, 0, ctx, 0); + ctx->zh = zk; + CPPUNIT_ASSERT_EQUAL(true, ctx->waitForConnected(zk)); + return zk; + } + + FILE *logfile; +public: + + Zookeeper_multi() { + logfile = openlogfile("Zookeeper_multi"); + } + + ~Zookeeper_multi() { + if (logfile) { + fflush(logfile); + fclose(logfile); + logfile = 0; + } + } + + void setUp() + { + zoo_set_log_stream(logfile); + } + + void tearDown() + { + } + + static volatile int count; + + static void multi_completion_fn(int rc, const void *data) { + CPPUNIT_ASSERT_EQUAL((int) ZOK, rc); + count++; + } + + static void multi_completion_fn_no_assert(int rc, const void *data) { + count++; + } + + static void waitForMultiCompletion(int seconds) { + time_t expires = time(0) + seconds; + while(count == 0 && time(0) < expires) { + sleep(1); + } + count--; + } + + static void resetCounter() { + count = 0; + } + + /** + * Test basic multi-op create functionality + */ + void testCreate() { + int rc; + watchctx_t ctx; + zhandle_t *zk = createClient(&ctx); + + int sz = 512; + char p1[sz]; + char p2[sz]; + char p3[sz]; + p1[0] = p2[0] = p3[0] = '\0'; + + int nops = 3 ; + zoo_op_t ops[nops]; + zoo_op_result_t results[nops]; + + zoo_create_op_init(&ops[0], "/multi1", "", 0, &ZOO_OPEN_ACL_UNSAFE, 0, p1, sz); + zoo_create_op_init(&ops[1], "/multi1/a", "", 0, &ZOO_OPEN_ACL_UNSAFE, 0, p2, sz); + zoo_create_op_init(&ops[2], "/multi1/b", "", 0, &ZOO_OPEN_ACL_UNSAFE, 0, p3, sz); + + rc = zoo_multi(zk, nops, ops, results); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + + CPPUNIT_ASSERT(strcmp(p1, "/multi1") == 0); + CPPUNIT_ASSERT(strcmp(p2, "/multi1/a") == 0); + CPPUNIT_ASSERT(strcmp(p3, "/multi1/b") == 0); + + CPPUNIT_ASSERT_EQUAL((int)ZOK, results[0].err); + CPPUNIT_ASSERT_EQUAL((int)ZOK, results[1].err); + CPPUNIT_ASSERT_EQUAL((int)ZOK, results[2].err); + } + + /** + * Test create followed by delete + */ + void testCreateDelete() { + int rc; + watchctx_t ctx; + zhandle_t *zk = createClient(&ctx); + int sz = 512; + char p1[sz]; + p1[0] = '\0'; + int nops = 2 ; + zoo_op_t ops[nops]; + zoo_op_result_t results[nops]; + + zoo_create_op_init(&ops[0], "/multi2", "", 0, &ZOO_OPEN_ACL_UNSAFE, 0, p1, sz); + zoo_delete_op_init(&ops[1], "/multi2", 0); + + rc = zoo_multi(zk, nops, ops, results); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + + // '/multi2' should have been deleted + rc = zoo_exists(zk, "/multi2", 0, NULL); + CPPUNIT_ASSERT_EQUAL((int)ZNONODE, rc); + } + + /** + * Test invalid versions + */ + void testInvalidVersion() { + int rc; + watchctx_t ctx; + zhandle_t *zk = createClient(&ctx); + int nops = 4; + zoo_op_t ops[nops]; + zoo_op_result_t results[nops]; + + zoo_create_op_init(&ops[0], "/multi3", "", 0, &ZOO_OPEN_ACL_UNSAFE, 0, NULL, 0); + zoo_delete_op_init(&ops[1], "/multi3", 1); + zoo_create_op_init(&ops[2], "/multi3", "", 0, &ZOO_OPEN_ACL_UNSAFE, 0, NULL, 0); + zoo_create_op_init(&ops[3], "/multi3/a", "", 0, &ZOO_OPEN_ACL_UNSAFE, 0, NULL, 0); + + rc = zoo_multi(zk, nops, ops, results); + CPPUNIT_ASSERT_EQUAL((int)ZBADVERSION, rc); + CPPUNIT_ASSERT_EQUAL((int)ZOK, results[0].err); + CPPUNIT_ASSERT_EQUAL((int)ZBADVERSION, results[1].err); + CPPUNIT_ASSERT_EQUAL((int)ZRUNTIMEINCONSISTENCY, results[2].err); + CPPUNIT_ASSERT_EQUAL((int)ZRUNTIMEINCONSISTENCY, results[3].err); + } + + /** + * Test nested creates that rely on state in earlier op in multi + */ + void testNestedCreate() { + int rc; + watchctx_t ctx; + zhandle_t *zk = createClient(&ctx); + int sz = 512; + char p1[sz]; + p1[0] = '\0'; + int nops = 6; + zoo_op_t ops[nops]; + zoo_op_result_t results[nops]; + + /* Create */ + zoo_create_op_init(&ops[0], "/multi4", "", 0, &ZOO_OPEN_ACL_UNSAFE, 0, p1, sz); + zoo_create_op_init(&ops[1], "/multi4/a", "", 0, &ZOO_OPEN_ACL_UNSAFE, 0, p1, sz); + zoo_create_op_init(&ops[2], "/multi4/a/1", "", 0, &ZOO_OPEN_ACL_UNSAFE, 0, p1, sz); + + /* Delete */ + zoo_delete_op_init(&ops[3], "/multi4/a/1", 0); + zoo_delete_op_init(&ops[4], "/multi4/a", 0); + zoo_delete_op_init(&ops[5], "/multi4", 0); + + rc = zoo_multi(zk, nops, ops, results); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + + // Verify tree deleted + rc = zoo_exists(zk, "/multi4/a/1", 0, NULL); + CPPUNIT_ASSERT_EQUAL((int)ZNONODE, rc); + + rc = zoo_exists(zk, "/multi4/a", 0, NULL); + CPPUNIT_ASSERT_EQUAL((int)ZNONODE, rc); + + rc = zoo_exists(zk, "/multi4", 0, NULL); + CPPUNIT_ASSERT_EQUAL((int)ZNONODE, rc); + } + + /** + * Test setdata functionality + */ + void testSetData() { + int rc; + watchctx_t ctx; + zhandle_t *zk = createClient(&ctx); + int sz = 512; + struct Stat s1; + + char buf[sz]; + int blen = sz ; + + char p1[sz], p2[sz]; + + int nops = 2; + zoo_op_t ops[nops]; + zoo_op_result_t results[nops]; + + zoo_create_op_init(&ops[0], "/multi5", "", 0, &ZOO_OPEN_ACL_UNSAFE, 0, p1, sz); + zoo_create_op_init(&ops[1], "/multi5/a", "", 0, &ZOO_OPEN_ACL_UNSAFE, 0, p2, sz); + + rc = zoo_multi(zk, nops, ops, results); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + + yield(zk, 5); + + zoo_op_t setdata_ops[nops]; + zoo_op_result_t setdata_results[nops]; + + zoo_set_op_init(&setdata_ops[0], "/multi5", "1", 1, 0, &s1); + zoo_set_op_init(&setdata_ops[1], "/multi5/a", "2", 1, 0, &s1); + + rc = zoo_multi(zk, nops, setdata_ops, setdata_results); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + CPPUNIT_ASSERT_EQUAL((int)ZOK, results[0].err); + CPPUNIT_ASSERT_EQUAL((int)ZOK, results[1].err); + + memset(buf, '\0', blen); + rc = zoo_get(zk, "/multi5", 0, buf, &blen, &s1); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + CPPUNIT_ASSERT_EQUAL(1, blen); + CPPUNIT_ASSERT(strcmp("1", buf) == 0); + + memset(buf, '\0', blen); + rc = zoo_get(zk, "/multi5/a", 0, buf, &blen, &s1); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + CPPUNIT_ASSERT_EQUAL(1, blen); + CPPUNIT_ASSERT(strcmp("2", buf) == 0); + } + + /** + * Test update conflicts + */ + void testUpdateConflict() { + int rc; + watchctx_t ctx; + zhandle_t *zk = createClient(&ctx); + int sz = 512; + char buf[sz]; + int blen = sz; + char p1[sz]; + p1[0] = '\0'; + struct Stat s1; + int nops = 3; + zoo_op_t ops[nops]; + zoo_op_result_t results[nops]; + + zoo_create_op_init(&ops[0], "/multi6", "", 0, &ZOO_OPEN_ACL_UNSAFE, 0, p1, sz); + zoo_set_op_init(&ops[1], "/multi6", "X", 1, 0, &s1); + zoo_set_op_init(&ops[2], "/multi6", "Y", 1, 0, &s1); + + rc = zoo_multi(zk, nops, ops, results); + CPPUNIT_ASSERT_EQUAL((int)ZBADVERSION, rc); + + //Updating version solves conflict -- order matters + ops[2].set_op.version = 1; + rc = zoo_multi(zk, nops, ops, results); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + + memset(buf, 0, sz); + rc = zoo_get(zk, "/multi6", 0, buf, &blen, &s1); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + CPPUNIT_ASSERT_EQUAL(blen, 1); + CPPUNIT_ASSERT(strncmp(buf, "Y", 1) == 0); + } + + /** + * Test delete-update conflicts + */ + void testDeleteUpdateConflict() { + int rc; + watchctx_t ctx; + zhandle_t *zk = createClient(&ctx); + int sz = 512; + char buf[sz]; + int blen; + char p1[sz]; + p1[0] = '\0'; + struct Stat stat; + int nops = 3; + zoo_op_t ops[nops]; + zoo_op_result_t results[nops]; + + zoo_create_op_init(&ops[0], "/multi7", "", 0, &ZOO_OPEN_ACL_UNSAFE, 0, p1, sz); + zoo_delete_op_init(&ops[1], "/multi7", 0); + zoo_set_op_init(&ops[2], "/multi7", "Y", 1, 0, &stat); + + rc = zoo_multi(zk, nops, ops, results); + CPPUNIT_ASSERT_EQUAL((int)ZNONODE, rc); + + // '/multi' should never have been created as entire op should fail + rc = zoo_exists(zk, "/multi7", 0, NULL); + CPPUNIT_ASSERT_EQUAL((int)ZNONODE, rc); + } + + void testAsyncMulti() { + int rc; + watchctx_t ctx; + zhandle_t *zk = createClient(&ctx); + + int sz = 512; + char p1[sz], p2[sz], p3[sz]; + p1[0] = '\0'; + p2[0] = '\0'; + p3[0] = '\0'; + + int nops = 3; + zoo_op_t ops[nops]; + zoo_op_result_t results[nops]; + + zoo_create_op_init(&ops[0], "/multi8", "", 0, &ZOO_OPEN_ACL_UNSAFE, 0, p1, sz); + zoo_create_op_init(&ops[1], "/multi8/a", "", 0, &ZOO_OPEN_ACL_UNSAFE, 0, p2, sz); + zoo_create_op_init(&ops[2], "/multi8/b", "", 0, &ZOO_OPEN_ACL_UNSAFE, 0, p3, sz); + + rc = zoo_amulti(zk, nops, ops, results, multi_completion_fn, 0); + waitForMultiCompletion(10); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + + CPPUNIT_ASSERT(strcmp(p1, "/multi8") == 0); + CPPUNIT_ASSERT(strcmp(p2, "/multi8/a") == 0); + CPPUNIT_ASSERT(strcmp(p3, "/multi8/b") == 0); + + CPPUNIT_ASSERT_EQUAL((int)ZOK, results[0].err); + CPPUNIT_ASSERT_EQUAL((int)ZOK, results[1].err); + CPPUNIT_ASSERT_EQUAL((int)ZOK, results[2].err); + } + + void testMultiFail() { + int rc; + watchctx_t ctx; + zhandle_t *zk = createClient(&ctx); + + int sz = 512; + char p1[sz], p2[sz], p3[sz]; + + p1[0] = '\0'; + p2[0] = '\0'; + p3[0] = '\0'; + + int nops = 3; + zoo_op_t ops[nops]; + zoo_op_result_t results[nops]; + + zoo_create_op_init(&ops[0], "/multi9", "", 0, &ZOO_OPEN_ACL_UNSAFE, 0, p1, sz); + zoo_create_op_init(&ops[1], "/multi9", "", 0, &ZOO_OPEN_ACL_UNSAFE, 0, p2, sz); + zoo_create_op_init(&ops[2], "/multi9/b", "", 0, &ZOO_OPEN_ACL_UNSAFE, 0, p3, sz); + + rc = zoo_multi(zk, nops, ops, results); + CPPUNIT_ASSERT_EQUAL((int)ZNODEEXISTS, rc); + } + + /** + * Test basic multi-op check functionality + */ + void testCheck() { + int rc; + watchctx_t ctx; + zhandle_t *zk = createClient(&ctx); + int sz = 512; + char p1[sz]; + p1[0] = '\0'; + struct Stat s1; + + rc = zoo_create(zk, "/multi0", "", 0, &ZOO_OPEN_ACL_UNSAFE, 0, p1, sz); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + + // Conditionally create /multi0/a' only if '/multi0' at version 0 + int nops = 2; + zoo_op_t ops[nops]; + zoo_op_result_t results[nops]; + + zoo_check_op_init(&ops[0], "/multi0", 0); + zoo_create_op_init(&ops[1], "/multi0/a", "", 0, &ZOO_OPEN_ACL_UNSAFE, 0, p1, sz); + + rc = zoo_multi(zk, nops, ops, results); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + + CPPUNIT_ASSERT_EQUAL((int)ZOK, results[0].err); + CPPUNIT_ASSERT_EQUAL((int)ZOK, results[1].err); + + // '/multi0/a' should have been created as it passed version check + rc = zoo_exists(zk, "/multi0/a", 0, NULL); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + + // Only create '/multi0/b' if '/multi0' at version 10 (which it's not) + zoo_op_t ops2[nops]; + zoo_check_op_init(&ops2[0], "/multi0", 10); + zoo_create_op_init(&ops2[1], "/multi0/b", "", 0, &ZOO_OPEN_ACL_UNSAFE, 0, p1, sz); + + rc = zoo_multi(zk, nops, ops2, results); + CPPUNIT_ASSERT_EQUAL((int)ZBADVERSION, rc); + + CPPUNIT_ASSERT_EQUAL((int)ZBADVERSION, results[0].err); + CPPUNIT_ASSERT_EQUAL((int)ZRUNTIMEINCONSISTENCY, results[1].err); + + // '/multi0/b' should NOT have been created + rc = zoo_exists(zk, "/multi0/b", 0, NULL); + CPPUNIT_ASSERT_EQUAL((int)ZNONODE, rc); + } + + /** + * Do a multi op inside a watch callback context. + */ + static void doMultiInWatch(zhandle_t *zk, int type, int state, const char *path, void *ctx) { + int rc; + int sz = 512; + char p1[sz]; + p1[0] = '\0'; + struct Stat s1; + + int nops = 1; + zoo_op_t ops[nops]; + zoo_op_result_t results[nops]; + + zoo_set_op_init(&ops[0], "/multiwatch", "1", 1, -1, NULL); + + rc = zoo_multi(zk, nops, ops, results); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + CPPUNIT_ASSERT_EQUAL((int)ZOK, results[0].err); + + memset(p1, '\0', sz); + rc = zoo_get(zk, "/multiwatch", 0, p1, &sz, &s1); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + CPPUNIT_ASSERT_EQUAL(1, sz); + CPPUNIT_ASSERT(strcmp("1", p1) == 0); + count++; + } + + /** + * Test multi-op called from a watch + */ + void testWatch() { + int rc; + watchctx_t ctx; + zhandle_t *zk = createClient(&ctx); + int sz = 512; + char p1[sz]; + p1[0] = '\0'; + + rc = zoo_create(zk, "/multiwatch", "", 0, &ZOO_OPEN_ACL_UNSAFE, 0, NULL, 0); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + + // create a watch on node '/multiwatch' + rc = zoo_wget(zk, "/multiwatch", doMultiInWatch, &ctx, p1, &sz, NULL); + + // setdata on node '/multiwatch' this should trip the watch + rc = zoo_set(zk, "/multiwatch", NULL, -1, -1); + CPPUNIT_ASSERT_EQUAL((int) ZOK, rc); + + // wait for multi completion in doMultiInWatch + waitForMultiCompletion(5); + } + + /** + * ZOOKEEPER-1624: PendingChanges of create sequential node request didn't + * get rollbacked correctly when multi-op failed. This caused + * create sequential node request in subsequent multi-op to failed because + * sequential node name generation is incorrect. + * + * The check is to make sure that each request in multi-op failed with + * the correct reason. + */ + void testSequentialNodeCreateInAsyncMulti() { + int rc; + watchctx_t ctx; + zhandle_t *zk = createClient(&ctx); + + int iteration = 4; + int nops = 2; + + zoo_op_result_t results[iteration][nops]; + zoo_op_t ops[nops]; + zoo_create_op_init(&ops[0], "/node-", "", 0, &ZOO_OPEN_ACL_UNSAFE, ZOO_SEQUENCE, NULL, 0); + zoo_create_op_init(&ops[1], "/dup", "", 0, &ZOO_OPEN_ACL_UNSAFE, 0, NULL, 0); + for (int i = 0; i < iteration ; ++i) { + rc = zoo_amulti(zk, nops, ops, results[i], multi_completion_fn_no_assert, 0); + CPPUNIT_ASSERT_EQUAL((int)ZOK, rc); + } + + waitForMultiCompletion(10); + + CPPUNIT_ASSERT_EQUAL((int)ZOK, results[0][0].err); + CPPUNIT_ASSERT_EQUAL((int)ZOK, results[1][0].err); + CPPUNIT_ASSERT_EQUAL((int)ZOK, results[2][0].err); + CPPUNIT_ASSERT_EQUAL((int)ZOK, results[3][0].err); + + CPPUNIT_ASSERT_EQUAL((int)ZOK, results[0][1].err); + CPPUNIT_ASSERT_EQUAL((int)ZNODEEXISTS, results[1][1].err); + CPPUNIT_ASSERT_EQUAL((int)ZNODEEXISTS, results[2][1].err); + CPPUNIT_ASSERT_EQUAL((int)ZNODEEXISTS, results[3][1].err); + + resetCounter(); + } +}; + +volatile int Zookeeper_multi::count; +const char Zookeeper_multi::hostPorts[] = "127.0.0.1:22181"; +CPPUNIT_TEST_SUITE_REGISTRATION(Zookeeper_multi); diff --git a/src/c/tests/TestOperations.cc b/src/c/tests/TestOperations.cc new file mode 100644 index 0000000..27d9270 --- /dev/null +++ b/src/c/tests/TestOperations.cc @@ -0,0 +1,710 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include "CppAssertHelper.h" + +#include "ZKMocks.h" +#include + +using namespace std; + +class Zookeeper_operations : public CPPUNIT_NS::TestFixture +{ + CPPUNIT_TEST_SUITE(Zookeeper_operations); +#ifndef THREADED + CPPUNIT_TEST(testPing); + CPPUNIT_TEST(testUnsolicitedPing); + CPPUNIT_TEST(testTimeoutCausedByWatches1); + CPPUNIT_TEST(testTimeoutCausedByWatches2); +#else + CPPUNIT_TEST(testAsyncWatcher1); + CPPUNIT_TEST(testAsyncGetOperation); +#endif + CPPUNIT_TEST(testOperationsAndDisconnectConcurrently1); + CPPUNIT_TEST(testOperationsAndDisconnectConcurrently2); + CPPUNIT_TEST(testConcurrentOperations1); + CPPUNIT_TEST_SUITE_END(); + zhandle_t *zh; + FILE *logfile; + + static void watcher(zhandle_t *, int, int, const char *,void*){} +public: + Zookeeper_operations() { + logfile = openlogfile("Zookeeper_operations"); + } + + ~Zookeeper_operations() { + if (logfile) { + fflush(logfile); + fclose(logfile); + logfile = 0; + } + } + + void setUp() + { + zoo_set_log_stream(logfile); + + zoo_deterministic_conn_order(0); + zh=0; + } + + void tearDown() + { + zookeeper_close(zh); + } + + class AsyncGetOperationCompletion: public AsyncCompletion{ + public: + AsyncGetOperationCompletion():called_(false),rc_(ZAPIERROR){} + virtual void dataCompl(int rc, const char *value, int len, const Stat *stat){ + synchronized(mx_); + called_=true; + rc_=rc; + value_.erase(); + if(rc!=ZOK) return; + value_.assign(value,len); + if(stat) + stat_=*stat; + } + bool operator()()const{ + synchronized(mx_); + return called_; + } + mutable Mutex mx_; + bool called_; + int rc_; + string value_; + NodeStat stat_; + }; +#ifndef THREADED + // send two get data requests; verify that the corresponding completions called + void testConcurrentOperations1() + { + Mock_gettimeofday timeMock; + ZookeeperServer zkServer; + // must call zookeeper_close() while all the mocks are in scope + CloseFinally guard(&zh); + + zh=zookeeper_init("localhost:2121",watcher,10000,TEST_CLIENT_ID,0,0); + CPPUNIT_ASSERT(zh!=0); + // simulate connected state + forceConnected(zh); + + int fd=0; + int interest=0; + timeval tv; + // first operation + AsyncGetOperationCompletion res1; + zkServer.addOperationResponse(new ZooGetResponse("1",1)); + int rc=zoo_aget(zh,"/x/y/1",0,asyncCompletion,&res1); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + // second operation + AsyncGetOperationCompletion res2; + zkServer.addOperationResponse(new ZooGetResponse("2",1)); + rc=zoo_aget(zh,"/x/y/2",0,asyncCompletion,&res2); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + // process the send queue + rc=zookeeper_interest(zh,&fd,&interest,&tv); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + while((rc=zookeeper_process(zh,interest))==ZOK) { + millisleep(100); + //printf("%d\n", rc); + } + //printf("RC = %d", rc); + CPPUNIT_ASSERT_EQUAL((int)ZNOTHING,rc); + + CPPUNIT_ASSERT_EQUAL((int)ZOK,res1.rc_); + CPPUNIT_ASSERT_EQUAL(string("1"),res1.value_); + CPPUNIT_ASSERT_EQUAL((int)ZOK,res2.rc_); + CPPUNIT_ASSERT_EQUAL(string("2"),res2.value_); + } + // send two getData requests and disconnect while the second request is + // outstanding; + // verify the completions are called + void testOperationsAndDisconnectConcurrently1() + { + Mock_gettimeofday timeMock; + ZookeeperServer zkServer; + // must call zookeeper_close() while all the mocks are in scope + CloseFinally guard(&zh); + + zh=zookeeper_init("localhost:2121",watcher,10000,TEST_CLIENT_ID,0,0); + CPPUNIT_ASSERT(zh!=0); + // simulate connected state + forceConnected(zh); + + int fd=0; + int interest=0; + timeval tv; + // first operation + AsyncGetOperationCompletion res1; + zkServer.addOperationResponse(new ZooGetResponse("1",1)); + int rc=zoo_aget(zh,"/x/y/1",0,asyncCompletion,&res1); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + // second operation + AsyncGetOperationCompletion res2; + zkServer.addOperationResponse(new ZooGetResponse("2",1)); + rc=zoo_aget(zh,"/x/y/2",0,asyncCompletion,&res2); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + // process the send queue + rc=zookeeper_interest(zh,&fd,&interest,&tv); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + rc=zookeeper_process(zh,interest); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + // simulate a disconnect + zkServer.setConnectionLost(); + rc=zookeeper_interest(zh,&fd,&interest,&tv); + rc=zookeeper_process(zh,interest); + CPPUNIT_ASSERT_EQUAL((int)ZCONNECTIONLOSS,rc); + CPPUNIT_ASSERT_EQUAL((int)ZOK,res1.rc_); + CPPUNIT_ASSERT_EQUAL(string("1"),res1.value_); + CPPUNIT_ASSERT_EQUAL((int)ZCONNECTIONLOSS,res2.rc_); + CPPUNIT_ASSERT_EQUAL(string(""),res2.value_); + } + // send two getData requests and simulate timeout while the both request + // are pending; + // verify the completions are called + void testOperationsAndDisconnectConcurrently2() + { + Mock_gettimeofday timeMock; + ZookeeperServer zkServer; + // must call zookeeper_close() while all the mocks are in scope + CloseFinally guard(&zh); + + zh=zookeeper_init("localhost:2121",watcher,10000,TEST_CLIENT_ID,0,0); + CPPUNIT_ASSERT(zh!=0); + // simulate connected state + forceConnected(zh); + + int fd=0; + int interest=0; + timeval tv; + // first operation + AsyncGetOperationCompletion res1; + zkServer.addOperationResponse(new ZooGetResponse("1",1)); + int rc=zoo_aget(zh,"/x/y/1",0,asyncCompletion,&res1); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + // second operation + AsyncGetOperationCompletion res2; + zkServer.addOperationResponse(new ZooGetResponse("2",1)); + rc=zoo_aget(zh,"/x/y/2",0,asyncCompletion,&res2); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + // simulate timeout + timeMock.tick(+10); // advance system time by 10 secs + // the next call to zookeeper_interest should return ZOPERATIONTIMEOUT + rc=zookeeper_interest(zh,&fd,&interest,&tv); + CPPUNIT_ASSERT_EQUAL((int)ZOPERATIONTIMEOUT,rc); + // make sure the completions have been called + CPPUNIT_ASSERT_EQUAL((int)ZOPERATIONTIMEOUT,res1.rc_); + CPPUNIT_ASSERT_EQUAL((int)ZOPERATIONTIMEOUT,res2.rc_); + } + + class PingCountingServer: public ZookeeperServer{ + public: + PingCountingServer():pingCount_(0){} + // called when a client request is received + virtual void onMessageReceived(const RequestHeader& rh, iarchive* ia){ + if(rh.type==ZOO_PING_OP){ + pingCount_++; + } + } + int pingCount_; + }; + + // establish a connection; idle for a while + // verify ping was sent at least once + void testPing() + { + const int TIMEOUT=9; // timeout in secs + Mock_gettimeofday timeMock; + PingCountingServer zkServer; + // must call zookeeper_close() while all the mocks are in scope + CloseFinally guard(&zh); + + // receive timeout is in milliseconds + zh=zookeeper_init("localhost:1234",watcher,TIMEOUT*1000,TEST_CLIENT_ID,0,0); + CPPUNIT_ASSERT(zh!=0); + // simulate connected state + forceConnected(zh); + + int fd=0; + int interest=0; + timeval tv; + // Round 1. + int rc=zookeeper_interest(zh,&fd,&interest,&tv); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + // simulate waiting for the select() call to timeout; + // advance the system clock accordingly + timeMock.tick(tv); + rc=zookeeper_process(zh,interest); + CPPUNIT_ASSERT_EQUAL((int)ZNOTHING,rc); + // verify no ping sent + CPPUNIT_ASSERT(zkServer.pingCount_==0); + + // Round 2. + // the client should have the idle threshold exceeded, by now + rc=zookeeper_interest(zh,&fd,&interest,&tv); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + // assume the socket is writable, so no idling here; move on to + // zookeeper_process immediately + rc=zookeeper_process(zh,interest); + // ZNOTHING means the client hasn't received a ping response yet + CPPUNIT_ASSERT_EQUAL((int)ZNOTHING,rc); + // verify a ping is sent + CPPUNIT_ASSERT_EQUAL(1,zkServer.pingCount_); + + // Round 3. + // we're going to receive a server PING response and make sure + // that the client has updated its last_recv timestamp + zkServer.addRecvResponse(new PingResponse); + rc=zookeeper_interest(zh,&fd,&interest,&tv); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + // pseudo-sleep for a short while (10 ms) + timeMock.millitick(10); + rc=zookeeper_process(zh,interest); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + // only one ping so far? + CPPUNIT_ASSERT_EQUAL(1,zkServer.pingCount_); + CPPUNIT_ASSERT(timeMock==zh->last_recv); + + // Round 4 + // make sure that a ping is not sent if something is outstanding + AsyncGetOperationCompletion res1; + rc=zoo_aget(zh,"/x/y/1",0,asyncCompletion,&res1); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + rc=zookeeper_interest(zh,&fd,&interest,&tv); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + timeMock.tick(tv); + rc=zookeeper_interest(zh,&fd,&interest,&tv); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + rc=zookeeper_process(zh,interest); + CPPUNIT_ASSERT_EQUAL((int)ZNOTHING,rc); + rc=zookeeper_interest(zh,&fd,&interest,&tv); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + // pseudo-sleep for a short while (10 ms) + timeMock.millitick(10); + rc=zookeeper_process(zh,interest); + CPPUNIT_ASSERT_EQUAL((int)ZNOTHING,rc); + // only one ping so far? + CPPUNIT_ASSERT_EQUAL(1,zkServer.pingCount_); + } + + // ZOOKEEPER-2253: Permit unsolicited pings + void testUnsolicitedPing() + { + const int TIMEOUT=9; // timeout in secs + Mock_gettimeofday timeMock; + PingCountingServer zkServer; + // must call zookeeper_close() while all the mocks are in scope + CloseFinally guard(&zh); + + // receive timeout is in milliseconds + zh=zookeeper_init("localhost:1234",watcher,TIMEOUT*1000,TEST_CLIENT_ID,0,0); + CPPUNIT_ASSERT(zh!=0); + // simulate connected state + forceConnected(zh); + + int fd=0; + int interest=0; + timeval tv; + + int rc=zookeeper_interest(zh,&fd,&interest,&tv); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + + // verify no ping sent + CPPUNIT_ASSERT(zkServer.pingCount_==0); + + // we're going to receive a unsolicited PING response; ensure + // that the client has updated its last_recv timestamp + timeMock.tick(tv); + zkServer.addRecvResponse(new PingResponse); + rc=zookeeper_process(zh,interest); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + CPPUNIT_ASSERT(timeMock==zh->last_recv); + } + + // simulate a watch arriving right before a ping is due + // assert the ping is sent nevertheless + void testTimeoutCausedByWatches1() + { + const int TIMEOUT=9; // timeout in secs + Mock_gettimeofday timeMock; + PingCountingServer zkServer; + // must call zookeeper_close() while all the mocks are in scope + CloseFinally guard(&zh); + + // receive timeout is in milliseconds + zh=zookeeper_init("localhost:1234",watcher,TIMEOUT*1000,TEST_CLIENT_ID,0,0); + CPPUNIT_ASSERT(zh!=0); + // simulate connected state + forceConnected(zh); + + int fd=0; + int interest=0; + timeval tv; + // Round 1. + int rc=zookeeper_interest(zh,&fd,&interest,&tv); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + // simulate waiting for the select() call to timeout; + // advance the system clock accordingly + timeMock.tick(tv); + timeMock.tick(-1); // set the clock to a millisecond before a ping is due + // trigger a watch now + zkServer.addRecvResponse(new ZNodeEvent(ZOO_CHANGED_EVENT,"/x/y/z")); + rc=zookeeper_process(zh,interest); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + // arrival of a watch sets the last_recv to the current time + CPPUNIT_ASSERT(timeMock==zh->last_recv); + // spend 1 millisecond by processing the watch + timeMock.tick(1); + + // Round 2. + // a ping is due; zookeeper_interest() must send it now + rc=zookeeper_interest(zh,&fd,&interest,&tv); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + // no delay here -- as if the socket is immediately writable + rc=zookeeper_process(zh,interest); + CPPUNIT_ASSERT_EQUAL((int)ZNOTHING,rc); + // verify a ping is sent + CPPUNIT_ASSERT_EQUAL(1,zkServer.pingCount_); + } + + // similar to testTimeoutCausedByWatches1, but this time the watch is + // triggered while the client has an outstanding request + // assert the ping is sent on time + void testTimeoutCausedByWatches2() + { + const int TIMEOUT=9; // timeout in secs + Mock_gettimeofday now; + PingCountingServer zkServer; + // must call zookeeper_close() while all the mocks are in scope + CloseFinally guard(&zh); + + // receive timeout is in milliseconds + zh=zookeeper_init("localhost:1234",watcher,TIMEOUT*1000,TEST_CLIENT_ID,0,0); + CPPUNIT_ASSERT(zh!=0); + // simulate connected state + forceConnected(zh); + + // queue up a request; keep it pending (as if the server is busy or has died) + AsyncGetOperationCompletion res1; + zkServer.addOperationResponse(new ZooGetResponse("2",1)); + int rc=zoo_aget(zh,"/x/y/1",0,asyncCompletion,&res1); + + int fd=0; + int interest=0; + timeval tv; + // Round 1. + // send the queued up zoo_aget() request + Mock_gettimeofday beginningOfTimes(now); // remember when we started + rc=zookeeper_interest(zh,&fd,&interest,&tv); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + // no delay -- the socket is writable + rc=zookeeper_process(zh,interest); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + + // Round 2. + // what's next? + rc=zookeeper_interest(zh,&fd,&interest,&tv); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + // no response from the server yet -- waiting in the select() call + now.tick(tv); + // a watch has arrived, thus preventing the connection from timing out + zkServer.addRecvResponse(new ZNodeEvent(ZOO_CHANGED_EVENT,"/x/y/z")); + rc=zookeeper_process(zh,interest); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); // read the watch message + CPPUNIT_ASSERT_EQUAL(0,zkServer.pingCount_); // not yet! + + //Round 3. + // now is the time to send a ping; make sure it's actually sent + rc=zookeeper_interest(zh,&fd,&interest,&tv); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + rc=zookeeper_process(zh,interest); + CPPUNIT_ASSERT_EQUAL((int)ZNOTHING,rc); + // verify a ping is sent + CPPUNIT_ASSERT_EQUAL(1,zkServer.pingCount_); + // make sure only 1/3 of the timeout has passed + CPPUNIT_ASSERT_EQUAL((int32_t)TIMEOUT/3*1000,toMilliseconds(now-beginningOfTimes)); + } + +#else + class TestGetDataJob: public TestJob{ + public: + TestGetDataJob(ZookeeperServer* svr,zhandle_t* zh, int reps=500) + :svr_(svr),zh_(zh),rc_(ZAPIERROR),reps_(reps){} + virtual void run(){ + int i; + for(i=0;iaddOperationResponse(new ZooGetResponse("1",1)); + rc_=zoo_get(zh_,"/x/y/z",0,&buf,&size,0); + if(rc_!=ZOK){ + break; + } + } + } + ZookeeperServer* svr_; + zhandle_t* zh_; + int rc_; + int reps_; + }; + class TestConcurrentOpJob: public TestGetDataJob{ + public: + static const int REPS=500; + TestConcurrentOpJob(ZookeeperServer* svr,zhandle_t* zh): + TestGetDataJob(svr,zh,REPS){} + virtual TestJob* clone() const { + return new TestConcurrentOpJob(svr_,zh_); + } + virtual void validate(const char* file, int line) const{ + CPPUNIT_ASSERT_EQUAL_MESSAGE_LOC("ZOK != rc",(int)ZOK,rc_,file,line); + } + }; + void testConcurrentOperations1() + { + for(int counter=0; counter<50; counter++){ + // frozen time -- no timeouts and no pings + Mock_gettimeofday timeMock; + + ZookeeperServer zkServer; + Mock_poll pollMock(&zkServer,ZookeeperServer::FD); + // must call zookeeper_close() while all the mocks are in the scope! + CloseFinally guard(&zh); + + zh=zookeeper_init("localhost:2121",watcher,10000,TEST_CLIENT_ID,0,0); + CPPUNIT_ASSERT(zh!=0); + // make sure the client has connected + CPPUNIT_ASSERT(ensureCondition(ClientConnected(zh),1000)<1000); + + TestJobManager jmgr(TestConcurrentOpJob(&zkServer,zh),10); + jmgr.startAllJobs(); + jmgr.wait(); + // validate test results + VALIDATE_JOBS(jmgr); + } + } + class ZKGetJob: public TestJob{ + public: + static const int REPS=1000; + ZKGetJob(zhandle_t* zh) + :zh_(zh),rc_(ZAPIERROR){} + virtual TestJob* clone() const { + return new ZKGetJob(zh_); + } + virtual void run(){ + int i; + for(i=0;i +#include "CppAssertHelper.h" + +#include "ZKMocks.h" +#include "CollectionUtil.h" +#include "Util.h" + +class Zookeeper_watchers : public CPPUNIT_NS::TestFixture +{ + CPPUNIT_TEST_SUITE(Zookeeper_watchers); + CPPUNIT_TEST(testDefaultSessionWatcher1); + CPPUNIT_TEST(testDefaultSessionWatcher2); + CPPUNIT_TEST(testObjectSessionWatcher1); + CPPUNIT_TEST(testObjectSessionWatcher2); + CPPUNIT_TEST(testNodeWatcher1); + CPPUNIT_TEST(testChildWatcher1); + CPPUNIT_TEST(testChildWatcher2); + CPPUNIT_TEST_SUITE_END(); + + static void watcher(zhandle_t *, int, int, const char *,void*){} + zhandle_t *zh; + FILE *logfile; + +public: + + Zookeeper_watchers() { + logfile = openlogfile("Zookeeper_watchers"); + } + + ~Zookeeper_watchers() { + if (logfile) { + fflush(logfile); + fclose(logfile); + logfile = 0; + } + } + + void setUp() + { + zoo_set_log_stream(logfile); + + zoo_deterministic_conn_order(0); + zh=0; + } + + void tearDown() + { + zookeeper_close(zh); + } + + class ConnectionWatcher: public WatcherAction{ + public: + ConnectionWatcher():connected_(false),counter_(0){} + virtual void onConnectionEstablished(zhandle_t*){ + synchronized(mx_); + counter_++; + connected_=true; + } + SyncedBoolCondition isConnectionEstablished() const{ + return SyncedBoolCondition(connected_,mx_); + } + bool connected_; + int counter_; + }; + + class DisconnectWatcher: public WatcherAction{ + public: + DisconnectWatcher():disconnected_(false),counter_(0){} + virtual void onConnectionLost(zhandle_t*){ + synchronized(mx_); + counter_++; + disconnected_=true; + } + SyncedBoolCondition isDisconnected() const{ + return SyncedBoolCondition(disconnected_,mx_); + } + bool disconnected_; + int counter_; + }; + + class CountingDataWatcher: public WatcherAction{ + public: + CountingDataWatcher():disconnected_(false),counter_(0){} + virtual void onNodeValueChanged(zhandle_t*,const char* path){ + synchronized(mx_); + counter_++; + } + virtual void onConnectionLost(zhandle_t*){ + synchronized(mx_); + counter_++; + disconnected_=true; + } + bool disconnected_; + int counter_; + }; + + class DeletionCountingDataWatcher: public WatcherAction{ + public: + DeletionCountingDataWatcher():counter_(0){} + virtual void onNodeDeleted(zhandle_t*,const char* path){ + synchronized(mx_); + counter_++; + } + int counter_; + }; + + class ChildEventCountingWatcher: public WatcherAction{ + public: + ChildEventCountingWatcher():counter_(0){} + virtual void onChildChanged(zhandle_t*,const char* path){ + synchronized(mx_); + counter_++; + } + int counter_; + }; + +#ifndef THREADED + + // verify: the default watcher is called once for a session event + void testDefaultSessionWatcher1(){ + Mock_gettimeofday timeMock; + ZookeeperServer zkServer; + // must call zookeeper_close() while all the mocks are in scope + CloseFinally guard(&zh); + + ConnectionWatcher watcher; + zh=zookeeper_init("localhost:2121",activeWatcher,10000,TEST_CLIENT_ID, + &watcher,0); + CPPUNIT_ASSERT(zh!=0); + + int fd=0; + int interest=0; + timeval tv; + // open the socket + int rc=zookeeper_interest(zh,&fd,&interest,&tv); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + CPPUNIT_ASSERT_EQUAL(ZOO_CONNECTING_STATE,zoo_state(zh)); + // send the handshake packet to the server + rc=zookeeper_process(zh,interest); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + CPPUNIT_ASSERT_EQUAL(ZOO_ASSOCIATING_STATE,zoo_state(zh)); + // receive the server handshake response + rc=zookeeper_process(zh,interest); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + // verify connected + CPPUNIT_ASSERT_EQUAL(ZOO_CONNECTED_STATE,zoo_state(zh)); + CPPUNIT_ASSERT(watcher.connected_); + CPPUNIT_ASSERT_EQUAL(1,watcher.counter_); + } + + // test case: connect to server, set a default watcher, disconnect from the server + // verify: the default watcher is called once + void testDefaultSessionWatcher2(){ + Mock_gettimeofday timeMock; + ZookeeperServer zkServer; + // must call zookeeper_close() while all the mocks are in scope + CloseFinally guard(&zh); + + DisconnectWatcher watcher; + zh=zookeeper_init("localhost:2121",activeWatcher,10000,TEST_CLIENT_ID, + &watcher,0); + CPPUNIT_ASSERT(zh!=0); + // simulate connected state + forceConnected(zh); + + // first operation + AsyncCompletion ignored; + zkServer.addOperationResponse(new ZooGetResponse("1",1)); + int rc=zoo_aget(zh,"/x/y/1",0,asyncCompletion,&ignored); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + // this will process the response and activate the watcher + rc=zookeeper_process(zh,ZOOKEEPER_READ); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + + // now, disconnect + zkServer.setConnectionLost(); + rc=zookeeper_process(zh,ZOOKEEPER_READ); + CPPUNIT_ASSERT_EQUAL((int)ZCONNECTIONLOSS,rc); + // verify disconnected + CPPUNIT_ASSERT(watcher.disconnected_); + CPPUNIT_ASSERT_EQUAL(1,watcher.counter_); + } + + // testcase: connect to the server, set a watcher object on a node, + // disconnect from the server + // verify: the watcher object as well as the default watcher are called + void testObjectSessionWatcher1(){ + Mock_gettimeofday timeMock; + ZookeeperServer zkServer; + // must call zookeeper_close() while all the mocks are in scope + CloseFinally guard(&zh); + + DisconnectWatcher defWatcher; + zh=zookeeper_init("localhost:2121",activeWatcher,10000,TEST_CLIENT_ID, + &defWatcher,0); + CPPUNIT_ASSERT(zh!=0); + // simulate connected state + forceConnected(zh); + + AsyncCompletion ignored; + CountingDataWatcher wobject; + zkServer.addOperationResponse(new ZooStatResponse); + int rc=zoo_awexists(zh,"/x/y/1",activeWatcher,&wobject, + asyncCompletion,&ignored); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + // this will process the response and activate the watcher + rc=zookeeper_process(zh,ZOOKEEPER_READ); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + + // now, disconnect + zkServer.setConnectionLost(); + rc=zookeeper_process(zh,ZOOKEEPER_READ); + CPPUNIT_ASSERT_EQUAL((int)ZCONNECTIONLOSS,rc); + + // verify the default watcher has been triggered + CPPUNIT_ASSERT(defWatcher.disconnected_); + // and triggered only once + CPPUNIT_ASSERT_EQUAL(1,defWatcher.counter_); + + // the path-specific watcher has been triggered as well + CPPUNIT_ASSERT(wobject.disconnected_); + // only once! + CPPUNIT_ASSERT_EQUAL(1,wobject.counter_); + } + + // testcase: connect to the server, set a watcher object on a node, + // set a def watcher on another node,disconnect from the server + // verify: the watcher object as well as the default watcher are called + void testObjectSessionWatcher2(){ + Mock_gettimeofday timeMock; + ZookeeperServer zkServer; + // must call zookeeper_close() while all the mocks are in scope + CloseFinally guard(&zh); + + DisconnectWatcher defWatcher; + zh=zookeeper_init("localhost:2121",activeWatcher,10000,TEST_CLIENT_ID, + &defWatcher,0); + CPPUNIT_ASSERT(zh!=0); + // simulate connected state + forceConnected(zh); + + // set the default watcher + AsyncCompletion ignored; + zkServer.addOperationResponse(new ZooStatResponse); + int rc=zoo_aexists(zh,"/a/b/c",1,asyncCompletion,&ignored); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + + CountingDataWatcher wobject; + zkServer.addOperationResponse(new ZooStatResponse); + rc=zoo_awexists(zh,"/x/y/z",activeWatcher,&wobject, + asyncCompletion,&ignored); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + + // this will process the response and activate the watcher + while((rc=zookeeper_process(zh,ZOOKEEPER_READ))==ZOK) { + millisleep(100); + } + CPPUNIT_ASSERT_EQUAL((int)ZNOTHING,rc); + + // disconnect now + zkServer.setConnectionLost(); + rc=zookeeper_process(zh,ZOOKEEPER_READ); + CPPUNIT_ASSERT_EQUAL((int)ZCONNECTIONLOSS,rc); + + // verify the default watcher has been triggered + CPPUNIT_ASSERT(defWatcher.disconnected_); + // and triggered only once + CPPUNIT_ASSERT_EQUAL(1,defWatcher.counter_); + + // the path-specific watcher has been triggered as well + CPPUNIT_ASSERT(wobject.disconnected_); + // only once! + CPPUNIT_ASSERT_EQUAL(1,wobject.counter_); + } + + // testcase: register 2 node watches for different paths, trigger the watches + // verify: the data watchers are processed, the default watcher is not called + void testNodeWatcher1(){ + Mock_gettimeofday timeMock; + ZookeeperServer zkServer; + // must call zookeeper_close() while all the mocks are in scope + CloseFinally guard(&zh); + + DisconnectWatcher defWatcher; + zh=zookeeper_init("localhost:2121",activeWatcher,10000,TEST_CLIENT_ID, + &defWatcher,0); + CPPUNIT_ASSERT(zh!=0); + // simulate connected state + forceConnected(zh); + + AsyncCompletion ignored; + CountingDataWatcher wobject1; + zkServer.addOperationResponse(new ZooStatResponse); + int rc=zoo_awexists(zh,"/a/b/c",activeWatcher,&wobject1, + asyncCompletion,&ignored); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + + CountingDataWatcher wobject2; + zkServer.addOperationResponse(new ZooStatResponse); + rc=zoo_awexists(zh,"/x/y/z",activeWatcher,&wobject2, + asyncCompletion,&ignored); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + + // this will process the response and activate the watcher + while((rc=zookeeper_process(zh,ZOOKEEPER_READ))==ZOK) { + millisleep(100); + } + CPPUNIT_ASSERT_EQUAL((int)ZNOTHING,rc); + + // we are all set now; let's trigger the watches + zkServer.addRecvResponse(new ZNodeEvent(ZOO_CHANGED_EVENT,"/a/b/c")); + zkServer.addRecvResponse(new ZNodeEvent(ZOO_CHANGED_EVENT,"/x/y/z")); + // make sure all watchers have been processed + while((rc=zookeeper_process(zh,ZOOKEEPER_READ))==ZOK) { + millisleep(100); + } + CPPUNIT_ASSERT_EQUAL((int)ZNOTHING,rc); + + CPPUNIT_ASSERT_EQUAL(1,wobject1.counter_); + CPPUNIT_ASSERT_EQUAL(1,wobject2.counter_); + CPPUNIT_ASSERT_EQUAL(0,defWatcher.counter_); + } + + // testcase: set up both a children and a data watchers on the node /a, then + // delete the node by sending a DELETE_EVENT event + // verify: both watchers are triggered + void testChildWatcher1(){ + Mock_gettimeofday timeMock; + ZookeeperServer zkServer; + // must call zookeeper_close() while all the mocks are in scope + CloseFinally guard(&zh); + + DeletionCountingDataWatcher defWatcher; + zh=zookeeper_init("localhost:2121",activeWatcher,10000,TEST_CLIENT_ID, + &defWatcher,0); + CPPUNIT_ASSERT(zh!=0); + // simulate connected state + forceConnected(zh); + + AsyncCompletion ignored; + DeletionCountingDataWatcher wobject1; + zkServer.addOperationResponse(new ZooStatResponse); + int rc=zoo_awexists(zh,"/a",activeWatcher,&wobject1, + asyncCompletion,&ignored); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + + typedef ZooGetChildrenResponse::StringVector ZooVector; + zkServer.addOperationResponse(new ZooGetChildrenResponse( + Util::CollectionBuilder()("/a/1")("/a/2") + )); + DeletionCountingDataWatcher wobject2; + rc=zoo_awget_children(zh,"/a",activeWatcher, + &wobject2,asyncCompletion,&ignored); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + + // this will process the response and activate the watcher + while((rc=zookeeper_process(zh,ZOOKEEPER_READ))==ZOK) { + millisleep(100); + } + CPPUNIT_ASSERT_EQUAL((int)ZNOTHING,rc); + + // we are all set now; let's trigger the watches + zkServer.addRecvResponse(new ZNodeEvent(ZOO_DELETED_EVENT,"/a")); + // make sure the watchers have been processed + while((rc=zookeeper_process(zh,ZOOKEEPER_READ))==ZOK) { + millisleep(100); + } + CPPUNIT_ASSERT_EQUAL((int)ZNOTHING,rc); + + CPPUNIT_ASSERT_EQUAL(1,wobject1.counter_); + CPPUNIT_ASSERT_EQUAL(1,wobject2.counter_); + CPPUNIT_ASSERT_EQUAL(0,defWatcher.counter_); + } + + // testcase: create both a child and data watch on the node /a, send a ZOO_CHILD_EVENT + // verify: only the child watch triggered + void testChildWatcher2(){ + Mock_gettimeofday timeMock; + ZookeeperServer zkServer; + // must call zookeeper_close() while all the mocks are in scope + CloseFinally guard(&zh); + + ChildEventCountingWatcher defWatcher; + zh=zookeeper_init("localhost:2121",activeWatcher,10000,TEST_CLIENT_ID, + &defWatcher,0); + CPPUNIT_ASSERT(zh!=0); + // simulate connected state + forceConnected(zh); + + AsyncCompletion ignored; + ChildEventCountingWatcher wobject1; + zkServer.addOperationResponse(new ZooStatResponse); + int rc=zoo_awexists(zh,"/a",activeWatcher,&wobject1, + asyncCompletion,&ignored); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + + typedef ZooGetChildrenResponse::StringVector ZooVector; + zkServer.addOperationResponse(new ZooGetChildrenResponse( + Util::CollectionBuilder()("/a/1")("/a/2") + )); + ChildEventCountingWatcher wobject2; + rc=zoo_awget_children(zh,"/a",activeWatcher, + &wobject2,asyncCompletion,&ignored); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + + // this will process the response and activate the watcher + while((rc=zookeeper_process(zh,ZOOKEEPER_READ))==ZOK) { + millisleep(100); + } + CPPUNIT_ASSERT_EQUAL((int)ZNOTHING,rc); + + // we are all set now; let's trigger the watches + zkServer.addRecvResponse(new ZNodeEvent(ZOO_CHILD_EVENT,"/a")); + // make sure the watchers have been processed + while((rc=zookeeper_process(zh,ZOOKEEPER_READ))==ZOK) { + millisleep(100); + } + CPPUNIT_ASSERT_EQUAL((int)ZNOTHING,rc); + + CPPUNIT_ASSERT_EQUAL(0,wobject1.counter_); + CPPUNIT_ASSERT_EQUAL(1,wobject2.counter_); + CPPUNIT_ASSERT_EQUAL(0,defWatcher.counter_); + } + +#else + // verify: the default watcher is called once for a session event + void testDefaultSessionWatcher1(){ + Mock_gettimeofday timeMock; + // zookeeper simulator + ZookeeperServer zkServer; + // detects when all watchers have been delivered + WatcherDeliveryTracker deliveryTracker(ZOO_SESSION_EVENT,ZOO_CONNECTED_STATE); + Mock_poll pollMock(&zkServer,ZookeeperServer::FD); + // must call zookeeper_close() while all the mocks are in the scope! + CloseFinally guard(&zh); + + ConnectionWatcher watcher; + zh=zookeeper_init("localhost:2121",activeWatcher,10000,TEST_CLIENT_ID, + &watcher,0); + CPPUNIT_ASSERT(zh!=0); + // wait till watcher proccessing has completed (the connection + // established event) + CPPUNIT_ASSERT(ensureCondition( + deliveryTracker.isWatcherProcessingCompleted(),1000)<1000); + + // verify the watcher has been triggered + CPPUNIT_ASSERT(ensureCondition(watcher.isConnectionEstablished(),1000)<1000); + // triggered only once + CPPUNIT_ASSERT_EQUAL(1,watcher.counter_); + } + + // test case: connect to server, set a default watcher, disconnect from the server + // verify: the default watcher is called once + void testDefaultSessionWatcher2(){ + Mock_gettimeofday timeMock; + // zookeeper simulator + ZookeeperServer zkServer; + Mock_poll pollMock(&zkServer,ZookeeperServer::FD); + // must call zookeeper_close() while all the mocks are in the scope! + CloseFinally guard(&zh); + + // detects when all watchers have been delivered + WatcherDeliveryTracker deliveryTracker(ZOO_SESSION_EVENT,ZOO_CONNECTING_STATE); + DisconnectWatcher watcher; + zh=zookeeper_init("localhost:2121",activeWatcher,10000,TEST_CLIENT_ID, + &watcher,0); + CPPUNIT_ASSERT(zh!=0); + // make sure the client has connected + CPPUNIT_ASSERT(ensureCondition(ClientConnected(zh),1000)<1000); + // set a default watch + AsyncCompletion ignored; + // a successful server response will activate the watcher + zkServer.addOperationResponse(new ZooStatResponse); + int rc=zoo_aexists(zh,"/x/y/z",1,asyncCompletion,&ignored); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + + // now, initiate a disconnect + zkServer.setConnectionLost(); + CPPUNIT_ASSERT(ensureCondition( + deliveryTracker.isWatcherProcessingCompleted(),1000)<1000); + + // verify the watcher has been triggered + CPPUNIT_ASSERT(watcher.disconnected_); + // triggered only once + CPPUNIT_ASSERT_EQUAL(1,watcher.counter_); + } + + // testcase: connect to the server, set a watcher object on a node, + // disconnect from the server + // verify: the watcher object as well as the default watcher are called + void testObjectSessionWatcher1(){ + Mock_gettimeofday timeMock; + // zookeeper simulator + ZookeeperServer zkServer; + Mock_poll pollMock(&zkServer,ZookeeperServer::FD); + // must call zookeeper_close() while all the mocks are in the scope! + CloseFinally guard(&zh); + + // detects when all watchers have been delivered + WatcherDeliveryTracker deliveryTracker(ZOO_SESSION_EVENT,ZOO_CONNECTING_STATE); + DisconnectWatcher defWatcher; + // use the tracker to find out when the watcher has been activated + WatcherActivationTracker activationTracker; + zh=zookeeper_init("localhost:2121",activeWatcher,10000,TEST_CLIENT_ID, + &defWatcher,0); + CPPUNIT_ASSERT(zh!=0); + // make sure the client has connected + CPPUNIT_ASSERT(ensureCondition(ClientConnected(zh),1000)<1000); + + AsyncCompletion ignored; + // this successful server response will activate the watcher + zkServer.addOperationResponse(new ZooStatResponse); + CountingDataWatcher wobject; + activationTracker.track(&wobject); + // set a path-specific watcher + int rc=zoo_awexists(zh,"/x/y/z",activeWatcher,&wobject, + asyncCompletion,&ignored); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + // make sure the watcher gets activated before we continue + CPPUNIT_ASSERT(ensureCondition(activationTracker.isWatcherActivated(),1000)<1000); + + // now, initiate a disconnect + zkServer.setConnectionLost(); + // make sure all watchers have been processed + CPPUNIT_ASSERT(ensureCondition( + deliveryTracker.isWatcherProcessingCompleted(),1000)<1000); + + // verify the default watcher has been triggered + CPPUNIT_ASSERT(defWatcher.disconnected_); + // and triggered only once + CPPUNIT_ASSERT_EQUAL(1,defWatcher.counter_); + + // the path-specific watcher has been triggered as well + CPPUNIT_ASSERT(wobject.disconnected_); + // only once! + CPPUNIT_ASSERT_EQUAL(1,wobject.counter_); + } + + // testcase: connect to the server, set a watcher object on a node, + // set a def watcher on another node,disconnect from the server + // verify: the watcher object as well as the default watcher are called + void testObjectSessionWatcher2(){ + Mock_gettimeofday timeMock; + // zookeeper simulator + ZookeeperServer zkServer; + Mock_poll pollMock(&zkServer,ZookeeperServer::FD); + // must call zookeeper_close() while all the mocks are in the scope! + CloseFinally guard(&zh); + + // detects when all watchers have been delivered + WatcherDeliveryTracker deliveryTracker(ZOO_SESSION_EVENT,ZOO_CONNECTING_STATE); + DisconnectWatcher defWatcher; + // use the tracker to find out when the watcher has been activated + WatcherActivationTracker activationTracker; + zh=zookeeper_init("localhost:2121",activeWatcher,10000,TEST_CLIENT_ID, + &defWatcher,0); + CPPUNIT_ASSERT(zh!=0); + // make sure the client has connected + CPPUNIT_ASSERT(ensureCondition(ClientConnected(zh),1000)<1000); + + // set a default watch + AsyncCompletion ignored; + // a successful server response will activate the watcher + zkServer.addOperationResponse(new ZooStatResponse); + activationTracker.track(&defWatcher); + int rc=zoo_aexists(zh,"/a/b/c",1,asyncCompletion,&ignored); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + // make sure the watcher gets activated before we continue + CPPUNIT_ASSERT(ensureCondition(activationTracker.isWatcherActivated(),1000)<1000); + + // this successful server response will activate the watcher + zkServer.addOperationResponse(new ZooStatResponse); + CountingDataWatcher wobject; + activationTracker.track(&wobject); + // set a path-specific watcher + rc=zoo_awexists(zh,"/x/y/z",activeWatcher,&wobject, + asyncCompletion,&ignored); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + // make sure the watcher gets activated before we continue + CPPUNIT_ASSERT(ensureCondition(activationTracker.isWatcherActivated(),1000)<1000); + + // now, initiate a disconnect + zkServer.setConnectionLost(); + // make sure all watchers have been processed + CPPUNIT_ASSERT(ensureCondition( + deliveryTracker.isWatcherProcessingCompleted(),1000)<1000); + + // verify the default watcher has been triggered + CPPUNIT_ASSERT(defWatcher.disconnected_); + // and triggered only once + CPPUNIT_ASSERT_EQUAL(1,defWatcher.counter_); + + // the path-specific watcher has been triggered as well + CPPUNIT_ASSERT(wobject.disconnected_); + // only once! + CPPUNIT_ASSERT_EQUAL(1,wobject.counter_); + } + + // testcase: register 2 node watches for different paths, trigger the watches + // verify: the data watchers are processed, the default watcher is not called + void testNodeWatcher1(){ + Mock_gettimeofday timeMock; + // zookeeper simulator + ZookeeperServer zkServer; + Mock_poll pollMock(&zkServer,ZookeeperServer::FD); + // must call zookeeper_close() while all the mocks are in the scope! + CloseFinally guard(&zh); + + // detects when all watchers have been delivered + WatcherDeliveryTracker deliveryTracker(ZOO_CHANGED_EVENT,0,false); + CountingDataWatcher defWatcher; + // use the tracker to find out when the watcher has been activated + WatcherActivationTracker activationTracker; + zh=zookeeper_init("localhost:2121",activeWatcher,10000,TEST_CLIENT_ID, + &defWatcher,0); + CPPUNIT_ASSERT(zh!=0); + // make sure the client has connected + CPPUNIT_ASSERT(ensureCondition(ClientConnected(zh),1000)<1000); + + // don't care about completions + AsyncCompletion ignored; + // set a one-shot watch + // a successful server response will activate the watcher + zkServer.addOperationResponse(new ZooStatResponse); + CountingDataWatcher wobject1; + activationTracker.track(&wobject1); + int rc=zoo_awexists(zh,"/a/b/c",activeWatcher,&wobject1, + asyncCompletion,&ignored); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + // make sure the watcher gets activated before we continue + CPPUNIT_ASSERT(ensureCondition(activationTracker.isWatcherActivated(),1000)<1000); + + // this successful server response will activate the watcher + zkServer.addOperationResponse(new ZooStatResponse); + CountingDataWatcher wobject2; + activationTracker.track(&wobject2); + // set a path-specific watcher + rc=zoo_awexists(zh,"/x/y/z",activeWatcher,&wobject2, + asyncCompletion,&ignored); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + // make sure the watcher gets activated before we continue + CPPUNIT_ASSERT(ensureCondition(activationTracker.isWatcherActivated(),1000)<1000); + + // we are all set now; let's trigger the watches + zkServer.addRecvResponse(new ZNodeEvent(ZOO_CHANGED_EVENT,"/a/b/c")); + zkServer.addRecvResponse(new ZNodeEvent(ZOO_CHANGED_EVENT,"/x/y/z")); + // make sure all watchers have been processed + CPPUNIT_ASSERT(ensureCondition( + deliveryTracker.deliveryCounterEquals(2),1000)<1000); + + CPPUNIT_ASSERT_EQUAL(1,wobject1.counter_); + CPPUNIT_ASSERT_EQUAL(1,wobject2.counter_); + CPPUNIT_ASSERT_EQUAL(0,defWatcher.counter_); + } + + // testcase: set up both a children and a data watchers on the node /a, then + // delete the node (that is, send a DELETE_EVENT) + // verify: both watchers are triggered + void testChildWatcher1(){ + Mock_gettimeofday timeMock; + // zookeeper simulator + ZookeeperServer zkServer; + Mock_poll pollMock(&zkServer,ZookeeperServer::FD); + // must call zookeeper_close() while all the mocks are in the scope! + CloseFinally guard(&zh); + + // detects when all watchers have been delivered + WatcherDeliveryTracker deliveryTracker(ZOO_DELETED_EVENT,0); + DeletionCountingDataWatcher defWatcher; + zh=zookeeper_init("localhost:2121",activeWatcher,10000,TEST_CLIENT_ID, + &defWatcher,0); + CPPUNIT_ASSERT(zh!=0); + // make sure the client has connected + CPPUNIT_ASSERT(ensureCondition(ClientConnected(zh),1000)<1000); + + // a successful server response will activate the watcher + zkServer.addOperationResponse(new ZooStatResponse); + DeletionCountingDataWatcher wobject1; + Stat stat; + // add a node watch + int rc=zoo_wexists(zh,"/a",activeWatcher,&wobject1,&stat); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + + typedef ZooGetChildrenResponse::StringVector ZooVector; + zkServer.addOperationResponse(new ZooGetChildrenResponse( + Util::CollectionBuilder()("/a/1")("/a/2") + )); + DeletionCountingDataWatcher wobject2; + String_vector children; + rc=zoo_wget_children(zh,"/a",activeWatcher,&wobject2,&children); + deallocate_String_vector(&children); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + + // we are all set now; let's trigger the watches + zkServer.addRecvResponse(new ZNodeEvent(ZOO_DELETED_EVENT,"/a")); + // make sure the watchers have been processed + CPPUNIT_ASSERT(ensureCondition( + deliveryTracker.isWatcherProcessingCompleted(),1000)<1000); + + CPPUNIT_ASSERT_EQUAL(1,wobject1.counter_); + CPPUNIT_ASSERT_EQUAL(1,wobject2.counter_); + CPPUNIT_ASSERT_EQUAL(0,defWatcher.counter_); + } + + // testcase: create both a child and data watch on the node /a, send a ZOO_CHILD_EVENT + // verify: only the child watch triggered + void testChildWatcher2(){ + Mock_gettimeofday timeMock; + // zookeeper simulator + ZookeeperServer zkServer; + Mock_poll pollMock(&zkServer,ZookeeperServer::FD); + // must call zookeeper_close() while all the mocks are in the scope! + CloseFinally guard(&zh); + + // detects when all watchers have been delivered + WatcherDeliveryTracker deliveryTracker(ZOO_CHILD_EVENT,0); + ChildEventCountingWatcher defWatcher; + zh=zookeeper_init("localhost:2121",activeWatcher,10000,TEST_CLIENT_ID, + &defWatcher,0); + CPPUNIT_ASSERT(zh!=0); + // make sure the client has connected + CPPUNIT_ASSERT(ensureCondition(ClientConnected(zh),1000)<1000); + // a successful server response will activate the watcher + zkServer.addOperationResponse(new ZooStatResponse); + ChildEventCountingWatcher wobject1; + Stat stat; + // add a node watch + int rc=zoo_wexists(zh,"/a",activeWatcher,&wobject1,&stat); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + + typedef ZooGetChildrenResponse::StringVector ZooVector; + zkServer.addOperationResponse(new ZooGetChildrenResponse( + Util::CollectionBuilder()("/a/1")("/a/2") + )); + ChildEventCountingWatcher wobject2; + String_vector children; + rc=zoo_wget_children(zh,"/a",activeWatcher,&wobject2,&children); + deallocate_String_vector(&children); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + + // we are all set now; let's trigger the watches + zkServer.addRecvResponse(new ZNodeEvent(ZOO_CHILD_EVENT,"/a")); + // make sure the watchers have been processed + CPPUNIT_ASSERT(ensureCondition( + deliveryTracker.isWatcherProcessingCompleted(),1000)<1000); + + CPPUNIT_ASSERT_EQUAL(0,wobject1.counter_); + CPPUNIT_ASSERT_EQUAL(1,wobject2.counter_); + CPPUNIT_ASSERT_EQUAL(0,defWatcher.counter_); + } + +#endif //THREADED +}; + +CPPUNIT_TEST_SUITE_REGISTRATION(Zookeeper_watchers); diff --git a/src/c/tests/TestZookeeperClose.cc b/src/c/tests/TestZookeeperClose.cc new file mode 100644 index 0000000..edefa66 --- /dev/null +++ b/src/c/tests/TestZookeeperClose.cc @@ -0,0 +1,472 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +#include "ZKMocks.h" + +#ifdef THREADED +#include "PthreadMocks.h" +#endif + +using namespace std; + +class Zookeeper_close : public CPPUNIT_NS::TestFixture +{ + CPPUNIT_TEST_SUITE(Zookeeper_close); +#ifdef THREADED + CPPUNIT_TEST(testIOThreadStoppedOnExpire); +#endif + CPPUNIT_TEST(testCloseUnconnected); + CPPUNIT_TEST(testCloseUnconnected1); + CPPUNIT_TEST(testCloseConnected1); + CPPUNIT_TEST(testCloseFromWatcher1); + CPPUNIT_TEST_SUITE_END(); + zhandle_t *zh; + static void watcher(zhandle_t *, int, int, const char *,void*){} + FILE *logfile; +public: + + Zookeeper_close() { + logfile = openlogfile("Zookeeper_close"); + } + + ~Zookeeper_close() { + if (logfile) { + fflush(logfile); + fclose(logfile); + logfile = 0; + } + } + + void setUp() + { + zoo_set_log_stream(logfile); + + zoo_deterministic_conn_order(0); + zh=0; + } + + void tearDown() + { + zookeeper_close(zh); + } + + class CloseOnSessionExpired: public WatcherAction{ + public: + CloseOnSessionExpired(bool callClose=true): + callClose_(callClose),rc(ZOK){} + virtual void onSessionExpired(zhandle_t* zh){ + memcpy(&lzh,zh,sizeof(lzh)); + if(callClose_) + rc=zookeeper_close(zh); + } + zhandle_t lzh; + bool callClose_; + int rc; + }; + +#ifndef THREADED + void testCloseUnconnected() + { + zh=zookeeper_init("localhost:2121",watcher,10000,0,0,0); + CPPUNIT_ASSERT(zh!=0); + + // do not actually free the memory while in zookeeper_close() + Mock_free_noop freeMock; + // make a copy of zhandle before close() overwrites some of + // it members with NULLs + zhandle_t lzh; + memcpy(&lzh,zh,sizeof(lzh)); + int rc=zookeeper_close(zh); + zhandle_t* savezh=zh; zh=0; + freeMock.disable(); // disable mock's fake free()- use libc's free() instead + + // verify that zookeeper_close has done its job + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + // memory + CPPUNIT_ASSERT_EQUAL(1,freeMock.getFreeCount(savezh)); + CPPUNIT_ASSERT_EQUAL(1,freeMock.getFreeCount(lzh.hostname)); + CPPUNIT_ASSERT_EQUAL(1,freeMock.getFreeCount(lzh.addrs)); + // This cannot be maintained properly CPPUNIT_ASSERT_EQUAL(9,freeMock.callCounter); + } + void testCloseUnconnected1() + { + zh=zookeeper_init("localhost:2121",watcher,10000,0,0,0); + CPPUNIT_ASSERT(zh!=0); + // simulate connected state + zh->fd=ZookeeperServer::FD; + zh->state=ZOO_CONNECTED_STATE; + Mock_flush_send_queue zkMock; + // do not actually free the memory while in zookeeper_close() + Mock_free_noop freeMock; + // make a copy of zhandle before close() overwrites some of + // it members with NULLs + zhandle_t lzh; + memcpy(&lzh,zh,sizeof(lzh)); + int rc=zookeeper_close(zh); + zhandle_t* savezh=zh; zh=0; + freeMock.disable(); // disable mock's fake free()- use libc's free() instead + + // verify that zookeeper_close has done its job + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + // memory + CPPUNIT_ASSERT_EQUAL(1,freeMock.getFreeCount(savezh)); + CPPUNIT_ASSERT_EQUAL(1,freeMock.getFreeCount(lzh.hostname)); + CPPUNIT_ASSERT_EQUAL(1,freeMock.getFreeCount(lzh.addrs)); + // the close request sent? + CPPUNIT_ASSERT_EQUAL(1,zkMock.counter); + } + void testCloseConnected1() + { + ZookeeperServer zkServer; + // poll() will called from zookeeper_close() + Mock_poll pollMock(&zkServer,ZookeeperServer::FD); + + zh=zookeeper_init("localhost:2121",watcher,10000,TEST_CLIENT_ID,0,0); + CPPUNIT_ASSERT(zh!=0); + + Mock_gettimeofday timeMock; + + int fd=0; + int interest=0; + timeval tv; + int rc=zookeeper_interest(zh,&fd,&interest,&tv); + + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + CPPUNIT_ASSERT_EQUAL(ZOO_CONNECTING_STATE,zoo_state(zh)); + CPPUNIT_ASSERT_EQUAL(ZOOKEEPER_READ|ZOOKEEPER_WRITE,interest); + + rc=zookeeper_process(zh,interest); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + CPPUNIT_ASSERT_EQUAL(ZOO_ASSOCIATING_STATE,zoo_state(zh)); + + rc=zookeeper_interest(zh,&fd,&interest,&tv); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + rc=zookeeper_process(zh,interest); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + CPPUNIT_ASSERT_EQUAL(ZOO_CONNECTED_STATE,zoo_state(zh)); + // do not actually free the memory while in zookeeper_close() + Mock_free_noop freeMock; + // make a copy of zhandle before close() overwrites some of + // it members with NULLs + zhandle_t lzh; + memcpy(&lzh,zh,sizeof(lzh)); + zookeeper_close(zh); + zhandle_t* savezh=zh; zh=0; + freeMock.disable(); // disable mock's fake free()- use libc's free() instead + // memory + CPPUNIT_ASSERT_EQUAL(1,freeMock.getFreeCount(savezh)); + CPPUNIT_ASSERT_EQUAL(1,freeMock.getFreeCount(lzh.hostname)); + CPPUNIT_ASSERT_EQUAL(1,freeMock.getFreeCount(lzh.addrs)); + // the close request sent? + CPPUNIT_ASSERT_EQUAL(1,(int)zkServer.closeSent); + } + void testCloseFromWatcher1() + { + Mock_gettimeofday timeMock; + + ZookeeperServer zkServer; + // make the server return a non-matching session id + zkServer.returnSessionExpired(); + // poll() will called from zookeeper_close() + Mock_poll pollMock(&zkServer,ZookeeperServer::FD); + + CloseOnSessionExpired closeAction; + zh=zookeeper_init("localhost:2121",activeWatcher,10000, + TEST_CLIENT_ID,&closeAction,0); + CPPUNIT_ASSERT(zh!=0); + + int fd=0; + int interest=0; + timeval tv; + // initiate connection + int rc=zookeeper_interest(zh,&fd,&interest,&tv); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + CPPUNIT_ASSERT_EQUAL(ZOO_CONNECTING_STATE,zoo_state(zh)); + CPPUNIT_ASSERT_EQUAL(ZOOKEEPER_READ|ZOOKEEPER_WRITE,interest); + rc=zookeeper_process(zh,interest); + // make sure the handshake in progress + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + CPPUNIT_ASSERT_EQUAL(ZOO_ASSOCIATING_STATE,zoo_state(zh)); + rc=zookeeper_interest(zh,&fd,&interest,&tv); + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + + // do not actually free the memory while in zookeeper_close() + Mock_free_noop freeMock; + // should call the watcher with ZOO_EXPIRED_SESSION_STATE state + rc=zookeeper_process(zh,interest); + zhandle_t* savezh=zh; zh=0; + freeMock.disable(); // disable mock's fake free()- use libc's free() instead + + CPPUNIT_ASSERT_EQUAL(ZOO_EXPIRED_SESSION_STATE,zoo_state(savezh)); + // memory + CPPUNIT_ASSERT_EQUAL(1,freeMock.getFreeCount(savezh)); + CPPUNIT_ASSERT_EQUAL(1,freeMock.getFreeCount(closeAction.lzh.hostname)); + CPPUNIT_ASSERT_EQUAL(1,freeMock.getFreeCount(closeAction.lzh.addrs)); + // make sure the close request NOT sent + CPPUNIT_ASSERT_EQUAL(0,(int)zkServer.closeSent); + } +#else + void testCloseUnconnected() + { + // disable threading + MockPthreadZKNull pthreadMock; + zh=zookeeper_init("localhost:2121",watcher,10000,0,0,0); + + CPPUNIT_ASSERT(zh!=0); + adaptor_threads* adaptor=(adaptor_threads*)zh->adaptor_priv; + CPPUNIT_ASSERT(adaptor!=0); + + // do not actually free the memory while in zookeeper_close() + Mock_free_noop freeMock; + // make a copy of zhandle before close() overwrites some of + // it members with NULLs + zhandle_t lzh; + memcpy(&lzh,zh,sizeof(lzh)); + int rc=zookeeper_close(zh); + zhandle_t* savezh=zh; zh=0; + // we're done, disable mock's fake free(), use libc's free() instead + freeMock.disable(); + + // verify that zookeeper_close has done its job + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + // memory + CPPUNIT_ASSERT_EQUAL(1,freeMock.getFreeCount(savezh)); + CPPUNIT_ASSERT_EQUAL(1,freeMock.getFreeCount(lzh.hostname)); + CPPUNIT_ASSERT_EQUAL(1,freeMock.getFreeCount(lzh.addrs)); + CPPUNIT_ASSERT_EQUAL(1,freeMock.getFreeCount(adaptor)); + // Cannot be maintained accurately: CPPUNIT_ASSERT_EQUAL(10,freeMock.callCounter); + // threads + CPPUNIT_ASSERT_EQUAL(1,MockPthreadsNull::getDestroyCounter(adaptor->io)); + CPPUNIT_ASSERT_EQUAL(1,MockPthreadsNull::getDestroyCounter(adaptor->completion)); + // mutexes + CPPUNIT_ASSERT_EQUAL(1,MockPthreadsNull::getDestroyCounter(&savezh->to_process.lock)); + CPPUNIT_ASSERT_EQUAL(0,MockPthreadsNull::getInvalidAccessCounter(&savezh->to_process.lock)); + CPPUNIT_ASSERT_EQUAL(1,MockPthreadsNull::getDestroyCounter(&savezh->to_send.lock)); + CPPUNIT_ASSERT_EQUAL(0,MockPthreadsNull::getInvalidAccessCounter(&savezh->to_send.lock)); + CPPUNIT_ASSERT_EQUAL(1,MockPthreadsNull::getDestroyCounter(&savezh->sent_requests.lock)); + CPPUNIT_ASSERT_EQUAL(0,MockPthreadsNull::getInvalidAccessCounter(&savezh->sent_requests.lock)); + CPPUNIT_ASSERT_EQUAL(1,MockPthreadsNull::getDestroyCounter(&savezh->completions_to_process.lock)); + CPPUNIT_ASSERT_EQUAL(0,MockPthreadsNull::getInvalidAccessCounter(&savezh->completions_to_process.lock)); + // conditionals + CPPUNIT_ASSERT_EQUAL(1,MockPthreadsNull::getDestroyCounter(&savezh->sent_requests.cond)); + CPPUNIT_ASSERT_EQUAL(0,MockPthreadsNull::getInvalidAccessCounter(&savezh->sent_requests.cond)); + CPPUNIT_ASSERT_EQUAL(1,MockPthreadsNull::getDestroyCounter(&savezh->completions_to_process.cond)); + CPPUNIT_ASSERT_EQUAL(0,MockPthreadsNull::getInvalidAccessCounter(&savezh->completions_to_process.cond)); + } + void testCloseUnconnected1() + { + for(int i=0; i<100;i++){ + zh=zookeeper_init("localhost:2121",watcher,10000,0,0,0); + CPPUNIT_ASSERT(zh!=0); + adaptor_threads* adaptor=(adaptor_threads*)zh->adaptor_priv; + CPPUNIT_ASSERT(adaptor!=0); + int rc=zookeeper_close(zh); + zh=0; + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + } + } + void testCloseConnected1() + { + // frozen time -- no timeouts and no pings + Mock_gettimeofday timeMock; + + for(int i=0;i<100;i++){ + ZookeeperServer zkServer; + Mock_poll pollMock(&zkServer,ZookeeperServer::FD); + // use a checked version of pthread calls + CheckedPthread threadMock; + // do not actually free the memory while in zookeeper_close() + Mock_free_noop freeMock; + + zh=zookeeper_init("localhost:2121",watcher,10000,TEST_CLIENT_ID,0,0); + CPPUNIT_ASSERT(zh!=0); + // make sure the client has connected + CPPUNIT_ASSERT(ensureCondition(ClientConnected(zh),1000)<1000); + // make a copy of zhandle before close() overwrites some of + // its members with NULLs + zhandle_t lzh; + memcpy(&lzh,zh,sizeof(lzh)); + int rc=zookeeper_close(zh); + zhandle_t* savezh=zh; zh=0; + // we're done, disable mock's fake free(), use libc's free() instead + freeMock.disable(); + + CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); + adaptor_threads* adaptor=(adaptor_threads*)lzh.adaptor_priv; + // memory + CPPUNIT_ASSERT_EQUAL(1,freeMock.getFreeCount(savezh)); + CPPUNIT_ASSERT_EQUAL(1,freeMock.getFreeCount(lzh.hostname)); + CPPUNIT_ASSERT_EQUAL(1,freeMock.getFreeCount(lzh.addrs)); + CPPUNIT_ASSERT_EQUAL(1,freeMock.getFreeCount(adaptor)); + // threads + CPPUNIT_ASSERT_EQUAL(1,CheckedPthread::getDestroyCounter(adaptor->io)); + CPPUNIT_ASSERT_EQUAL(1,CheckedPthread::getDestroyCounter(adaptor->completion)); + // mutexes + CPPUNIT_ASSERT_EQUAL(1,CheckedPthread::getDestroyCounter(&savezh->to_process.lock)); + CPPUNIT_ASSERT_EQUAL(0,CheckedPthread::getInvalidAccessCounter(&savezh->to_process.lock)); + CPPUNIT_ASSERT_EQUAL(1,CheckedPthread::getDestroyCounter(&savezh->to_send.lock)); + CPPUNIT_ASSERT_EQUAL(0,CheckedPthread::getInvalidAccessCounter(&savezh->to_send.lock)); + CPPUNIT_ASSERT_EQUAL(1,CheckedPthread::getDestroyCounter(&savezh->sent_requests.lock)); + CPPUNIT_ASSERT_EQUAL(0,CheckedPthread::getInvalidAccessCounter(&savezh->sent_requests.lock)); + CPPUNIT_ASSERT_EQUAL(1,CheckedPthread::getDestroyCounter(&savezh->completions_to_process.lock)); + CPPUNIT_ASSERT_EQUAL(0,CheckedPthread::getInvalidAccessCounter(&savezh->completions_to_process.lock)); + // conditionals + CPPUNIT_ASSERT_EQUAL(1,CheckedPthread::getDestroyCounter(&savezh->sent_requests.cond)); + CPPUNIT_ASSERT_EQUAL(0,CheckedPthread::getInvalidAccessCounter(&savezh->sent_requests.cond)); + CPPUNIT_ASSERT_EQUAL(1,CheckedPthread::getDestroyCounter(&savezh->completions_to_process.cond)); + CPPUNIT_ASSERT_EQUAL(0,CheckedPthread::getInvalidAccessCounter(&savezh->completions_to_process.cond)); + } + } + + struct PointerFreed{ + PointerFreed(Mock_free_noop& freeMock,void* ptr): + freeMock_(freeMock),ptr_(ptr){} + bool operator()() const{return freeMock_.isFreed(ptr_); } + Mock_free_noop& freeMock_; + void* ptr_; + }; + // test if zookeeper_close may be called from a watcher callback on + // SESSION_EXPIRED event + void testCloseFromWatcher1() + { + // frozen time -- no timeouts and no pings + Mock_gettimeofday timeMock; + + for(int i=0;i<100;i++){ + ZookeeperServer zkServer; + // make the server return a non-matching session id + zkServer.returnSessionExpired(); + + Mock_poll pollMock(&zkServer,ZookeeperServer::FD); + // use a checked version of pthread calls + CheckedPthread threadMock; + // do not actually free the memory while in zookeeper_close() + Mock_free_noop freeMock; + + CloseOnSessionExpired closeAction; + zh=zookeeper_init("localhost:2121",activeWatcher,10000, + TEST_CLIENT_ID,&closeAction,0); + + CPPUNIT_ASSERT(zh!=0); + // we rely on the fact that zh is freed the last right before + // zookeeper_close() returns... + CPPUNIT_ASSERT(ensureCondition(PointerFreed(freeMock,zh),1000)<1000); + zhandle_t* lzh=zh; + zh=0; + // we're done, disable mock's fake free(), use libc's free() instead + freeMock.disable(); + + CPPUNIT_ASSERT_EQUAL((int)ZOK,closeAction.rc); + adaptor_threads* adaptor=(adaptor_threads*)closeAction.lzh.adaptor_priv; + // memory + CPPUNIT_ASSERT_EQUAL(1,freeMock.getFreeCount(lzh)); + CPPUNIT_ASSERT_EQUAL(1,freeMock.getFreeCount(closeAction.lzh.hostname)); + CPPUNIT_ASSERT_EQUAL(1,freeMock.getFreeCount(closeAction.lzh.addrs)); + CPPUNIT_ASSERT_EQUAL(1,freeMock.getFreeCount(adaptor)); + // threads + CPPUNIT_ASSERT_EQUAL(1,CheckedPthread::getDestroyCounter(adaptor->io)); + CPPUNIT_ASSERT_EQUAL(1,CheckedPthread::getDestroyCounter(adaptor->completion)); + // mutexes + CPPUNIT_ASSERT_EQUAL(1,CheckedPthread::getDestroyCounter(&lzh->to_process.lock)); + CPPUNIT_ASSERT_EQUAL(0,CheckedPthread::getInvalidAccessCounter(&lzh->to_process.lock)); + CPPUNIT_ASSERT_EQUAL(1,CheckedPthread::getDestroyCounter(&lzh->to_send.lock)); + CPPUNIT_ASSERT_EQUAL(0,CheckedPthread::getInvalidAccessCounter(&lzh->to_send.lock)); + CPPUNIT_ASSERT_EQUAL(1,CheckedPthread::getDestroyCounter(&lzh->sent_requests.lock)); + CPPUNIT_ASSERT_EQUAL(0,CheckedPthread::getInvalidAccessCounter(&lzh->sent_requests.lock)); + CPPUNIT_ASSERT_EQUAL(1,CheckedPthread::getDestroyCounter(&lzh->completions_to_process.lock)); + CPPUNIT_ASSERT_EQUAL(0,CheckedPthread::getInvalidAccessCounter(&lzh->completions_to_process.lock)); + // conditionals + CPPUNIT_ASSERT_EQUAL(1,CheckedPthread::getDestroyCounter(&lzh->sent_requests.cond)); + CPPUNIT_ASSERT_EQUAL(0,CheckedPthread::getInvalidAccessCounter(&lzh->sent_requests.cond)); + CPPUNIT_ASSERT_EQUAL(1,CheckedPthread::getDestroyCounter(&lzh->completions_to_process.cond)); + CPPUNIT_ASSERT_EQUAL(0,CheckedPthread::getInvalidAccessCounter(&lzh->completions_to_process.cond)); + } + } + + void testIOThreadStoppedOnExpire() + { + // frozen time -- no timeouts and no pings + Mock_gettimeofday timeMock; + + for(int i=0;i<100;i++){ + ZookeeperServer zkServer; + // make the server return a non-matching session id + zkServer.returnSessionExpired(); + + Mock_poll pollMock(&zkServer,ZookeeperServer::FD); + // use a checked version of pthread calls + CheckedPthread threadMock; + // do not call zookeeper_close() from the watcher + CloseOnSessionExpired closeAction(false); + zh=zookeeper_init("localhost:2121",activeWatcher,10000, + &testClientId,&closeAction,0); + + // this is to ensure that if any assert fires, zookeeper_close() + // will still be called while all the mocks are in the scope! + CloseFinally guard(&zh); + + CPPUNIT_ASSERT(zh!=0); + CPPUNIT_ASSERT(ensureCondition(SessionExpired(zh),1000)<1000); + CPPUNIT_ASSERT(ensureCondition(IOThreadStopped(zh),1000)<1000); + // make sure the watcher has been processed + CPPUNIT_ASSERT(ensureCondition(closeAction.isWatcherTriggered(),1000)<1000); + // make sure the threads have not been destroyed yet + adaptor_threads* adaptor=(adaptor_threads*)zh->adaptor_priv; + CPPUNIT_ASSERT_EQUAL(0,CheckedPthread::getDestroyCounter(adaptor->io)); + CPPUNIT_ASSERT_EQUAL(0,CheckedPthread::getDestroyCounter(adaptor->completion)); + // about to call zookeeper_close() -- no longer need the guard + guard.disarm(); + + // do not actually free the memory while in zookeeper_close() + Mock_free_noop freeMock; + zookeeper_close(zh); + zhandle_t* lzh=zh; zh=0; + // we're done, disable mock's fake free(), use libc's free() instead + freeMock.disable(); + + // memory + CPPUNIT_ASSERT_EQUAL(1,freeMock.getFreeCount(lzh)); + CPPUNIT_ASSERT_EQUAL(1,freeMock.getFreeCount(closeAction.lzh.hostname)); + CPPUNIT_ASSERT_EQUAL(1,freeMock.getFreeCount(closeAction.lzh.addrs)); + CPPUNIT_ASSERT_EQUAL(1,freeMock.getFreeCount(adaptor)); + // threads + CPPUNIT_ASSERT_EQUAL(1,CheckedPthread::getDestroyCounter(adaptor->io)); + CPPUNIT_ASSERT_EQUAL(1,CheckedPthread::getDestroyCounter(adaptor->completion)); + // mutexes + CPPUNIT_ASSERT_EQUAL(1,CheckedPthread::getDestroyCounter(&lzh->to_process.lock)); + CPPUNIT_ASSERT_EQUAL(0,CheckedPthread::getInvalidAccessCounter(&lzh->to_process.lock)); + CPPUNIT_ASSERT_EQUAL(1,CheckedPthread::getDestroyCounter(&lzh->to_send.lock)); + CPPUNIT_ASSERT_EQUAL(0,CheckedPthread::getInvalidAccessCounter(&lzh->to_send.lock)); + CPPUNIT_ASSERT_EQUAL(1,CheckedPthread::getDestroyCounter(&lzh->sent_requests.lock)); + CPPUNIT_ASSERT_EQUAL(0,CheckedPthread::getInvalidAccessCounter(&lzh->sent_requests.lock)); + CPPUNIT_ASSERT_EQUAL(1,CheckedPthread::getDestroyCounter(&lzh->completions_to_process.lock)); + CPPUNIT_ASSERT_EQUAL(0,CheckedPthread::getInvalidAccessCounter(&lzh->completions_to_process.lock)); + // conditionals + CPPUNIT_ASSERT_EQUAL(1,CheckedPthread::getDestroyCounter(&lzh->sent_requests.cond)); + CPPUNIT_ASSERT_EQUAL(0,CheckedPthread::getInvalidAccessCounter(&lzh->sent_requests.cond)); + CPPUNIT_ASSERT_EQUAL(1,CheckedPthread::getDestroyCounter(&lzh->completions_to_process.cond)); + CPPUNIT_ASSERT_EQUAL(0,CheckedPthread::getInvalidAccessCounter(&lzh->completions_to_process.cond)); + } + } + +#endif +}; + +CPPUNIT_TEST_SUITE_REGISTRATION(Zookeeper_close); diff --git a/src/c/tests/TestZookeeperInit.cc b/src/c/tests/TestZookeeperInit.cc new file mode 100644 index 0000000..eadf41d --- /dev/null +++ b/src/c/tests/TestZookeeperInit.cc @@ -0,0 +1,301 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include +#include + +#include "Util.h" +#include "LibCMocks.h" +#include "ZKMocks.h" + +#ifdef THREADED +#include "PthreadMocks.h" +#else +class MockPthreadsNull; +#endif + +using namespace std; + +class Zookeeper_init : public CPPUNIT_NS::TestFixture +{ + CPPUNIT_TEST_SUITE(Zookeeper_init); + CPPUNIT_TEST(testBasic); + CPPUNIT_TEST(testAddressResolution); + CPPUNIT_TEST(testMultipleAddressResolution); + CPPUNIT_TEST(testNullAddressString); + CPPUNIT_TEST(testEmptyAddressString); + CPPUNIT_TEST(testOneSpaceAddressString); + CPPUNIT_TEST(testTwoSpacesAddressString); + CPPUNIT_TEST(testInvalidAddressString1); + CPPUNIT_TEST(testInvalidAddressString2); + CPPUNIT_TEST(testNonexistentHost); + CPPUNIT_TEST(testOutOfMemory_init); + CPPUNIT_TEST(testOutOfMemory_getaddrs1); +#if !defined(__CYGWIN__) // not valid for cygwin + CPPUNIT_TEST(testOutOfMemory_getaddrs2); +#endif + CPPUNIT_TEST(testPermuteAddrsList); + CPPUNIT_TEST_SUITE_END(); + zhandle_t *zh; + MockPthreadsNull* pthreadMock; + static void watcher(zhandle_t *, int , int , const char *,void*){} + FILE *logfile; +public: + Zookeeper_init():zh(0),pthreadMock(0){ + logfile = openlogfile("Zookeeper_init"); + } + + ~Zookeeper_init() { + if (logfile) { + fflush(logfile); + fclose(logfile); + logfile = 0; + } + } + + void setUp() + { + zoo_set_log_stream(logfile); + + zoo_deterministic_conn_order(0); +#ifdef THREADED + // disable threading + pthreadMock=new MockPthreadZKNull; +#endif + zh=0; + } + + void tearDown() + { + zookeeper_close(zh); +#ifdef THREADED + delete pthreadMock; +#endif + } + + void testBasic() + { + const string EXPECTED_HOST("127.0.0.1:2121"); + const int EXPECTED_ADDRS_COUNT =1; + const int EXPECTED_RECV_TIMEOUT=10000; + clientid_t cid; + memset(&cid,0xFE,sizeof(cid)); + + zh=zookeeper_init(EXPECTED_HOST.c_str(),watcher,EXPECTED_RECV_TIMEOUT, + &cid,(void*)1,0); + + CPPUNIT_ASSERT(zh!=0); + CPPUNIT_ASSERT(zh->fd == -1); + CPPUNIT_ASSERT(zh->hostname!=0); + CPPUNIT_ASSERT_EQUAL(EXPECTED_ADDRS_COUNT,zh->addrs_count); + CPPUNIT_ASSERT_EQUAL(EXPECTED_HOST,string(zh->hostname)); + CPPUNIT_ASSERT(zh->state == NOTCONNECTED_STATE_DEF); + CPPUNIT_ASSERT(zh->context == (void*)1); + CPPUNIT_ASSERT_EQUAL(EXPECTED_RECV_TIMEOUT,zh->recv_timeout); + CPPUNIT_ASSERT(zh->watcher == watcher); + CPPUNIT_ASSERT(zh->connect_index==0); + CPPUNIT_ASSERT(zh->primer_buffer.buffer==zh->primer_storage_buffer); + CPPUNIT_ASSERT(zh->primer_buffer.curr_offset ==0); + CPPUNIT_ASSERT(zh->primer_buffer.len == sizeof(zh->primer_storage_buffer)); + CPPUNIT_ASSERT(zh->primer_buffer.next == 0); + CPPUNIT_ASSERT(zh->last_zxid ==0); + CPPUNIT_ASSERT(memcmp(&zh->client_id,&cid,sizeof(cid))==0); + +#ifdef THREADED + // thread specific checks + adaptor_threads* adaptor=(adaptor_threads*)zh->adaptor_priv; + CPPUNIT_ASSERT(adaptor!=0); + CPPUNIT_ASSERT(pthreadMock->pthread_createCounter==2); + CPPUNIT_ASSERT(MockPthreadsNull::isInitialized(adaptor->io)); + CPPUNIT_ASSERT(MockPthreadsNull::isInitialized(adaptor->completion)); + CPPUNIT_ASSERT(MockPthreadsNull::isInitialized(&zh->to_process.lock)); + CPPUNIT_ASSERT(MockPthreadsNull::isInitialized(&zh->to_send.lock)); + CPPUNIT_ASSERT(MockPthreadsNull::isInitialized(&zh->sent_requests.lock)); + CPPUNIT_ASSERT(MockPthreadsNull::isInitialized(&zh->completions_to_process.lock)); + CPPUNIT_ASSERT(MockPthreadsNull::isInitialized(&zh->sent_requests.cond)); + CPPUNIT_ASSERT(MockPthreadsNull::isInitialized(&zh->completions_to_process.cond)); +#endif + } + void testAddressResolution() + { + const char EXPECTED_IPS[][4]={{127,0,0,1}}; + const int EXPECTED_ADDRS_COUNT =COUNTOF(EXPECTED_IPS); + + zoo_deterministic_conn_order(1); + zh=zookeeper_init("127.0.0.1:2121",0,10000,0,0,0); + + CPPUNIT_ASSERT(zh!=0); + CPPUNIT_ASSERT_EQUAL(EXPECTED_ADDRS_COUNT,zh->addrs_count); + for(int i=0;iaddrs_count;i++){ + sockaddr_in* addr=(struct sockaddr_in*)&zh->addrs[i]; + CPPUNIT_ASSERT(memcmp(EXPECTED_IPS[i],&addr->sin_addr,sizeof(addr->sin_addr))==0); + CPPUNIT_ASSERT_EQUAL(2121,(int)ntohs(addr->sin_port)); + } + } + void testMultipleAddressResolution() + { + const string EXPECTED_HOST("127.0.0.1:2121,127.0.0.2:3434"); + const char EXPECTED_IPS[][4]={{127,0,0,1},{127,0,0,2}}; + const int EXPECTED_ADDRS_COUNT =COUNTOF(EXPECTED_IPS); + + zoo_deterministic_conn_order(1); + zh=zookeeper_init(EXPECTED_HOST.c_str(),0,1000,0,0,0); + + CPPUNIT_ASSERT(zh!=0); + CPPUNIT_ASSERT_EQUAL(EXPECTED_ADDRS_COUNT,zh->addrs_count); + + for(int i=0;iaddrs_count;i++){ + sockaddr_in* addr=(struct sockaddr_in*)&zh->addrs[i]; + CPPUNIT_ASSERT(memcmp(EXPECTED_IPS[i],&addr->sin_addr,sizeof(addr->sin_addr))==0); + if(i<1) + CPPUNIT_ASSERT_EQUAL(2121,(int)ntohs(addr->sin_port)); + else + CPPUNIT_ASSERT_EQUAL(3434,(int)ntohs(addr->sin_port)); + } + } + void testMultipleAddressWithSpace() + { + const string EXPECTED_HOST("127.0.0.1:2121, 127.0.0.2:3434"); + const char EXPECTED_IPS[][4]={{127,0,0,1},{127,0,0,2}}; + const int EXPECTED_ADDRS_COUNT =COUNTOF(EXPECTED_IPS); + + zoo_deterministic_conn_order(1); + zh=zookeeper_init(EXPECTED_HOST.c_str(),0,1000,0,0,0); + + CPPUNIT_ASSERT(zh!=0); + CPPUNIT_ASSERT_EQUAL(EXPECTED_ADDRS_COUNT,zh->addrs_count); + + for(int i=0;iaddrs_count;i++){ + sockaddr_in* addr=(struct sockaddr_in*)&zh->addrs[i]; + CPPUNIT_ASSERT(memcmp(EXPECTED_IPS[i],&addr->sin_addr,sizeof(addr->sin_addr))==0); + if(i<1) + CPPUNIT_ASSERT_EQUAL(2121,(int)ntohs(addr->sin_port)); + else + CPPUNIT_ASSERT_EQUAL(3434,(int)ntohs(addr->sin_port)); + } + } + void testNullAddressString() + { + zh=zookeeper_init(NULL,0,0,0,0,0); + CPPUNIT_ASSERT(zh==0); + CPPUNIT_ASSERT_EQUAL(EINVAL,errno); + } + void testEmptyAddressString() + { + const string INVALID_HOST(""); + zh=zookeeper_init(INVALID_HOST.c_str(),0,0,0,0,0); + CPPUNIT_ASSERT(zh==0); + CPPUNIT_ASSERT_EQUAL(EINVAL,errno); + } + void testOneSpaceAddressString() + { + const string INVALID_HOST(" "); + zh=zookeeper_init(INVALID_HOST.c_str(),0,0,0,0,0); + CPPUNIT_ASSERT(zh==0); + CPPUNIT_ASSERT_EQUAL(EINVAL,errno); + } + void testTwoSpacesAddressString() + { + const string INVALID_HOST(" "); + zh=zookeeper_init(INVALID_HOST.c_str(),0,0,0,0,0); + CPPUNIT_ASSERT(zh==0); + CPPUNIT_ASSERT_EQUAL(EINVAL,errno); + } + void testInvalidAddressString1() + { + const string INVALID_HOST("host1"); + zh=zookeeper_init(INVALID_HOST.c_str(),0,0,0,0,0); + CPPUNIT_ASSERT(zh==0); + CPPUNIT_ASSERT_EQUAL(EINVAL,errno); + } + void testInvalidAddressString2() + { + const string INVALID_HOST("host1:1111+host:123"); + zh=zookeeper_init(INVALID_HOST.c_str(),0,0,0,0,0); + CPPUNIT_ASSERT(zh==0); + CPPUNIT_ASSERT((ENOENT|EINVAL) & errno); + } + void testNonexistentHost() + { + const string EXPECTED_HOST("host1.blabadibla.bla.:1111"); + + zh=zookeeper_init(EXPECTED_HOST.c_str(),0,0,0,0,0); + + CPPUNIT_ASSERT(zh==0); + //With the switch to thread safe getaddrinfo, we don't get + //these global variables + //CPPUNIT_ASSERT_EQUAL(EINVAL,errno); + //CPPUNIT_ASSERT_EQUAL(HOST_NOT_FOUND,h_errno); + } + void testOutOfMemory_init() + { + Mock_calloc mock; + mock.callsBeforeFailure=0; // fail first calloc in init() + + zh=zookeeper_init("ahost:123",watcher,10000,0,0,0); + + CPPUNIT_ASSERT(zh==0); + CPPUNIT_ASSERT_EQUAL(ENOMEM,errno); + } + void testOutOfMemory_getaddrs1() + { + Mock_realloc reallocMock; + reallocMock.callsBeforeFailure=0; // fail on first call to realloc + + zh=zookeeper_init("127.0.0.1:123",0,0,0,0,0); + + CPPUNIT_ASSERT(zh==0); + CPPUNIT_ASSERT_EQUAL(ENOMEM,errno); + } + void testOutOfMemory_getaddrs2() + { + Mock_realloc reallocMock; + reallocMock.callsBeforeFailure=1; // fail on the second call to realloc + + zh=zookeeper_init("127.0.0.1:123,127.0.0.2:123,127.0.0.3:123,127.0.0.4:123,127.0.0.5:123,127.0.0.6:123,127.0.0.7:123,127.0.0.8:123,127.0.0.9:123,127.0.0.10:123,127.0.0.11:123,127.0.0.12:123,127.0.0.13:123,127.0.0.14:123,127.0.0.15:123,127.0.0.16:123,127.0.0.17:123",0,0,0,0,0); + + CPPUNIT_ASSERT(zh==0); + CPPUNIT_ASSERT_EQUAL(ENOMEM,errno); + } + void testPermuteAddrsList() + { + const char EXPECTED[][5]={"\0\0\0\0","\1\1\1\1","\2\2\2\2","\3\3\3\3"}; + const int EXPECTED_ADDR_COUNT=COUNTOF(EXPECTED); + + const int RAND_SEQ[]={0,1,1,-1}; + const int RAND_SIZE=COUNTOF(RAND_SEQ); + Mock_random randomMock; + randomMock.randomReturns.assign(RAND_SEQ,RAND_SEQ+RAND_SIZE-1); + zh=zookeeper_init("0.0.0.0:123,1.1.1.1:123,2.2.2.2:123,3.3.3.3:123",0,1000,0,0,0); + + CPPUNIT_ASSERT(zh!=0); + CPPUNIT_ASSERT_EQUAL(EXPECTED_ADDR_COUNT,zh->addrs_count); + const string EXPECTED_SEQ("3210"); + char ACTUAL_SEQ[EXPECTED_ADDR_COUNT+1]; ACTUAL_SEQ[EXPECTED_ADDR_COUNT]=0; + for(int i=0;iaddrs_count;i++){ + sockaddr_in* addr=(struct sockaddr_in*)&zh->addrs[i]; + // match the first byte of the EXPECTED and of the actual address + ACTUAL_SEQ[i]=((char*)&addr->sin_addr)[0]+'0'; + } + CPPUNIT_ASSERT_EQUAL(EXPECTED_SEQ,string(ACTUAL_SEQ)); + } +}; + +CPPUNIT_TEST_SUITE_REGISTRATION(Zookeeper_init); diff --git a/src/c/tests/ThreadingUtil.cc b/src/c/tests/ThreadingUtil.cc new file mode 100644 index 0000000..3b5170a --- /dev/null +++ b/src/c/tests/ThreadingUtil.cc @@ -0,0 +1,87 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include "ThreadingUtil.h" +#include "LibCSymTable.h" + +#ifdef THREADED + +// **************************************************************************** +// Mutex wrapper +struct Mutex::Impl{ + Impl(){ + LIBC_SYMBOLS.pthread_mutex_init(&mut_, 0); + } + ~Impl(){ + LIBC_SYMBOLS.pthread_mutex_destroy(&mut_); + } + pthread_mutex_t mut_; +}; + +Mutex::Mutex():impl_(new Impl) {} +Mutex::~Mutex() { delete impl_;} +void Mutex::acquire() { + LIBC_SYMBOLS.pthread_mutex_lock(&impl_->mut_); +} +void Mutex::release() { + LIBC_SYMBOLS.pthread_mutex_unlock(&impl_->mut_); +} + +// **************************************************************************** +// Atomics +int32_t atomic_post_incr(volatile int32_t* operand, int32_t incr) +{ +#if defined(__GNUC__) + return __sync_fetch_and_add(operand,incr); +#else + int32_t result; + __asm__ __volatile__( + "lock xaddl %0,%1\n" + : "=r"(result), "=m"(*operand) + : "0"(incr) + : "memory"); + return result; +#endif +} +int32_t atomic_fetch_store(volatile int32_t *ptr, int32_t value) +{ +#if defined(__GNUC__) + return __sync_lock_test_and_set(ptr,value); +#else + int32_t result; + __asm__ __volatile__("lock xchgl %0,%1\n" + : "=r"(result), "=m"(*ptr) + : "0"(value) + : "memory"); + return result; +#endif +} +#else +int32_t atomic_post_incr(volatile int32_t* operand, int32_t incr){ + int32_t v=*operand; + *operand+=incr; + return v; +} +int32_t atomic_fetch_store(volatile int32_t *ptr, int32_t value) +{ + int32_t result=*ptr; + *ptr=value; + return result; +} +#endif // THREADED diff --git a/src/c/tests/ThreadingUtil.h b/src/c/tests/ThreadingUtil.h new file mode 100644 index 0000000..9165412 --- /dev/null +++ b/src/c/tests/ThreadingUtil.h @@ -0,0 +1,261 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef THREADINGUTIL_H_ +#define THREADINGUTIL_H_ + +#include + +#ifdef THREADED +#include "pthread.h" +#endif + +// ***************************************************************************** +// Threading primitives + +// atomic post-increment; returns the previous value of the operand +int32_t atomic_post_incr(volatile int32_t* operand, int32_t incr); +// atomic fetch&store; returns the previous value of the operand +int32_t atomic_fetch_store(volatile int32_t *operand, int32_t value); + +// a partial implementation of an atomic integer type +class AtomicInt{ +public: + explicit AtomicInt(int32_t init=0):v_(init){} + AtomicInt(const AtomicInt& other):v_(other){} + // assigment + AtomicInt& operator=(const AtomicInt& lhs){ + atomic_fetch_store(&v_,lhs); + return *this; + } + AtomicInt& operator=(int32_t i){ + atomic_fetch_store(&v_,i); + return *this; + } + // pre-increment + AtomicInt& operator++() { + atomic_post_incr(&v_,1); + return *this; + } + // pre-decrement + AtomicInt& operator--() { + atomic_post_incr(&v_,-1); + return *this; + } + // post-increment + AtomicInt operator++(int){ + return AtomicInt(atomic_post_incr(&v_,1)); + } + // post-decrement + AtomicInt operator--(int){ + return AtomicInt(atomic_post_incr(&v_,-1)); + } + + operator int() const{ + return atomic_post_incr(&v_,0); + } + int get() const{ + return atomic_post_incr(&v_,0); + } +private: + mutable int32_t v_; +}; + +#ifdef THREADED +// **************************************************************************** +#define VALIDATE_JOBS(jm) jm.validateJobs(__FILE__,__LINE__) +#define VALIDATE_JOB(j) j.validate(__FILE__,__LINE__) + +class Mutex{ +public: + Mutex(); + ~Mutex(); + void acquire(); + void release(); +private: + Mutex(const Mutex&); + Mutex& operator=(const Mutex&); + struct Impl; + Impl* impl_; +}; + +class MTLock{ +public: + MTLock(Mutex& m):m_(m){m.acquire();} + ~MTLock(){m_.release();} + Mutex& m_; +}; + +#define synchronized(m) MTLock __lock(m) + +// **************************************************************************** +class Latch { +public: + virtual ~Latch() {} + virtual void await() const =0; + virtual void signalAndWait() =0; + virtual void signal() =0; +}; + +class CountDownLatch: public Latch { +public: + CountDownLatch(int count):count_(count) { + pthread_cond_init(&cond_,0); + pthread_mutex_init(&mut_,0); + } + virtual ~CountDownLatch() { + pthread_mutex_lock(&mut_); + if(count_!=0) { + count_=0; + pthread_cond_broadcast(&cond_); + } + pthread_mutex_unlock(&mut_); + + pthread_cond_destroy(&cond_); + pthread_mutex_destroy(&mut_); + } + + virtual void await() const { + pthread_mutex_lock(&mut_); + awaitImpl(); + pthread_mutex_unlock(&mut_); + } + virtual void signalAndWait() { + pthread_mutex_lock(&mut_); + signalImpl(); + awaitImpl(); + pthread_mutex_unlock(&mut_); + } + virtual void signal() { + pthread_mutex_lock(&mut_); + signalImpl(); + pthread_mutex_unlock(&mut_); + } +private: + void awaitImpl() const{ + while(count_!=0) + pthread_cond_wait(&cond_,&mut_); + } + void signalImpl() { + if(count_>0) { + count_--; + pthread_cond_broadcast(&cond_); + } + } + int count_; + mutable pthread_mutex_t mut_; + mutable pthread_cond_t cond_; +}; + +class TestJob { +public: + typedef long JobId; + TestJob():hasRun_(false),startLatch_(0),endLatch_(0) {} + virtual ~TestJob() { + join(); + } + virtual TestJob* clone() const =0; + + virtual void run() =0; + virtual void validate(const char* file, int line) const =0; + + virtual void start(Latch* startLatch=0,Latch* endLatch=0) { + startLatch_=startLatch;endLatch_=endLatch; + hasRun_=true; + pthread_create(&thread_, 0, thread, this); + } + virtual JobId getJobId() const { + return (JobId)thread_; + } + virtual void join() { + if(!hasRun_) + return; + if(!pthread_equal(thread_,pthread_self())) + pthread_join(thread_,0); + else + pthread_detach(thread_); + } +private: + void awaitStart() { + if(startLatch_==0) return; + startLatch_->signalAndWait(); + } + void signalFinished() { + if(endLatch_==0) return; + endLatch_->signal(); + } + static void* thread(void* p) { + TestJob* j=(TestJob*)p; + j->awaitStart(); // wait for the start command + j->run(); + j->signalFinished(); + return 0; + } + bool hasRun_; + Latch* startLatch_; + Latch* endLatch_; + pthread_t thread_; +}; + +class TestJobManager { + typedef std::vector JobList; +public: + TestJobManager(const TestJob& tj,int threadCount=1): + startLatch_(threadCount),endLatch_(threadCount) + { + for(int i=0;istart(&startLatch_,&endLatch_); + } + virtual void startJobsImmediately() { + for(unsigned i=0;istart(0,&endLatch_); + } + virtual void wait() const { + endLatch_.await(); + } + virtual void validateJobs(const char* file, int line) const{ + for(unsigned i=0;ivalidate(file,line); + } +private: + JobList jobs_; + CountDownLatch startLatch_; + CountDownLatch endLatch_; +}; + +#else // THREADED +// single THREADED +class Mutex{ +public: + void acquire(){} + void release(){} +}; +#define synchronized(m) + +#endif // THREADED + +#endif /*THREADINGUTIL_H_*/ diff --git a/src/c/tests/Util.cc b/src/c/tests/Util.cc new file mode 100644 index 0000000..2b9da84 --- /dev/null +++ b/src/c/tests/Util.cc @@ -0,0 +1,51 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "Util.h" +#include "string.h" + +const std::string EMPTY_STRING; + +TestConfig globalTestConfig; + +void millisleep(int ms){ + timespec ts; + ts.tv_sec=ms/1000; + ts.tv_nsec=(ms%1000)*1000000; // to nanoseconds + nanosleep(&ts,0); +} + +FILE *openlogfile(const char* testname) { + char name[1024]; + strcpy(name, "TEST-"); + strncpy(name + 5, testname, sizeof(name) - 5); +#ifdef THREADED + strcpy(name + strlen(name), "-mt.txt"); +#else + strcpy(name + strlen(name), "-st.txt"); +#endif + + FILE *logfile = fopen(name, "a"); + + if (logfile == 0) { + fprintf(stderr, "Can't open log file %s!\n", name); + return 0; + } + + return logfile; +} diff --git a/src/c/tests/Util.h b/src/c/tests/Util.h new file mode 100644 index 0000000..01e21ce --- /dev/null +++ b/src/c/tests/Util.h @@ -0,0 +1,137 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef UTIL_H_ +#define UTIL_H_ + +#include +#include +#include + +#include "zookeeper_log.h" + +// number of elements in array +#define COUNTOF(array) sizeof(array)/sizeof(array[0]) + +#define DECLARE_WRAPPER(ret,sym,sig) \ + extern "C" ret __real_##sym sig; \ + extern "C" ret __wrap_##sym sig + +#define CALL_REAL(sym,params) \ + __real_##sym params + +// must include "src/zookeeper_log.h" to be able to use this macro +#define TEST_TRACE(x) \ + log_message(ZOO_LOG_LEVEL_DEBUG,__LINE__,__func__,format_log_message x) + +extern const std::string EMPTY_STRING; + +// ***************************************************************************** +// A bit of wizardry to get to the bare type from a reference or a pointer +// to the type +template +struct TypeOp { + typedef T BareT; + typedef T ArgT; +}; + +// partial specialization for reference types +template +struct TypeOp{ + typedef T& ArgT; + typedef typename TypeOp::BareT BareT; +}; + +// partial specialization for pointers +template +struct TypeOp{ + typedef T* ArgT; + typedef typename TypeOp::BareT BareT; +}; + +// ***************************************************************************** +// Container utilities + +template +void putValue(std::map& map,const K& k, const V& v){ + typedef std::map Map; + typename Map::const_iterator it=map.find(k); + if(it==map.end()) + map.insert(typename Map::value_type(k,v)); + else + map[k]=v; +} + +template +bool getValue(const std::map& map,const K& k,V& v){ + typedef std::map Map; + typename Map::const_iterator it=map.find(k); + if(it==map.end()) + return false; + v=it->second; + return true; +} + +// ***************************************************************************** +// misc utils + +// millisecond sleep +void millisleep(int ms); +FILE *openlogfile(const char* name); +// evaluate given predicate until it returns true or the timeout +// (in millis) has expired +template +int ensureCondition(const Predicate& p,int timeout){ + int elapsed=0; + while(!p() && elapsed CmdLineOptList; +public: + typedef CmdLineOptList::const_iterator const_iterator; + TestConfig(){} + ~TestConfig(){} + void addConfigFromCmdLine(int argc, char* argv[]){ + if(argc>=2) + testName_=argv[1]; + for(int i=2; i + +// function to conveniently stream vectors +template +std::ostream& operator<<(std::ostream& os,const std::vector& c){ + typedef std::vector V; + os<<"["; + if(c.size()>0){ + for(typename V::const_iterator it=c.begin();it!=c.end();++it) + os<<*it<<","; + os.seekp(-1,std::ios::cur); + } + os<<"]"; + return os; +} + +#endif // _VECTOR_UTIL_H diff --git a/src/c/tests/ZKMocks.cc b/src/c/tests/ZKMocks.cc new file mode 100644 index 0000000..69bea16 --- /dev/null +++ b/src/c/tests/ZKMocks.cc @@ -0,0 +1,519 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include // for htonl +#include + +#include +#include + +#ifdef THREADED +#include "PthreadMocks.h" +#endif +#include "ZKMocks.h" + +using namespace std; + +TestClientId testClientId; +const char* TestClientId::PASSWD="1234567890123456"; + +HandshakeRequest* HandshakeRequest::parse(const std::string& buf){ + auto_ptr req(new HandshakeRequest); + + memcpy(&req->protocolVersion,buf.data(), sizeof(req->protocolVersion)); + req->protocolVersion = htonl(req->protocolVersion); + + int offset=sizeof(req->protocolVersion); + + memcpy(&req->lastZxidSeen,buf.data()+offset,sizeof(req->lastZxidSeen)); + req->lastZxidSeen = zoo_htonll(req->lastZxidSeen); + offset+=sizeof(req->lastZxidSeen); + + memcpy(&req->timeOut,buf.data()+offset,sizeof(req->timeOut)); + req->timeOut = htonl(req->timeOut); + offset+=sizeof(req->timeOut); + + memcpy(&req->sessionId,buf.data()+offset,sizeof(req->sessionId)); + req->sessionId = zoo_htonll(req->sessionId); + offset+=sizeof(req->sessionId); + + memcpy(&req->passwd_len,buf.data()+offset,sizeof(req->passwd_len)); + req->passwd_len = htonl(req->passwd_len); + offset+=sizeof(req->passwd_len); + + memcpy(req->passwd,buf.data()+offset,sizeof(req->passwd)); + if(testClientId.client_id==req->sessionId && + !memcmp(testClientId.passwd,req->passwd,sizeof(req->passwd))) + return req.release(); + // the request didn't match -- may not be a handshake request after all + return 0; +} + +// ***************************************************************************** +// watcher action implementation +void activeWatcher(zhandle_t *zh, int type, int state, const char *path,void* ctx){ + if(zh==0 || ctx==0) return; + WatcherAction* action=(WatcherAction*)ctx; + + if(type==ZOO_SESSION_EVENT){ + if(state==ZOO_EXPIRED_SESSION_STATE) + action->onSessionExpired(zh); + else if(state==ZOO_CONNECTING_STATE) + action->onConnectionLost(zh); + else if(state==ZOO_CONNECTED_STATE) + action->onConnectionEstablished(zh); + }else if(type==ZOO_CHANGED_EVENT) + action->onNodeValueChanged(zh,path); + else if(type==ZOO_DELETED_EVENT) + action->onNodeDeleted(zh,path); + else if(type==ZOO_CHILD_EVENT) + action->onChildChanged(zh,path); + // TODO: implement for the rest of the event types + // ... + action->setWatcherTriggered(); +} +SyncedBoolCondition WatcherAction::isWatcherTriggered() const{ + return SyncedBoolCondition(triggered_,mx_); +} + +// ***************************************************************************** +// a set of async completion signatures +void asyncCompletion(int rc, ACL_vector *acl,Stat *stat, const void *data){ + assert("Completion data is NULL"&&data); + static_cast((void*)data)->aclCompl(rc,acl,stat); +} +void asyncCompletion(int rc, const char *value, int len, const Stat *stat, + const void *data){ + assert("Completion data is NULL"&&data); + static_cast((void*)data)->dataCompl(rc,value,len,stat); +} +void asyncCompletion(int rc, const Stat *stat, const void *data){ + assert("Completion data is NULL"&&data); + static_cast((void*)data)->statCompl(rc,stat); +} +void asyncCompletion(int rc, const char *value, const void *data){ + assert("Completion data is NULL"&&data); + static_cast((void*)data)->stringCompl(rc,value); +} +void asyncCompletion(int rc,const String_vector *strings, const void *data){ + assert("Completion data is NULL"&&data); + static_cast((void*)data)->stringsCompl(rc,strings); +} +void asyncCompletion(int rc, const void *data){ + assert("Completion data is NULL"&&data); + static_cast((void*)data)->voidCompl(rc); +} + +// ***************************************************************************** +// a predicate implementation +bool IOThreadStopped::operator()() const{ +#ifdef THREADED + adaptor_threads* adaptor=(adaptor_threads*)zh_->adaptor_priv; + return CheckedPthread::isTerminated(adaptor->io); +#else + assert("IOThreadStopped predicate is only for use with THREADED client"&& false); + return false; +#endif +} + +//****************************************************************************** +// +DECLARE_WRAPPER(int,flush_send_queue,(zhandle_t*zh, int timeout)) +{ + if(!Mock_flush_send_queue::mock_) + return CALL_REAL(flush_send_queue,(zh,timeout)); + return Mock_flush_send_queue::mock_->call(zh,timeout); +} + +Mock_flush_send_queue* Mock_flush_send_queue::mock_=0; + +//****************************************************************************** +// +DECLARE_WRAPPER(int32_t,get_xid,()) +{ + if(!Mock_get_xid::mock_) + return CALL_REAL(get_xid,()); + return Mock_get_xid::mock_->call(); +} + +Mock_get_xid* Mock_get_xid::mock_=0; + +//****************************************************************************** +// activateWatcher mock + +DECLARE_WRAPPER(void,activateWatcher,(zhandle_t *zh, watcher_registration_t* reg, int rc)) +{ + if(!Mock_activateWatcher::mock_){ + CALL_REAL(activateWatcher,(zh, reg,rc)); + }else{ + Mock_activateWatcher::mock_->call(zh, reg,rc); + } +} +Mock_activateWatcher* Mock_activateWatcher::mock_=0; + +class ActivateWatcherWrapper: public Mock_activateWatcher{ +public: + ActivateWatcherWrapper():ctx_(0),activated_(false){} + + virtual void call(zhandle_t *zh, watcher_registration_t* reg, int rc){ + CALL_REAL(activateWatcher,(zh, reg,rc)); + synchronized(mx_); + if(reg->context==ctx_){ + activated_=true; + ctx_=0; + } + } + + void setContext(void* ctx){ + synchronized(mx_); + ctx_=ctx; + activated_=false; + } + + SyncedBoolCondition isActivated() const{ + return SyncedBoolCondition(activated_,mx_); + } + mutable Mutex mx_; + void* ctx_; + bool activated_; +}; + +WatcherActivationTracker::WatcherActivationTracker(): + wrapper_(new ActivateWatcherWrapper) +{ +} + +WatcherActivationTracker::~WatcherActivationTracker(){ + delete wrapper_; +} + +void WatcherActivationTracker::track(void* ctx){ + wrapper_->setContext(ctx); +} + +SyncedBoolCondition WatcherActivationTracker::isWatcherActivated() const{ + return wrapper_->isActivated(); +} + +//****************************************************************************** +// +DECLARE_WRAPPER(void,deliverWatchers,(zhandle_t* zh,int type,int state, const char* path, watcher_object_list_t **list)) +{ + if(!Mock_deliverWatchers::mock_){ + CALL_REAL(deliverWatchers,(zh,type,state,path, list)); + }else{ + Mock_deliverWatchers::mock_->call(zh,type,state,path, list); + } +} + +Mock_deliverWatchers* Mock_deliverWatchers::mock_=0; + +struct RefCounterValue{ + RefCounterValue(zhandle_t* const& zh,int32_t expectedCounter,Mutex& mx): + zh_(zh),expectedCounter_(expectedCounter),mx_(mx){} + bool operator()() const{ + { + synchronized(mx_); + if(zh_==0) + return false; + } + return inc_ref_counter(zh_,0)==expectedCounter_; + } + zhandle_t* const& zh_; + int32_t expectedCounter_; + Mutex& mx_; +}; + + +class DeliverWatchersWrapper: public Mock_deliverWatchers{ +public: + DeliverWatchersWrapper(int type,int state,bool terminate): + type_(type),state_(state), + allDelivered_(false),terminate_(terminate),zh_(0),deliveryCounter_(0){} + virtual void call(zhandle_t* zh,int type,int state, const char* path, watcher_object_list **list){ + { + synchronized(mx_); + zh_=zh; + allDelivered_=false; + } + CALL_REAL(deliverWatchers,(zh,type,state,path, list)); + if(type_==type && state_==state){ + if(terminate_){ + // prevent zhandle_t from being prematurely distroyed; + // this will also ensure that zookeeper_close() cleanups the thread + // resources by calling finish_adaptor() + inc_ref_counter(zh,1); + terminateZookeeperThreads(zh); + } + synchronized(mx_); + allDelivered_=true; + deliveryCounter_++; + } + } + SyncedBoolCondition isDelivered() const{ + if(terminate_){ + int i=ensureCondition(RefCounterValue(zh_,1,mx_),1000); + assert(i<1000); + } + return SyncedBoolCondition(allDelivered_,mx_); + } + void resetDeliveryCounter(){ + synchronized(mx_); + deliveryCounter_=0; + } + SyncedIntegerEqual deliveryCounterEquals(int expected) const{ + if(terminate_){ + int i=ensureCondition(RefCounterValue(zh_,1,mx_),1000); + assert(i<1000); + } + return SyncedIntegerEqual(deliveryCounter_,expected,mx_); + } + int type_; + int state_; + mutable Mutex mx_; + bool allDelivered_; + bool terminate_; + zhandle_t* zh_; + int deliveryCounter_; +}; + +WatcherDeliveryTracker::WatcherDeliveryTracker( + int type,int state,bool terminateCompletionThread): + deliveryWrapper_(new DeliverWatchersWrapper( + type,state,terminateCompletionThread)){ +} + +WatcherDeliveryTracker::~WatcherDeliveryTracker(){ + delete deliveryWrapper_; +} + +SyncedBoolCondition WatcherDeliveryTracker::isWatcherProcessingCompleted() const{ + return deliveryWrapper_->isDelivered(); +} + +void WatcherDeliveryTracker::resetDeliveryCounter(){ + deliveryWrapper_->resetDeliveryCounter(); +} + +SyncedIntegerEqual WatcherDeliveryTracker::deliveryCounterEquals(int expected) const{ + return deliveryWrapper_->deliveryCounterEquals(expected); +} + +//****************************************************************************** +// +string HandshakeResponse::toString() const { + string buf; + int32_t tmp=htonl(protocolVersion); + buf.append((char*)&tmp,sizeof(tmp)); + tmp=htonl(timeOut); + buf.append((char*)&tmp,sizeof(tmp)); + int64_t tmp64=zoo_htonll(sessionId); + buf.append((char*)&tmp64,sizeof(sessionId)); + tmp=htonl(passwd_len); + buf.append((char*)&tmp,sizeof(tmp)); + buf.append(passwd,sizeof(passwd)); + // finally set the buffer length + tmp=htonl(buf.size()+sizeof(tmp)); + buf.insert(0,(char*)&tmp, sizeof(tmp)); + return buf; +} + +string ZooGetResponse::toString() const{ + oarchive* oa=create_buffer_oarchive(); + + ReplyHeader h = {xid_,1,ZOK}; + serialize_ReplyHeader(oa, "hdr", &h); + + GetDataResponse resp; + char buf[1024]; + assert("GetDataResponse is too long"&&data_.size()<=sizeof(buf)); + resp.data.len=data_.size(); + resp.data.buff=buf; + data_.copy(resp.data.buff, data_.size()); + resp.stat=stat_; + serialize_GetDataResponse(oa, "reply", &resp); + int32_t len=htonl(get_buffer_len(oa)); + string res((char*)&len,sizeof(len)); + res.append(get_buffer(oa),get_buffer_len(oa)); + + close_buffer_oarchive(&oa,1); + return res; +} + +string ZooStatResponse::toString() const{ + oarchive* oa=create_buffer_oarchive(); + + ReplyHeader h = {xid_,1,rc_}; + serialize_ReplyHeader(oa, "hdr", &h); + + SetDataResponse resp; + resp.stat=stat_; + serialize_SetDataResponse(oa, "reply", &resp); + int32_t len=htonl(get_buffer_len(oa)); + string res((char*)&len,sizeof(len)); + res.append(get_buffer(oa),get_buffer_len(oa)); + + close_buffer_oarchive(&oa,1); + return res; +} + +string ZooGetChildrenResponse::toString() const{ + oarchive* oa=create_buffer_oarchive(); + + ReplyHeader h = {xid_,1,rc_}; + serialize_ReplyHeader(oa, "hdr", &h); + + GetChildrenResponse resp; + // populate the string vector + allocate_String_vector(&resp.children,strings_.size()); + for(int i=0;i<(int)strings_.size();++i) + resp.children.data[i]=strdup(strings_[i].c_str()); + serialize_GetChildrenResponse(oa, "reply", &resp); + deallocate_GetChildrenResponse(&resp); + + int32_t len=htonl(get_buffer_len(oa)); + string res((char*)&len,sizeof(len)); + res.append(get_buffer(oa),get_buffer_len(oa)); + + close_buffer_oarchive(&oa,1); + return res; +} + +string ZNodeEvent::toString() const{ + oarchive* oa=create_buffer_oarchive(); + struct WatcherEvent evt = {type_,0,(char*)path_.c_str()}; + struct ReplyHeader h = {WATCHER_EVENT_XID,0,ZOK }; + + serialize_ReplyHeader(oa, "hdr", &h); + serialize_WatcherEvent(oa, "event", &evt); + + int32_t len=htonl(get_buffer_len(oa)); + string res((char*)&len,sizeof(len)); + res.append(get_buffer(oa),get_buffer_len(oa)); + + close_buffer_oarchive(&oa,1); + return res; +} + +string PingResponse::toString() const{ + oarchive* oa=create_buffer_oarchive(); + + ReplyHeader h = {PING_XID,1,ZOK}; + serialize_ReplyHeader(oa, "hdr", &h); + + int32_t len=htonl(get_buffer_len(oa)); + string res((char*)&len,sizeof(len)); + res.append(get_buffer(oa),get_buffer_len(oa)); + + close_buffer_oarchive(&oa,1); + return res; +} + +//****************************************************************************** +// Zookeeper server simulator +// +bool ZookeeperServer::hasMoreRecv() const{ + return recvHasMore.get()!=0 || connectionLost; +} + +ssize_t ZookeeperServer::callRecv(int s,void *buf,size_t len,int flags){ + if(connectionLost){ + recvReturnBuffer.erase(); + return 0; + } + // done transmitting the current buffer? + if(recvReturnBuffer.size()==0){ + synchronized(recvQMx); + if(recvQueue.empty()){ + recvErrno=EAGAIN; + return Mock_socket::callRecv(s,buf,len,flags); + } + --recvHasMore; + Element& el=recvQueue.front(); + if(el.first!=0){ + recvReturnBuffer=el.first->toString(); + delete el.first; + } + recvErrno=el.second; + recvQueue.pop_front(); + } + return Mock_socket::callRecv(s,buf,len,flags); +} + +void ZookeeperServer::onMessageReceived(const RequestHeader& rh, iarchive* ia){ + // no-op by default +} + +void ZookeeperServer::notifyBufferSent(const std::string& buffer){ + if(HandshakeRequest::isValid(buffer)){ + // could be a connect request + auto_ptr req(HandshakeRequest::parse(buffer)); + if(req.get()!=0){ + // handle the handshake + int64_t sessId=sessionExpired?req->sessionId+1:req->sessionId; + sessionExpired=false; + addRecvResponse(new HandshakeResponse(sessId)); + return; + } + // not a connect request -- fall thru + } + // parse the buffer to extract the request type and its xid + iarchive *ia=create_buffer_iarchive((char*)buffer.data(), buffer.size()); + RequestHeader rh; + deserialize_RequestHeader(ia,"hdr",&rh); + // notify the "server" a client request has arrived + if (rh.xid == -8) { + Element e = Element(new ZooStatResponse,0); + e.first->setXID(-8); + addRecvResponse(e); + close_buffer_iarchive(&ia); + return; + } else { + onMessageReceived(rh,ia); + } + close_buffer_iarchive(&ia); + if(rh.type==ZOO_CLOSE_OP){ + ++closeSent; + return; // no reply for close requests + } + // get the next response from the response queue and append it to the receive list + Element e; + { + synchronized(respQMx); + if(respQueue.empty()) + return; + e=respQueue.front(); + respQueue.pop_front(); + } + e.first->setXID(rh.xid); + addRecvResponse(e); +} + +void forceConnected(zhandle_t* zh){ + // simulate connected state + zh->state=ZOO_CONNECTED_STATE; + zh->fd=ZookeeperServer::FD; + zh->input_buffer=0; + gettimeofday(&zh->last_recv,0); + gettimeofday(&zh->last_send,0); +} + +void terminateZookeeperThreads(zhandle_t* zh){ + // this will cause the zookeeper threads to terminate + zh->close_requested=1; +} diff --git a/src/c/tests/ZKMocks.h b/src/c/tests/ZKMocks.h new file mode 100644 index 0000000..fbcfc4f --- /dev/null +++ b/src/c/tests/ZKMocks.h @@ -0,0 +1,509 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ZKMOCKS_H_ +#define ZKMOCKS_H_ + +#include +#include "src/zk_adaptor.h" + +#include "Util.h" +#include "LibCMocks.h" +#include "MocksBase.h" + +// ***************************************************************************** +// sets internal zhandle_t members to certain values to simulate the client +// connected state. This function should only be used with the single-threaded +// Async API tests! +void forceConnected(zhandle_t* zh); + +/** + * Gracefully terminates zookeeper I/O and completion threads. + */ +void terminateZookeeperThreads(zhandle_t* zh); + +// ***************************************************************************** +// Abstract watcher action +struct SyncedBoolCondition; + +class WatcherAction{ +public: + WatcherAction():triggered_(false){} + virtual ~WatcherAction(){} + + virtual void onSessionExpired(zhandle_t*){} + virtual void onConnectionEstablished(zhandle_t*){} + virtual void onConnectionLost(zhandle_t*){} + virtual void onNodeValueChanged(zhandle_t*,const char* path){} + virtual void onNodeDeleted(zhandle_t*,const char* path){} + virtual void onChildChanged(zhandle_t*,const char* path){} + + SyncedBoolCondition isWatcherTriggered() const; + void setWatcherTriggered(){ + synchronized(mx_); + triggered_=true; + } + +protected: + mutable Mutex mx_; + bool triggered_; +}; +// zh->context is a pointer to a WatcherAction instance +// based on the event type and state, the watcher calls a specific watcher +// action method +void activeWatcher(zhandle_t *zh, int type, int state, const char *path,void* ctx); + +// ***************************************************************************** +// a set of async completion signatures +class AsyncCompletion{ +public: + virtual ~AsyncCompletion(){} + virtual void aclCompl(int rc, ACL_vector *acl,Stat *stat){} + virtual void dataCompl(int rc, const char *value, int len, const Stat *stat){} + virtual void statCompl(int rc, const Stat *stat){} + virtual void stringCompl(int rc, const char *value){} + virtual void stringsCompl(int rc,const String_vector *strings){} + virtual void voidCompl(int rc){} +}; +void asyncCompletion(int rc, ACL_vector *acl,Stat *stat, const void *data); +void asyncCompletion(int rc, const char *value, int len, const Stat *stat, + const void *data); +void asyncCompletion(int rc, const Stat *stat, const void *data); +void asyncCompletion(int rc, const char *value, const void *data); +void asyncCompletion(int rc,const String_vector *strings, const void *data); +void asyncCompletion(int rc, const void *data); + +// ***************************************************************************** +// some common predicates to use with ensureCondition(): +// checks if the connection is established +struct ClientConnected{ + ClientConnected(zhandle_t* zh):zh_(zh){} + bool operator()() const{ + return zoo_state(zh_)==ZOO_CONNECTED_STATE; + } + zhandle_t* zh_; +}; +// check in the session expired +struct SessionExpired{ + SessionExpired(zhandle_t* zh):zh_(zh){} + bool operator()() const{ + return zoo_state(zh_)==ZOO_EXPIRED_SESSION_STATE; + } + zhandle_t* zh_; +}; +// checks if the IO thread has stopped; CheckedPthread must be active +struct IOThreadStopped{ + IOThreadStopped(zhandle_t* zh):zh_(zh){} + bool operator()() const; + zhandle_t* zh_; +}; + +// a synchronized boolean condition +struct SyncedBoolCondition{ + SyncedBoolCondition(const bool& cond,Mutex& mx):cond_(cond),mx_(mx){} + bool operator()() const{ + synchronized(mx_); + return cond_; + } + const bool& cond_; + Mutex& mx_; +}; + +// a synchronized integer comparison +struct SyncedIntegerEqual{ + SyncedIntegerEqual(const int& cond,int expected,Mutex& mx): + cond_(cond),expected_(expected),mx_(mx){} + bool operator()() const{ + synchronized(mx_); + return cond_==expected_; + } + const int& cond_; + const int expected_; + Mutex& mx_; +}; + +// ***************************************************************************** +// make sure to call zookeeper_close() even in presence of exceptions +struct CloseFinally{ + CloseFinally(zhandle_t** zh):zh_(zh){} + ~CloseFinally(){ + execute(); + } + int execute(){ + if(zh_==0)return ZOK; + zhandle_t* lzh=*zh_; + *zh_=0; + disarm(); + return zookeeper_close(lzh); + } + void disarm(){zh_=0;} + zhandle_t ** zh_; +}; + +struct TestClientId: clientid_t{ + static const int SESSION_ID=123456789; + static const char* PASSWD; + TestClientId(){ + client_id=SESSION_ID; + memcpy(passwd,PASSWD,sizeof(passwd)); + } +}; + +// ***************************************************************************** +// special client id recongnized by the ZK server simulator +extern TestClientId testClientId; +#define TEST_CLIENT_ID &testClientId + +// ***************************************************************************** +// +struct HandshakeRequest: public connect_req +{ + static HandshakeRequest* parse(const std::string& buf); + static bool isValid(const std::string& buf){ + // this is just quick and dirty check before we go and parse the request + return buf.size()==HANDSHAKE_REQ_SIZE; + } +}; + +// ***************************************************************************** +// flush_send_queue +class Mock_flush_send_queue: public Mock +{ +public: + Mock_flush_send_queue():counter(0),callReturns(ZOK){mock_=this;} + ~Mock_flush_send_queue(){mock_=0;} + + int counter; + int callReturns; + virtual int call(zhandle_t* zh, int timeout){ + counter++; + return callReturns; + } + + static Mock_flush_send_queue* mock_; +}; + +// ***************************************************************************** +// get_xid +class Mock_get_xid: public Mock +{ +public: + static const int32_t XID=123456; + Mock_get_xid(int retValue=XID):callReturns(retValue){mock_=this;} + ~Mock_get_xid(){mock_=0;} + + int callReturns; + virtual int call(){ + return callReturns; + } + + static Mock_get_xid* mock_; +}; + +// ***************************************************************************** +// activateWatcher +class Mock_activateWatcher: public Mock{ +public: + Mock_activateWatcher(){mock_=this;} + virtual ~Mock_activateWatcher(){mock_=0;} + + virtual void call(zhandle_t *zh, watcher_registration_t* reg, int rc){} + static Mock_activateWatcher* mock_; +}; + +class ActivateWatcherWrapper; +class WatcherActivationTracker{ +public: + WatcherActivationTracker(); + ~WatcherActivationTracker(); + + void track(void* ctx); + SyncedBoolCondition isWatcherActivated() const; +private: + ActivateWatcherWrapper* wrapper_; +}; + +// ***************************************************************************** +// deliverWatchers +class Mock_deliverWatchers: public Mock{ +public: + Mock_deliverWatchers(){mock_=this;} + virtual ~Mock_deliverWatchers(){mock_=0;} + + virtual void call(zhandle_t* zh,int type,int state, const char* path, watcher_object_list **){} + static Mock_deliverWatchers* mock_; +}; + +class DeliverWatchersWrapper; +class WatcherDeliveryTracker{ +public: + // filters deliveries by state and type + WatcherDeliveryTracker(int type,int state,bool terminateCompletionThread=true); + ~WatcherDeliveryTracker(); + + // if the thread termination requested (see the ctor params) + // this function will wait for the I/O and completion threads to + // terminate before returning a SyncBoolCondition instance + SyncedBoolCondition isWatcherProcessingCompleted() const; + void resetDeliveryCounter(); + SyncedIntegerEqual deliveryCounterEquals(int expected) const; +private: + DeliverWatchersWrapper* deliveryWrapper_; +}; + +// ***************************************************************************** +// a zookeeper Stat wrapper +struct NodeStat: public Stat +{ + NodeStat(){ + czxid=0; + mzxid=0; + ctime=0; + mtime=0; + version=1; + cversion=0; + aversion=0; + ephemeralOwner=0; + } + NodeStat(const Stat& other){ + memcpy(this,&other,sizeof(*this)); + } +}; + +// ***************************************************************************** +// Abstract server Response +class Response +{ +public: + virtual ~Response(){} + + virtual void setXID(int32_t xid){} + // this method is used by the ZookeeperServer class to serialize + // the instance of Response + virtual std::string toString() const =0; +}; + +// ***************************************************************************** +// Handshake response +class HandshakeResponse: public Response +{ +public: + HandshakeResponse(int64_t sessId=1) + :protocolVersion(1),timeOut(10000),sessionId(sessId),passwd_len(sizeof(passwd)) + { + memcpy(passwd,"1234567890123456",sizeof(passwd)); + } + int32_t protocolVersion; + int32_t timeOut; + int64_t sessionId; + int32_t passwd_len; + char passwd[16]; + virtual std::string toString() const ; +}; + +// zoo_get() response +class ZooGetResponse: public Response +{ +public: + ZooGetResponse(const char* data, int len,int32_t xid=0,int rc=ZOK,const Stat& stat=NodeStat()) + :xid_(xid),data_(data,len),rc_(rc),stat_(stat) + { + } + virtual std::string toString() const; + virtual void setXID(int32_t xid) {xid_=xid;} + +private: + int32_t xid_; + std::string data_; + int rc_; + Stat stat_; +}; + +// zoo_exists(), zoo_set() response +class ZooStatResponse: public Response +{ +public: + ZooStatResponse(int32_t xid=0,int rc=ZOK,const Stat& stat=NodeStat()) + :xid_(xid),rc_(rc),stat_(stat) + { + } + virtual std::string toString() const; + virtual void setXID(int32_t xid) {xid_=xid;} + +private: + int32_t xid_; + int rc_; + Stat stat_; +}; + +// zoo_get_children() +class ZooGetChildrenResponse: public Response +{ +public: + typedef std::vector StringVector; + ZooGetChildrenResponse(const StringVector& v,int rc=ZOK): + xid_(0),strings_(v),rc_(rc) + { + } + + virtual std::string toString() const; + virtual void setXID(int32_t xid) {xid_=xid;} + + int32_t xid_; + StringVector strings_; + int rc_; +}; + +// PING response +class PingResponse: public Response +{ +public: + virtual std::string toString() const; +}; + +// watcher znode event +class ZNodeEvent: public Response +{ +public: + ZNodeEvent(int type,const char* path):type_(type),path_(path){} + + virtual std::string toString() const; + +private: + int type_; + std::string path_; +}; + +// **************************************************************************** +// Zookeeper server simulator + +class ZookeeperServer: public Mock_socket +{ +public: + ZookeeperServer(): + serverDownSkipCount_(-1),sessionExpired(false),connectionLost(false) + { + connectReturns=-1; + connectErrno=EWOULDBLOCK; + } + virtual ~ZookeeperServer(){ + clearRecvQueue(); + clearRespQueue(); + } + virtual int callClose(int fd){ + if(fd!=FD) + return LIBC_SYMBOLS.close(fd); + clearRecvQueue(); + clearRespQueue(); + return Mock_socket::callClose(fd); + } + // connection handling + // what to do when the handshake request comes in? + int serverDownSkipCount_; + // this will cause getsockopt(zh->fd,SOL_SOCKET,SO_ERROR,&error,&len) return + // a failure after skipCount dropped to zero, thus simulating a server down + // condition + // passing skipCount==-1 will make every connect attempt succeed + void setServerDown(int skipCount=0){ + serverDownSkipCount_=skipCount; + optvalSO_ERROR=0; + } + virtual void setSO_ERROR(void *optval,socklen_t len){ + if(serverDownSkipCount_!=-1){ + if(serverDownSkipCount_==0) + optvalSO_ERROR=ECONNREFUSED; + else + serverDownSkipCount_--; + } + Mock_socket::setSO_ERROR(optval,len); + } + + // this is a trigger that gets reset back to false + // a connect request will return a non-matching session id thus causing + // the client throw SESSION_EXPIRED + volatile bool sessionExpired; + void returnSessionExpired(){ sessionExpired=true; } + + // this is a one shot trigger that gets reset back to false + // next recv call will return 0 length, thus simulating a connecton loss + volatile bool connectionLost; + void setConnectionLost() {connectionLost=true;} + + // recv + // this queue is used for server responses: client's recv() system call + // returns next available message from this queue + typedef std::pair Element; + typedef std::deque ResponseList; + ResponseList recvQueue; + mutable Mutex recvQMx; + AtomicInt recvHasMore; + ZookeeperServer& addRecvResponse(Response* resp, int errnum=0){ + synchronized(recvQMx); + recvQueue.push_back(Element(resp,errnum)); + ++recvHasMore; + return *this; + } + ZookeeperServer& addRecvResponse(int errnum){ + synchronized(recvQMx); + recvQueue.push_back(Element(0,errnum)); + ++recvHasMore; + return *this; + } + ZookeeperServer& addRecvResponse(const Element& e){ + synchronized(recvQMx); + recvQueue.push_back(e); + ++recvHasMore; + return *this; + } + void clearRecvQueue(){ + synchronized(recvQMx); + recvHasMore=0; + for(unsigned i=0; i /dev/null +if [ $? -eq 0 ] +then + pid=`lsof -i :$ZOOPORT | grep LISTEN | awk '{print $2}'` + if [ -n "$pid" ] + then + $KILL -9 $pid + fi +fi + +if [ "x${base_dir}" == "x" ] +then +zk_base="../../" +else +zk_base="${base_dir}" +fi + +CLASSPATH="$CLASSPATH:${zk_base}/build/classes" +CLASSPATH="$CLASSPATH:${zk_base}/conf" + +for i in "${zk_base}"/build/lib/*.jar +do + CLASSPATH="$CLASSPATH:$i" +done + +for i in "${zk_base}"/src/java/lib/*.jar +do + CLASSPATH="$CLASSPATH:$i" +done + +CLASSPATH="$CLASSPATH:${CLOVER_HOME}/lib/clover.jar" + +if $cygwin +then + CLASSPATH=`cygpath -wp "$CLASSPATH"` +fi + +case $1 in +start|startClean) + if [ "x${base_dir}" == "x" ] + then + mkdir -p /tmp/zkdata + java -cp "$CLASSPATH" org.apache.zookeeper.server.ZooKeeperServerMain $ZOOPORT /tmp/zkdata 3000 $ZKMAXCNXNS &> /tmp/zk.log & + pid=$! + echo -n $! > /tmp/zk.pid + else + mkdir -p "${base_dir}/build/tmp/zkdata" + java -cp "$CLASSPATH" org.apache.zookeeper.server.ZooKeeperServerMain $ZOOPORT "${base_dir}/build/tmp/zkdata" 3000 $ZKMAXCNXNS &> "${base_dir}/build/tmp/zk.log" & + pid=$! + echo -n $pid > "${base_dir}/build/tmp/zk.pid" + fi + + # wait max 120 seconds for server to be ready to server clients + # this handles testing on slow hosts + success=false + for i in {1..120} + do + if ps -p $pid > /dev/null + then + java -cp "$CLASSPATH" org.apache.zookeeper.ZooKeeperMain -server localhost:$ZOOPORT ls / > /dev/null 2>&1 + if [ $? -ne 0 ] + then + # server not up yet - wait + sleep 1 + else + # server is up and serving client connections + success=true + break + fi + else + # server died - exit now + echo -n " ZooKeeper server process failed" + break + fi + done + + if $success + then + ## in case for debug, but generally don't use as it messes up the + ## console test output + echo -n " ZooKeeper server started" + else + echo -n " ZooKeeper server NOT started" + fi + + ;; +stop) + # Already killed above + ;; +*) + echo "Unknown command " + $1 + exit 2 +esac + diff --git a/src/contrib/build-contrib.xml b/src/contrib/build-contrib.xml new file mode 100644 index 0000000..276516e --- /dev/null +++ b/src/contrib/build-contrib.xml @@ -0,0 +1,248 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/contrib/build.xml b/src/contrib/build.xml new file mode 100644 index 0000000..7f7ba4f --- /dev/null +++ b/src/contrib/build.xml @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/contrib/fatjar/README.txt b/src/contrib/fatjar/README.txt new file mode 100644 index 0000000..f8027ae --- /dev/null +++ b/src/contrib/fatjar/README.txt @@ -0,0 +1,2 @@ +This package contains build to create a fat zookeeper jar. You need to run ant to create the fat jar. +To run the fatjar you can use. java -jar zoookeeper-*fatjar.jar diff --git a/src/contrib/fatjar/build.xml b/src/contrib/fatjar/build.xml new file mode 100644 index 0000000..8935f39 --- /dev/null +++ b/src/contrib/fatjar/build.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/contrib/fatjar/conf/mainClasses b/src/contrib/fatjar/conf/mainClasses new file mode 100644 index 0000000..2b0fc83 --- /dev/null +++ b/src/contrib/fatjar/conf/mainClasses @@ -0,0 +1,10 @@ +::Client Commands +client:org.apache.zookeeper.ZooKeeperMain:Client shell to ZooKeeper +::Server Commands +server:org.apache.zookeeper.server.quorum.QuorumPeerMain:Start ZooKeeper server +::Test Commands +generateLoad:org.apache.zookeeper.test.system.GenerateLoad:A distributed load generator for testing +quorumBench:org.apache.zookeeper.server.QuorumBenchmark:A benchmark of just the quorum protocol +abBench:org.apache.zookeeper.server.quorum.AtomicBroadcastBenchmark:A benchmark of just the atomic broadcast +ic:org.apache.zookeeper.test.system.InstanceContainer:A container that will instantiate classes as directed by an instance manager +systest:org.apache.zookeeper.test.system.BaseSysTest:Start system test diff --git a/src/contrib/fatjar/src/java/org/apache/zookeeper/util/FatJarMain.java b/src/contrib/fatjar/src/java/org/apache/zookeeper/util/FatJarMain.java new file mode 100644 index 0000000..bdf0eae --- /dev/null +++ b/src/contrib/fatjar/src/java/org/apache/zookeeper/util/FatJarMain.java @@ -0,0 +1,126 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.zookeeper.util; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.HashMap; + +/** + * This is a generic Main class that is completely driven by the + * /mainClasses resource on the class path. This resource has the + * format: + *

+ * cmd:mainClass:Description
+ * 
+ * Any lines starting with # will be skipped + * + */ +public class FatJarMain { + static class Cmd { + Cmd(String cmd, String clazz, String desc) { + this.cmd = cmd; + this.clazz = clazz; + this.desc = desc; + } + String cmd; + String clazz; + String desc; + } + static HashMap cmds = new HashMap(); + static ArrayList order = new ArrayList(); + + /** + * @param args the first parameter of args will be used as an + * index into the /mainClasses resource. The rest will be passed + * to the mainClass to run. + * @throws IOException + * @throws ClassNotFoundException + * @throws NoSuchMethodException + * @throws SecurityException + * @throws IllegalAccessException + * @throws IllegalArgumentException + */ + public static void main(String[] args) throws IOException, ClassNotFoundException, SecurityException, NoSuchMethodException, IllegalArgumentException, IllegalAccessException { + InputStream is = FatJarMain.class.getResourceAsStream("/mainClasses"); + if (is == null) { + System.err.println("Couldn't find /mainClasses in classpath."); + System.exit(3); + } + BufferedReader br = new BufferedReader(new InputStreamReader(is)); + String line; + while((line = br.readLine()) != null) { + String parts[] = line.split(":", 3); + if (parts.length != 3 || (parts[0].length() > 0 && parts[0].charAt(0) == '#')) { + continue; + } + if (parts[0].length() > 0) { + cmds.put(parts[0], new Cmd(parts[0], parts[1], parts[2])); + // We use the order array to preserve the order of the commands + // for help. The hashmap will not preserver order. (It may be overkill.) + order.add(parts[0]); + } else { + // Just put the description in + order.add(parts[2]); + } + } + if (args.length == 0) { + doHelp(); + return; + } + Cmd cmd = cmds.get(args[0]); + if (cmd == null) { + doHelp(); + return; + } + Class clazz = Class.forName(cmd.clazz); + Method main = clazz.getMethod("main", String[].class); + String newArgs[] = new String[args.length-1]; + System.arraycopy(args, 1, newArgs, 0, newArgs.length); + try { + main.invoke(null, (Object)newArgs); + } catch(InvocationTargetException e) { + if (e.getCause() != null) { + e.getCause().printStackTrace(); + } else { + e.printStackTrace(); + } + } + } + + private static void doHelp() { + System.err.println("USAGE: FatJarMain cmd args"); + System.err.println("Available cmds:"); + for(String c: order) { + Cmd cmd = cmds.get(c); + if (cmd != null) { + System.err.println(" " + c + " " + cmd.desc); + } else { + System.err.println(c); + } + } + System.exit(2); + } + +} diff --git a/src/contrib/huebrowser/README b/src/contrib/huebrowser/README new file mode 100644 index 0000000..c03ea90 --- /dev/null +++ b/src/contrib/huebrowser/README @@ -0,0 +1,62 @@ + +ZooKeeper Browser - Hue Application +=================================== + +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. + +Requirements +------------ + +Hue-1.0: + * http://github.com/downloads/cloudera/hue/hue-1.0.tgz + * http://github.com/downloads/cloudera/hue/release-notes-1.0.html + +ZooKeeper REST gateway: + * available as contrib: contrib/rest + +How to install? +--------------- + +First of all you need to install Hue 1.0 release: + + * http://archive.cloudera.com/cdh/3/hue/sdk/sdk.html + * http://github.com/cloudera/hue/tree/release-1.0 + +After you finish the previous step you should copy the zkui/ folder to apps/ and register the new application: + + * $ ./build/env/bin/python tools/app_reg/app_reg.py --install apps/zkui + * $ ./build/env/bin/python tools/app_reg/app_reg.py --list 2>&1 | grep zkui + zkui 0.1 /Users/philip/src/hue/apps/zkui + + +And restart the Hue application server. + +Configuration +------------- + +Edit zkui/src/zkui/settings.py: + +CLUSTERS = [{ + 'nice_name': 'Default', + 'hostport': 'localhost:2181,localhost:2182,localhost:2183', + 'rest_gateway': 'http://localhost:9998' + }, { + # ... and more clusters + } +] + +What is Hue? +------------ + +Wiki: http://wiki.github.com/cloudera/hue/ +Main Repo: http://github.com/cloudera/hue + +Hue is both a web UI for Hadoop and a framework to create interactive web applications. It features a FileBrowser for accessing HDFS, JobSub and JobBrowser applications for submitting and viewing MapReduce jobs, a Beeswax application for interacting with Hive. On top of that, the web frontend is mostly built from declarative widgets that require no JavaScript and are easy to learn. + +What is ZooKeeper? +------------------ + +http://zookeeper.apache.org/ + +ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services. All of these kinds of services are used in some form or another by distributed applications. Each time they are implemented there is a lot of work that goes into fixing the bugs and race conditions that are inevitable. Because of the difficulty of implementing these kinds of services, applications initially usually skimp on them ,which make them brittle in the presence of change and difficult to manage. Even when done correctly, different implementations of these services lead to management complexity when the applications are deployed. + diff --git a/src/contrib/huebrowser/zkui/Makefile b/src/contrib/huebrowser/zkui/Makefile new file mode 100644 index 0000000..9c22d1c --- /dev/null +++ b/src/contrib/huebrowser/zkui/Makefile @@ -0,0 +1,21 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +ifeq ($(ROOT),) + $(error "Error: Expect the environment variable $$ROOT to point to the Desktop installation") +endif + +include $(ROOT)/Makefile.sdk diff --git a/src/contrib/huebrowser/zkui/setup.py b/src/contrib/huebrowser/zkui/setup.py new file mode 100644 index 0000000..68d1352 --- /dev/null +++ b/src/contrib/huebrowser/zkui/setup.py @@ -0,0 +1,46 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +from setuptools import setup, find_packages +import os + +def expand_package_data(src_dirs, strip=""): + ret = [] + for src_dir in src_dirs: + for path, dnames, fnames in os.walk(src_dir): + for fname in fnames: + ret.append(os.path.join(path, fname).replace(strip, "")) + return ret + +os.chdir(os.path.dirname(os.path.abspath(__file__))) +setup( + name = "zkui", + version = "0.1", + url = 'http://zookeeper.apache.org/', + description = 'ZooKeeper Browser', + packages = find_packages('src'), + package_dir = {'': 'src'}, + install_requires = ['setuptools', 'desktop'], + entry_points = { 'desktop.sdk.application': 'zkui=zkui' }, + zip_safe = False, + package_data = { + # Include static resources. Package_data doesn't + # deal well with directory globs, so we enumerate + # the files manually. + 'zkui': expand_package_data( + ["src/zkui/templates", "src/zkui/static"], + "src/zkui/") + } +) diff --git a/src/contrib/huebrowser/zkui/src/zkui/__init__.py b/src/contrib/huebrowser/zkui/src/zkui/__init__.py new file mode 100644 index 0000000..eccc881 --- /dev/null +++ b/src/contrib/huebrowser/zkui/src/zkui/__init__.py @@ -0,0 +1,16 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/src/contrib/huebrowser/zkui/src/zkui/forms.py b/src/contrib/huebrowser/zkui/src/zkui/forms.py new file mode 100644 index 0000000..6b1f178 --- /dev/null +++ b/src/contrib/huebrowser/zkui/src/zkui/forms.py @@ -0,0 +1,29 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from django import forms +from django.forms.widgets import Textarea, HiddenInput + +class CreateZNodeForm(forms.Form): + name = forms.CharField(max_length=64) + data = forms.CharField(required=False, widget=Textarea) + sequence = forms.BooleanField(required=False) + +class EditZNodeForm(forms.Form): + data = forms.CharField(required=False, widget=Textarea) + version = forms.IntegerField(required=False, widget=HiddenInput) + + diff --git a/src/contrib/huebrowser/zkui/src/zkui/models.py b/src/contrib/huebrowser/zkui/src/zkui/models.py new file mode 100644 index 0000000..a46696b --- /dev/null +++ b/src/contrib/huebrowser/zkui/src/zkui/models.py @@ -0,0 +1,17 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + diff --git a/src/contrib/huebrowser/zkui/src/zkui/rest.py b/src/contrib/huebrowser/zkui/src/zkui/rest.py new file mode 100644 index 0000000..e4874a1 --- /dev/null +++ b/src/contrib/huebrowser/zkui/src/zkui/rest.py @@ -0,0 +1,230 @@ + +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import urllib2 +import urllib +import simplejson + +from contextlib import contextmanager + +class RequestWithMethod(urllib2.Request): + """ Request class that know how to set the method name """ + def __init__(self, *args, **kwargs): + urllib2.Request.__init__(self, *args, **kwargs) + self._method = None + + def get_method(self): + return self._method or \ + urllib2.Request.get_method(self) + + def set_method(self, method): + self._method = method + +class ZooKeeper(object): + + class Error(Exception): pass + + class NotFound(Error): pass + + class ZNodeExists(Error): pass + + class InvalidSession(Error): pass + + class WrongVersion(Error): pass + + def __init__(self, uri = 'http://localhost:9998'): + self._base = uri + self._session = None + + def start_session(self, expire=5, id=None): + """ Create a session and return the ID """ + if id is None: + url = "%s/sessions/v1/?op=create&expire=%d" % (self._base, expire) + self._session = self._do_post(url)['id'] + else: + self._session = id + return self._session + + def close_session(self): + """ Close the session on the server """ + if self._session is not None: + url = '%s/sessions/v1/%s' % (self._base, self._session) + self._do_delete(url) + self._session = None + + def heartbeat(self): + """ Send a heartbeat request. This is needed in order to keep a session alive """ + if self._session is not None: + url = '%s/sessions/v1/%s' % (self._base, self._session) + self._do_put(url, '') + + @contextmanager + def session(self, *args, **kwargs): + """ Session handling using a context manager """ + yield self.start_session(*args, **kwargs) + self.close_session() + + def get(self, path): + """ Get a node """ + url = "%s/znodes/v1%s" % (self._base, path) + return self._do_get(url) + + def get_children(self, path): + """ Get all the children for a given path. This function creates a generator """ + for child_path in self.get_children_paths(path, uris=True): + try: + yield self._do_get(child_path) + except ZooKeeper.NotFound: + continue + + def get_children_paths(self, path, uris=False): + """ Get the paths for children nodes """ + url = "%s/znodes/v1%s?view=children" % (self._base, path) + resp = self._do_get(url) + for child in resp.get('children', []): + yield child if not uris else resp['child_uri_template']\ + .replace('{child}', urllib2.quote(child)) + + def create(self, path, data=None, sequence=False, ephemeral=False): + """ Create a new node. By default this call creates a persistent znode. + + You can also create an ephemeral or a sequential znode. + """ + ri = path.rindex('/') + head, name = path[:ri+1], path[ri+1:] + if head != '/': head = head[:-1] + + flags = { + 'null': 'true' if data is None else 'false', + 'ephemeral': 'true' if ephemeral else 'false', + 'sequence': 'true' if sequence else 'false' + } + if ephemeral: + if self._session: + flags['session'] = self._session + else: + raise ZooKeeper.Error, 'You need a session '\ + 'to create an ephemeral node' + flags = urllib.urlencode(flags) + + url = "%s/znodes/v1%s?op=create&name=%s&%s" % \ + (self._base, head, name, flags) + + return self._do_post(url, data) + + def set(self, path, data=None, version=-1, null=False): + """ Set the value of node """ + url = "%s/znodes/v1%s?%s" % (self._base, path, \ + urllib.urlencode({ + 'version': version, + 'null': 'true' if null else 'false' + })) + return self._do_put(url, data) + + def delete(self, path, version=-1): + """ Delete a znode """ + if type(path) is list: + map(lambda el: self.delete(el, version), path) + return + + url = '%s/znodes/v1%s?%s' % (self._base, path, \ + urllib.urlencode({ + 'version':version + })) + try: + return self._do_delete(url) + except urllib2.HTTPError, e: + if e.code == 412: + raise ZooKeeper.WrongVersion(path) + elif e.code == 404: + raise ZooKeeper.NotFound(path) + raise + + def recursive_delete(self, path): + """ Delete all the nodes from the tree """ + for child in self.get_children_paths(path): + fp = ("%s/%s" % (path, child)).replace('//', '/') + self.recursive_delete(fp) + self.delete(path) + + def exists(self, path): + """ Do a znode exists """ + try: + self.get(path) + return True + except ZooKeeper.NotFound: + return False + + def _do_get(self, uri): + """ Send a GET request and convert errors to exceptions """ + try: + req = urllib2.urlopen(uri) + resp = simplejson.load(req) + + if 'Error' in resp: + raise ZooKeeper.Error(resp['Error']) + + return resp + except urllib2.HTTPError, e: + if e.code == 404: + raise ZooKeeper.NotFound(uri) + raise + + def _do_post(self, uri, data=None): + """ Send a POST request and convert errors to exceptions """ + try: + req = urllib2.Request(uri, {}) + req.add_header('Content-Type', 'application/octet-stream') + if data is not None: + req.add_data(data) + + resp = simplejson.load(urllib2.urlopen(req)) + if 'Error' in resp: + raise ZooKeeper.Error(resp['Error']) + return resp + + except urllib2.HTTPError, e: + if e.code == 201: + return True + elif e.code == 409: + raise ZooKeeper.ZNodeExists(uri) + elif e.code == 401: + raise ZooKeeper.InvalidSession(uri) + raise + + def _do_delete(self, uri): + """ Send a DELETE request """ + req = RequestWithMethod(uri) + req.set_method('DELETE') + req.add_header('Content-Type', 'application/octet-stream') + return urllib2.urlopen(req).read() + + def _do_put(self, uri, data): + """ Send a PUT request """ + try: + req = RequestWithMethod(uri) + req.set_method('PUT') + req.add_header('Content-Type', 'application/octet-stream') + if data is not None: + req.add_data(data) + + return urllib2.urlopen(req).read() + except urllib2.HTTPError, e: + if e.code == 412: # precondition failed + raise ZooKeeper.WrongVersion(uri) + raise + diff --git a/src/contrib/huebrowser/zkui/src/zkui/settings.py b/src/contrib/huebrowser/zkui/src/zkui/settings.py new file mode 100644 index 0000000..844c695 --- /dev/null +++ b/src/contrib/huebrowser/zkui/src/zkui/settings.py @@ -0,0 +1,30 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +DJANGO_APPS = [ "zkui" ] +NICE_NAME = "ZooKeeper Browser" +REQUIRES_HADOOP = False + +CLUSTERS = [{ + 'nice_name': 'Default', + 'hostport': 'localhost:2181,localhost:2182,localhost:2183', + 'rest_gateway': 'http://localhost:9998' + } +] + +DEPENDER_PACKAGE_YMLS = [ + "src/zkui/static/js/package.yml", +] diff --git a/src/contrib/huebrowser/zkui/src/zkui/static/art/line_icons.png b/src/contrib/huebrowser/zkui/src/zkui/static/art/line_icons.png new file mode 100644 index 0000000000000000000000000000000000000000..1da4a294b34c5bcfe27ce676c85a2f363bab95c7 GIT binary patch literal 7499 zcmV-R9kk+!P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;K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>DErAe_FSrQRA&4S^$VW33wm&<(8bH-lqH2II z0s=L{FZl>X-~}P3WpKjzbCyUEh$nusX2Y1RInVWQ0|os(WGQ|vc-eLQyN5@z^la}X zmm4KFP$1Ktr!weJ=&zD&FpDQ%G-F}pn=eZuybvN6s%3}4T_pm~XLL`I;lXTr#-fh& zVYS@pv&OBTQg5%wR3div_r0`sNAJR-?=kou;`meduPa@C`#Ho-hWR+8fFT z==SnC`qz0atC!t+)4(%pKRr?^Q}c>H_~7yh#EhJmo5CGPQ~<@cfn4x=>@d;QrnpKg1= z(EO9aP(jng3qM&?`Ob=Ul@|^Pt`cc$S`#Xs9})Ls^!M*$+W2|`p&{h{Ymn7QzU3GG z#ifn^6Nd6^+mI;2B_L!UN=~* zG?tvmR1|@#&^EPMJM*n{98f5bD64ccMkF+ZP_W__n{s7{g8f&}kSL)v-`{S$>5f)o zEI4<#>L!Cw!3_je$70lt*p{K`no}FT_@;BfAi92Llfp#{;%JJ(tXA0A>)tY4u8ynu zk*O*QQK(UIg&E3sUJCCC?wOZg^T)Nce8aE|49!ASRoqB`qJR)YLLtyilF2t`?rx|W z#hOLghk~n;DMj=a9J)sW_KZ088@%%L_zfC?Er3x+Vbqh2tcaT0-s0- z{0Qm{!BFLmd%}DrT4!hqDN~0iL{%abMPgeTDZ?kF2RH%LYLap!7$`=E?oa?UMXXW{ z>**;S<4zwiOf+j0Rgow{M<^PxxP={$8Q(hXsN3N5yJc;N1N{AKyc z^P85`Ja6&j3GIt}Gsd#e579LRAp`*e!;G!o+@F2+b(x-#=-Jk^=nSi3nM9&%5JeF> z&`_^-DpJ0oY!FGlYD%dd-KrB1ArUB2kTL`k7_CI7DT2ifmb%(D#4|zk?i=R+1IrTE UeFd$x$^ZZW07*qoM6N<$f+d!kO#lD@ literal 0 HcmV?d00001 diff --git a/src/contrib/huebrowser/zkui/src/zkui/static/bootstrap.js b/src/contrib/huebrowser/zkui/src/zkui/static/bootstrap.js new file mode 100644 index 0000000..8e3fbfb --- /dev/null +++ b/src/contrib/huebrowser/zkui/src/zkui/static/bootstrap.js @@ -0,0 +1,32 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +CCS.Desktop.register({ + Zkui : { + name : 'ZooKeeper Browser', + css : '/zkui/static/css/zkui.css', + require: [ 'Zkui' ], + launch: function(path, options){ + return new Zkui(path || '/zkui/', options); + }, + menu: { + id: 'ccs-zkui-menu', + img: { + src: '/zkui/static/art/zkui.png' + } + }, + help: '/help/zkui/' + } +}); diff --git a/src/contrib/huebrowser/zkui/src/zkui/static/css/zkui.css b/src/contrib/huebrowser/zkui/src/zkui/static/css/zkui.css new file mode 100644 index 0000000..c49f392 --- /dev/null +++ b/src/contrib/huebrowser/zkui/src/zkui/static/css/zkui.css @@ -0,0 +1,56 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +.zkui img.zkui_icon { + width: 55px; + height: 55px; + position: absolute; + top: 27px; + left: 3px; +} + +div.zkui .left_col li { + margin: 5px 0px; + font-size: 16px; + background-color: white; + color: black; + padding: 2px 1px 1px 5px; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border: solid black 1px; +} + +div.zkui .left_col li:hover { + background-color: lightBlue; + color: white; +} + +div.zkui .left_col li a { + color: black; + display: block; +} + +div.zkui .left_col li a:hover { + text-decoration: none; +} + +div.zkui .createZnodeForm td, +div.zkui .editZnodeForm td { + padding: 5px; +} + diff --git a/src/contrib/huebrowser/zkui/src/zkui/static/help/index.html b/src/contrib/huebrowser/zkui/src/zkui/static/help/index.html new file mode 100644 index 0000000..355c8cd --- /dev/null +++ b/src/contrib/huebrowser/zkui/src/zkui/static/help/index.html @@ -0,0 +1,26 @@ + + +

ZooKeeper Browser

+ + +

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

+ +

About

+ +

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.

+ diff --git a/src/contrib/huebrowser/zkui/src/zkui/static/js/Source/Zkui/Zkui.js b/src/contrib/huebrowser/zkui/src/zkui/static/js/Source/Zkui/Zkui.js new file mode 100644 index 0000000..c8bf383 --- /dev/null +++ b/src/contrib/huebrowser/zkui/src/zkui/static/js/Source/Zkui/Zkui.js @@ -0,0 +1,50 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/* +--- + +script: Zkui.js + +description: Defines Zkui; a Hue application that extends CCS.JBrowser. + +authors: +- Unknown + +requires: +- ccs-shared/CCS.JBrowser + +provides: [Zkui] + +... +*/ +ART.Sheet.define('window.art.browser.zkui', { + 'min-width': 620 +}); + +var Zkui = new Class({ + + Extends: CCS.JBrowser, + + options: { + className: 'art browser logo_header zkui' + }, + + initialize: function(path, options){ + this.parent(path || '/zkui/', options); + } + +}); diff --git a/src/contrib/huebrowser/zkui/src/zkui/static/js/package.yml b/src/contrib/huebrowser/zkui/src/zkui/static/js/package.yml new file mode 100644 index 0000000..c2c07ad --- /dev/null +++ b/src/contrib/huebrowser/zkui/src/zkui/static/js/package.yml @@ -0,0 +1,19 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +copyright: Apache License v2.0 +version: 0.1 +description: ZooKeeper Browser +name: ZooKeeper Browser +sources: [Source/Zkui/Zkui.js] diff --git a/src/contrib/huebrowser/zkui/src/zkui/stats.py b/src/contrib/huebrowser/zkui/src/zkui/stats.py new file mode 100644 index 0000000..48f35dd --- /dev/null +++ b/src/contrib/huebrowser/zkui/src/zkui/stats.py @@ -0,0 +1,170 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import socket +import re + +from StringIO import StringIO + +class Session(object): + + class BrokenLine(Exception): pass + + def __init__(self, session): + m = re.search('/(\d+\.\d+\.\d+\.\d+):(\d+)\[(\d+)\]\((.*)\)', session) + if m: + self.host = m.group(1) + self.port = m.group(2) + self.interest_ops = m.group(3) + for d in m.group(4).split(","): + k,v = d.split("=") + self.__dict__[k] = v + else: + raise Session.BrokenLine() + +class ZooKeeperStats(object): + + def __init__(self, host='localhost', port='2181', timeout=1): + self._address = (host, int(port)) + self._timeout = timeout + + def get_stats(self): + """ Get ZooKeeper server stats as a map """ + data = self._send_cmd('mntr') + if data: + return self._parse(data) + else: + data = self._send_cmd('stat') + return self._parse_stat(data) + + def get_clients(self): + """ Get ZooKeeper server clients """ + clients = [] + + stat = self._send_cmd('stat') + if not stat: + return clients + + sio = StringIO(stat) + + #skip two lines + sio.readline() + sio.readline() + + for line in sio: + if not line.strip(): + break + try: + clients.append(Session(line.strip())) + except Session.BrokenLine: + continue + + return clients + + def _create_socket(self): + return socket.socket() + + def _send_cmd(self, cmd): + """ Send a 4letter word command to the server """ + s = self._create_socket() + s.settimeout(self._timeout) + + s.connect(self._address) + s.send(cmd) + + data = s.recv(2048) + s.close() + + return data + + def _parse(self, data): + """ Parse the output from the 'mntr' 4letter word command """ + h = StringIO(data) + + result = {} + for line in h.readlines(): + try: + key, value = self._parse_line(line) + result[key] = value + except ValueError: + pass # ignore broken lines + + return result + + def _parse_stat(self, data): + """ Parse the output from the 'stat' 4letter word command """ + h = StringIO(data) + + result = {} + + version = h.readline() + if version: + result['zk_version'] = version[version.index(':')+1:].strip() + + # skip all lines until we find the empty one + while h.readline().strip(): pass + + for line in h.readlines(): + m = re.match('Latency min/avg/max: (\d+)/(\d+)/(\d+)', line) + if m is not None: + result['zk_min_latency'] = int(m.group(1)) + result['zk_avg_latency'] = int(m.group(2)) + result['zk_max_latency'] = int(m.group(3)) + continue + + m = re.match('Received: (\d+)', line) + if m is not None: + result['zk_packets_received'] = int(m.group(1)) + continue + + m = re.match('Sent: (\d+)', line) + if m is not None: + result['zk_packets_sent'] = int(m.group(1)) + continue + + m = re.match('Outstanding: (\d+)', line) + if m is not None: + result['zk_outstanding_requests'] = int(m.group(1)) + continue + + m = re.match('Mode: (.*)', line) + if m is not None: + result['zk_server_state'] = m.group(1) + continue + + m = re.match('Node count: (\d+)', line) + if m is not None: + result['zk_znode_count'] = int(m.group(1)) + continue + + return result + + def _parse_line(self, line): + try: + key, value = map(str.strip, line.split('\t')) + except ValueError: + raise ValueError('Found invalid line: %s' % line) + + if not key: + raise ValueError('The key is mandatory and should not be empty') + + try: + value = int(value) + except (TypeError, ValueError): + pass + + return key, value + diff --git a/src/contrib/huebrowser/zkui/src/zkui/templates/clients.mako b/src/contrib/huebrowser/zkui/src/zkui/templates/clients.mako new file mode 100644 index 0000000..2bee9a7 --- /dev/null +++ b/src/contrib/huebrowser/zkui/src/zkui/templates/clients.mako @@ -0,0 +1,51 @@ +<%! +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +%> + +<%namespace name="shared" file="shared_components.mako" /> + +${shared.header("ZooKeeper Browser > Clients > %s:%s" % (host, port))} + +

${host}:${port} :: client connections

+
+ +% if clients: + + + + + + + + + + + % for client in clients: + + + + + + + + + % endfor +
HostPortInterest OpsQueuedReceivedSent
${client.host}${client.port}${client.interest_ops}${client.queued}${client.recved}${client.sent}
+% endif + +${shared.footer()} + diff --git a/src/contrib/huebrowser/zkui/src/zkui/templates/create.mako b/src/contrib/huebrowser/zkui/src/zkui/templates/create.mako new file mode 100644 index 0000000..2a8b8cc --- /dev/null +++ b/src/contrib/huebrowser/zkui/src/zkui/templates/create.mako @@ -0,0 +1,34 @@ +<%! +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +%> +<%namespace name="shared" file="shared_components.mako" /> + +${shared.header("ZooKeeper Browser > Create Znode")} + +

Create New Znode :: ${path}

+

+ +
+ + ${form.as_table()|n} + +
+ +
+
+ +${shared.footer()} diff --git a/src/contrib/huebrowser/zkui/src/zkui/templates/edit.mako b/src/contrib/huebrowser/zkui/src/zkui/templates/edit.mako new file mode 100644 index 0000000..997bd07 --- /dev/null +++ b/src/contrib/huebrowser/zkui/src/zkui/templates/edit.mako @@ -0,0 +1,34 @@ +<%! +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +%> +<%namespace name="shared" file="shared_components.mako" /> + +${shared.header("ZooKeeper Browser > Edit Znode > %s" % path)} + +

Edit Znode Data :: ${path}

+

+ +
+ + ${form.as_table()|n} + +
+ +
+
+ +${shared.footer()} diff --git a/src/contrib/huebrowser/zkui/src/zkui/templates/index.mako b/src/contrib/huebrowser/zkui/src/zkui/templates/index.mako new file mode 100644 index 0000000..567919d --- /dev/null +++ b/src/contrib/huebrowser/zkui/src/zkui/templates/index.mako @@ -0,0 +1,54 @@ +<%! +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +%> +<%namespace name="shared" file="shared_components.mako" /> + +${shared.header("ZooKeeper Browser")} + +

Overview

+ +
+ +% for i, c in enumerate(overview): +

${i+1}. ${c['nice_name']} Cluster Overview


+ + + + + + + + + + + + % for host, stats in c['stats'].items(): + + + + + + + + % endfor +
NodeRoleAvg LatencyWatch CountVersion
${host}${stats.get('zk_server_state', '')}${stats.get('zk_avg_latency', '')}${stats.get('zk_watch_count', '')}${stats.get('zk_version', '')}
+ +

+% endfor + +${shared.footer()} + diff --git a/src/contrib/huebrowser/zkui/src/zkui/templates/shared_components.mako b/src/contrib/huebrowser/zkui/src/zkui/templates/shared_components.mako new file mode 100644 index 0000000..f9a4589 --- /dev/null +++ b/src/contrib/huebrowser/zkui/src/zkui/templates/shared_components.mako @@ -0,0 +1,66 @@ +<%! +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +%> + +<%! +import datetime +from django.template.defaultfilters import urlencode, escape +from zkui import settings +%> + +<%def name="header(title='ZooKeeper Browser', toolbar=True)"> + + + + ${title} + + + % if toolbar: +
+ +
+ % endif + +
+
+ +
+ +

Clusters

+ +
+ +
+ + +<%def name="info_button(url, text)"> + ${text} + + +<%def name="footer()"> +
+
+ + + diff --git a/src/contrib/huebrowser/zkui/src/zkui/templates/tree.mako b/src/contrib/huebrowser/zkui/src/zkui/templates/tree.mako new file mode 100644 index 0000000..c74c202 --- /dev/null +++ b/src/contrib/huebrowser/zkui/src/zkui/templates/tree.mako @@ -0,0 +1,75 @@ +<%! +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +%> +<%namespace name="shared" file="shared_components.mako" /> + +${shared.header("ZooKeeper Browser > Tree > %s > %s" % (cluster['nice_name'], path))} + +

${cluster['nice_name'].lower()} :: ${path}

+
+ + + + + + % for child in children: + + % endfor +
Children
+ + ${child} + + Delete +
+
+ + ${shared.info_button(url('zkui.views.create', id=cluster['id'], path=path), 'Create New')} + + +
+ +

data :: base64 :: length :: ${znode.get('dataLength', 0)}

+
+ + +
+ + ${shared.info_button(url('zkui.views.edit_as_base64', id=cluster['id'], path=path), 'Edit as Base64')} + ${shared.info_button(url('zkui.views.edit_as_text', id=cluster['id'], path=path), 'Edit as Text')} + +
+
+ +

stat information

+
+ + + + + % for key in ('pzxid', 'ctime', 'aversion', 'mzxid', \ + 'ephemeralOwner', 'version', 'mtime', 'cversion', 'czxid'): + + % endfor +
KeyValue
${key}${znode[key]}
+ +
+Details on stat information. + +${shared.footer()} + diff --git a/src/contrib/huebrowser/zkui/src/zkui/templates/view.mako b/src/contrib/huebrowser/zkui/src/zkui/templates/view.mako new file mode 100644 index 0000000..e046afc --- /dev/null +++ b/src/contrib/huebrowser/zkui/src/zkui/templates/view.mako @@ -0,0 +1,128 @@ +<%! +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +%> +<%namespace name="shared" file="shared_components.mako" /> + +${shared.header("ZooKeeper Browser > %s" % cluster['nice_name'])} + +<%def name="show_stats(stats)"> + + Key + Value + + + Version + ${stats.get('zk_version')} + + + Latency + Min: ${stats.get('zk_min_latency', '')} + Avg: ${stats.get('zk_avg_latency', '')} + Max: ${stats.get('zk_max_latency', '')} + + + Packets + Sent: ${stats.get('zk_packets_sent', '')} + Received: ${stats.get('zk_packets_received', '')} + + + + Outstanding Requests + ${stats.get('zk_outstanding_requests', '')} + + + Watch Count + ${stats.get('zk_watch_count', '')} + + + Open FD Count + ${stats.get('zk_open_file_descriptor_count', '')} + + + Max FD Count + ${stats.get('zk_max_file_descriptor_count', '')} + + + + +

${cluster['nice_name']} Cluster Overview

+ +${shared.info_button(url('zkui.views.tree', id=cluster['id'], path='/'), 'View Znode Hierarchy')} + +

+ +% if leader: +

General

+ + + + + + + + + + + + + + + +
KeyValue
ZNode Count${leader.get('zk_znode_count', '')}
Ephemerals Count${leader.get('zk_ephemerals_count', '')}
Approximate Data Size${leader.get('zk_approximate_data_size', '')} bytes
+

+% endif + +% if leader: +

node :: ${leader['host']} :: leader

+ + ${shared.info_button(url('zkui.views.clients', host=leader['host']), 'View Client Connections')} + +

+ + ${show_stats(leader)} + + + + + + + + + + + + + +
Followers${leader.get('zk_followers', '')}
Synced Followers${leader.get('zk_synced_followers', '')}
Pending Syncs${leader.get('zk_pending_syncs', '')}
+

+% endif + +% for stats in followers: +

node :: ${stats['host']} :: follower

+
+ + ${shared.info_button(url('zkui.views.clients', host=stats['host']), 'View Client Connections')} + +

+ + ${show_stats(stats)} +
+

+% endfor + +${shared.footer()} + diff --git a/src/contrib/huebrowser/zkui/src/zkui/urls.py b/src/contrib/huebrowser/zkui/src/zkui/urls.py new file mode 100644 index 0000000..f795f7e --- /dev/null +++ b/src/contrib/huebrowser/zkui/src/zkui/urls.py @@ -0,0 +1,28 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from django.conf.urls.defaults import patterns, url + +urlpatterns = patterns('zkui', + url(r'^$', 'views.index'), + url(r'view/(?P\d+)$', 'views.view'), + url(r'clients/(?P.+)$', 'views.clients'), + url(r'tree/(?P\d+)(?P.+)$', 'views.tree'), + url(r'create/(?P\d+)(?P.*)$', 'views.create'), + url(r'delete/(?P\d+)(?P.*)$', 'views.delete'), + url(r'edit/base64/(?P\d+)(?P.*)$', 'views.edit_as_base64'), + url(r'edit/text/(?P\d+)(?P.*)$', 'views.edit_as_text') +) diff --git a/src/contrib/huebrowser/zkui/src/zkui/utils.py b/src/contrib/huebrowser/zkui/src/zkui/utils.py new file mode 100644 index 0000000..fb01317 --- /dev/null +++ b/src/contrib/huebrowser/zkui/src/zkui/utils.py @@ -0,0 +1,33 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from zkui import settings + +from django.http import Http404 + +def get_cluster_or_404(id): + try: + id = int(id) + if not (0 <= id < len(settings.CLUSTERS)): + raise ValueError, 'Undefined cluster id.' + except (TypeError, ValueError): + raise Http404() + + cluster = settings.CLUSTERS[id] + cluster['id'] = id + + return cluster + diff --git a/src/contrib/huebrowser/zkui/src/zkui/views.py b/src/contrib/huebrowser/zkui/src/zkui/views.py new file mode 100644 index 0000000..64d926b --- /dev/null +++ b/src/contrib/huebrowser/zkui/src/zkui/views.py @@ -0,0 +1,165 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from desktop.lib.django_util import render +from django.http import Http404 + +from zkui import settings +from zkui.stats import ZooKeeperStats +from zkui.rest import ZooKeeper +from zkui.utils import get_cluster_or_404 +from zkui.forms import CreateZNodeForm, EditZNodeForm + +def _get_global_overview(): + overview = [] + for c in settings.CLUSTERS: + overview.append(_get_overview(c)) + return overview + +def _get_overview(cluster): + stats = {} + for s in cluster['hostport'].split(','): + host, port = map(str.strip, s.split(':')) + + zks = ZooKeeperStats(host, port) + stats[s] = zks.get_stats() or {} + + cluster['stats'] = stats + return cluster + +def _group_stats_by_role(cluster): + leader, followers = None, [] + for host, stats in cluster['stats'].items(): + stats['host'] = host + + if stats.get('zk_server_state') == 'leader': + leader = stats + + elif stats.get('zk_server_state') == 'follower': + followers.append(stats) + + return leader, followers + +def index(request): + overview = _get_global_overview() + return render('index.mako', request, + dict(overview=overview)) + +def view(request, id): + cluster = get_cluster_or_404(id) + + cluster = _get_overview(cluster) + leader, followers = _group_stats_by_role(cluster) + + return render('view.mako', request, + dict(cluster=cluster, leader=leader, followers=followers)) + +def clients(request, host): + parts = host.split(':') + if len(parts) != 2: + raise Http404 + + host, port = parts + zks = ZooKeeperStats(host, port) + clients = zks.get_clients() + + return render('clients.mako', request, + dict(host=host, port=port, clients=clients)) + +def tree(request, id, path): + cluster = get_cluster_or_404(id) + zk = ZooKeeper(cluster['rest_gateway']) + + znode = zk.get(path) + children = sorted(zk.get_children_paths(path)) + + return render('tree.mako', request, + dict(cluster=cluster, path=path, \ + znode=znode, children=children)) + +def delete(request, id, path): + cluster = get_cluster_or_404(id) + if request.method == 'POST': + zk = ZooKeeper(cluster['rest_gateway']) + try: + zk.recursive_delete(path) + except ZooKeeper.NotFound: + pass + + return tree(request, id, path[:path.rindex('/')] or '/') + +def create(request, id, path): + cluster = get_cluster_or_404(id) + + if request.method == 'POST': + form = CreateZNodeForm(request.POST) + if form.is_valid(): + zk = ZooKeeper(cluster['rest_gateway']) + + full_path = ("%s/%s" % (path, form.cleaned_data['name']))\ + .replace('//', '/') + + zk.create(full_path, \ + form.cleaned_data['data'], \ + sequence = form.cleaned_data['sequence']) + return tree(request, id, path) + else: + form = CreateZNodeForm() + + return render('create.mako', request, + dict(path=path, form=form)) + +def edit_as_base64(request, id, path): + cluster = get_cluster_or_404(id) + zk = ZooKeeper(cluster['rest_gateway']) + node = zk.get(path) + + if request.method == 'POST': + form = EditZNodeForm(request.POST) + if form.is_valid(): + # TODO is valid base64 string? + data = form.cleaned_data['data'].decode('base64') + zk.set(path, data, form.cleaned_data['version']) + + return tree(request, id, path) + else: + form = EditZNodeForm(dict(\ + data=node.get('data64', ''), + version=node.get('version', '-1'))) + + return render('edit.mako', request, + dict(path=path, form=form)) + +def edit_as_text(request, id, path): + cluster = get_cluster_or_404(id) + zk = ZooKeeper(cluster['rest_gateway']) + node = zk.get(path) + + if request.method == 'POST': + form = EditZNodeForm(request.POST) + if form.is_valid(): + zk.set(path, form.cleaned_data['data']) + + return tree(request, id, path) + else: + form = EditZNodeForm(dict(data=node.get('data64', '')\ + .decode('base64').strip(), + version=node.get('version', '-1'))) + + return render('edit.mako', request, + dict(path=path, form=form)) + + diff --git a/src/contrib/huebrowser/zkui/src/zkui/windmilltests.py b/src/contrib/huebrowser/zkui/src/zkui/windmilltests.py new file mode 100644 index 0000000..ba44e26 --- /dev/null +++ b/src/contrib/huebrowser/zkui/src/zkui/windmilltests.py @@ -0,0 +1,23 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from desktop.lib.windmill_util import logged_in_client + +def test_zkui(): + """ launches the default view for zkui """ + client = logged_in_client() + client.click(id='ccs-zkui-menu') + client.waits.forElement(classname='CCS-ZKUI', timeout='2000') diff --git a/src/contrib/loggraph/README.txt b/src/contrib/loggraph/README.txt new file mode 100644 index 0000000..1865fa5 --- /dev/null +++ b/src/contrib/loggraph/README.txt @@ -0,0 +1,69 @@ +LogGraph README + +1 - About +LogGraph is an application for viewing and filtering zookeeper logs. It can handle transaction logs and message logs. + +2 - Compiling + +Run "ant jar" in src/contrib/loggraph/. This will download all dependencies and compile all the loggraph code. + +Once compilation has finished, you can run it the the loggraph.sh script in src/contrib/loggraph/bin. This will start and embedded web server on your machine. +Navigate to http://localhost:8182/graph/main.html + +3 - Usage +LogGraph presents the user with 4 views, + + a) Simple log view + This view simply displays the log text. This isn't very useful without filters (see "Filtering the logs"). + + b) Server view + The server view shows the interactions between the different servers in an ensemble. The X axis represents time. + * Exceptions show up as red dots. Hovering your mouse over them will give you more details of the exception + * The colour of the line represents the election state of the server. + - orange means LOOKING for leader + - dark green means the server is the leader + - light green means the server is following a leader + - yellow means there isn't enough information to determine the state of the server. + * The gray arrows denote election messages between servers. Pink dashed arrows are messages that were sent but never delivered. + + c) Session view + The session view shows the lifetime of sessions on a server. Use the time filter to narrow down the view. Any more than about 2000 events will take a long time to view in your browser. + The X axis represents time. Each line is a session. The black dots represent events on the session. You can click on the black dots for more details of the event. + + d) Stats view + There is currently only one statistics view, Transactions/minute. Suggestions for other statistic views are very welcome. + +4 - Filtering the logs +The logs can be filtered in 2 ways, by time and by content. + +To filter by time simply move the slider to the desired start time. The time window specifies how many milliseconds after and including the start time will be displayed. + +Content filtering uses a adhoc filtering language, using prefix notation. The language looks somewhat similar to lisp. A statement in the language takes the form (op arg arg ....). A statement resolves to a boolean value. Statements can be nested. + +4.1 - Filter arguments +An argument can be a number, a string or a symbol. A number is any argument which starts with -, + or 0 to 9. If the number starts with 0x it is interpretted as hexidecimal. Otherwise it is interpretted as decimal. If the argument begins with a double-quote, (") it is interpretted as a string. Anything else is interpretted as a symbol. + +4.2 - Filter symbols +The possible filter symbols are: + +client-id : number, the session id of the client who initiated a transaction. +cxid : number, the cxid of a transaction +zxid : number, the zxid of a transaction +operation : string, the operation being performed, for example "setData", "createSession", "closeSession", "error", "create" + +4.3 - Filter operations +The possible filter operations are: + +or : logical or, takes 1 or more arguments which must be other statements. +and : logical and, takes 1 or more arguments which must be other statements. +not : logical not, takes 1 argument which must be another statement. +xor : exclusive or, takes 1 or more arguments which must be other statements. += : equals, takes 1 or more arguments, which must all be equal to each other to return true. +> : greater than, takes 1 or more arguments, to return true the 1st argument must be greater than the 2nd argument which must be greater than the 3rd argument and so on... +< : less than, takes 1 or more arguments, to return true the 1st argument must be less than the 2nd argument which must be less than the 3rd argument and so on... + +4.3 - Filter examples +Give me all the setData operations with session id 0xdeadbeef or 0xcafeb33r but not with zxid 0x12341234 -> + +(and (= operation "setData") (or (= client-id 0xdeadbeef) (= client-id 0xcafeb33r)) (not (= zxid 0x12341234))) + diff --git a/src/contrib/loggraph/bin/loggraph-dev.sh b/src/contrib/loggraph/bin/loggraph-dev.sh new file mode 100644 index 0000000..0b82efa --- /dev/null +++ b/src/contrib/loggraph/bin/loggraph-dev.sh @@ -0,0 +1,43 @@ +#!/bin/sh + +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +make_canonical () { + cd $1; pwd; +} + +SCRIPTDIR=`dirname $0` +BUILDDIR=`make_canonical $SCRIPTDIR/../../../../build/contrib/loggraph` +LIBDIR=`make_canonical $BUILDDIR/lib` +WEBDIR=`make_canonical $SCRIPTDIR/../web` +ZKDIR=`make_canonical $SCRIPTDIR/../../../../build/` + +if [ ! -x $BUILDDIR ]; then + echo "\n\n*** You need to build loggraph before running it ***\n\n"; + exit; +fi + +for i in `ls $LIBDIR`; do + CLASSPATH=$LIBDIR/$i:$CLASSPATH +done + +for i in $ZKDIR/zookeeper-*.jar; do + CLASSPATH="$i:$CLASSPATH" +done + +CLASSPATH=$BUILDDIR/classes:$WEBDIR:$CLASSPATH +echo $CLASSPATH +java -Dlog4j.configuration=org/apache/zookeeper/graph/log4j.properties -Xdebug -Xrunjdwp:transport=dt_socket,address=4444,server=y,suspend=n -cp $CLASSPATH org.apache.zookeeper.graph.LogServer $* diff --git a/src/contrib/loggraph/bin/loggraph.sh b/src/contrib/loggraph/bin/loggraph.sh new file mode 100644 index 0000000..381e5ad --- /dev/null +++ b/src/contrib/loggraph/bin/loggraph.sh @@ -0,0 +1,48 @@ +#!/bin/sh + +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +make_canonical () { + cd $1; pwd; +} + +SCRIPTDIR=`dirname $0` +BUILDDIR=`make_canonical $SCRIPTDIR/../../../../build/contrib/loggraph` +LIBDIR=`make_canonical $BUILDDIR/lib` +ZKDIR=`make_canonical $SCRIPTDIR/../../../../build/` + +if [ ! -x $BUILDDIR ]; then + echo "\n\n*** You need to build loggraph before running it ***\n\n"; + exit; +fi + +for i in `ls $LIBDIR`; do + CLASSPATH=$LIBDIR/$i:$CLASSPATH +done + +for i in `ls $BUILDDIR/*.jar`; do + CLASSPATH=$i:$CLASSPATH +done + +for i in $ZKDIR/zookeeper-*.jar; do + CLASSPATH="$i:$CLASSPATH" +done + +java -cp $CLASSPATH org.apache.zookeeper.graph.LogServer $* + + + + diff --git a/src/contrib/loggraph/build.xml b/src/contrib/loggraph/build.xml new file mode 100644 index 0000000..5be6970 --- /dev/null +++ b/src/contrib/loggraph/build.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/contrib/loggraph/ivy.xml b/src/contrib/loggraph/ivy.xml new file mode 100644 index 0000000..d6fa9d6 --- /dev/null +++ b/src/contrib/loggraph/ivy.xml @@ -0,0 +1,44 @@ + + + + + + + + ZooKeeper Graphing + + + + + + + + + + + + + + + + + + + diff --git a/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/FilterException.java b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/FilterException.java new file mode 100644 index 0000000..c0912fa --- /dev/null +++ b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/FilterException.java @@ -0,0 +1,22 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.graph; + +public class FilterException extends Exception { + public FilterException(String s) { super(s); } +}; diff --git a/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/FilterOp.java b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/FilterOp.java new file mode 100644 index 0000000..ee73283 --- /dev/null +++ b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/FilterOp.java @@ -0,0 +1,75 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.graph; + +import java.util.ArrayList; +import org.apache.zookeeper.graph.filterops.*; + +public abstract class FilterOp { + protected ArrayList subOps; + protected ArrayList args; + + public enum ArgType { + STRING, NUMBER, SYMBOL + } + + public FilterOp() { + subOps = new ArrayList(); + args = new ArrayList(); + } + + public static FilterOp newOp(String op) throws FilterException { + if (op.equals("or")) + return new OrOp(); + if (op.equals("and")) + return new AndOp(); + if (op.equals("not")) + return new NotOp(); + if (op.equals("xor")) + return new XorOp(); + if (op.equals("=")) + return new EqualsOp(); + if (op.equals("<")) + return new LessThanOp(); + if (op.equals(">")) + return new GreaterThanOp(); + + throw new FilterException("Invalid operation '"+op+"'"); + } + + public void addSubOp(FilterOp op) { + subOps.add(op); + } + + public void addArg(Arg arg) { + args.add(arg); + } + + public abstract boolean matches(LogEntry entry) throws FilterException; + + public String toString() { + String op = "(" + getClass().getName(); + for (FilterOp f : subOps) { + op += " " + f; + } + for (Arg a : args) { + op += " " + a; + } + return op + ")"; + } +} diff --git a/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/FilterParser.java b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/FilterParser.java new file mode 100644 index 0000000..cf12e3a --- /dev/null +++ b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/FilterParser.java @@ -0,0 +1,131 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.graph; + +import java.io.PushbackReader; +import java.io.StringReader; +import java.io.IOException; +import java.util.ArrayList; + +import org.apache.zookeeper.graph.filterops.*; + +public class FilterParser { + private PushbackReader reader; + + public FilterParser(String s) { + reader = new PushbackReader(new StringReader(s)); + } + + private String readUntilSpace() throws IOException { + StringBuffer buffer = new StringBuffer(); + + int c = reader.read(); + while (!Character.isWhitespace(c) && c != ')' && c != '(') { + buffer.append((char)c); + c = reader.read(); + if (c == -1) { + break; + } + } + reader.unread(c); + + return buffer.toString().trim(); + } + + private StringArg readStringArg() throws IOException, FilterException { + int c = reader.read(); + int last = 0; + if (c != '"') { + throw new FilterException("Check the parser, trying to read a string that doesn't begin with quotes"); + } + StringBuffer buffer = new StringBuffer(); + while (reader.ready()) { + last = c; + c = reader.read(); + if (c == -1) { + break; + } + + if (c == '"' && last != '\\') { + return new StringArg(buffer.toString()); + } else { + buffer.append((char)c); + } + } + throw new FilterException("Unterminated string"); + } + + private NumberArg readNumberArg() throws IOException, FilterException { + String strval = readUntilSpace(); + + try { + if (strval.startsWith("0x")) { + return new NumberArg(Long.valueOf(strval.substring(2), 16)); + } else { + return new NumberArg(Long.valueOf(strval)); + } + } catch (NumberFormatException e) { + throw new FilterException("Not a number [" + strval + "]\n" + e); + } + } + + private SymbolArg readSymbolArg() throws IOException, FilterException { + return new SymbolArg(readUntilSpace()); + } + + public FilterOp parse() throws IOException, FilterException { + int c = reader.read(); + if (c != '(') { + throw new FilterException("Invalid format"); + } + + String opstr = readUntilSpace(); + FilterOp op = FilterOp.newOp(opstr); + + while (reader.ready()) { + c = reader.read(); + if (c == -1) { + break; + } + if (c == '(') { + reader.unread(c); + op.addSubOp(parse()); + } else if (c == ')') { + return op; + } else if (c == '"') { + reader.unread(c); + op.addArg(readStringArg()); + } else if (Character.isDigit(c) || c == '-' || c == '+') { + reader.unread(c); + op.addArg(readNumberArg()); + } else if (Character.isJavaIdentifierStart(c)) { + reader.unread(c); + op.addArg(readSymbolArg()); + } + } + throw new FilterException("Incomplete filter"); + } + + public static void main(String[] args) throws IOException, FilterException { + if (args.length == 1) { + System.out.println(new FilterParser(args[0]).parse()); + } else { + System.out.println(new FilterParser("(or (and (= session foobar) (= session barfoo)) (= session sdfs))").parse()); + } + } +}; diff --git a/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/JsonGenerator.java b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/JsonGenerator.java new file mode 100644 index 0000000..afaf3a1 --- /dev/null +++ b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/JsonGenerator.java @@ -0,0 +1,223 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.graph; + + +import org.json.simple.JSONArray; +import org.json.simple.JSONObject; +import org.json.simple.JSONValue; + +import java.io.Writer; +import java.io.OutputStreamWriter; +import java.io.IOException; +import java.util.regex.Pattern; +import java.util.regex.Matcher; +import java.util.HashSet; +import java.util.Iterator; +import java.util.LinkedList; +import java.util.ListIterator; + +public class JsonGenerator { + private JSONObject root; + private HashSet servers; + + private class Message { + private int from; + private int to; + private long zxid; + + public Message(int from, int to, long zxid) { + this.from = from; + this.to = to; + this.zxid = zxid; + } + + public boolean equals(Message m) { + return (m.from == this.from + && m.to == this.to + && m.zxid == this.zxid); + } + }; + + public JSONObject txnEntry(TransactionEntry e) { + JSONObject event = new JSONObject(); + + event.put("time", Long.toString(e.getTimestamp())); + event.put("client", Long.toHexString(e.getClientId())); + event.put("cxid", Long.toHexString(e.getCxid())); + event.put("zxid", Long.toHexString(e.getZxid())); + event.put("op", e.getOp()); + event.put("extra", e.getExtra()); + event.put("type", "transaction"); + + return event; + } + + /** + Assumes entries are sorted by timestamp. + */ + public JsonGenerator(LogIterator iter) { + servers = new HashSet(); + + Pattern stateChangeP = Pattern.compile("- (LOOKING|FOLLOWING|LEADING)"); + Pattern newElectionP = Pattern.compile("New election. My id = (\\d+), Proposed zxid = (\\d+)"); + Pattern receivedProposalP = Pattern.compile("Notification: (\\d+) \\(n.leader\\), (\\d+) \\(n.zxid\\), (\\d+) \\(n.round\\), .+ \\(n.state\\), (\\d+) \\(n.sid\\), .+ \\(my state\\)"); + Pattern exceptionP = Pattern.compile("xception"); + + root = new JSONObject(); + Matcher m = null; + JSONArray events = new JSONArray(); + root.put("events", events); + + long starttime = Long.MAX_VALUE; + long endtime = 0; + + int leader = 0; + long curEpoch = 0; + boolean newEpoch = false; + + while (iter.hasNext()) { + LogEntry ent = iter.next(); + + if (ent.getTimestamp() < starttime) { + starttime = ent.getTimestamp(); + } + if (ent.getTimestamp() > endtime) { + endtime = ent.getTimestamp(); + } + + if (ent.getType() == LogEntry.Type.TXN) { + events.add(txnEntry((TransactionEntry)ent)); + } else { + Log4JEntry e = (Log4JEntry)ent; + servers.add(e.getNode()); + + if ((m = stateChangeP.matcher(e.getEntry())).find()) { + JSONObject stateChange = new JSONObject(); + stateChange.put("type", "stateChange"); + stateChange.put("time", e.getTimestamp()); + stateChange.put("server", e.getNode()); + stateChange.put("state", m.group(1)); + events.add(stateChange); + + if (m.group(1).equals("LEADING")) { + leader = e.getNode(); + } + } else if ((m = newElectionP.matcher(e.getEntry())).find()) { + Iterator iterator = servers.iterator(); + long zxid = Long.valueOf(m.group(2)); + int count = (int)zxid;// & 0xFFFFFFFFL; + int epoch = (int)Long.rotateRight(zxid, 32);// >> 32; + + if (leader != 0 && epoch > curEpoch) { + JSONObject stateChange = new JSONObject(); + stateChange.put("type", "stateChange"); + stateChange.put("time", e.getTimestamp()); + stateChange.put("server", leader); + stateChange.put("state", "INIT"); + events.add(stateChange); + leader = 0; + } + + while (iterator.hasNext()) { + int dst = iterator.next(); + if (dst != e.getNode()) { + JSONObject msg = new JSONObject(); + msg.put("type", "postmessage"); + msg.put("src", e.getNode()); + msg.put("dst", dst); + msg.put("time", e.getTimestamp()); + msg.put("zxid", m.group(2)); + msg.put("count", count); + msg.put("epoch", epoch); + + events.add(msg); + } + } + } else if ((m = receivedProposalP.matcher(e.getEntry())).find()) { + // Pattern.compile("Notification: \\d+, (\\d+), (\\d+), \\d+, [^,]*, [^,]*, (\\d+)");//, LOOKING, LOOKING, 2 + int src = Integer.valueOf(m.group(4)); + long zxid = Long.valueOf(m.group(2)); + int dst = e.getNode(); + long epoch2 = Long.valueOf(m.group(3)); + + int count = (int)zxid;// & 0xFFFFFFFFL; + int epoch = (int)Long.rotateRight(zxid, 32);// >> 32; + + if (leader != 0 && epoch > curEpoch) { + JSONObject stateChange = new JSONObject(); + stateChange.put("type", "stateChange"); + stateChange.put("time", e.getTimestamp()); + stateChange.put("server", leader); + stateChange.put("state", "INIT"); + events.add(stateChange); + leader = 0; + } + + if (src != dst) { + JSONObject msg = new JSONObject(); + msg.put("type", "delivermessage"); + msg.put("src", src); + msg.put("dst", dst); + msg.put("time", e.getTimestamp()); + msg.put("zxid", zxid); + msg.put("epoch", epoch); + msg.put("count", count); + msg.put("epoch2", epoch2); + + events.add(msg); + } + } else if ((m = exceptionP.matcher(e.getEntry())).find()) { + JSONObject ex = new JSONObject(); + ex.put("type", "exception"); + ex.put("server", e.getNode()); + ex.put("time", e.getTimestamp()); + ex.put("text", e.getEntry()); + events.add(ex); + } + } + JSONObject ex = new JSONObject(); + ex.put("type", "text"); + ex.put("time", ent.getTimestamp()); + String txt = ent.toString(); + ex.put("text", txt); + events.add(ex); + } + // System.out.println("pending messages: "+pendingMessages.size()); + root.put("starttime", starttime); + root.put("endtime", endtime); + + JSONArray serversarray = new JSONArray(); + root.put("servers", serversarray); + + Iterator iterator = servers.iterator(); + while (iterator.hasNext()) { + serversarray.add(iterator.next()); + } + } + + public String toString() { + return JSONValue.toJSONString(root); + } + + public static void main(String[] args) throws Exception { + MergedLogSource src = new MergedLogSource(args); + LogIterator iter = src.iterator(); + System.out.println(new JsonGenerator(iter)); + } +} diff --git a/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/Log4JEntry.java b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/Log4JEntry.java new file mode 100644 index 0000000..0edc146 --- /dev/null +++ b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/Log4JEntry.java @@ -0,0 +1,40 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.graph; + +public class Log4JEntry extends LogEntry { + public Log4JEntry(long timestamp, int node, String entry) { + super(timestamp); + setAttribute("log-text", entry); + setAttribute("node", new Integer(node)); + } + + public String getEntry() { + return (String) getAttribute("log-text"); + } + + public String toString() { + return "" + getTimestamp() + "::::" + getNode() + "::::" + getEntry(); + } + + public int getNode() { + return (Integer) getAttribute("node"); + } + + public Type getType() { return LogEntry.Type.LOG4J; } +} diff --git a/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/Log4JSource.java b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/Log4JSource.java new file mode 100644 index 0000000..84a9d98 --- /dev/null +++ b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/Log4JSource.java @@ -0,0 +1,391 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.graph; + +import java.io.File; +import java.io.InputStreamReader; +import java.io.BufferedReader; +import java.io.FileReader; +import java.io.IOException; +import java.util.regex.Pattern; +import java.util.regex.Matcher; +import java.util.ArrayList; +import java.util.Date; +import java.text.SimpleDateFormat; +import java.text.ParseException; +import java.util.Calendar; +import java.util.GregorianCalendar; + +import java.io.EOFException; +import java.io.Closeable; +import java.io.FileNotFoundException; +import java.util.Iterator; +import java.util.NoSuchElementException; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class Log4JSource implements LogSource { + private static final Logger LOG = LoggerFactory.getLogger(Log4JSource.class); + + private static final int skipN = 10000; + private static final String DATE_FORMAT = "yyyy-MM-dd HH:mm:ss,SSS"; + + private LogSkipList skiplist = null; + + private String file = null; + private long starttime = 0; + private long endtime = 0; + private int serverid = 0; + private long size = 0; + + private Pattern timep; + + public boolean overlapsRange(long starttime, long endtime) { + return (starttime <= this.endtime && endtime >= this.starttime); + } + + public long size() { return size; } + public long getStartTime() { return starttime; } + public long getEndTime() { return endtime; } + public LogSkipList getSkipList() { return skiplist; } + + private class Log4JSourceIterator implements LogIterator { + private RandomAccessFileReader in; + private LogEntry next = null; + private long starttime = 0; + private long endtime = 0; + private String buf = ""; + private Log4JSource src = null; + private long skippedAtStart = 0; + private SimpleDateFormat dateformat = null; + private FilterOp filter = null; + + public Log4JSourceIterator(Log4JSource src, long starttime, long endtime) throws IllegalArgumentException, FilterException { + this(src, starttime, endtime, null); + } + + public Log4JSourceIterator(Log4JSource src, long starttime, long endtime, FilterOp filter) throws IllegalArgumentException, FilterException { + + this.dateformat = new SimpleDateFormat(DATE_FORMAT); + this.src = src; + this.starttime = starttime; + this.endtime = endtime; + + File f = new File(src.file); + try { + in = new RandomAccessFileReader(f); + } catch (FileNotFoundException e) { + throw new IllegalArgumentException("Bad file passed in (" + src.file +") cannot open:" + e); + } + + // skip to the offset of latest skip point before starttime + LogSkipList.Mark start = src.getSkipList().findMarkBefore(starttime); + try { + in.seek(start.getBytes()); + skippedAtStart = start.getEntriesSkipped(); + } catch (IOException ioe) { + // if we can't skip, we should just read from the start + } + + LogEntry e; + while ((e = readNextEntry()) != null && e.getTimestamp() < endtime) { + if (e.getTimestamp() >= starttime && (filter == null || filter.matches(e))) { + next = e; + return; + } + skippedAtStart++; + } + this.filter = filter; + } + + synchronized public long size() throws IOException { + if (LOG.isTraceEnabled()) { + LOG.trace("size() called"); + } + + if (this.endtime >= src.getEndTime()) { + return src.size() - skippedAtStart; + } + + long pos = in.getPosition(); + + if (LOG.isTraceEnabled()) { + LOG.trace("saved pos () = " + pos); + } + + LogEntry e; + + LogSkipList.Mark lastseg = src.getSkipList().findMarkBefore(this.endtime); + in.seek(lastseg.getBytes()); + buf = ""; // clear the buf so we don't get something we read before we sought + // number of entries skipped to get to the end of the iterator, less the number skipped to get to the start + long count = lastseg.getEntriesSkipped() - skippedAtStart; + + while ((e = readNextEntry()) != null) { + if (LOG.isTraceEnabled()) { + //LOG.trace(e); + } + if (e.getTimestamp() > this.endtime) { + break; + } + count++; + } + in.seek(pos); + buf = ""; + + if (LOG.isTraceEnabled()) { + LOG.trace("size() = " + count); + } + + return count; + } + + synchronized private LogEntry readNextEntry() { + try { + try { + while (true) { + String line = in.readLine(); + if (line == null) { + break; + } + + Matcher m = src.timep.matcher(line); + if (m.lookingAt()) { + if (buf.length() > 0) { + LogEntry e = new Log4JEntry(src.timestampFromText(dateformat, buf), src.getServerId(), buf); + buf = line; + return e; + } + buf = line; + } else if (buf.length() > 0) { + buf += line + "\n"; + } + } + } catch (EOFException eof) { + // ignore, we've simply come to the end of the file + } + if (buf.length() > 0) { + LogEntry e = new Log4JEntry(src.timestampFromText(dateformat, buf), src.getServerId(), buf); + buf = ""; + return e; + } + } catch (Exception e) { + LOG.error("Error reading next entry in file (" + src.file + "): " + e); + return null; + } + return null; + } + + public boolean hasNext() { + return next != null; + } + + public LogEntry next() throws NoSuchElementException { + LogEntry ret = next; + LogEntry e = readNextEntry(); + + if (filter != null) { + try { + while (e != null && !filter.matches(e)) { + e = readNextEntry(); + } + } catch (FilterException fe) { + throw new NoSuchElementException(e.toString()); + } + } + + if (e != null && e.getTimestamp() < endtime) { + next = e; + } else { + next = null; + } + return ret; + } + + public void remove() throws UnsupportedOperationException { + throw new UnsupportedOperationException("remove not supported for L4J logs"); + } + + public void close() throws IOException { + in.close(); + } + + public String toString() { + String size; + try { + size = new Long(size()).toString(); + } catch (IOException ioe) { + size = "Unable to read"; + } + return "Log4JSourceIterator(start=" + starttime + ", end=" + endtime + ", size=" + size + ")"; + } + } + + public LogIterator iterator(long starttime, long endtime) throws IllegalArgumentException { + try { + return iterator(starttime, endtime, null); + } catch (FilterException fe) { + assert(false); //"This should never happen, you can't have a filter exception without a filter"); + return null; + } + } + + public LogIterator iterator(long starttime, long endtime, FilterOp filter) throws IllegalArgumentException, FilterException{ + // sanitise start and end times + if (endtime < starttime) { + throw new IllegalArgumentException("End time (" + endtime + ") must be greater or equal to starttime (" + starttime + ")"); + } + + return new Log4JSourceIterator(this, starttime, endtime, filter); + } + + public LogIterator iterator() throws IllegalArgumentException { + return iterator(starttime, endtime+1); + } + + public Log4JSource(String file) throws IOException { + this.file=file; + + timep = Pattern.compile("^(\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2},\\d{3})"); + skiplist = new LogSkipList(); + init(); + } + + private static long timestampFromText(SimpleDateFormat format, String s) { + Date d = null; + try { + d = format.parse(s); + } catch (ParseException e) { + return 0; + } + Calendar c = new GregorianCalendar(); + c.setTime(d); + return c.getTimeInMillis(); + } + + private void init() throws IOException { + File f = new File(file); + RandomAccessFileReader in = new RandomAccessFileReader(f); + SimpleDateFormat dateformat = new SimpleDateFormat(DATE_FORMAT); + Pattern idp = Pattern.compile("\\[myid:(\\d+)\\]"); + + long lastFp = in.getPosition(); + String line = in.readLine(); + Matcher m = null; + + // if we have read data from the file, and it matchs the timep pattern + if ((line != null) && (m = timep.matcher(line)).lookingAt()) { + starttime = timestampFromText(dateformat, m.group(1)); + } else { + throw new IOException("Invalid log4j format. First line doesn't start with time"); + } + + /* + Count number of log entries. Any line starting with a timestamp counts as an entry + */ + String lastentry = line; + try { + while (line != null) { + m = timep.matcher(line); + if (m.lookingAt()) { + if (size % skipN == 0) { + long time = timestampFromText(dateformat, m.group(1)); + skiplist.addMark(time, lastFp, size); + } + size++; + lastentry = line; + } + if (serverid == 0 && (m = idp.matcher(line)).find()) { + serverid = Integer.valueOf(m.group(1)); + } + + lastFp = in.getPosition(); + line = in.readLine(); + } + } catch (EOFException eof) { + // ignore, simply end of file, though really (line!=null) should have caught this + } finally { + in.close(); + } + + m = timep.matcher(lastentry); + if (m.lookingAt()) { + endtime = timestampFromText(dateformat, m.group(1)); + } else { + throw new IOException("Invalid log4j format. Last line doesn't start with time"); + } + } + + public String toString() { + return "Log4JSource(file=" + file + ", size=" + size + ", start=" + starttime + ", end=" + endtime +", id=" + serverid +")"; + } + + public static void main(String[] args) throws IOException { + final Log4JSource s = new Log4JSource(args[0]); + System.out.println(s); + + LogIterator iter; + + if (args.length == 3) { + final long starttime = Long.valueOf(args[1]); + final long endtime = Long.valueOf(args[2]); + iter = s.iterator(starttime, endtime); + + Thread t1 = new Thread() { public void run () { + + LogIterator iter = s.iterator(starttime, endtime); + System.out.println(iter); + try { + iter.close(); + } catch (IOException ioe) { + System.out.println(ioe.getMessage()); + } + }; }; + Thread t2 = new Thread() { public void run () { + + LogIterator iter = s.iterator(starttime, endtime); + System.out.println(iter); + try { + iter.close(); + } catch (IOException ioe) { + System.out.println(ioe.getMessage()); + } + }; }; + Thread t3 = new Thread() { public void run () { + + LogIterator iter = s.iterator(starttime, endtime); + System.out.println(iter); + }; }; + t1.start(); + t2.start(); + // t3.start(); + } else { + iter = s.iterator(); + } + + /*while (iter.hasNext()) { + System.out.println(iter.next()); + }*/ + iter.close(); + } + + public int getServerId() { + return serverid; + } +} diff --git a/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/LogEntry.java b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/LogEntry.java new file mode 100644 index 0000000..a8252eb --- /dev/null +++ b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/LogEntry.java @@ -0,0 +1,46 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.graph; + +import java.io.Serializable; +import java.util.HashMap; + +public abstract class LogEntry implements Serializable { + private HashMap attributes; + + public enum Type { UNKNOWN, LOG4J, TXN }; + + public LogEntry(long timestamp) { + attributes = new HashMap(); + setAttribute("timestamp", new Long(timestamp)); + } + + public long getTimestamp() { + return (Long)getAttribute("timestamp"); + } + + public abstract Type getType(); + + public void setAttribute(String key, Object v) { + attributes.put(key, v); + } + + public Object getAttribute(String key) { + return attributes.get(key); + } +} diff --git a/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/LogIterator.java b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/LogIterator.java new file mode 100644 index 0000000..9af440b --- /dev/null +++ b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/LogIterator.java @@ -0,0 +1,26 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.graph; + +import java.io.Closeable; +import java.util.Iterator; +import java.io.IOException; + +public interface LogIterator extends Iterator, Closeable { + long size() throws IOException;; +}; diff --git a/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/LogServer.java b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/LogServer.java new file mode 100644 index 0000000..5cffcdd --- /dev/null +++ b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/LogServer.java @@ -0,0 +1,66 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.graph; + +import java.io.IOException; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.ServletException; + +import java.io.IOException; + +import org.eclipse.jetty.server.Server; +import org.eclipse.jetty.server.Request; +import org.eclipse.jetty.server.handler.AbstractHandler; +import org.eclipse.jetty.servlet.ServletContextHandler; +import org.eclipse.jetty.servlet.ServletHolder; + +import org.apache.zookeeper.graph.servlets.*; + +public class LogServer extends ServletContextHandler { + public LogServer(MergedLogSource src) throws Exception { + super(ServletContextHandler.SESSIONS); + setContextPath("/"); + + addServlet(new ServletHolder(new StaticContent()),"/graph/*"); + + addServlet(new ServletHolder(new Fs()),"/fs"); + addServlet(new ServletHolder(new GraphData(src)), "/data"); + addServlet(new ServletHolder(new FileLoader(src)), "/loadfile"); + addServlet(new ServletHolder(new NumEvents(src)), "/info"); + addServlet(new ServletHolder(new Throughput(src)), "/throughput"); + } + + public static void main(String[] args) { + try { + MergedLogSource src = new MergedLogSource(args); + System.out.println(src); + + Server server = new Server(8182); + server.setHandler(new LogServer(src)); + + server.start(); + server.join(); + + } catch (Exception e) { + // Something is wrong. + e.printStackTrace(); + } + } +} diff --git a/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/LogSkipList.java b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/LogSkipList.java new file mode 100644 index 0000000..e744442 --- /dev/null +++ b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/LogSkipList.java @@ -0,0 +1,95 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.graph; + +import java.util.List; +import java.util.LinkedList; +import java.util.NoSuchElementException; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** +Generic skip list for holding a rough index of a log file. When the log file is loaded, this +index is built by adding a mark every n entries. Then when a specific time position is requested +from the file, a point at most n-1 entries before the time position can be jumped to. + +*/ +public class LogSkipList { + private static final Logger LOG = LoggerFactory.getLogger(LogSkipList.class); + + private LinkedList marks; + + public class Mark { + private long time; + private long bytes; + private long skipped; + + public Mark(long time, long bytes, long skipped) { + this.time = time; + this.bytes = bytes; + this.skipped = skipped; + } + + public long getTime() { return this.time; } + public long getBytes() { return this.bytes; } + public long getEntriesSkipped() { return this.skipped; } + + public String toString() { + return "Mark(time=" + time + ", bytes=" + bytes + ", skipped=" + skipped + ")"; + } + }; + + public LogSkipList() { + if (LOG.isTraceEnabled()) { + LOG.trace("New skip list"); + } + marks = new LinkedList(); + } + + public void addMark(long time, long bytes, long skipped) { + if (LOG.isTraceEnabled()) { + LOG.trace("addMark (time:" + time + ", bytes: " + bytes + ", skipped: " + skipped + ")"); + } + marks.add(new Mark(time, bytes, skipped)); + } + + /** + Find the last mark in the skip list before time. + */ + public Mark findMarkBefore(long time) throws NoSuchElementException { + if (LOG.isTraceEnabled()) { + LOG.trace("findMarkBefore(" + time + ")"); + } + + Mark last = marks.getFirst(); + for (Mark m: marks) { + if (m.getTime() > time) { + break; + } + last = m; + } + + if (LOG.isTraceEnabled()) { + LOG.trace("return " + last ); + } + + return last; + } + +}; diff --git a/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/LogSource.java b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/LogSource.java new file mode 100644 index 0000000..9845c7f --- /dev/null +++ b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/LogSource.java @@ -0,0 +1,33 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.graph; +import java.util.Iterator; + +public interface LogSource extends Iterable { + public LogIterator iterator(long starttime, long endtime, FilterOp filter) throws IllegalArgumentException, FilterException; + + public LogIterator iterator(long starttime, long endtime) throws IllegalArgumentException; + + public LogIterator iterator() throws IllegalArgumentException; + + public boolean overlapsRange(long starttime, long endtime); + + public long size(); + public long getStartTime(); + public long getEndTime(); +} diff --git a/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/MeasureThroughput.java b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/MeasureThroughput.java new file mode 100644 index 0000000..1c83da7 --- /dev/null +++ b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/MeasureThroughput.java @@ -0,0 +1,103 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.graph; + +import java.io.IOException; +import java.io.BufferedOutputStream; +import java.io.FileOutputStream; +import java.io.DataOutputStream; +import java.io.PrintStream; + +import java.util.HashSet; + +public class MeasureThroughput { + private static final int MS_PER_SEC = 1000; + private static final int MS_PER_MIN = MS_PER_SEC*60; + private static final int MS_PER_HOUR = MS_PER_MIN*60; + + public static void main(String[] args) throws IOException { + MergedLogSource source = new MergedLogSource(args); + + PrintStream ps_ms = new PrintStream(new BufferedOutputStream(new FileOutputStream("throughput-ms.out"))); + PrintStream ps_sec = new PrintStream(new BufferedOutputStream(new FileOutputStream("throughput-sec.out"))); + PrintStream ps_min = new PrintStream(new BufferedOutputStream(new FileOutputStream("throughput-min.out"))); + PrintStream ps_hour = new PrintStream(new BufferedOutputStream(new FileOutputStream("throughput-hour.out"))); + LogIterator iter; + + System.out.println(source); + iter = source.iterator(); + long currentms = 0; + long currentsec = 0; + long currentmin = 0; + long currenthour = 0; + HashSet zxids_ms = new HashSet(); + long zxid_sec = 0; + long zxid_min = 0; + long zxid_hour = 0; + + while (iter.hasNext()) { + LogEntry e = iter.next(); + TransactionEntry cxn = (TransactionEntry)e; + + long ms = cxn.getTimestamp(); + long sec = ms/MS_PER_SEC; + long min = ms/MS_PER_MIN; + long hour = ms/MS_PER_HOUR; + + if (currentms != ms && currentms != 0) { + ps_ms.println("" + currentms + " " + zxids_ms.size()); + + zxid_sec += zxids_ms.size(); + zxid_min += zxids_ms.size(); + zxid_hour += zxids_ms.size(); + zxids_ms.clear(); + } + + if (currentsec != sec && currentsec != 0) { + ps_sec.println("" + currentsec*MS_PER_SEC + " " + zxid_sec); + + zxid_sec = 0; + } + + if (currentmin != min && currentmin != 0) { + ps_min.println("" + currentmin*MS_PER_MIN + " " + zxid_min); + + zxid_min = 0; + } + + if (currenthour != hour && currenthour != 0) { + ps_hour.println("" + currenthour*MS_PER_HOUR + " " + zxid_hour); + + zxid_hour = 0; + } + + currentms = ms; + currentsec = sec; + currentmin = min; + currenthour = hour; + + zxids_ms.add(cxn.getZxid()); + } + + iter.close(); + ps_ms.close(); + ps_sec.close(); + ps_min.close(); + ps_hour.close(); + } +}; diff --git a/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/MergedLogSource.java b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/MergedLogSource.java new file mode 100644 index 0000000..bb789d3 --- /dev/null +++ b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/MergedLogSource.java @@ -0,0 +1,219 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.graph; + +import java.io.ByteArrayInputStream; +import java.io.EOFException; +import java.io.FileInputStream; +import java.io.IOException; +import java.text.DateFormat; +import java.util.Date; +import java.util.zip.Adler32; +import java.util.zip.Checksum; +import java.util.HashMap; + +import org.apache.jute.BinaryInputArchive; +import org.apache.jute.InputArchive; +import org.apache.jute.Record; +import org.apache.zookeeper.server.TraceFormatter; +import org.apache.zookeeper.server.persistence.FileHeader; +import org.apache.zookeeper.server.persistence.FileTxnLog; +import org.apache.zookeeper.server.util.SerializeUtils; +import org.apache.zookeeper.txn.TxnHeader; + +import org.apache.zookeeper.ZooDefs.OpCode; + +import org.apache.zookeeper.txn.CreateSessionTxn; +import org.apache.zookeeper.txn.CreateTxn; +import org.apache.zookeeper.txn.DeleteTxn; +import org.apache.zookeeper.txn.ErrorTxn; +import org.apache.zookeeper.txn.SetACLTxn; +import org.apache.zookeeper.txn.SetDataTxn; +import org.apache.zookeeper.txn.TxnHeader; + +import java.io.Closeable; +import java.io.FileNotFoundException; +import java.util.Vector; +import java.util.Iterator; +import java.util.Collections; +import java.util.NoSuchElementException; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class MergedLogSource implements LogSource { + private static final Logger LOG = LoggerFactory.getLogger(MergedLogSource.class); + private Vector sources = null; + private long starttime = 0; + private long endtime = 0; + private long size = 0; + + public boolean overlapsRange(long starttime, long endtime) { + return (starttime <= this.endtime && endtime >= this.starttime); + } + + public long size() { return size; } + public long getStartTime() { return starttime; } + public long getEndTime() { return endtime; } + + private class MergedLogSourceIterator implements LogIterator { + private LogEntry next = null; + private long start = 0; + private long end = 0; + private MergedLogSource src = null; + private LogIterator[] sources = null; + private LogEntry[] nexts = null; + private FilterOp filter = null; + + public MergedLogSourceIterator(MergedLogSource src, long starttime, long endtime, FilterOp filter) throws IllegalArgumentException, FilterException { + Vector iters = new Vector(); + for (LogSource s : src.sources) { + if (s.overlapsRange(starttime, endtime)) { + iters.add(s.iterator(starttime, endtime, filter)); + } + } + + sources = new LogIterator[iters.size()]; + sources = iters.toArray(sources); + nexts = new LogEntry[iters.size()]; + for (int i = 0; i < sources.length; i++) { + if (sources[i].hasNext()) + nexts[i] = sources[i].next(); + } + this.filter = filter; + } + + public MergedLogSourceIterator(MergedLogSource src, long starttime, long endtime) throws IllegalArgumentException, FilterException { + this(src, starttime, endtime, null); + } + + public long size() throws IOException { + long size = 0; + for (LogIterator i : sources) { + size += i.size(); + } + return size; + } + + public boolean hasNext() { + for (LogEntry n : nexts) { + if (n != null) return true; + } + return false; + } + + public LogEntry next() { + int min = -1; + for (int i = 0; i < nexts.length; i++) { + if (nexts[i] != null) { + if (min == -1) { + min = i; + } else if (nexts[i].getTimestamp() < nexts[min].getTimestamp()) { + min = i; + } + } + } + if (min == -1) { + return null; + } else { + LogEntry e = nexts[min]; + nexts[min] = sources[min].next(); + return e; + } + } + + public void remove() throws UnsupportedOperationException { + throw new UnsupportedOperationException("remove not supported for Merged logs"); + } + + public void close() throws IOException { + for (LogIterator i : sources) { + i.close(); + } + } + } + + public LogIterator iterator(long starttime, long endtime) throws IllegalArgumentException { + try { + return iterator(starttime, endtime, null); + } catch (FilterException fe) { + assert(false); // shouldn't happen without filter + return null; + } + } + + public LogIterator iterator(long starttime, long endtime, FilterOp filter) throws IllegalArgumentException, FilterException { + // sanitise start and end times + if (endtime < starttime) { + throw new IllegalArgumentException("End time (" + endtime + ") must be greater or equal to starttime (" + starttime + ")"); + } + + return new MergedLogSourceIterator(this, starttime, endtime, filter); + } + + public LogIterator iterator() throws IllegalArgumentException { + return iterator(starttime, endtime+1); + } + + public MergedLogSource(String[] files) throws IOException { + sources = new Vector(); + for (String f : files) { + addSource(f); + } + } + + public void addSource(String f) throws IOException { + LogSource s = null; + if (TxnLogSource.isTransactionFile(f)) { + s = new TxnLogSource(f); + } else { + s = new Log4JSource(f); + } + + size += s.size(); + endtime = s.getEndTime() > endtime ? s.getEndTime() : endtime; + starttime = s.getStartTime() < starttime || starttime == 0 ? s.getStartTime() : starttime; + sources.add(s); + } + + public String toString() { + String s = "MergedLogSource(size=" + size + ", start=" + starttime + ", end=" + endtime +")"; + for (LogSource src : sources) { + s += "\n\t- " +src; + } + return s; + } + + public static void main(String[] args) throws IOException { + System.out.println("Time: " + System.currentTimeMillis()); + MergedLogSource s = new MergedLogSource(args); + System.out.println(s); + + LogIterator iter; + + iter = s.iterator(); + System.out.println("Time: " + System.currentTimeMillis()); + System.out.println("Iterator Size: " + iter.size()); + System.out.println("Time: " + System.currentTimeMillis()); + /* while (iter.hasNext()) { + System.out.println(iter.next()); + }*/ + iter.close(); + System.out.println("Time: " + System.currentTimeMillis()); + } +} diff --git a/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/RandomAccessFileReader.java b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/RandomAccessFileReader.java new file mode 100644 index 0000000..13a41a5 --- /dev/null +++ b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/RandomAccessFileReader.java @@ -0,0 +1,329 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.graph; + +import java.io.File; +import java.io.Reader; +import java.io.IOException; +import java.io.EOFException; +import java.io.RandomAccessFile; +import java.io.FileNotFoundException; + +import java.io.DataInputStream; +import java.io.ByteArrayInputStream; +import java.io.DataInput; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class RandomAccessFileReader extends Reader implements DataInput { + private static final Logger LOG = LoggerFactory.getLogger(RandomAccessFileReader.class); + private RandomAccessFile file; + private byte[] buffer; + private int buffersize; + private int bufferoffset; + private long fileoffset; + private long fp; + + private static final int DEFAULT_BUFFER_SIZE = 512*1024; // 512k + private int point = 0; + + public RandomAccessFileReader(File f) throws FileNotFoundException { + file = new RandomAccessFile(f, "r"); + if (LOG.isDebugEnabled()) { + try { + LOG.debug("Opened file(" + f + ") with FD (" + file.getFD() + ")"); + } catch (IOException ioe) { + LOG.debug("Opened file(" + f + ") coulds get FD"); + } + } + + buffer = new byte[DEFAULT_BUFFER_SIZE]; + buffersize = 0; + bufferoffset = 0; + fileoffset = 0; + fp = 0; + } + + /** + fill the buffer from the file. + fp keeps track of the file pointer. + fileoffset is the offset into the file to where the buffer came from. + */ + private int fill() throws IOException { + fileoffset = fp; + int read = file.read(buffer, 0, buffer.length); + + if (LOG.isDebugEnabled()) { + String buf = new String(buffer, 0, 40, "UTF-8"); + LOG.debug("fill(buffer=" + buf + ")"); + } + + if (read == -1) { // eof reached + buffersize = 0; + } else { + buffersize = read; + } + fp += buffersize; + bufferoffset = 0; + + return buffersize; + } + + /** + * Reader interface + */ + public boolean markSupported() { return false; } + + /** + copy what we can from buffer. if it's not enough, fill buffer again and copy again + */ + synchronized public int read(char[] cbuf, int off, int len) throws IOException { + // This could be faster, but probably wont be used + byte[] b = new byte[2]; + int bytesread = 0; + while (len > 0) { + int read = read(b, 0, 2); + bytesread += read; + if (read < 2) { + return bytesread; + } + cbuf[off] = (char)((b[0] << 8) | (b[1] & 0xff)); + off += read; + len -= read; + } + + return bytesread; + } + + synchronized public int read(byte[] buf, int off, int len) throws IOException { + if (LOG.isTraceEnabled()) { + LOG.trace("read(buf, off=" + off + ", len=" + len); + } + + int read = 0; + while (len > 0) { + if (buffersize == 0) { + fill(); + if (buffersize == 0) { + break; + } + } + + int tocopy = Math.min(len, buffersize); + if (LOG.isTraceEnabled()) { + LOG.trace("tocopy=" + tocopy); + } + + System.arraycopy(buffer, bufferoffset, buf, off, tocopy); + buffersize -= tocopy; + bufferoffset += tocopy; + + len -= tocopy; + read += tocopy; + off += tocopy; + } + if (LOG.isTraceEnabled()) { + LOG.trace("read=" + read); + } + + return read; + } + + public void close() throws IOException { + file.close(); + } + + /** + * Seek interface + */ + public long getPosition() { + return bufferoffset + fileoffset; + } + + synchronized public void seek(long pos) throws IOException { + if (LOG.isDebugEnabled()) { + LOG.debug("seek(" + pos + ")"); + } + file.seek(pos); + fp = pos; + buffersize = 0; // force a buffer fill on next read + } + + /** + works like the usual readLine but disregards \r to make things easier + */ + synchronized public String readLine() throws IOException { + StringBuffer s = null; + + // go through buffer until i find a \n, if i reach end of buffer first, put whats in buffer into string buffer, + // repeat + buffering: + for (;;) { + if (buffersize == 0) { + fill(); + if (buffersize == 0) { + break; + } + } + + for (int i = 0; i < buffersize; i++) { + if (buffer[bufferoffset + i] == '\n') { + if (i > 0) { // if \n is first char in buffer, leave the string buffer empty + if (s == null) { s = new StringBuffer(); } + s.append(new String(buffer, bufferoffset, i, "UTF-8")); + } + bufferoffset += i+1; + buffersize -= i+1; + break buffering; + } + } + + // We didn't find \n, read the whole buffer into string buffer + if (s == null) { s = new StringBuffer(); } + s.append(new String(buffer, bufferoffset, buffersize, "UTF-8")); + buffersize = 0; + } + + if (s == null) { + return null; + } else { + return s.toString(); + } + } + + /** + DataInput interface + */ + public void readFully(byte[] b) throws IOException { + readFully(b, 0, b.length); + } + + public void readFully(byte[] b, int off, int len) throws IOException + { + while (len > 0) { + int read = read(b, off, len); + len -= read; + off += read; + + if (read == 0) { + throw new EOFException("End of file reached"); + } + } + } + + public int skipBytes(int n) throws IOException { + seek(getPosition() + n); + return n; + } + + public boolean readBoolean() throws IOException { + return (readByte() != 0); + } + + public byte readByte() throws IOException { + byte[] b = new byte[1]; + readFully(b, 0, 1); + return b[0]; + } + + public int readUnsignedByte() throws IOException { + return (int)readByte(); + } + + public short readShort() throws IOException { + byte[] b = new byte[2]; + readFully(b, 0, 2); + return (short)((b[0] << 8) | (b[1] & 0xff)); + } + + public int readUnsignedShort() throws IOException { + byte[] b = new byte[2]; + readFully(b, 0, 2); + return (((b[0] & 0xff) << 8) | (b[1] & 0xff)); + } + + public char readChar() throws IOException { + return (char)readShort(); + } + + public int readInt() throws IOException { + byte[] b = new byte[4]; + readFully(b, 0, 4); + return (((b[0] & 0xff) << 24) | ((b[1] & 0xff) << 16) | ((b[2] & 0xff) << 8) | (b[3] & 0xff)); + } + + public long readLong() throws IOException { + byte[] b = new byte[8]; + readFully(b, 0, 8); + + return (((long)(b[0] & 0xff) << 56) | ((long)(b[1] & 0xff) << 48) | + ((long)(b[2] & 0xff) << 40) | ((long)(b[3] & 0xff) << 32) | + ((long)(b[4] & 0xff) << 24) | ((long)(b[5] & 0xff) << 16) | + ((long)(b[6] & 0xff) << 8) | ((long)(b[7] & 0xff))); + } + + public float readFloat() throws IOException { + return Float.intBitsToFloat(readInt()); + } + + public double readDouble() throws IOException { + return Double.longBitsToDouble(readLong()); + } + + public String readUTF() throws IOException { + int len = readUnsignedShort(); + byte[] bytes = new byte[len+2]; + bytes[0] = (byte)((len >> 8) & 0xFF); + bytes[1] = (byte)(len & 0xFF); + readFully(bytes, 2, len); + DataInputStream dis = new DataInputStream(new ByteArrayInputStream(bytes)); + return dis.readUTF(); + } + + public static void main(String[] args) throws IOException { + RandomAccessFileReader f = new RandomAccessFileReader(new File(args[0])); + + long pos0 = f.getPosition(); + for (int i = 0; i < 5; i++) { + System.out.println(f.readLine()); + } + System.out.println("============="); + long pos1 = f.getPosition(); + System.out.println("pos: " + pos1); + for (int i = 0; i < 5; i++) { + System.out.println(f.readLine()); + } + System.out.println("============="); + f.seek(pos1); + for (int i = 0; i < 5; i++) { + System.out.println(f.readLine()); + } + System.out.println("============="); + f.seek(pos0); + for (int i = 0; i < 5; i++) { + System.out.println(f.readLine()); + } + long pos2 = f.getPosition(); + System.out.println("============="); + System.out.println(f.readLine()); + f.seek(pos2); + System.out.println(f.readLine()); + f.close(); + } +}; diff --git a/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/TransactionEntry.java b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/TransactionEntry.java new file mode 100644 index 0000000..33c7189 --- /dev/null +++ b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/TransactionEntry.java @@ -0,0 +1,59 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.graph; + +public class TransactionEntry extends LogEntry { + public TransactionEntry(long timestamp, long clientId, long Cxid, long Zxid, String op) { + this(timestamp, clientId, Cxid, Zxid, op, ""); + } + + public TransactionEntry(long timestamp, long clientId, long Cxid, long Zxid, String op, String extra) { + super(timestamp); + setAttribute("client-id", new Long(clientId)); + setAttribute("cxid", new Long(Cxid)); + setAttribute("zxid", new Long(Zxid)); + setAttribute("operation", op); + setAttribute("extra", extra); + } + + public long getClientId() { + return (Long)getAttribute("client-id"); + } + + public long getCxid() { + return (Long)getAttribute("cxid"); + } + + public long getZxid() { + return (Long)getAttribute("zxid"); + } + + public String getOp() { + return (String)getAttribute("operation"); + } + + public String getExtra() { + return (String)getAttribute("extra"); + } + + public String toString() { + return getTimestamp() + ":::session(0x" + Long.toHexString(getClientId()) + ") cxid(0x" + Long.toHexString(getCxid()) + ") zxid(0x" + Long.toHexString(getZxid()) + ") op(" + getOp() + ") extra(" + getExtra() +")"; + } + + public Type getType() { return LogEntry.Type.TXN; } +} diff --git a/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/TxnLogSource.java b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/TxnLogSource.java new file mode 100644 index 0000000..809c455 --- /dev/null +++ b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/TxnLogSource.java @@ -0,0 +1,376 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.graph; + +import java.io.ByteArrayInputStream; +import java.io.EOFException; +import java.io.FileInputStream; +import java.io.IOException; +import java.text.DateFormat; +import java.util.Date; +import java.util.zip.Adler32; +import java.util.zip.Checksum; +import java.util.HashMap; + +import org.apache.jute.BinaryInputArchive; +import org.apache.jute.InputArchive; +import org.apache.jute.Record; +import org.apache.zookeeper.server.TraceFormatter; +import org.apache.zookeeper.server.persistence.FileHeader; +import org.apache.zookeeper.server.persistence.FileTxnLog; +import org.apache.zookeeper.server.util.SerializeUtils; +import org.apache.zookeeper.txn.TxnHeader; + +import org.apache.zookeeper.ZooDefs.OpCode; + +import org.apache.zookeeper.txn.CreateSessionTxn; +import org.apache.zookeeper.txn.CreateTxn; +import org.apache.zookeeper.txn.DeleteTxn; +import org.apache.zookeeper.txn.ErrorTxn; +import org.apache.zookeeper.txn.SetACLTxn; +import org.apache.zookeeper.txn.SetDataTxn; +import org.apache.zookeeper.txn.TxnHeader; + +import java.io.File; +import java.io.Closeable; +import java.io.FileNotFoundException; +import java.util.Iterator; +import java.util.NoSuchElementException; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class TxnLogSource implements LogSource { + private static final Logger LOG = LoggerFactory.getLogger(TxnLogSource.class); + + private LogSkipList skiplist = null; + private static final int skipN = 10000; + + private String file = null; + private long starttime = 0; + private long endtime = 0; + private long size = 0; + + public boolean overlapsRange(long starttime, long endtime) { + return (starttime <= this.endtime && endtime >= this.starttime); + } + + public long size() { return size; } + public long getStartTime() { return starttime; } + public long getEndTime() { return endtime; } + public LogSkipList getSkipList() { return skiplist; } + + public static boolean isTransactionFile(String file) throws IOException { + RandomAccessFileReader reader = new RandomAccessFileReader(new File(file)); + BinaryInputArchive logStream = new BinaryInputArchive(reader); + FileHeader fhdr = new FileHeader(); + fhdr.deserialize(logStream, "fileheader"); + reader.close(); + + return fhdr.getMagic() == FileTxnLog.TXNLOG_MAGIC; + } + + private class TxnLogSourceIterator implements LogIterator { + private LogEntry next = null; + private long starttime = 0; + private long endtime = 0; + private TxnLogSource src = null; + private RandomAccessFileReader reader = null; + private BinaryInputArchive logStream = null; + private long skippedAtStart = 0; + private FilterOp filter = null; + + public TxnLogSourceIterator(TxnLogSource src, long starttime, long endtime) throws IllegalArgumentException, FilterException { + this(src,starttime,endtime,null); + } + + public TxnLogSourceIterator(TxnLogSource src, long starttime, long endtime, FilterOp filter) throws IllegalArgumentException, FilterException { + try { + this.src = src; + this.starttime = starttime; + this.endtime = endtime; + reader = new RandomAccessFileReader(new File(src.file)); + logStream = new BinaryInputArchive(reader); + FileHeader fhdr = new FileHeader(); + fhdr.deserialize(logStream, "fileheader"); + } catch (Exception e) { + throw new IllegalArgumentException("Cannot open transaction log ("+src.file+") :" + e); + } + + LogSkipList.Mark start = src.getSkipList().findMarkBefore(starttime); + try { + reader.seek(start.getBytes()); + skippedAtStart = start.getEntriesSkipped(); + } catch (IOException ioe) { + // if we can't skip, we should just read from the start + } + + this.filter = filter; + + LogEntry e; + while ((e = readNextEntry()) != null && e.getTimestamp() < endtime) { + if (e.getTimestamp() >= starttime && (filter == null || filter.matches(e)) ) { + next = e; + return; + } + skippedAtStart++; + } + + + } + + public long size() throws IOException { + if (this.endtime >= src.getEndTime()) { + return src.size() - skippedAtStart; + } + + long pos = reader.getPosition(); + LogEntry e; + + LogSkipList.Mark lastseg = src.getSkipList().findMarkBefore(this.endtime); + reader.seek(lastseg.getBytes()); + // number of entries skipped to get to the end of the iterator, less the number skipped to get to the start + long count = lastseg.getEntriesSkipped() - skippedAtStart; + + while ((e = readNextEntry()) != null) { + if (e.getTimestamp() > this.endtime) { + break; + } + count++; + } + reader.seek(pos);; + + return count; + } + + private LogEntry readNextEntry() { + LogEntry e = null; + try { + long crcValue; + byte[] bytes; + try { + crcValue = logStream.readLong("crcvalue"); + + bytes = logStream.readBuffer("txnEntry"); + } catch (EOFException ex) { + return null; + } + + if (bytes.length == 0) { + return null; + } + Checksum crc = new Adler32(); + crc.update(bytes, 0, bytes.length); + if (crcValue != crc.getValue()) { + throw new IOException("CRC doesn't match " + crcValue + + " vs " + crc.getValue()); + } + TxnHeader hdr = new TxnHeader(); + Record r = SerializeUtils.deserializeTxn(bytes, hdr); + + switch (hdr.getType()) { + case OpCode.createSession: { + e = new TransactionEntry(hdr.getTime(), hdr.getClientId(), hdr.getCxid(), hdr.getZxid(), "createSession"); + } + break; + case OpCode.closeSession: { + e = new TransactionEntry(hdr.getTime(), hdr.getClientId(), hdr.getCxid(), hdr.getZxid(), "closeSession"); + } + break; + case OpCode.create: + if (r != null) { + CreateTxn create = (CreateTxn)r; + String path = create.getPath(); + e = new TransactionEntry(hdr.getTime(), hdr.getClientId(), hdr.getCxid(), hdr.getZxid(), "create", path); + } + break; + case OpCode.setData: + if (r != null) { + SetDataTxn set = (SetDataTxn)r; + String path = set.getPath(); + e = new TransactionEntry(hdr.getTime(), hdr.getClientId(), hdr.getCxid(), hdr.getZxid(), "setData", path); + } + break; + case OpCode.setACL: + if (r != null) { + SetACLTxn setacl = (SetACLTxn)r; + String path = setacl.getPath(); + e = new TransactionEntry(hdr.getTime(), hdr.getClientId(), hdr.getCxid(), hdr.getZxid(), "setACL", path); + } + break; + case OpCode.error: + if (r != null) { + ErrorTxn error = (ErrorTxn)r; + + e = new TransactionEntry(hdr.getTime(), hdr.getClientId(), hdr.getCxid(), hdr.getZxid(), "error", "Error: " + error.getErr()); + } + break; + default: + LOG.info("Unknown op: " + hdr.getType()); + break; + } + + if (logStream.readByte("EOR") != 'B') { + throw new EOFException("Last transaction was partial."); + } + } catch (Exception ex) { + LOG.error("Error reading transaction from (" + src.file + ") :" + e); + return null; + } + return e; + } + + public boolean hasNext() { + return next != null; + } + + public LogEntry next() throws NoSuchElementException { + LogEntry ret = next; + LogEntry e = readNextEntry(); + + if (filter != null) { + try { + while (e != null && !filter.matches(e)) { + e = readNextEntry(); + } + } catch (FilterException fe) { + throw new NoSuchElementException(fe.toString()); + } + } + if (e != null && e.getTimestamp() < endtime) { + next = e; + } else { + next = null; + } + return ret; + } + + public void remove() throws UnsupportedOperationException { + throw new UnsupportedOperationException("remove not supported for Txn logs"); + } + + public void close() throws IOException { + reader.close(); + } + } + + public LogIterator iterator(long starttime, long endtime) throws IllegalArgumentException { + try { + return iterator(starttime, endtime, null); + } catch (FilterException fe) { + assert(false); // should never ever happen + return null; + } + } + + public LogIterator iterator(long starttime, long endtime, FilterOp filter) throws IllegalArgumentException, FilterException { + // sanitise start and end times + if (endtime < starttime) { + throw new IllegalArgumentException("End time (" + endtime + ") must be greater or equal to starttime (" + starttime + ")"); + } + + return new TxnLogSourceIterator(this, starttime, endtime, filter); + } + + public LogIterator iterator() throws IllegalArgumentException { + return iterator(starttime, endtime+1); + } + + public TxnLogSource(String file) throws IOException { + this.file = file; + + skiplist = new LogSkipList(); + + RandomAccessFileReader reader = new RandomAccessFileReader(new File(file)); + try { + BinaryInputArchive logStream = new BinaryInputArchive(reader); + FileHeader fhdr = new FileHeader(); + fhdr.deserialize(logStream, "fileheader"); + + byte[] bytes = null; + while (true) { + long lastFp = reader.getPosition(); + + long crcValue; + + try { + crcValue = logStream.readLong("crcvalue"); + bytes = logStream.readBuffer("txnEntry"); + } catch (EOFException e) { + break; + } + + if (bytes.length == 0) { + break; + } + Checksum crc = new Adler32(); + crc.update(bytes, 0, bytes.length); + if (crcValue != crc.getValue()) { + throw new IOException("CRC doesn't match " + crcValue + + " vs " + crc.getValue()); + } + if (logStream.readByte("EOR") != 'B') { + throw new EOFException("Last transaction was partial."); + } + TxnHeader hdr = new TxnHeader(); + Record r = SerializeUtils.deserializeTxn(bytes, hdr); + + if (starttime == 0) { + starttime = hdr.getTime(); + } + endtime = hdr.getTime(); + + if (size % skipN == 0) { + skiplist.addMark(hdr.getTime(), lastFp, size); + } + size++; + } + if (bytes == null) { + throw new IOException("Nothing read from ("+file+")"); + } + } finally { + reader.close(); + } + } + + public String toString() { + return "TxnLogSource(file=" + file + ", size=" + size + ", start=" + starttime + ", end=" + endtime +")"; + } + + public static void main(String[] args) throws IOException, FilterException { + TxnLogSource s = new TxnLogSource(args[0]); + System.out.println(s); + + LogIterator iter; + + if (args.length == 3) { + long starttime = Long.valueOf(args[1]); + long endtime = Long.valueOf(args[2]); + FilterOp fo = new FilterParser("(or (and (> zxid 0x2f0bd6f5e0) (< zxid 0x2f0bd6f5e9)) (= operation \"error\"))").parse(); + System.out.println("fo: " + fo); + iter = s.iterator(starttime, endtime, fo); + } else { + iter = s.iterator(); + } + System.out.println(iter); + while (iter.hasNext()) { + System.out.println(iter.next()); + } + iter.close(); + } +} diff --git a/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/AndOp.java b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/AndOp.java new file mode 100644 index 0000000..581bdaa --- /dev/null +++ b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/AndOp.java @@ -0,0 +1,33 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.graph.filterops; + +import org.apache.zookeeper.graph.LogEntry; +import org.apache.zookeeper.graph.FilterOp; +import org.apache.zookeeper.graph.FilterException; + +public class AndOp extends FilterOp { + public boolean matches(LogEntry entry) throws FilterException { + for (FilterOp f : subOps) { + if (!f.matches(entry)) { + return false; + } + } + return true; + } +} diff --git a/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/Arg.java b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/Arg.java new file mode 100644 index 0000000..4fda3cf --- /dev/null +++ b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/Arg.java @@ -0,0 +1,36 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.graph.filterops; + +import org.apache.zookeeper.graph.FilterOp.*; + +public class Arg { + private ArgType type; + protected T value; + + protected Arg(ArgType type) { + this.type = type; + } + + public ArgType getType() { return type; } + public T getValue() { return value; } + + public String toString() { + return "[" + type + ":" + value + "]"; + } +} diff --git a/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/EqualsOp.java b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/EqualsOp.java new file mode 100644 index 0000000..409815a --- /dev/null +++ b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/EqualsOp.java @@ -0,0 +1,44 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.graph.filterops; + +import org.apache.zookeeper.graph.LogEntry; +import org.apache.zookeeper.graph.FilterOp; +import org.apache.zookeeper.graph.FilterException; + +public class EqualsOp extends FilterOp { + public boolean matches(LogEntry entry) throws FilterException { + + Object last = null; + for (Arg a : args) { + Object v = a.getValue(); + if (a.getType() == FilterOp.ArgType.SYMBOL) { + String key = (String)a.getValue(); + v = entry.getAttribute(key); + } + + if (last != null + && !last.equals(v)) { + return false; + } + last = v; + } + + return true; + } +} diff --git a/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/GreaterThanOp.java b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/GreaterThanOp.java new file mode 100644 index 0000000..244dd3d --- /dev/null +++ b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/GreaterThanOp.java @@ -0,0 +1,70 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.graph.filterops; + +import org.apache.zookeeper.graph.LogEntry; +import org.apache.zookeeper.graph.FilterOp; +import org.apache.zookeeper.graph.FilterException; + +public class GreaterThanOp extends FilterOp { + public boolean matches(LogEntry entry) throws FilterException { + Arg first = args.get(0); + + if (first != null) { + FilterOp.ArgType type = first.getType(); + if (type == FilterOp.ArgType.SYMBOL) { + String key = (String)first.getValue(); + Object v = entry.getAttribute(key); + if (v instanceof String) { + type = FilterOp.ArgType.STRING; + } else if (v instanceof Double || v instanceof Long || v instanceof Integer || v instanceof Short) { + type = FilterOp.ArgType.NUMBER; + } else { + throw new FilterException("LessThanOp: Invalid argument, first argument resolves to neither a String nor a Number"); + } + } + + Object last = null; + for (Arg a : args) { + Object v = a.getValue(); + if (a.getType() == FilterOp.ArgType.SYMBOL) { + String key = (String)a.getValue(); + v = entry.getAttribute(key); + } + + if (last != null) { + if (type == FilterOp.ArgType.STRING) { + if (((String)last).compareTo((String)v) <= 0) { + return false; + } + } else if (type == FilterOp.ArgType.NUMBER) { + // System.out.println("last[" + ((Number)last).longValue() + "] v["+ ((Number)v).longValue() + "]"); + if (((Number)last).longValue() <= ((Number)v).longValue()) { + return false; + } + } + } + last = v; + } + return true; + } else { + return true; + } + } + +} diff --git a/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/LessThanOp.java b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/LessThanOp.java new file mode 100644 index 0000000..b7d9e09 --- /dev/null +++ b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/LessThanOp.java @@ -0,0 +1,69 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.graph.filterops; + +import org.apache.zookeeper.graph.LogEntry; +import org.apache.zookeeper.graph.FilterOp; +import org.apache.zookeeper.graph.FilterException; + +public class LessThanOp extends FilterOp { + public boolean matches(LogEntry entry) throws FilterException { + Arg first = args.get(0); + + if (first != null) { + FilterOp.ArgType type = first.getType(); + if (type == FilterOp.ArgType.SYMBOL) { + String key = (String)first.getValue(); + Object v = entry.getAttribute(key); + if (v instanceof String) { + type = FilterOp.ArgType.STRING; + } else if (v instanceof Double || v instanceof Long || v instanceof Integer || v instanceof Short) { + type = FilterOp.ArgType.NUMBER; + } else { + throw new FilterException("LessThanOp: Invalid argument, first argument resolves to neither a String nor a Number"); + } + } + + Object last = null; + for (Arg a : args) { + Object v = a.getValue(); + if (a.getType() == FilterOp.ArgType.SYMBOL) { + String key = (String)a.getValue(); + v = entry.getAttribute(key); + } + + if (last != null) { + if (type == FilterOp.ArgType.STRING) { + if (((String)last).compareTo((String)v) >= 0) { + return false; + } + } else if (type == FilterOp.ArgType.NUMBER) { + if (((Number)last).doubleValue() >= ((Number)v).doubleValue()) { + return false; + } + } + } + last = v; + } + return true; + } else { + return true; + } + } + +} diff --git a/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/NotOp.java b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/NotOp.java new file mode 100644 index 0000000..d8ed757 --- /dev/null +++ b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/NotOp.java @@ -0,0 +1,31 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.graph.filterops; + +import org.apache.zookeeper.graph.LogEntry; +import org.apache.zookeeper.graph.FilterOp; +import org.apache.zookeeper.graph.FilterException; + +public class NotOp extends FilterOp { + public boolean matches(LogEntry entry) throws FilterException { + if (subOps.size() != 1) { + throw new FilterException("Not operation can only take one argument"); + } + return !subOps.get(0).matches(entry); + } +} diff --git a/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/NumberArg.java b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/NumberArg.java new file mode 100644 index 0000000..d6b584d --- /dev/null +++ b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/NumberArg.java @@ -0,0 +1,28 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.graph.filterops; + +import org.apache.zookeeper.graph.FilterOp.*; + +public class NumberArg extends Arg { + public NumberArg(Long value) { + super(ArgType.NUMBER); + this.value = value; + } +}; + diff --git a/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/OrOp.java b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/OrOp.java new file mode 100644 index 0000000..d681589 --- /dev/null +++ b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/OrOp.java @@ -0,0 +1,33 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.graph.filterops; + +import org.apache.zookeeper.graph.LogEntry; +import org.apache.zookeeper.graph.FilterOp; +import org.apache.zookeeper.graph.FilterException; + +public class OrOp extends FilterOp { + public boolean matches(LogEntry entry) throws FilterException { + for (FilterOp f : subOps) { + if (f.matches(entry)) { + return true; + } + } + return false; + } +} diff --git a/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/StringArg.java b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/StringArg.java new file mode 100644 index 0000000..7345d3c --- /dev/null +++ b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/StringArg.java @@ -0,0 +1,28 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.graph.filterops; + +import org.apache.zookeeper.graph.FilterOp.*; + +public class StringArg extends Arg { + public StringArg(String value) { + super(ArgType.STRING); + this.value = value; + } +}; + diff --git a/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/SymbolArg.java b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/SymbolArg.java new file mode 100644 index 0000000..077553b --- /dev/null +++ b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/SymbolArg.java @@ -0,0 +1,27 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.graph.filterops; + +import org.apache.zookeeper.graph.FilterOp.*; + +public class SymbolArg extends Arg { + public SymbolArg(String value) { + super(ArgType.SYMBOL); + this.value = value; + } +}; diff --git a/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/XorOp.java b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/XorOp.java new file mode 100644 index 0000000..9e778b1 --- /dev/null +++ b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/XorOp.java @@ -0,0 +1,40 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.graph.filterops; + +import org.apache.zookeeper.graph.LogEntry; +import org.apache.zookeeper.graph.FilterOp; +import org.apache.zookeeper.graph.FilterException; + +public class XorOp extends FilterOp { + public boolean matches(LogEntry entry) throws FilterException { + int count = 0; + for (FilterOp f : subOps) { + if (f.matches(entry)) { + count++; + if (count > 1) { + return false; + } + } + } + if (count == 1) { + return true; + } + return false; + } +} diff --git a/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/servlets/FileLoader.java b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/servlets/FileLoader.java new file mode 100644 index 0000000..67e8945 --- /dev/null +++ b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/servlets/FileLoader.java @@ -0,0 +1,60 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.graph.servlets; + +import java.io.File; +import java.io.IOException; +import java.io.FileNotFoundException; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.json.simple.JSONArray; +import org.json.simple.JSONObject; +import org.json.simple.JSONValue; + +import org.apache.zookeeper.graph.*; + +public class FileLoader extends JsonServlet +{ + private MergedLogSource source = null; + + public FileLoader(MergedLogSource src) throws Exception { + source = src; + } + + String handleRequest(JsonRequest request) throws Exception + { + String output = ""; + + String file = request.getString("path", "/"); + JSONObject o = new JSONObject(); + try { + this.source.addSource(file); + o.put("status", "OK"); + + } catch (Exception e) { + o.put("status", "ERR"); + o.put("error", e.toString()); + } + + return JSONValue.toJSONString(o); + } +} diff --git a/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/servlets/Fs.java b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/servlets/Fs.java new file mode 100644 index 0000000..e5b1a01 --- /dev/null +++ b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/servlets/Fs.java @@ -0,0 +1,69 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.graph.servlets; + +import java.io.File; +import java.io.IOException; +import java.io.FileNotFoundException; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.json.simple.JSONArray; +import org.json.simple.JSONObject; +import org.json.simple.JSONValue; +import java.util.Arrays; +import java.util.Comparator; + +public class Fs extends JsonServlet +{ + String handleRequest(JsonRequest request) throws Exception + { + String output = ""; + JSONArray filelist = new JSONArray(); + + File base = new File(request.getString("path", "/")); + if (!base.exists() || !base.isDirectory()) { + throw new FileNotFoundException("Couldn't find [" + request + "]"); + } + File[] files = base.listFiles(); + Arrays.sort(files, new Comparator() { + public int compare(File o1, File o2) { + if (o1.isDirectory() != o2.isDirectory()) { + if (o1.isDirectory()) { + return -1; + } else { + return 1; + } + } + return o1.getName().compareToIgnoreCase(o2.getName()); + } + }); + + for (File f : files) { + JSONObject o = new JSONObject(); + o.put("file", f.getName()); + o.put("type", f.isDirectory() ? "D" : "F"); + o.put("path", f.getCanonicalPath()); + filelist.add(o); + } + return JSONValue.toJSONString(filelist); + } +} diff --git a/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/servlets/GraphData.java b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/servlets/GraphData.java new file mode 100644 index 0000000..fc10eb1 --- /dev/null +++ b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/servlets/GraphData.java @@ -0,0 +1,85 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.graph.servlets; + +import java.io.File; +import java.io.IOException; +import java.io.FileNotFoundException; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import java.util.regex.Pattern; +import java.util.regex.Matcher; + +import org.json.simple.JSONArray; +import org.json.simple.JSONObject; +import org.json.simple.JSONValue; + +import org.apache.zookeeper.graph.*; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class GraphData extends JsonServlet +{ + private static final Logger LOG = LoggerFactory.getLogger(GraphData.class); + private static final int DEFAULT_PERIOD = 1000; + + private LogSource source = null; + + public GraphData(LogSource src) throws Exception { + this.source = src; + } + + String handleRequest(JsonRequest request) throws Exception { + + + long starttime = 0; + long endtime = 0; + long period = 0; + FilterOp fo = null; + + starttime = request.getNumber("start", 0); + endtime = request.getNumber("end", 0); + period = request.getNumber("period", 0); + String filterstr = request.getString("filter", ""); + + if (filterstr.length() > 0) { + fo = new FilterParser(filterstr).parse(); + } + + if (starttime == 0) { starttime = source.getStartTime(); } + if (endtime == 0) { + if (period > 0) { + endtime = starttime + period; + } else { + endtime = starttime + DEFAULT_PERIOD; + } + } + + if (LOG.isDebugEnabled()) { + LOG.debug("handle(start= " + starttime + ", end=" + endtime + ", period=" + period + ")"); + } + + LogIterator iterator = (fo != null) ? + source.iterator(starttime, endtime, fo) : source.iterator(starttime, endtime); + return new JsonGenerator(iterator).toString(); + } +} diff --git a/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/servlets/JsonServlet.java b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/servlets/JsonServlet.java new file mode 100644 index 0000000..910d44f --- /dev/null +++ b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/servlets/JsonServlet.java @@ -0,0 +1,85 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.graph.servlets; + +import java.io.IOException; + +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.json.simple.JSONObject; +import org.json.simple.JSONValue; + +import java.util.Map; + +abstract public class JsonServlet extends HttpServlet { + abstract String handleRequest(JsonRequest request) throws Exception; + + protected class JsonRequest { + private Map map; + + public JsonRequest(ServletRequest request) { + map = request.getParameterMap(); + } + + public long getNumber(String name, long defaultnum) { + String[] vals = (String[])map.get(name); + if (vals == null || vals.length == 0) { + return defaultnum; + } + + try { + return Long.valueOf(vals[0]); + } catch (NumberFormatException e) { + return defaultnum; + } + } + + public String getString(String name, String defaultstr) { + String[] vals = (String[])map.get(name); + if (vals == null || vals.length == 0) { + return defaultstr; + } else { + return vals[0]; + } + } + } + + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException + { + response.setContentType("text/plain;charset=utf-8"); + response.setStatus(HttpServletResponse.SC_OK); + + try { + String req = request.getRequestURI().substring(request.getServletPath().length()); + + response.getWriter().println(handleRequest(new JsonRequest(request))); + } catch (Exception e) { + JSONObject o = new JSONObject(); + o.put("error", e.toString()); + response.getWriter().println(JSONValue.toJSONString(o)); + } catch (java.lang.OutOfMemoryError oom) { + JSONObject o = new JSONObject(); + o.put("error", "Out of memory. Perhaps you've requested too many logs. Try narrowing you're filter criteria."); + response.getWriter().println(JSONValue.toJSONString(o)); + } + } +} diff --git a/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/servlets/NumEvents.java b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/servlets/NumEvents.java new file mode 100644 index 0000000..5961a12 --- /dev/null +++ b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/servlets/NumEvents.java @@ -0,0 +1,88 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.graph.servlets; + +import java.io.File; +import java.io.IOException; +import java.io.FileNotFoundException; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.json.simple.JSONArray; +import org.json.simple.JSONObject; +import org.json.simple.JSONValue; + +import java.util.regex.Pattern; +import java.util.regex.Matcher; + +import org.apache.zookeeper.graph.*; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + +public class NumEvents extends JsonServlet +{ + private static final Logger LOG = LoggerFactory.getLogger(NumEvents.class); + private static final int DEFAULT_PERIOD = 1000; + + private LogSource source = null; + + public NumEvents(LogSource src) throws Exception { + this.source = src; + } + + String handleRequest(JsonRequest request) throws Exception { + String output = ""; + + long starttime = 0; + long endtime = 0; + long period = 0; + + starttime = request.getNumber("start", 0); + endtime = request.getNumber("end", 0); + period = request.getNumber("period", 0); + + if (starttime == 0) { starttime = source.getStartTime(); } + if (endtime == 0) { + if (period > 0) { + endtime = starttime + period; + } else { + endtime = source.getEndTime(); + } + } + + LogIterator iter = source.iterator(starttime, endtime); + JSONObject data = new JSONObject(); + data.put("startTime", starttime); + data.put("endTime", endtime); + long size = 0; + + size = iter.size(); + + data.put("numEntries", size); + if (LOG.isDebugEnabled()) { + LOG.debug("handle(start= " + starttime + ", end=" + endtime + ", numEntries=" + size +")"); + } + iter.close(); + return JSONValue.toJSONString(data); + } +} + diff --git a/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/servlets/StaticContent.java b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/servlets/StaticContent.java new file mode 100644 index 0000000..d91acb6 --- /dev/null +++ b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/servlets/StaticContent.java @@ -0,0 +1,53 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.graph.servlets; + +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.BufferedReader; + +import java.io.IOException; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +public class StaticContent extends HttpServlet { + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException + { + String path = request.getRequestURI().substring(request.getServletPath().length()); + + InputStream resource = ClassLoader.getSystemResourceAsStream("org/apache/zookeeper/graph/resources" + path); + if (resource == null) { + response.getWriter().println(path + " not found!"); + response.setStatus(HttpServletResponse.SC_NOT_FOUND); + return; + } + try { + while (resource.available() > 0) { + response.getWriter().write(resource.read()); + } + } finally { + resource.close(); + } + // response.setContentType("text/plain;charset=utf-8"); + response.setStatus(HttpServletResponse.SC_OK); + } + +} diff --git a/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/servlets/Throughput.java b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/servlets/Throughput.java new file mode 100644 index 0000000..341bf9e --- /dev/null +++ b/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/servlets/Throughput.java @@ -0,0 +1,125 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.graph.servlets; + +import java.io.IOException; +import java.io.BufferedOutputStream; +import java.io.FileOutputStream; +import java.io.DataOutputStream; +import java.io.PrintStream; + +import java.util.HashSet; +import java.util.LinkedHashMap; + +import org.apache.zookeeper.graph.*; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.json.simple.JSONArray; +import org.json.simple.JSONObject; +import org.json.simple.JSONValue; + + +public class Throughput extends JsonServlet +{ + private static final int MS_PER_SEC = 1000; + private static final int MS_PER_MIN = MS_PER_SEC*60; + private static final int MS_PER_HOUR = MS_PER_MIN*60; + + private LogSource source = null; + + public Throughput(LogSource src) throws Exception { + this.source = src; + } + + public String handleRequest(JsonRequest request) throws Exception { + long starttime = 0; + long endtime = 0; + long period = 0; + long scale = 0; + + starttime = request.getNumber("start", 0); + endtime = request.getNumber("end", 0); + period = request.getNumber("period", 0); + + + if (starttime == 0) { starttime = source.getStartTime(); } + if (endtime == 0) { + if (period > 0) { + endtime = starttime + period; + } else { + endtime = source.getEndTime(); + } + } + + String scalestr = request.getString("scale", "minutes"); + if (scalestr.equals("seconds")) { + scale = MS_PER_SEC; + } else if (scalestr.equals("hours")) { + scale = MS_PER_HOUR; + } else { + scale = MS_PER_MIN; + } + + LogIterator iter = source.iterator(starttime, endtime); + + long current = 0; + long currentms = 0; + HashSet zxids_ms = new HashSet(); + long zxidcount = 0; + + JSONArray events = new JSONArray(); + while (iter.hasNext()) { + LogEntry e = iter.next(); + if (e.getType() != LogEntry.Type.TXN) { + continue; + } + + TransactionEntry cxn = (TransactionEntry)e; + + long ms = cxn.getTimestamp(); + long inscale = ms/scale; + + if (currentms != ms && currentms != 0) { + zxidcount += zxids_ms.size(); + zxids_ms.clear(); + } + + if (inscale != current && current != 0) { + JSONObject o = new JSONObject(); + o.put("time", current*scale); + o.put("count", zxidcount); + events.add(o); + zxidcount = 0; + } + current = inscale; + currentms = ms; + + zxids_ms.add(cxn.getZxid()); + } + JSONObject o = new JSONObject(); + o.put("time", current*scale); + o.put("count", zxidcount); + events.add(o); + + iter.close(); + + return JSONValue.toJSONString(events); + } + +}; diff --git a/src/contrib/loggraph/web/org/apache/zookeeper/graph/log4j.properties b/src/contrib/loggraph/web/org/apache/zookeeper/graph/log4j.properties new file mode 100644 index 0000000..ab8960b --- /dev/null +++ b/src/contrib/loggraph/web/org/apache/zookeeper/graph/log4j.properties @@ -0,0 +1,11 @@ +log4j.rootLogger=TRACE, CONSOLE + +# Print the date in ISO 8601 format +log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender +log4j.appender.CONSOLE.Threshold=TRACE +log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout +log4j.appender.CONSOLE.layout.ConversionPattern=%d{ISO8601} - %-5p [%t:%C{1}@%L] - %m%n + +log4j.logger.org.apache.zookeeper.graph.LogSkipList=off +log4j.logger.org.apache.zookeeper.graph.RandomAccessFileReader=off +#log4j.logger.org.apache.zookeeper.graph.Log4JSource=off \ No newline at end of file diff --git a/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/date.format.js b/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/date.format.js new file mode 100644 index 0000000..5515009 --- /dev/null +++ b/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/date.format.js @@ -0,0 +1,126 @@ +/* + * Date Format 1.2.3 + * (c) 2007-2009 Steven Levithan + * MIT license + * + * Includes enhancements by Scott Trenda + * and Kris Kowal + * + * Accepts a date, a mask, or a date and a mask. + * Returns a formatted version of the given date. + * The date defaults to the current date/time. + * The mask defaults to dateFormat.masks.default. + */ + +var dateFormat = function () { + var token = /d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g, + timezone = /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g, + timezoneClip = /[^-+\dA-Z]/g, + pad = function (val, len) { + val = String(val); + len = len || 2; + while (val.length < len) val = "0" + val; + return val; + }; + + // Regexes and supporting functions are cached through closure + return function (date, mask, utc) { + var dF = dateFormat; + + // You can't provide utc if you skip other args (use the "UTC:" mask prefix) + if (arguments.length == 1 && Object.prototype.toString.call(date) == "[object String]" && !/\d/.test(date)) { + mask = date; + date = undefined; + } + + // Passing date through Date applies Date.parse, if necessary + date = date ? new Date(date) : new Date; + if (isNaN(date)) throw SyntaxError("invalid date"); + + mask = String(dF.masks[mask] || mask || dF.masks["default"]); + + // Allow setting the utc argument via the mask + if (mask.slice(0, 4) == "UTC:") { + mask = mask.slice(4); + utc = true; + } + + var _ = utc ? "getUTC" : "get", + d = date[_ + "Date"](), + D = date[_ + "Day"](), + m = date[_ + "Month"](), + y = date[_ + "FullYear"](), + H = date[_ + "Hours"](), + M = date[_ + "Minutes"](), + s = date[_ + "Seconds"](), + L = date[_ + "Milliseconds"](), + o = utc ? 0 : date.getTimezoneOffset(), + flags = { + d: d, + dd: pad(d), + ddd: dF.i18n.dayNames[D], + dddd: dF.i18n.dayNames[D + 7], + m: m + 1, + mm: pad(m + 1), + mmm: dF.i18n.monthNames[m], + mmmm: dF.i18n.monthNames[m + 12], + yy: String(y).slice(2), + yyyy: y, + h: H % 12 || 12, + hh: pad(H % 12 || 12), + H: H, + HH: pad(H), + M: M, + MM: pad(M), + s: s, + ss: pad(s), + l: pad(L, 3), + L: pad(L > 99 ? Math.round(L / 10) : L), + t: H < 12 ? "a" : "p", + tt: H < 12 ? "am" : "pm", + T: H < 12 ? "A" : "P", + TT: H < 12 ? "AM" : "PM", + Z: utc ? "UTC" : (String(date).match(timezone) || [""]).pop().replace(timezoneClip, ""), + o: (o > 0 ? "-" : "+") + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4), + S: ["th", "st", "nd", "rd"][d % 10 > 3 ? 0 : (d % 100 - d % 10 != 10) * d % 10] + }; + + return mask.replace(token, function ($0) { + return $0 in flags ? flags[$0] : $0.slice(1, $0.length - 1); + }); + }; +}(); + +// Some common format strings +dateFormat.masks = { + "default": "ddd mmm dd yyyy HH:MM:ss", + shortDate: "m/d/yy", + mediumDate: "mmm d, yyyy", + longDate: "mmmm d, yyyy", + fullDate: "dddd, mmmm d, yyyy", + shortTime: "h:MM TT", + mediumTime: "h:MM:ss TT", + longTime: "h:MM:ss TT Z", + isoDate: "yyyy-mm-dd", + isoTime: "HH:MM:ss", + isoDateTime: "yyyy-mm-dd'T'HH:MM:ss", + isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'" +}; + +// Internationalization strings +dateFormat.i18n = { + dayNames: [ + "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", + "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" + ], + monthNames: [ + "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", + "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" + ] +}; + +// For convenience... +Date.prototype.format = function (mask, utc) { + return dateFormat(this, mask, utc); +}; + diff --git a/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/g.bar.js b/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/g.bar.js new file mode 100644 index 0000000..2f7212a --- /dev/null +++ b/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/g.bar.js @@ -0,0 +1,385 @@ +/* + * g.Raphael 0.4 - Charting library, based on Raphaël + * + * Copyright (c) 2009 Dmitry Baranovskiy (http://g.raphaeljs.com) + * Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license. + */ +Raphael.fn.g.barchart = function (x, y, width, height, values, opts) { + opts = opts || {}; + var type = {round: "round", sharp: "sharp", soft: "soft"}[opts.type] || "square", + gutter = parseFloat(opts.gutter || "20%"), + chart = this.set(), + bars = this.set(), + covers = this.set(), + covers2 = this.set(), + total = Math.max.apply(Math, values), + stacktotal = [], + paper = this, + multi = 0, + colors = opts.colors || this.g.colors, + len = values.length; + if (this.raphael.is(values[0], "array")) { + total = []; + multi = len; + len = 0; + for (var i = values.length; i--;) { + bars.push(this.set()); + total.push(Math.max.apply(Math, values[i])); + len = Math.max(len, values[i].length); + } + if (opts.stacked) { + for (var i = len; i--;) { + var tot = 0; + for (var j = values.length; j--;) { + tot +=+ values[j][i] || 0; + } + stacktotal.push(tot); + } + } + for (var i = values.length; i--;) { + if (values[i].length < len) { + for (var j = len; j--;) { + values[i].push(0); + } + } + } + total = Math.max.apply(Math, opts.stacked ? stacktotal : total); + } + + total = (opts.to) || total; + var barwidth = width / (len * (100 + gutter) + gutter) * 100, + barhgutter = barwidth * gutter / 100, + barvgutter = opts.vgutter == null ? 20 : opts.vgutter, + stack = [], + X = x + barhgutter, + Y = (height - 2 * barvgutter) / total; + if (!opts.stretch) { + barhgutter = Math.round(barhgutter); + barwidth = Math.floor(barwidth); + } + !opts.stacked && (barwidth /= multi || 1); + for (var i = 0; i < len; i++) { + stack = []; + for (var j = 0; j < (multi || 1); j++) { + var h = Math.round((multi ? values[j][i] : values[i]) * Y), + top = y + height - barvgutter - h, + bar = this.g.finger(Math.round(X + barwidth / 2), top + h, barwidth, h, true, type).attr({stroke: colors[multi ? j : i], fill: colors[multi ? j : i]}); + if (multi) { + bars[j].push(bar); + } else { + bars.push(bar); + } + bar.y = top; + bar.x = Math.round(X + barwidth / 2); + bar.w = barwidth; + bar.h = h; + bar.value = multi ? values[j][i] : values[i]; + if (!opts.stacked) { + X += barwidth; + } else { + stack.push(bar); + } + } + if (opts.stacked) { + var cvr; + covers2.push(cvr = this.rect(stack[0].x - stack[0].w / 2, y, barwidth, height).attr(this.g.shim)); + cvr.bars = this.set(); + var size = 0; + for (var s = stack.length; s--;) { + stack[s].toFront(); + } + for (var s = 0, ss = stack.length; s < ss; s++) { + var bar = stack[s], + cover, + h = (size + bar.value) * Y, + path = this.g.finger(bar.x, y + height - barvgutter - !!size * .5, barwidth, h, true, type, 1); + cvr.bars.push(bar); + size && bar.attr({path: path}); + bar.h = h; + bar.y = y + height - barvgutter - !!size * .5 - h; + covers.push(cover = this.rect(bar.x - bar.w / 2, bar.y, barwidth, bar.value * Y).attr(this.g.shim)); + cover.bar = bar; + cover.value = bar.value; + size += bar.value; + } + X += barwidth; + } + X += barhgutter; + } + covers2.toFront(); + X = x + barhgutter; + if (!opts.stacked) { + for (var i = 0; i < len; i++) { + for (var j = 0; j < (multi || 1); j++) { + var cover; + covers.push(cover = this.rect(Math.round(X), y + barvgutter, barwidth, height - barvgutter).attr(this.g.shim)); + cover.bar = multi ? bars[j][i] : bars[i]; + cover.value = cover.bar.value; + X += barwidth; + } + X += barhgutter; + } + } + chart.label = function (labels, isBottom) { + labels = labels || []; + this.labels = paper.set(); + var L, l = -Infinity; + if (opts.stacked) { + for (var i = 0; i < len; i++) { + var tot = 0; + for (var j = 0; j < (multi || 1); j++) { + tot += multi ? values[j][i] : values[i]; + if (j == multi - 1) { + var label = paper.g.labelise(labels[i], tot, total); + L = paper.g.text(bars[i * (multi || 1) + j].x, y + height - barvgutter / 2, label).insertBefore(covers[i * (multi || 1) + j]); + var bb = L.getBBox(); + if (bb.x - 7 < l) { + L.remove(); + } else { + this.labels.push(L); + l = bb.x + bb.width; + } + } + } + } + } else { + for (var i = 0; i < len; i++) { + for (var j = 0; j < (multi || 1); j++) { + var label = paper.g.labelise(multi ? labels[j] && labels[j][i] : labels[i], multi ? values[j][i] : values[i], total); + L = paper.g.text(bars[i * (multi || 1) + j].x, isBottom ? y + height - barvgutter / 2 : bars[i * (multi || 1) + j].y - 10, label).insertBefore(covers[i * (multi || 1) + j]); + var bb = L.getBBox(); + if (bb.x - 7 < l) { + L.remove(); + } else { + this.labels.push(L); + l = bb.x + bb.width; + } + } + } + } + return this; + }; + chart.hover = function (fin, fout) { + covers2.hide(); + covers.show(); + covers.mouseover(fin).mouseout(fout); + return this; + }; + chart.hoverColumn = function (fin, fout) { + covers.hide(); + covers2.show(); + fout = fout || function () {}; + covers2.mouseover(fin).mouseout(fout); + return this; + }; + chart.click = function (f) { + covers2.hide(); + covers.show(); + covers.click(f); + return this; + }; + chart.each = function (f) { + if (!Raphael.is(f, "function")) { + return this; + } + for (var i = covers.length; i--;) { + f.call(covers[i]); + } + return this; + }; + chart.eachColumn = function (f) { + if (!Raphael.is(f, "function")) { + return this; + } + for (var i = covers2.length; i--;) { + f.call(covers2[i]); + } + return this; + }; + chart.clickColumn = function (f) { + covers.hide(); + covers2.show(); + covers2.click(f); + return this; + }; + chart.push(bars, covers, covers2); + chart.bars = bars; + chart.covers = covers; + return chart; +}; +Raphael.fn.g.hbarchart = function (x, y, width, height, values, opts) { + opts = opts || {}; + var type = {round: "round", sharp: "sharp", soft: "soft"}[opts.type] || "square", + gutter = parseFloat(opts.gutter || "20%"), + chart = this.set(), + bars = this.set(), + covers = this.set(), + covers2 = this.set(), + total = Math.max.apply(Math, values), + stacktotal = [], + paper = this, + multi = 0, + colors = opts.colors || this.g.colors, + len = values.length; + if (this.raphael.is(values[0], "array")) { + total = []; + multi = len; + len = 0; + for (var i = values.length; i--;) { + bars.push(this.set()); + total.push(Math.max.apply(Math, values[i])); + len = Math.max(len, values[i].length); + } + if (opts.stacked) { + for (var i = len; i--;) { + var tot = 0; + for (var j = values.length; j--;) { + tot +=+ values[j][i] || 0; + } + stacktotal.push(tot); + } + } + for (var i = values.length; i--;) { + if (values[i].length < len) { + for (var j = len; j--;) { + values[i].push(0); + } + } + } + total = Math.max.apply(Math, opts.stacked ? stacktotal : total); + } + + total = (opts.to) || total; + var barheight = Math.floor(height / (len * (100 + gutter) + gutter) * 100), + bargutter = Math.floor(barheight * gutter / 100), + stack = [], + Y = y + bargutter, + X = (width - 1) / total; + !opts.stacked && (barheight /= multi || 1); + for (var i = 0; i < len; i++) { + stack = []; + for (var j = 0; j < (multi || 1); j++) { + var val = multi ? values[j][i] : values[i], + bar = this.g.finger(x, Y + barheight / 2, Math.round(val * X), barheight - 1, false, type).attr({stroke: colors[multi ? j : i], fill: colors[multi ? j : i]}); + if (multi) { + bars[j].push(bar); + } else { + bars.push(bar); + } + bar.x = x + Math.round(val * X); + bar.y = Y + barheight / 2; + bar.w = Math.round(val * X); + bar.h = barheight; + bar.value = +val; + if (!opts.stacked) { + Y += barheight; + } else { + stack.push(bar); + } + } + if (opts.stacked) { + var cvr = this.rect(x, stack[0].y - stack[0].h / 2, width, barheight).attr(this.g.shim); + covers2.push(cvr); + cvr.bars = this.set(); + var size = 0; + for (var s = stack.length; s--;) { + stack[s].toFront(); + } + for (var s = 0, ss = stack.length; s < ss; s++) { + var bar = stack[s], + cover, + val = Math.round((size + bar.value) * X), + path = this.g.finger(x, bar.y, val, barheight - 1, false, type, 1); + cvr.bars.push(bar); + size && bar.attr({path: path}); + bar.w = val; + bar.x = x + val; + covers.push(cover = this.rect(x + size * X, bar.y - bar.h / 2, bar.value * X, barheight).attr(this.g.shim)); + cover.bar = bar; + size += bar.value; + } + Y += barheight; + } + Y += bargutter; + } + covers2.toFront(); + Y = y + bargutter; + if (!opts.stacked) { + for (var i = 0; i < len; i++) { + for (var j = 0; j < multi; j++) { + var cover = this.rect(x, Y, width, barheight).attr(this.g.shim); + covers.push(cover); + cover.bar = bars[j][i]; + Y += barheight; + } + Y += bargutter; + } + } + chart.label = function (labels, isRight) { + labels = labels || []; + this.labels = paper.set(); + for (var i = 0; i < len; i++) { + for (var j = 0; j < multi; j++) { + var label = paper.g.labelise(multi ? labels[j] && labels[j][i] : labels[i], multi ? values[j][i] : values[i], total); + var X = isRight ? bars[i * (multi || 1) + j].x - barheight / 2 + 3 : x + 5, + A = isRight ? "end" : "start", + L; + this.labels.push(L = paper.g.text(X, bars[i * (multi || 1) + j].y, label).attr({"text-anchor": A}).insertBefore(covers[0])); + if (L.getBBox().x < x + 5) { + L.attr({x: x + 5, "text-anchor": "start"}); + } else { + bars[i * (multi || 1) + j].label = L; + } + } + } + return this; + }; + chart.hover = function (fin, fout) { + covers2.hide(); + covers.show(); + fout = fout || function () {}; + covers.mouseover(fin).mouseout(fout); + return this; + }; + chart.hoverColumn = function (fin, fout) { + covers.hide(); + covers2.show(); + fout = fout || function () {}; + covers2.mouseover(fin).mouseout(fout); + return this; + }; + chart.each = function (f) { + if (!Raphael.is(f, "function")) { + return this; + } + for (var i = covers.length; i--;) { + f.call(covers[i]); + } + return this; + }; + chart.eachColumn = function (f) { + if (!Raphael.is(f, "function")) { + return this; + } + for (var i = covers2.length; i--;) { + f.call(covers2[i]); + } + return this; + }; + chart.click = function (f) { + covers2.hide(); + covers.show(); + covers.click(f); + return this; + }; + chart.clickColumn = function (f) { + covers.hide(); + covers2.show(); + covers2.click(f); + return this; + }; + chart.push(bars, covers, covers2); + chart.bars = bars; + chart.covers = covers; + return chart; +}; diff --git a/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/g.dot.js b/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/g.dot.js new file mode 100644 index 0000000..2821e62 --- /dev/null +++ b/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/g.dot.js @@ -0,0 +1,110 @@ +/* + * g.Raphael 0.4 - Charting library, based on Raphaël + * + * Copyright (c) 2009 Dmitry Baranovskiy (http://g.raphaeljs.com) + * Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license. + */ +Raphael.fn.g.dotchart = function (x, y, width, height, valuesx, valuesy, size, opts) { + function drawAxis(ax) { + +ax[0] && (ax[0] = paper.g.axis(x + gutter, y + gutter, width - 2 * gutter, minx, maxx, opts.axisxstep || Math.floor((width - 2 * gutter) / 20), 2, opts.axisxlabels || null, opts.axisxtype || "t")); + +ax[1] && (ax[1] = paper.g.axis(x + width - gutter, y + height - gutter, height - 2 * gutter, miny, maxy, opts.axisystep || Math.floor((height - 2 * gutter) / 20), 3, opts.axisylabels || null, opts.axisytype || "t")); + +ax[2] && (ax[2] = paper.g.axis(x + gutter, y + height - gutter + maxR, width - 2 * gutter, minx, maxx, opts.axisxstep || Math.floor((width - 2 * gutter) / 20), 0, opts.axisxlabels || null, opts.axisxtype || "t")); + +ax[3] && (ax[3] = paper.g.axis(x + gutter - maxR, y + height - gutter, height - 2 * gutter, miny, maxy, opts.axisystep || Math.floor((height - 2 * gutter) / 20), 1, opts.axisylabels || null, opts.axisytype || "t")); + } + opts = opts || {}; + var xdim = this.g.snapEnds(Math.min.apply(Math, valuesx), Math.max.apply(Math, valuesx), valuesx.length - 1), + minx = xdim.from, + maxx = xdim.to, + gutter = opts.gutter || 10, + ydim = this.g.snapEnds(Math.min.apply(Math, valuesy), Math.max.apply(Math, valuesy), valuesy.length - 1), + miny = ydim.from, + maxy = ydim.to, + len = Math.max(valuesx.length, valuesy.length, size.length), + symbol = this.g.markers[opts.symbol] || "disc", + res = this.set(), + series = this.set(), + max = opts.max || 100, + top = Math.max.apply(Math, size), + R = [], + paper = this, + k = Math.sqrt(top / Math.PI) * 2 / max; + + for (var i = 0; i < len; i++) { + R[i] = Math.min(Math.sqrt(size[i] / Math.PI) * 2 / k, max); + } + gutter = Math.max.apply(Math, R.concat(gutter)); + var axis = this.set(), + maxR = Math.max.apply(Math, R); + if (opts.axis) { + var ax = (opts.axis + "").split(/[,\s]+/); + drawAxis(ax); + var g = [], b = []; + for (var i = 0, ii = ax.length; i < ii; i++) { + var bb = ax[i].all ? ax[i].all.getBBox()[["height", "width"][i % 2]] : 0; + g[i] = bb + gutter; + b[i] = bb; + } + gutter = Math.max.apply(Math, g.concat(gutter)); + for (var i = 0, ii = ax.length; i < ii; i++) if (ax[i].all) { + ax[i].remove(); + ax[i] = 1; + } + drawAxis(ax); + for (var i = 0, ii = ax.length; i < ii; i++) if (ax[i].all) { + axis.push(ax[i].all); + } + res.axis = axis; + } + var kx = (width - gutter * 2) / ((maxx - minx) || 1), + ky = (height - gutter * 2) / ((maxy - miny) || 1); + for (var i = 0, ii = valuesy.length; i < ii; i++) { + var sym = this.raphael.is(symbol, "array") ? symbol[i] : symbol, + X = x + gutter + (valuesx[i] - minx) * kx, + Y = y + height - gutter - (valuesy[i] - miny) * ky; + sym && R[i] && series.push(this.g[sym](X, Y, R[i]).attr({fill: opts.heat ? this.g.colorValue(R[i], maxR) : Raphael.fn.g.colors[0], "fill-opacity": opts.opacity ? R[i] / max : 1, stroke: "none"})); + } + var covers = this.set(); + for (var i = 0, ii = valuesy.length; i < ii; i++) { + var X = x + gutter + (valuesx[i] - minx) * kx, + Y = y + height - gutter - (valuesy[i] - miny) * ky; + covers.push(this.circle(X, Y, maxR).attr(this.g.shim)); + opts.href && opts.href[i] && covers[i].attr({href: opts.href[i]}); + covers[i].r = +R[i].toFixed(3); + covers[i].x = +X.toFixed(3); + covers[i].y = +Y.toFixed(3); + covers[i].X = valuesx[i]; + covers[i].Y = valuesy[i]; + covers[i].value = size[i] || 0; + covers[i].dot = series[i]; + } + res.covers = covers; + res.series = series; + res.push(series, axis, covers); + res.hover = function (fin, fout) { + covers.mouseover(fin).mouseout(fout); + return this; + }; + res.click = function (f) { + covers.click(f); + return this; + }; + res.each = function (f) { + if (!Raphael.is(f, "function")) { + return this; + } + for (var i = covers.length; i--;) { + f.call(covers[i]); + } + return this; + }; + res.href = function (map) { + var cover; + for (var i = covers.length; i--;) { + cover = covers[i]; + if (cover.X == map.x && cover.Y == map.y && cover.value == map.value) { + cover.attr({href: map.href}); + } + } + }; + return res; +}; diff --git a/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/g.line.js b/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/g.line.js new file mode 100644 index 0000000..eb56e59 --- /dev/null +++ b/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/g.line.js @@ -0,0 +1,230 @@ +/* + * g.Raphael 0.4 - Charting library, based on Raphaël + * + * Copyright (c) 2009 Dmitry Baranovskiy (http://g.raphaeljs.com) + * Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license. + */ +Raphael.fn.g.linechart = function (x, y, width, height, valuesx, valuesy, opts) { + function shrink(values, dim) { + var k = values.length / dim, + j = 0, + l = k, + sum = 0, + res = []; + while (j < values.length) { + l--; + if (l < 0) { + sum += values[j] * (1 + l); + res.push(sum / k); + sum = values[j++] * -l; + l += k; + } else { + sum += values[j++]; + } + } + return res; + } + opts = opts || {}; + if (!this.raphael.is(valuesx[0], "array")) { + valuesx = [valuesx]; + } + if (!this.raphael.is(valuesy[0], "array")) { + valuesy = [valuesy]; + } + var allx = Array.prototype.concat.apply([], valuesx), + ally = Array.prototype.concat.apply([], valuesy), + xdim = this.g.snapEnds(Math.min.apply(Math, allx), Math.max.apply(Math, allx), valuesx[0].length - 1), + minx = xdim.from, + maxx = xdim.to, + gutter = opts.gutter || 10, + kx = (width - gutter * 2) / (maxx - minx), + ydim = this.g.snapEnds(Math.min.apply(Math, ally), Math.max.apply(Math, ally), valuesy[0].length - 1), + miny = ydim.from, + maxy = ydim.to, + ky = (height - gutter * 2) / (maxy - miny), + len = Math.max(valuesx[0].length, valuesy[0].length), + symbol = opts.symbol || "", + colors = opts.colors || Raphael.fn.g.colors, + that = this, + columns = null, + dots = null, + chart = this.set(), + path = []; + + for (var i = 0, ii = valuesy.length; i < ii; i++) { + len = Math.max(len, valuesy[i].length); + } + var shades = this.set(); + for (var i = 0, ii = valuesy.length; i < ii; i++) { + if (opts.shade) { + shades.push(this.path().attr({stroke: "none", fill: colors[i], opacity: opts.nostroke ? 1 : .3})); + } + if (valuesy[i].length > width - 2 * gutter) { + valuesy[i] = shrink(valuesy[i], width - 2 * gutter); + len = width - 2 * gutter; + } + if (valuesx[i] && valuesx[i].length > width - 2 * gutter) { + valuesx[i] = shrink(valuesx[i], width - 2 * gutter); + } + } + var axis = this.set(); + if (opts.axis) { + var ax = (opts.axis + "").split(/[,\s]+/); + +ax[0] && axis.push(this.g.axis(x + gutter, y + gutter, width - 2 * gutter, minx, maxx, opts.axisxstep || Math.floor((width - 2 * gutter) / 20), 2, opts.northlabels)); + +ax[1] && axis.push(this.g.axis(x + width - gutter, y + height - gutter, height - 2 * gutter, miny, maxy, opts.axisystep || Math.floor((height - 2 * gutter) / 20), 3, opts.eastlabels)); + +ax[2] && axis.push(this.g.axis(x + gutter, y + height - gutter, width - 2 * gutter, minx, maxx, opts.axisxstep || Math.floor((width - 2 * gutter) / 20), 0, opts.southlabels)); + +ax[3] && axis.push(this.g.axis(x + gutter, y + height - gutter, height - 2 * gutter, miny, maxy, opts.axisystep || Math.floor((height - 2 * gutter) / 20), 1, opts.westlabels)); + } + if (opts.northAxisLabel) { + this.g.text(x + gutter + width/2, gutter, opts.northAxisLabel); + } + if (opts.southAxisLabel) { + this.g.text(x + gutter + width/2, y + height + 20, opts.southAxisLabel); + } + if (opts.westAxisLabel) { + this.g.text(gutter, y + gutter + height/2, opts.westAxisLabel).attr({rotation: -90}); + } + if (opts.eastAxisLabel) { + this.g.text(x + gutter + width + 20, y + gutter + height/2, opts.eastAxisLabel).attr({rotation: 90}); + } + + var lines = this.set(), + symbols = this.set(), + line; + for (var i = 0, ii = valuesy.length; i < ii; i++) { + if (!opts.nostroke) { + lines.push(line = this.path().attr({ + stroke: colors[i], + "stroke-width": opts.width || 2, + "stroke-linejoin": "round", + "stroke-linecap": "round", + "stroke-dasharray": opts.dash || "" + })); + } + var sym = this.raphael.is(symbol, "array") ? symbol[i] : symbol, + symset = this.set(); + path = []; + for (var j = 0, jj = valuesy[i].length; j < jj; j++) { + var X = x + gutter + ((valuesx[i] || valuesx[0])[j] - minx) * kx; + var Y = y + height - gutter - (valuesy[i][j] - miny) * ky; + (Raphael.is(sym, "array") ? sym[j] : sym) && symset.push(this.g[Raphael.fn.g.markers[this.raphael.is(sym, "array") ? sym[j] : sym]](X, Y, (opts.width || 2) * 3).attr({fill: colors[i], stroke: "none"})); + path = path.concat([j ? "L" : "M", X, Y]); + } + symbols.push(symset); + if (opts.shade) { + shades[i].attr({path: path.concat(["L", X, y + height - gutter, "L", x + gutter + ((valuesx[i] || valuesx[0])[0] - minx) * kx, y + height - gutter, "z"]).join(",")}); + } + !opts.nostroke && line.attr({path: path.join(",")}); + } + function createColumns(f) { + // unite Xs together + var Xs = []; + for (var i = 0, ii = valuesx.length; i < ii; i++) { + Xs = Xs.concat(valuesx[i]); + } + Xs.sort(); + // remove duplicates + var Xs2 = [], + xs = []; + for (var i = 0, ii = Xs.length; i < ii; i++) { + Xs[i] != Xs[i - 1] && Xs2.push(Xs[i]) && xs.push(x + gutter + (Xs[i] - minx) * kx); + } + Xs = Xs2; + ii = Xs.length; + var cvrs = f || that.set(); + for (var i = 0; i < ii; i++) { + var X = xs[i] - (xs[i] - (xs[i - 1] || x)) / 2, + w = ((xs[i + 1] || x + width) - xs[i]) / 2 + (xs[i] - (xs[i - 1] || x)) / 2, + C; + f ? (C = {}) : cvrs.push(C = that.rect(X - 1, y, Math.max(w + 1, 1), height).attr({stroke: "none", fill: "#000", opacity: 0})); + C.values = []; + C.symbols = that.set(); + C.y = []; + C.x = xs[i]; + C.axis = Xs[i]; + for (var j = 0, jj = valuesy.length; j < jj; j++) { + Xs2 = valuesx[j] || valuesx[0]; + for (var k = 0, kk = Xs2.length; k < kk; k++) { + if (Xs2[k] == Xs[i]) { + C.values.push(valuesy[j][k]); + C.y.push(y + height - gutter - (valuesy[j][k] - miny) * ky); + C.symbols.push(chart.symbols[j][k]); + } + } + } + f && f.call(C); + } + !f && (columns = cvrs); + } + function createDots(f) { + var cvrs = f || that.set(), + C; + for (var i = 0, ii = valuesy.length; i < ii; i++) { + for (var j = 0, jj = valuesy[i].length; j < jj; j++) { + var X = x + gutter + ((valuesx[i] || valuesx[0])[j] - minx) * kx, + nearX = x + gutter + ((valuesx[i] || valuesx[0])[j ? j - 1 : 1] - minx) * kx, + Y = y + height - gutter - (valuesy[i][j] - miny) * ky; + f ? (C = {}) : cvrs.push(C = that.circle(X, Y, Math.abs(nearX - X) / 2).attr({stroke: "none", fill: "#000", opacity: 0})); + C.x = X; + C.y = Y; + C.value = valuesy[i][j]; + C.line = chart.lines[i]; + C.shade = chart.shades[i]; + C.symbol = chart.symbols[i][j]; + C.symbols = chart.symbols[i]; + C.axis = (valuesx[i] || valuesx[0])[j]; + f && f.call(C); + } + } + !f && (dots = cvrs); + } + chart.push(lines, shades, symbols, axis, columns, dots); + chart.lines = lines; + chart.shades = shades; + chart.symbols = symbols; + chart.axis = axis; + chart.hoverColumn = function (fin, fout) { + !columns && createColumns(); + columns.mouseover(fin).mouseout(fout); + return this; + }; + chart.clickColumn = function (f) { + !columns && createColumns(); + columns.click(f); + return this; + }; + chart.hrefColumn = function (cols) { + var hrefs = that.raphael.is(arguments[0], "array") ? arguments[0] : arguments; + if (!(arguments.length - 1) && typeof cols == "object") { + for (var x in cols) { + for (var i = 0, ii = columns.length; i < ii; i++) if (columns[i].axis == x) { + columns[i].attr("href", cols[x]); + } + } + } + !columns && createColumns(); + for (var i = 0, ii = hrefs.length; i < ii; i++) { + columns[i] && columns[i].attr("href", hrefs[i]); + } + return this; + }; + chart.hover = function (fin, fout) { + !dots && createDots(); + dots.mouseover(fin).mouseout(fout); + return this; + }; + chart.click = function (f) { + !dots && createDots(); + dots.click(f); + return this; + }; + chart.each = function (f) { + createDots(f); + return this; + }; + chart.eachColumn = function (f) { + createColumns(f); + return this; + }; + return chart; +}; diff --git a/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/g.pie.js b/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/g.pie.js new file mode 100644 index 0000000..8d20374 --- /dev/null +++ b/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/g.pie.js @@ -0,0 +1,205 @@ +/* + * g.Raphael 0.4 - Charting library, based on Raphaël + * + * Copyright (c) 2009 Dmitry Baranovskiy (http://g.raphaeljs.com) + * Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license. + */ +Raphael.fn.g.piechart = function (cx, cy, r, values, opts) { + opts = opts || {}; + var paper = this, + sectors = [], + covers = this.set(), + chart = this.set(), + series = this.set(), + order = [], + len = values.length, + angle = 0, + total = 0, + others = 0, + cut = 9, + defcut = true; + chart.covers = covers; + if (len == 1) { + series.push(this.circle(cx, cy, r).attr({fill: this.g.colors[0], stroke: opt.stroke || "#fff", "stroke-width": opts.strokewidth == null ? 1 : opts.strokewidth})); + covers.push(this.circle(cx, cy, r).attr(this.g.shim)); + total = values[0]; + values[0] = {value: values[0], order: 0, valueOf: function () { return this.value; }}; + series[0].middle = {x: cx, y: cy}; + series[0].mangle = 180; + } else { + function sector(cx, cy, r, startAngle, endAngle, fill) { + var rad = Math.PI / 180, + x1 = cx + r * Math.cos(-startAngle * rad), + x2 = cx + r * Math.cos(-endAngle * rad), + xm = cx + r / 2 * Math.cos(-(startAngle + (endAngle - startAngle) / 2) * rad), + y1 = cy + r * Math.sin(-startAngle * rad), + y2 = cy + r * Math.sin(-endAngle * rad), + ym = cy + r / 2 * Math.sin(-(startAngle + (endAngle - startAngle) / 2) * rad), + res = ["M", cx, cy, "L", x1, y1, "A", r, r, 0, +(Math.abs(endAngle - startAngle) > 180), 1, x2, y2, "z"]; + res.middle = {x: xm, y: ym}; + return res; + } + for (var i = 0; i < len; i++) { + total += values[i]; + values[i] = {value: values[i], order: i, valueOf: function () { return this.value; }}; + } + values.sort(function (a, b) { + return b.value - a.value; + }); + for (var i = 0; i < len; i++) { + if (defcut && values[i] * 360 / total <= 1.5) { + cut = i; + defcut = false; + } + if (i > cut) { + defcut = false; + values[cut].value += values[i]; + values[cut].others = true; + others = values[cut].value; + } + } + len = Math.min(cut + 1, values.length); + others && values.splice(len) && (values[cut].others = true); + for (var i = 0; i < len; i++) { + var mangle = angle - 360 * values[i] / total / 2; + if (!i) { + angle = 90 - mangle; + mangle = angle - 360 * values[i] / total / 2; + } + if (opts.init) { + var ipath = sector(cx, cy, 1, angle, angle - 360 * values[i] / total).join(","); + } + var path = sector(cx, cy, r, angle, angle -= 360 * values[i] / total); + var p = this.path(opts.init ? ipath : path).attr({fill: opts.colors && opts.colors[i] || this.g.colors[i] || "#666", stroke: opts.stroke || "#fff", "stroke-width": (opts.strokewidth == null ? 1 : opts.strokewidth), "stroke-linejoin": "round"}); + p.value = values[i]; + p.middle = path.middle; + p.mangle = mangle; + sectors.push(p); + series.push(p); + opts.init && p.animate({path: path.join(",")}, (+opts.init - 1) || 1000, ">"); + } + for (var i = 0; i < len; i++) { + var p = paper.path(sectors[i].attr("path")).attr(this.g.shim); + opts.href && opts.href[i] && p.attr({href: opts.href[i]}); + p.attr = function () {}; + covers.push(p); + series.push(p); + } + } + + chart.hover = function (fin, fout) { + fout = fout || function () {}; + var that = this; + for (var i = 0; i < len; i++) { + (function (sector, cover, j) { + var o = { + sector: sector, + cover: cover, + cx: cx, + cy: cy, + mx: sector.middle.x, + my: sector.middle.y, + mangle: sector.mangle, + r: r, + value: values[j], + total: total, + label: that.labels && that.labels[j] + }; + cover.mouseover(function () { + fin.call(o); + }).mouseout(function () { + fout.call(o); + }); + })(series[i], covers[i], i); + } + return this; + }; + // x: where label could be put + // y: where label could be put + // value: value to show + // total: total number to count % + chart.each = function (f) { + var that = this; + for (var i = 0; i < len; i++) { + (function (sector, cover, j) { + var o = { + sector: sector, + cover: cover, + cx: cx, + cy: cy, + x: sector.middle.x, + y: sector.middle.y, + mangle: sector.mangle, + r: r, + value: values[j], + total: total, + label: that.labels && that.labels[j] + }; + f.call(o); + })(series[i], covers[i], i); + } + return this; + }; + chart.click = function (f) { + var that = this; + for (var i = 0; i < len; i++) { + (function (sector, cover, j) { + var o = { + sector: sector, + cover: cover, + cx: cx, + cy: cy, + mx: sector.middle.x, + my: sector.middle.y, + mangle: sector.mangle, + r: r, + value: values[j], + total: total, + label: that.labels && that.labels[j] + }; + cover.click(function () { f.call(o); }); + })(series[i], covers[i], i); + } + return this; + }; + chart.inject = function (element) { + element.insertBefore(covers[0]); + }; + var legend = function (labels, otherslabel, mark, dir) { + var x = cx + r + r / 5, + y = cy, + h = y + 10; + labels = labels || []; + dir = (dir && dir.toLowerCase && dir.toLowerCase()) || "east"; + mark = paper.g.markers[mark && mark.toLowerCase()] || "disc"; + chart.labels = paper.set(); + for (var i = 0; i < len; i++) { + var clr = series[i].attr("fill"), + j = values[i].order, + txt; + values[i].others && (labels[j] = otherslabel || "Others"); + labels[j] = paper.g.labelise(labels[j], values[i], total); + chart.labels.push(paper.set()); + chart.labels[i].push(paper.g[mark](x + 5, h, 5).attr({fill: clr, stroke: "none"})); + chart.labels[i].push(txt = paper.text(x + 20, h, labels[j] || values[j]).attr(paper.g.txtattr).attr({fill: opts.legendcolor || "#000", "text-anchor": "start"})); + covers[i].label = chart.labels[i]; + h += txt.getBBox().height * 1.2; + } + var bb = chart.labels.getBBox(), + tr = { + east: [0, -bb.height / 2], + west: [-bb.width - 2 * r - 20, -bb.height / 2], + north: [-r - bb.width / 2, -r - bb.height - 10], + south: [-r - bb.width / 2, r + 10] + }[dir]; + chart.labels.translate.apply(chart.labels, tr); + chart.push(chart.labels); + }; + if (opts.legend) { + legend(opts.legend, opts.legendothers, opts.legendmark, opts.legendpos); + } + chart.push(series, covers); + chart.series = series; + chart.covers = covers; + return chart; +}; diff --git a/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/g.raphael.js b/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/g.raphael.js new file mode 100644 index 0000000..8e94c36 --- /dev/null +++ b/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/g.raphael.js @@ -0,0 +1,481 @@ +/* + * g.Raphael 0.4 - Charting library, based on Raphaël + * + * Copyright (c) 2009 Dmitry Baranovskiy (http://g.raphaeljs.com) + * Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license. + */ + + +(function () { + Raphael.fn.g = Raphael.fn.g || {}; + Raphael.fn.g.markers = { + disc: "disc", + o: "disc", + flower: "flower", + f: "flower", + diamond: "diamond", + d: "diamond", + square: "square", + s: "square", + triangle: "triangle", + t: "triangle", + star: "star", + "*": "star", + cross: "cross", + x: "cross", + plus: "plus", + "+": "plus", + arrow: "arrow", + "->": "arrow" + }; + Raphael.fn.g.shim = {stroke: "none", fill: "#000", "fill-opacity": 0}; + Raphael.fn.g.txtattr = {font: "12px Arial, sans-serif"}; + Raphael.fn.g.colors = []; + var hues = [.6, .2, .05, .1333, .75, 0]; + for (var i = 0; i < 10; i++) { + if (i < hues.length) { + Raphael.fn.g.colors.push("hsb(" + hues[i] + ", .75, .75)"); + } else { + Raphael.fn.g.colors.push("hsb(" + hues[i - hues.length] + ", 1, .5)"); + } + } + Raphael.fn.g.text = function (x, y, text) { + return this.text(x, y, text).attr(this.g.txtattr); + }; + Raphael.fn.g.labelise = function (label, val, total) { + if (label) { + return (label + "").replace(/(##+(?:\.#+)?)|(%%+(?:\.%+)?)/g, function (all, value, percent) { + if (value) { + return (+val).toFixed(value.replace(/^#+\.?/g, "").length); + } + if (percent) { + return (val * 100 / total).toFixed(percent.replace(/^%+\.?/g, "").length) + "%"; + } + }); + } else { + return (+val).toFixed(0); + } + }; + + Raphael.fn.g.finger = function (x, y, width, height, dir, ending, isPath) { + // dir 0 for horisontal and 1 for vertical + if ((dir && !height) || (!dir && !width)) { + return isPath ? "" : this.path(); + } + ending = {square: "square", sharp: "sharp", soft: "soft"}[ending] || "round"; + var path; + height = Math.round(height); + width = Math.round(width); + x = Math.round(x); + y = Math.round(y); + switch (ending) { + case "round": + if (!dir) { + var r = Math.floor(height / 2); + if (width < r) { + r = width; + path = ["M", x + .5, y + .5 - Math.floor(height / 2), "l", 0, 0, "a", r, Math.floor(height / 2), 0, 0, 1, 0, height, "l", 0, 0, "z"]; + } else { + path = ["M", x + .5, y + .5 - r, "l", width - r, 0, "a", r, r, 0, 1, 1, 0, height, "l", r - width, 0, "z"]; + } + } else { + var r = Math.floor(width / 2); + if (height < r) { + r = height; + path = ["M", x - Math.floor(width / 2), y, "l", 0, 0, "a", Math.floor(width / 2), r, 0, 0, 1, width, 0, "l", 0, 0, "z"]; + } else { + path = ["M", x - r, y, "l", 0, r - height, "a", r, r, 0, 1, 1, width, 0, "l", 0, height - r, "z"]; + } + } + break; + case "sharp": + if (!dir) { + var half = Math.floor(height / 2); + path = ["M", x, y + half, "l", 0, -height, Math.max(width - half, 0), 0, Math.min(half, width), half, -Math.min(half, width), half + (half * 2 < height), "z"]; + } else { + var half = Math.floor(width / 2); + path = ["M", x + half, y, "l", -width, 0, 0, -Math.max(height - half, 0), half, -Math.min(half, height), half, Math.min(half, height), half, "z"]; + } + break; + case "square": + if (!dir) { + path = ["M", x, y + Math.floor(height / 2), "l", 0, -height, width, 0, 0, height, "z"]; + } else { + path = ["M", x + Math.floor(width / 2), y, "l", 1 - width, 0, 0, -height, width - 1, 0, "z"]; + } + break; + case "soft": + var r; + if (!dir) { + r = Math.min(width, Math.round(height / 5)); + path = ["M", x + .5, y + .5 - Math.floor(height / 2), "l", width - r, 0, "a", r, r, 0, 0, 1, r, r, "l", 0, height - r * 2, "a", r, r, 0, 0, 1, -r, r, "l", r - width, 0, "z"]; + } else { + r = Math.min(Math.round(width / 5), height); + path = ["M", x - Math.floor(width / 2), y, "l", 0, r - height, "a", r, r, 0, 0, 1, r, -r, "l", width - 2 * r, 0, "a", r, r, 0, 0, 1, r, r, "l", 0, height - r, "z"]; + } + } + if (isPath) { + return path.join(","); + } else { + return this.path(path); + } + }; + + // Symbols + Raphael.fn.g.disc = function (cx, cy, r) { + return this.circle(cx, cy, r); + }; + Raphael.fn.g.line = function (cx, cy, r) { + return this.rect(cx - r, cy - r / 5, 2 * r, 2 * r / 5); + }; + Raphael.fn.g.square = function (cx, cy, r) { + r = r * .7; + return this.rect(cx - r, cy - r, 2 * r, 2 * r); + }; + Raphael.fn.g.triangle = function (cx, cy, r) { + r *= 1.75; + return this.path("M".concat(cx, ",", cy, "m0-", r * .58, "l", r * .5, ",", r * .87, "-", r, ",0z")); + }; + Raphael.fn.g.diamond = function (cx, cy, r) { + return this.path(["M", cx, cy - r, "l", r, r, -r, r, -r, -r, r, -r, "z"]); + }; + Raphael.fn.g.flower = function (cx, cy, r, n) { + r = r * 1.25; + var rout = r, + rin = rout * .5; + n = +n < 3 || !n ? 5 : n; + var points = ["M", cx, cy + rin, "Q"], + R; + for (var i = 1; i < n * 2 + 1; i++) { + R = i % 2 ? rout : rin; + points = points.concat([+(cx + R * Math.sin(i * Math.PI / n)).toFixed(3), +(cy + R * Math.cos(i * Math.PI / n)).toFixed(3)]); + } + points.push("z"); + return this.path(points.join(",")); + }; + Raphael.fn.g.star = function (cx, cy, r, r2) { + r2 = r2 || r * .5; + var points = ["M", cx, cy + r2, "L"], + R; + for (var i = 1; i < 10; i++) { + R = i % 2 ? r : r2; + points = points.concat([(cx + R * Math.sin(i * Math.PI * .2)).toFixed(3), (cy + R * Math.cos(i * Math.PI * .2)).toFixed(3)]); + } + points.push("z"); + return this.path(points.join(",")); + }; + Raphael.fn.g.cross = function (cx, cy, r) { + r = r / 2.5; + return this.path("M".concat(cx - r, ",", cy, "l", [-r, -r, r, -r, r, r, r, -r, r, r, -r, r, r, r, -r, r, -r, -r, -r, r, -r, -r, "z"])); + }; + Raphael.fn.g.plus = function (cx, cy, r) { + r = r / 2; + return this.path("M".concat(cx - r / 2, ",", cy - r / 2, "l", [0, -r, r, 0, 0, r, r, 0, 0, r, -r, 0, 0, r, -r, 0, 0, -r, -r, 0, 0, -r, "z"])); + }; + Raphael.fn.g.arrow = function (cx, cy, r) { + return this.path("M".concat(cx - r * .7, ",", cy - r * .4, "l", [r * .6, 0, 0, -r * .4, r, r * .8, -r, r * .8, 0, -r * .4, -r * .6, 0], "z")); + }; + + // Tooltips + Raphael.fn.g.tag = function (x, y, text, angle, r) { + angle = angle || 0; + r = r == null ? 5 : r; + text = text == null ? "$9.99" : text; + var R = .5522 * r, + res = this.set(), + d = 3; + res.push(this.path().attr({fill: "#000", stroke: "none"})); + res.push(this.text(x, y, text).attr(this.g.txtattr).attr({fill: "#fff"})); + res.update = function () { + this.rotate(0, x, y); + var bb = this[1].getBBox(); + if (bb.height >= r * 2) { + this[0].attr({path: ["M", x, y + r, "a", r, r, 0, 1, 1, 0, -r * 2, r, r, 0, 1, 1, 0, r * 2, "m", 0, -r * 2 -d, "a", r + d, r + d, 0, 1, 0, 0, (r + d) * 2, "L", x + r + d, y + bb.height / 2 + d, "l", bb.width + 2 * d, 0, 0, -bb.height - 2 * d, -bb.width - 2 * d, 0, "L", x, y - r - d].join(",")}); + } else { + var dx = Math.sqrt(Math.pow(r + d, 2) - Math.pow(bb.height / 2 + d, 2)); + // ["c", -R, 0, -r, R - r, -r, -r, 0, -R, r - R, -r, r, -r, R, 0, r, r - R, r, r, 0, R, R - r, r, -r, r] + // "a", r, r, 0, 1, 1, 0, -r * 2, r, r, 0, 1, 1, 0, r * 2, + this[0].attr({path: ["M", x, y + r, "c", -R, 0, -r, R - r, -r, -r, 0, -R, r - R, -r, r, -r, R, 0, r, r - R, r, r, 0, R, R - r, r, -r, r, "M", x + dx, y - bb.height / 2 - d, "a", r + d, r + d, 0, 1, 0, 0, bb.height + 2 * d, "l", r + d - dx + bb.width + 2 * d, 0, 0, -bb.height - 2 * d, "L", x + dx, y - bb.height / 2 - d].join(",")}); + } + this[1].attr({x: x + r + d + bb.width / 2, y: y}); + angle = (360 - angle) % 360; + this.rotate(angle, x, y); + angle > 90 && angle < 270 && this[1].attr({x: x - r - d - bb.width / 2, y: y, rotation: [180 + angle, x, y]}); + return this; + }; + res.update(); + return res; + }; + Raphael.fn.g.popupit = function (x, y, set, dir, size) { + dir = dir == null ? 2 : dir; + size = size || 5; + x = Math.round(x) + .5; + y = Math.round(y) + .5; + var bb = set.getBBox(), + w = Math.round(bb.width / 2), + h = Math.round(bb.height / 2), + dx = [0, w + size * 2, 0, -w - size * 2], + dy = [-h * 2 - size * 3, -h - size, 0, -h - size], + p = ["M", x - dx[dir], y - dy[dir], "l", -size, (dir == 2) * -size, -Math.max(w - size, 0), 0, "a", size, size, 0, 0, 1, -size, -size, + "l", 0, -Math.max(h - size, 0), (dir == 3) * -size, -size, (dir == 3) * size, -size, 0, -Math.max(h - size, 0), "a", size, size, 0, 0, 1, size, -size, + "l", Math.max(w - size, 0), 0, size, !dir * -size, size, !dir * size, Math.max(w - size, 0), 0, "a", size, size, 0, 0, 1, size, size, + "l", 0, Math.max(h - size, 0), (dir == 1) * size, size, (dir == 1) * -size, size, 0, Math.max(h - size, 0), "a", size, size, 0, 0, 1, -size, size, + "l", -Math.max(w - size, 0), 0, "z"].join(","), + xy = [{x: x, y: y + size * 2 + h}, {x: x - size * 2 - w, y: y}, {x: x, y: y - size * 2 - h}, {x: x + size * 2 + w, y: y}][dir]; + set.translate(xy.x - w - bb.x, xy.y - h - bb.y); + return this.path(p).attr({fill: "#000", stroke: "none"}).insertBefore(set.node ? set : set[0]); + }; + Raphael.fn.g.popup = function (x, y, text, dir, size) { + dir = dir == null ? 2 : dir; + size = size || 5; + text = text || "$9.99"; + var res = this.set(), + d = 3; + res.push(this.path().attr({fill: "#000", stroke: "none"})); + res.push(this.text(x, y, text).attr(this.g.txtattr).attr({fill: "#fff"})); + res.update = function (X, Y, withAnimation) { + X = X || x; + Y = Y || y; + var bb = this[1].getBBox(), + w = bb.width / 2, + h = bb.height / 2, + dx = [0, w + size * 2, 0, -w - size * 2], + dy = [-h * 2 - size * 3, -h - size, 0, -h - size], + p = ["M", X - dx[dir], Y - dy[dir], "l", -size, (dir == 2) * -size, -Math.max(w - size, 0), 0, "a", size, size, 0, 0, 1, -size, -size, + "l", 0, -Math.max(h - size, 0), (dir == 3) * -size, -size, (dir == 3) * size, -size, 0, -Math.max(h - size, 0), "a", size, size, 0, 0, 1, size, -size, + "l", Math.max(w - size, 0), 0, size, !dir * -size, size, !dir * size, Math.max(w - size, 0), 0, "a", size, size, 0, 0, 1, size, size, + "l", 0, Math.max(h - size, 0), (dir == 1) * size, size, (dir == 1) * -size, size, 0, Math.max(h - size, 0), "a", size, size, 0, 0, 1, -size, size, + "l", -Math.max(w - size, 0), 0, "z"].join(","), + xy = [{x: X, y: Y + size * 2 + h}, {x: X - size * 2 - w, y: Y}, {x: X, y: Y - size * 2 - h}, {x: X + size * 2 + w, y: Y}][dir]; + if (withAnimation) { + this[0].animate({path: p}, 500, ">"); + this[1].animate(xy, 500, ">"); + } else { + this[0].attr({path: p}); + this[1].attr(xy); + } + return this; + }; + return res.update(x, y); + }; + Raphael.fn.g.flag = function (x, y, text, angle) { + angle = angle || 0; + text = text || "$9.99"; + var res = this.set(), + d = 3; + res.push(this.path().attr({fill: "#000", stroke: "none"})); + res.push(this.text(x, y, text).attr(this.g.txtattr).attr({fill: "#fff"})); + res.update = function (x, y) { + this.rotate(0, x, y); + var bb = this[1].getBBox(), + h = bb.height / 2; + this[0].attr({path: ["M", x, y, "l", h + d, -h - d, bb.width + 2 * d, 0, 0, bb.height + 2 * d, -bb.width - 2 * d, 0, "z"].join(",")}); + this[1].attr({x: x + h + d + bb.width / 2, y: y}); + angle = 360 - angle; + this.rotate(angle, x, y); + angle > 90 && angle < 270 && this[1].attr({x: x - r - d - bb.width / 2, y: y, rotation: [180 + angle, x, y]}); + return this; + }; + return res.update(x, y); + }; + Raphael.fn.g.label = function (x, y, text) { + var res = this.set(); + res.push(this.rect(x, y, 10, 10).attr({stroke: "none", fill: "#000"})); + res.push(this.text(x, y, text).attr(this.g.txtattr).attr({fill: "#fff"})); + res.update = function () { + var bb = this[1].getBBox(), + r = Math.min(bb.width + 10, bb.height + 10) / 2; + this[0].attr({x: bb.x - r / 2, y: bb.y - r / 2, width: bb.width + r, height: bb.height + r, r: r}); + }; + res.update(); + return res; + }; + Raphael.fn.g.labelit = function (set) { + var bb = set.getBBox(), + r = Math.min(20, bb.width + 10, bb.height + 10) / 2; + return this.rect(bb.x - r / 2, bb.y - r / 2, bb.width + r, bb.height + r, r).attr({stroke: "none", fill: "#000"}).insertBefore(set[0]); + }; + Raphael.fn.g.drop = function (x, y, text, size, angle) { + size = size || 30; + angle = angle || 0; + var res = this.set(); + res.push(this.path(["M", x, y, "l", size, 0, "A", size * .4, size * .4, 0, 1, 0, x + size * .7, y - size * .7, "z"]).attr({fill: "#000", stroke: "none", rotation: [22.5 - angle, x, y]})); + angle = (angle + 90) * Math.PI / 180; + res.push(this.text(x + size * Math.sin(angle), y + size * Math.cos(angle), text).attr(this.g.txtattr).attr({"font-size": size * 12 / 30, fill: "#fff"})); + res.drop = res[0]; + res.text = res[1]; + return res; + }; + Raphael.fn.g.blob = function (x, y, text, angle, size) { + angle = (+angle + 1 ? angle : 45) + 90; + size = size || 12; + var rad = Math.PI / 180, + fontSize = size * 12 / 12; + var res = this.set(); + res.push(this.path().attr({fill: "#000", stroke: "none"})); + res.push(this.text(x + size * Math.sin((angle) * rad), y + size * Math.cos((angle) * rad) - fontSize / 2, text).attr(this.g.txtattr).attr({"font-size": fontSize, fill: "#fff"})); + res.update = function (X, Y, withAnimation) { + X = X || x; + Y = Y || y; + var bb = this[1].getBBox(), + w = Math.max(bb.width + fontSize, size * 25 / 12), + h = Math.max(bb.height + fontSize, size * 25 / 12), + x2 = X + size * Math.sin((angle - 22.5) * rad), + y2 = Y + size * Math.cos((angle - 22.5) * rad), + x1 = X + size * Math.sin((angle + 22.5) * rad), + y1 = Y + size * Math.cos((angle + 22.5) * rad), + dx = (x1 - x2) / 2, + dy = (y1 - y2) / 2, + rx = w / 2, + ry = h / 2, + k = -Math.sqrt(Math.abs(rx * rx * ry * ry - rx * rx * dy * dy - ry * ry * dx * dx) / (rx * rx * dy * dy + ry * ry * dx * dx)), + cx = k * rx * dy / ry + (x1 + x2) / 2, + cy = k * -ry * dx / rx + (y1 + y2) / 2; + if (withAnimation) { + this.animate({x: cx, y: cy, path: ["M", x, y, "L", x1, y1, "A", rx, ry, 0, 1, 1, x2, y2, "z"].join(",")}, 500, ">"); + } else { + this.attr({x: cx, y: cy, path: ["M", x, y, "L", x1, y1, "A", rx, ry, 0, 1, 1, x2, y2, "z"].join(",")}); + } + return this; + }; + res.update(x, y); + return res; + }; + + Raphael.fn.g.colorValue = function (value, total, s, b) { + return "hsb(" + [Math.min((1 - value / total) * .4, 1), s || .75, b || .75] + ")"; + }; + + Raphael.fn.g.snapEnds = function (from, to, steps) { + var f = from, + t = to; + if (f == t) { + return {from: f, to: t, power: 0}; + } + function round(a) { + return Math.abs(a - .5) < .25 ? Math.floor(a) + .5 : Math.round(a); + } + var d = (t - f) / steps, + r = Math.floor(d), + R = r, + i = 0; + if (r) { + while (R) { + i--; + R = Math.floor(d * Math.pow(10, i)) / Math.pow(10, i); + } + i ++; + } else { + while (!r) { + i = i || 1; + r = Math.floor(d * Math.pow(10, i)) / Math.pow(10, i); + i++; + } + i && i--; + } + var t = round(to * Math.pow(10, i)) / Math.pow(10, i); + if (t < to) { + t = round((to + .5) * Math.pow(10, i)) / Math.pow(10, i); + } + var f = round((from - (i > 0 ? 0 : .5)) * Math.pow(10, i)) / Math.pow(10, i); + return {from: f, to: t, power: i}; + }; + Raphael.fn.g.axis = function (x, y, length, from, to, steps, orientation, labels, type, dashsize) { + dashsize = dashsize == null ? 3 : dashsize; + type = type || "t"; + steps = steps || 10; + var path = type == "|" || type == " " ? ["M", x + .5, y, "l", 0, .001] : orientation == 1 || orientation == 3 ? ["M", x + .5, y, "l", 0, -length] : ["M", x, y + .5, "l", length, 0], + ends = this.g.snapEnds(from, to, steps), + f = ends.from, + t = ends.to, + i = ends.power, + j = 0, + text = this.set(); + d = (t - f) / steps; + var label = f, + rnd = i > 0 ? i : 0; + dx = length / steps; + if (+orientation == 1 || +orientation == 3) { + var Y = y, + addon = (orientation - 1 ? 1 : -1) * (dashsize + 3 + !!(orientation - 1)); + while (Y >= y - length) { + type != "-" && type != " " && (path = path.concat(["M", x - (type == "+" || type == "|" ? dashsize : !(orientation - 1) * dashsize * 2), Y + .5, "l", dashsize * 2 + 1, 0])); + text.push(this.text(x + addon, Y, (labels && labels[j++]) || (Math.round(label) == label ? label : +label.toFixed(rnd))).attr(this.g.txtattr).attr({"text-anchor": orientation - 1 ? "start" : "end"})); + label += d; + Y -= dx; + } + if (Math.round(Y + dx - (y - length))) { + type != "-" && type != " " && (path = path.concat(["M", x - (type == "+" || type == "|" ? dashsize : !(orientation - 1) * dashsize * 2), y - length + .5, "l", dashsize * 2 + 1, 0])); + text.push(this.text(x + addon, y - length, (labels && labels[j]) || (Math.round(label) == label ? label : +label.toFixed(rnd))).attr(this.g.txtattr).attr({"text-anchor": orientation - 1 ? "start" : "end"})); + } + } else { + var X = x, + label = f, + rnd = i > 0 ? i : 0, + addon = (orientation ? -1 : 1) * (dashsize + 9 + !orientation), + dx = length / steps, + txt = 0, + prev = 0; + while (X <= x + length) { + + text.push(txt = this.text(X, y + addon, (labels && labels[j++]) || (Math.round(label) == label ? label : +label.toFixed(rnd))).attr(this.g.txtattr)); + var bb = txt.getBBox(); + var ds = dashsize; + if (prev >= bb.x - 5) { + text.pop(text.length - 1).remove(); + ds = 1; + } else { + prev = bb.x + bb.width; + } + + type != "-" && type != " " && (path = path.concat(["M", X + .5, y - (type == "+" ? ds : !!orientation * ds * 2), "l", 0, ds * 2 + 1])); + + label += d; + X += dx; + } + if (Math.round(X - dx - x - length)) { + type != "-" && type != " " && (path = path.concat(["M", x + length + .5, y - (type == "+" ? dashsize : !!orientation * dashsize * 2), "l", 0, dashsize * 2 + 1])); + text.push(this.text(x + length, y + addon, (labels && labels[j]) || (Math.round(label) == label ? label : +label.toFixed(rnd))).attr(this.g.txtattr)); + } + } + var res = this.path(path); + res.text = text; + res.all = this.set([res, text]); + res.remove = function () { + this.text.remove(); + this.constructor.prototype.remove.call(this); + }; + return res; + }; + + Raphael.el.lighter = function (times) { + times = times || 2; + var fs = [this.attrs.fill, this.attrs.stroke]; + this.fs = this.fs || [fs[0], fs[1]]; + fs[0] = Raphael.rgb2hsb(Raphael.getRGB(fs[0]).hex); + fs[1] = Raphael.rgb2hsb(Raphael.getRGB(fs[1]).hex); + fs[0].b = Math.min(fs[0].b * times, 1); + fs[0].s = fs[0].s / times; + fs[1].b = Math.min(fs[1].b * times, 1); + fs[1].s = fs[1].s / times; + this.attr({fill: "hsb(" + [fs[0].h, fs[0].s, fs[0].b] + ")", stroke: "hsb(" + [fs[1].h, fs[1].s, fs[1].b] + ")"}); + }; + Raphael.el.darker = function (times) { + times = times || 2; + var fs = [this.attrs.fill, this.attrs.stroke]; + this.fs = this.fs || [fs[0], fs[1]]; + fs[0] = Raphael.rgb2hsb(Raphael.getRGB(fs[0]).hex); + fs[1] = Raphael.rgb2hsb(Raphael.getRGB(fs[1]).hex); + fs[0].s = Math.min(fs[0].s * times, 1); + fs[0].b = fs[0].b / times; + fs[1].s = Math.min(fs[1].s * times, 1); + fs[1].b = fs[1].b / times; + this.attr({fill: "hsb(" + [fs[0].h, fs[0].s, fs[0].b] + ")", stroke: "hsb(" + [fs[1].h, fs[1].s, fs[1].b] + ")"}); + }; + Raphael.el.original = function () { + if (this.fs) { + this.attr({fill: this.fs[0], stroke: this.fs[1]}); + delete this.fs; + } + }; +})(); \ No newline at end of file diff --git a/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/load-big.gif b/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/load-big.gif new file mode 100644 index 0000000000000000000000000000000000000000..ddb7ff1aac1b2fc825667c157873c2c55bbe8db8 GIT binary patch literal 1924 zcmciDX;70#00!U)Urs41ND>$3-?7cZa-C@o`?~}E+$na_sVK~an51Y7o6Am#OJGNBi-|v-0K)zTz!9cZZmYYj zeiQ^4Hx2}<@9us*(zz1hB8-YDCx|yPvMXzQM{_K$!h*iJ(7x2j*bY>E)v;gG zt15c?^oIWX1BxEuJ?E}-N%%X2$C&X)nYafzWBB27BZK9$hH1k@-(v5=%efcJKAYA8 zj{X%G-GGGnp>xBKmtR{qyXkbXi>i|w&^A+i%*o~apB=fnp1EvhyA8i)zT0!ZJK|=f zGujFu=8Q?f@YHB=vJ&Q(Q2ooMB$CxnsQ@;Cl88SakbL=c9-bR}Cd`4o_e-(kkx-G` z1gxmM5nm)f#c{~lR_t33s5hr)1~uEaw)kjKO}BP*)>VmXx>RQ1;1H?TbtLMnaSW#; zj9+XgO*q{nKEpjQb`O`&-Jk8B)-S0R`xoZlkUo^CY4otNIEG*Z>9xBj^;cd~XE!if z=JK3SR%Kh!+&qgwp0nLox=TA*jYs?se%u2xUeoK&1u^$dFrFz~jrhLs@UeBBdpx|M zY)D3CZeBjWKwtxdli{#JJ47_Xo<)bn10rN1&s7)?M_u%xDH4!1ac=bhs)DA9u4+yx zQz*rfNSWBSxTLdtwZlQ%QWxV{Y9-?#zL7M}ttCzze@xWkN1wM3@#hRCqG74qOeC&J z9C^RRzb6jvbS)W0Nd^=G0Xde#v6Z!xx5H+VUZrNmDp2GD$ZAyrrw%!G2FskYEUNL97Eu}MQR$IyrnBkg(h1rW4yIQEM3J@S3&;1KqjvtHc)u##|B-p#vH)WPhuYi^mQjj0C~N7S!=n7H-h z)-{F0|AmmcM>roo8TLt*J%^c#&ZiY1FVl9S>(#+iza>x4q)s+Z@gD1* z@P^eR(w@FoxHWz6T{O`R|GvS0@PW)Hmm#QRgaoFdRCosCuGa!^PcBA73HQUcl65Dr zO|`ePK2pY_S=Cuk0cLN5NYeIMmj@%E-?ilgU&#f%3S_8AdaDu z`F^)`6_9BI%cf+|5|L?q0A9#NmQZLMl$0#@LkamJueh-M5`ik%{!(^MZk{k*qitzz zdsl7?nA3Imb6iI@->x5 zwXc~EZZLz-aKH4hJ%XN<9U8*$f;BXGrEQ^o=8paJ`*iQfV=)}tj7M$B9-E(t0}WI5 ziiH<<@gb})LXWcd=N1SGi;6?d9SD)&II^XLelX2e#DZKujgFz0`cy~Oo<~(uRW#l% zG_=kVdRXZIt%P()d)_@2TRL5aa4qGGD&I4tJNR+p1a_1(jW-f!2MXqTpXs0WExsHx Pn1F;$An(;T&^-PCGf5vc literal 0 HcmV?d00001 diff --git a/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/load.gif b/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/load.gif new file mode 100644 index 0000000000000000000000000000000000000000..d0bce1542342e912da81a2c260562df172f30d73 GIT binary patch literal 673 zcmZ?wbhEHb6krfw_{6~Q|Nnmm28Kh24mmkF0U1e2Nli^nlO|14{Lk&@8WQa67~pE8 zXTZz|lvDgC+Z`3#dv5h=E26FfcG1 zbL_hF&)}42ws10s6^G;;cE1^EoUR)U5A70}d2pLv!jVIT7j&Z~EblI3x0K*v_sV|m z0kj3v921Z^em#l`(k(o@H$3ZdDRc@9NidXDNbqrumReCGv$gd8+e8WW28HVqkJ_9i zH>s*<31KtHjANIPvi2#*6BEu%3Dak5O_t&NBI)H?V$TxT}#l{vOTn5naXTfF^&~Hhq+NX@#Ccc>y7T?;vjI&jdhsDsPJyAw*m0Qz>i}K7# zL9w50Ng{fT}A5JUe8lRK1h7_Y2;BWJDd=c6f&i?Wv5(5q?6|P zQw{>maxZP<537OA37Uk}7@%_$4o$EWe_Zl>&#id|lE-BpDC#+Fn|msJ%_2h{Hg1vP z#N8WAzfWasG}yq|xqE)DrWaOofX=z|?*pgc%{ig5vl!pqDlC|q&~Z0$&Rvsft&VO- z4MZj+%-+Vx%W}v;V76hyp=;+R;x+~t^Q%*xuFTQAF2})fSfTHDAs>sO!OBw`)&)o$ c0!CNZt))x~rAZP^^P&YOFfdqy5)K#u0POD40{{R3 literal 0 HcmV?d00001 diff --git a/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/loggraph.css b/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/loggraph.css new file mode 100644 index 0000000..a84d90e --- /dev/null +++ b/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/loggraph.css @@ -0,0 +1,54 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ +body { font-family: sans-serif; } + +div.fileSelector { border: solid 3px black; position: absolute; background: white; + -moz-border-radius: 10px; border-radius: 10px; + padding: 5px; font-family: sans-serif; + right: 10px; top: 10px; + } +div.fileSelector a { cursor: pointer; } +.fileSelector li.selectedFile { background: lightgreen; } + +div.selector { border: solid 3px black; position: absolute; background: white; + -moz-border-radius: 10px; border-radius: 10px; + padding: 5px; + right: 10px; top: 10px; background: #aaaaaa; opacity: 0.7; + } +div.selector a { cursor: pointer; } +.fileSelector li.selectedFile { background: lightgreen; } + +#fileLoader { -moz-border-radius: 10px; border-radius: 10px; background: #aaaaaa; opacity: 0.7; position: absolute; left: 20px; top: 20px; } +#loadingScreen { position: absolute; top: 100px; margin-left: 40%; margin-right: 40%; width: 500px; background: #aaaaaa; opacity: 0.7; -moz-border-radius: 10px; border-radius: 10px; text-align: center } +#filterinput { width: 500px; height: 100px; } +/* main interface */ +#actions { float: right; } +#views { float: left; } + +.closebutton { position: absolute; right: 5px; float: right; display: block; cursor: pointer; } + +.actionbutton { color: blue; text-decoration: none; padding: 3px; cursor: pointer; } +span:hover.actionbutton { background: lightblue; } + +#status { text-align: center; } + +#canvas { width: 100%; height: 1000px; } + +#logtable { width: 100%; } +.popUp { border: 3px solid black; -moz-border-radius: 10px; border-radius: 10px; position: absolute; background: white; padding: 10px; min-width: 300px; } + +.errorpage { position: absolute; top: 100px; margin-left: 40%; margin-right: 40%; width: 500px; background: #aaaaaa; opacity: 0.7; -moz-border-radius: 10px; border-radius: 10px; padding: 10px; } \ No newline at end of file diff --git a/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/loggraph.js b/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/loggraph.js new file mode 100644 index 0000000..87bb7d8 --- /dev/null +++ b/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/loggraph.js @@ -0,0 +1,262 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +LogGraph = function(canvas, status) { + this.canvas = document.getElementById(canvas); + this.status = document.getElementById(status); + this.starttime = 0; + this.endtime = 0; + this.period = 0; + this.numEntries = 0; + this.currentRender = 0; + this.filter = ""; + + this.saveFilters = function () { + localStorage.starttime = this.starttime; + localStorage.endtime = this.endtime; + localStorage.period = this.period; + localStorage.filter = this.filter; + + }; + this.loadFilters = function () { + if (localStorage.starttime) { this.starttime = parseInt(localStorage.starttime); } + if (localStorage.endtime) { this.endtime = parseInt(localStorage.endtime); } + if (localStorage.period) { this.period = parseInt(localStorage.period); } + if (localStorage.filter) { this.filter = localStorage.filter; } + }; + this.loadFilters(); + var self = this; + + var updateStatus = function (starttime, period, filter, numEntries) { + self.starttime = starttime; + self.endtime = starttime + period; + self.period = period; + self.filter = filter; + self.saveFilters(); + + self.status.innerHTML = dateFormat(starttime, "HH:MM:ss,l") + " ⇒ " + dateFormat(self.endtime, "HH:MM:ss,l") + "    |    " + numEntries + " entries    |    " + (filter ? filter : "No filter"); + + if (self.currentRender) { + self.currentRender(); + } + }; + + YUI().use("io-base", function(Y) { + var uri = "/info"; + if (self.starttime) { + var uri = "/info?start=" + self.starttime + "&period=" + self.period + "&filter=" + self.filter; + } + + function complete(id, o, args) { + var data = eval("(" + o.responseText + ")"); // Response data. + var period = data.endTime - data.startTime; + updateStatus(data.startTime, period, self.filter, data.numEntries); + }; + + Y.on('io:complete', complete, Y, []); + var request = Y.io(uri); + }); + + this.addLogs = function() { + new LogGraph.fileSelector(function (files) { new LogGraph.fileLoader(files); }); + }; + + this.editFilters = function() { + new LogGraph.filterSelector(this.starttime, this.period, this.filter, updateStatus); + }; + + this.getCleanCanvas = function () { + this.canvas.innerHTML = ""; + return this.canvas; + }; + + this.showLoadingScreen = function () { + this.loadingScreen = document.createElement("div"); + this.loadingScreen.id = "loadingScreen"; + this.loadingScreen.innerHTML = "

Loading...

"; + document.body.appendChild(this.loadingScreen); + }; + + this.hideLoadingScreen = function () { + document.body.removeChild(this.loadingScreen); + this.loadingScreen.style.visibility = "hidden"; + }; + + + /*** + * TODO: refactor these to load the data first, before handing to a draw funciton. + * We shouldn't pass the async q into the drawing function + */ + this.showLogs = function() { + var self= this; + YUI().use('async-queue', function(Y) { + var q = new Y.AsyncQueue(self.showLoadingScreen, + // The second callback will pause the Queue and send an XHR for data + function () { + q.pause(); + var loggraph = new LogGraph.LogTable(q, self.getCleanCanvas(), self.starttime, self.endtime, self.filter); + self.currentRender = self.showLogs; + }, + self.hideLoadingScreen); + q.run(); + } + ); + }; + + this.serverGraph = function() { + var self= this; + YUI().use('async-queue', function(Y) { + var q = new Y.AsyncQueue(self.showLoadingScreen, + // The second callback will pause the Queue and send an XHR for data + function () { + q.pause(); + var servergraph = new LogGraph.ServerGraph(q, self.getCleanCanvas(), self.starttime, self.endtime, self.filter); + self.currentRender = self.showLogs; + }, + self.hideLoadingScreen); + q.run(); + } + ); + }; + + this.sessionGraph = function() { + var self= this; + YUI().use('async-queue', function(Y) { + var q = new Y.AsyncQueue(self.showLoadingScreen, + // The second callback will pause the Queue and send an XHR for data + function () { + q.pause(); + var sessiongraph = new LogGraph.SessionGraph(q, self.getCleanCanvas(), self.starttime, self.endtime, self.filter); + self.currentRender = self.sessionGraph; + }, + self.hideLoadingScreen); + q.run(); + } + ); + }; + + this.showStats = function() { + var self= this; + YUI().use('async-queue', function(Y) { + var q = new Y.AsyncQueue(self.showLoadingScreen, + // The second callback will pause the Queue and send an XHR for data + function () { + q.pause(); + var statgraph = new LogGraph.StatsGraph(q, self.getCleanCanvas(), self.starttime, self.endtime, self.filter); + self.currentRender = self.showStats; + }, + self.hideLoadingScreen); + q.run(); + } + ); + }; +}; + +LogGraph.error = function(description) { + var errorPage = document.createElement("div"); + errorPage.className = "errorpage"; + var p = document.createElement("p"); + p.innerHTML = description; + errorPage.appendChild(p); + + var span = document.createElement("span"); + p = document.createElement("p"); + span.className = "actionButton"; + span.innerHTML = "OK"; + span.onclick = function (evt) { + document.body.removeChild(errorPage); + delete errorPage; + } + p.appendChild(span); + errorPage.appendChild(p); + + document.body.appendChild(errorPage); +}; + +LogGraph.ticker =function(allow_dups) { + this.ticks = new Array(); + this.current_tick = 0; + this.allow_dups = allow_dups;; + + this.tick = function(time) { + if (time == this.ticks[this.ticks.length - 1] && this.allow_dups == true) + return this.current_tick; + + this.ticks.push(time); + return this.current_tick++; + }; + + this.current = function() { + return this.current_tick; + }; + + this.reset = function() { + while (this.ticks.length) { + this.ticks.pop(); + } + this.current_tick = 0; + }; +}; + + +LogGraph.timescale = function(starttime, endtime) { + this.starttime = starttime; + this.endtime = endtime; + this.millis = endtime - starttime; + + this.draw = function(paper) { + var scale = paper.set(); + scale.push(paper.path("M0 0 L" + paper.width + " 0")); + + for (var i = 0; i < paper.width; i += 100) { + scale.push(paper.path("M" + i + " 0 L" + i + " 5")); + // var time = dateFormat((this.starttime + (i*ms_per_pixel)), "h:MM:ss,l"); + // paper.text(i + 5, 10, time); + } + + scale.attr({"stroke-width": 2}); + }; +}; + +/* + Fetch data from an uri and process it, the process data func returns true if any of the data is useful +*/ +LogGraph.loadData = function (asyncq, uri, processdata) { + YUI().use("io-base", function(Y) { + function success(id, o, args) { + var data = eval("(" + o.responseText + ")"); // Response data. + if (data.error) { + LogGraph.error(data.error); + } else { + if (!processdata(data)) { + LogGraph.error("No data. Perhaps you should loosen your filter criteria."); + } + } + asyncq.run(); + }; + function failure(id, o, args) { + LogGraph.error("Error contacting server: (" + o.status + ") " + o.statusText); + asyncq.run(); + }; + + Y.on('io:success', success, Y, []); + Y.on('io:failure', failure, Y, []); + + var request = Y.io(uri); + }); +} \ No newline at end of file diff --git a/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/loggraph.log.js b/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/loggraph.log.js new file mode 100644 index 0000000..551ea4b --- /dev/null +++ b/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/loggraph.log.js @@ -0,0 +1,57 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +LogGraph.LogTable = function (asyncq, canvas, starttime, endtime, filter) { + this.starttime = starttime; + this.endtime = endtime; + this.filter = filter; + + var table = document.createElement("table"); + table.id = "logtable"; + canvas.appendChild(table); + + this.addLogLine = function(time, text) { + var tr = document.createElement("tr"); + table.appendChild(tr); + + var td = document.createElement("td"); + td.innerHTML = dateFormat(time, "h:MM:ss,l"); + tr.appendChild(td); + + td = document.createElement("td"); + td.innerHTML = text; + tr.appendChild(td); + } + + var self = this; + var processdata = function(data) { + var events = data["events"]; + var count = 0; + for (var i in events) { + var e = events[i]; + if (e.type == "text") { + self.addLogLine(e.time, e.text); + count++; + } + } + return count != 0; + }; + + var uri = "/data?start=" + self.starttime + "&end=" + self.endtime + "&filter=" + self.filter; + LogGraph.loadData(asyncq, uri, processdata); +}; diff --git a/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/loggraph.server.js b/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/loggraph.server.js new file mode 100644 index 0000000..0a74b5c --- /dev/null +++ b/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/loggraph.server.js @@ -0,0 +1,329 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +LogGraph.ServerGraph = function(asyncq, canvas, starttime, endtime, filter) { + this.starttime = starttime; + this.endtime = endtime; + this.millis = endtime - starttime; + this.nextserverid = 0; + this.serveroffset = 100; + this.filter = filter; + + this.pixels_per_tick = 20; + this.ticker = new LogGraph.ticker(); + + + var paper = Raphael(canvas, 1, 1); + + var self = this; + + this.timescale = new LogGraph.timescale(starttime, endtime); + this.objects = new Array(); + + this.add = function(obj) { + this.objects.push(obj); + } + + this.tick_to_x = function (timestamp) { + var x = timestamp * this.pixels_per_tick; + return x; + }; + + this._drawTime = function(paper, x, time) { + var p = paper.path("M" + x + " 0 L" + x + " " + paper.height); + var t = paper.text(x, 10, dateFormat(time, "h:MM:ss,l")); + + t.hide(); + p.mouseover(function(evt) { + t.show(); + p.attr({stroke: "red"}); + }); + p.mouseout(function(evt) { + t.hide(); + p.attr({stroke: "lightgray"}); + }); + + return p; + }; + + this.draw = function(paper) { + var grid = paper.set(); + for (var i = 0; i < paper.height; i += 20) { + grid.push(paper.path("M0 " + i + " L" + paper.width + " " + i)); + } + var lasttick = this.starttime; + var scale = 500; // 500 ms + + var y = 0; + + for (var t = 0, len = this.ticker.ticks.length; t < len; t++) { + var basex = t * this.pixels_per_tick; + var thistick = this.ticker.ticks[t]; + var nexttick = t + 1 == this.ticker.ticks.length ? this.endtime : this.ticker.ticks[t+1]; + if (nexttick == thistick) { + continue; + } + var time = thistick - lasttick; + var first = scale - (lasttick % scale); + + /* for (var i = 0; (first+scale*i) < time; i++) { + + var toffset = first+scale*i; + var x = basex + LogGraph._pixels_per_tick * toffset/time; + grid.push(this._drawTime(paper, x, lasttick + toffset, grid)); + + }*/ + + + //grid.push(paper.path("M" + i + " 0 L" + i + " " + paper.height)); + lasttick = thistick; + } + grid.attr({stroke: "lightgray"}); + this.timescale.draw(paper); + + for (o in this.objects) { + this.objects[o].draw(paper); + } + }; + + + var processdata = function(data) { + var servermap = {}; + var servers = data.servers; + var count = 0; + for (s in servers) { + var server = new LogGraph.ServerGraph.server(self, "Server " + servers[s]); + servermap[servers[s]] = server; + self.add(server); + count++; + } + + var messages = {}; + var events = data.events; + for (var i in events) { + var e = events[i]; + var t = e.time; + if (e.type == "stateChange") { + servermap[e.server].addState(e.state, self.ticker.tick(e.time)); + } + if (e.type == "postmessage") { + src = servermap[e.src]; + dst = servermap[e.dst]; + var key = "key:s" + e.src + ",d" + e.dst + ",z" + e.zxid; + + var m = new LogGraph.ServerGraph.message(self, src, self.ticker.tick(e.time), dst, e.zxid); + messages[key] = m; + } + if (e.type == "delivermessage") { + var key = "key:s" + e.src + ",d" + e.dst + ",z" + e.zxid; + + var m = messages[key]; + if (m) { + m.dsttime = self.ticker.tick(e.time); + m.name = "Propose"; + self.add(m); + delete messages[key]; + } + } + if (e.type == "exception") { + servermap[e.server].addException(self.ticker.tick(e.time), e.text, e.time); + } + count++; + } + + for (var i in messages) { + var m = messages[i]; + m.markIncomplete(); + self.add(m); + count++; + } + + if (count != 0) { + paper.setSize(self.tick_to_x(self.ticker.current()), 1000); + + var line = paper.path("M0 0 L0 1000"); + line.attr({"stroke": "red", "stroke-dasharray": "- "}); + var base = canvas.offsetLeft;// + ((canvas.offsetWidth - paper.width)/2); + canvas.onmousemove = function (evt) { + var x = evt.screenX - base; + + line.attr({"path": "M" + x + " 0 L"+ x +" 1000"}); + + }; + + self.draw(paper); + return true; + } else { + return false; + } + }; + + var uri = "/data?start=" + self.starttime + "&end=" + self.endtime + "&filter=" + filter; + + LogGraph.loadData(asyncq, uri, processdata); +}; + +LogGraph.ServerGraph.server = function (graph, name) { + this.graph = graph; + this.serverid = graph.nextserverid++; + this.name = name; + this.y = (this.serverid * 300 + graph.serveroffset); + this.states = new Array(); + this.exception = new Array(); + + this.addState = function(state, time) { + this.states.push([state, time]); + } + + this.addException = function(tick, exception, time) { + this.exception.push(new LogGraph.ServerGraph.exception(this.graph, tick, exception, time)); + } + + this.draw = function(paper) { + var st = paper.set(); + st.push(paper.path("M0 " + this.y + " L" + paper.width + " " + this.y)); + st.push(paper.text(20, this.y - 10, this.name)); + st.attr({stroke: "gray"}); + + var numstates = this.states.length; + + for (s = 0; s < numstates; s++) { + var style = {}; + switch (this.states[s][0]) { + case "INIT": style = {stroke: "yellow", "stroke-width":3}; break; + case "FOLLOWING": style = {stroke: "lightgreen", "stroke-width":7}; break; + case "LEADING": style = {stroke: "green", "stroke-width":10}; break; + case "LOOKING": style = {stroke: "orange", "stroke-width":5}; break; + } + var startx = this.graph.tick_to_x(this.states[s][1]); + var endx = s + 1 < numstates ? this.graph.tick_to_x(this.states[(s+1)][1]) : paper.width; + var p = paper.path("M" + startx + " " + this.y + " L" + endx + " " + this.y); + p.attr(style); + } + + for (e in this.exception) { + this.exception[e].draw(paper, this); + } + } +}; + +LogGraph.ServerGraph.message = function(graph, src, srctime, dst, zxid) { + this.graph = graph; + this.src = src; + this.srctime = srctime; + this.dst = dst; + this.dsttime = 0; //dsttime; + this.name = "Unknown"; + this.zxid = zxid; + this.moreinfo = "No extra information"; + this.incomplete = false; + + this.markIncomplete = function() { + this.incomplete = true; + this.dsttime = this.srctime; + } + + this.draw = function(paper) { + var srcx = this.graph.tick_to_x(this.srctime); + var dstx = this.graph.tick_to_x(this.dsttime); + + var arrow = paper.set(); + var p = paper.path("M" + srcx + " " + this.src.y + " L" + dstx + " " + this.dst.y); + arrow.push(p); + + var tx = (srcx + dstx)/2; + var ty = (this.src.y + this.dst.y)/2; + var t = paper.text(tx, ty, this.name); + + var gradiant = (this.dst.y - this.src.y)/(dstx - srcx); + var angle = Math.atan(gradiant) * 57.2958; + t.rotate(angle, true); + + var arrowl = paper.path("M" + dstx + " " + this.dst.y + " L" + (dstx - 10) +" " + this.dst.y); + arrowl.rotate(angle + 20, dstx, this.dst.y); + arrow.push(arrowl); + var arrowr = paper.path("M" + dstx + " " + this.dst.y + " L" + (dstx - 10) +" " + this.dst.y); + arrowr.rotate(angle - 20, dstx, this.dst.y); + arrow.push(arrowr); + + arrow.attr({"stroke-width": 2, stroke: "gray"}); + if (this.incomplete) { + arrow.attr({"stroke-dasharray": "- .", stroke: "pink", "stroke-width": 2}); + } + arrow.mouseover(function(evt) { + t.attr({"font-size": 20}); + arrow.attr({stroke: "red", "stroke-width": 3}); + }); + arrow.mouseout(function(evt) { + t.attr({"font-size": 10}); + + if (this.incomplete) { + arrow.attr({stroke: "pink", "stroke-width": 2}); + } else { + arrow.attr({stroke: "gray", "stroke-width": 2}); + } + }); + + + + arrow.click(function(evt) { + var popup = document.createElement("div"); + popup.className = "popUp"; + popup.innerHTML = "zxid: " + parseInt(this.zxid).toString(16); + + popup.style.top = evt.clientY; + popup.style.left = evt.clientX; + document.body.appendChild(popup); + + popup.onclick = function(evt) { + document.body.removeChild(popup); + }; + }); + } +}; + +LogGraph.ServerGraph.exception = function(graph, tick, exceptiontext, time) { + this.graph = graph; + this.time = time; + this.text = exceptiontext; + this.tick = tick; + + var self = this; + + this.draw = function(paper, server) { + var center = this.graph.tick_to_x(this.tick); + var p = paper.circle(center, server.y, 5); + p.attr({stroke: "orange", fill: "red"}); + + p.mouseover(function(evt) { + p.popup = document.createElement("div"); + p.popup.className = "popUp"; + p.popup.innerHTML = self.text.replace("\n", "
");; + p.popup.style.top = server.y + 50; + p.popup.style.left = center + 25; + document.body.appendChild(p.popup); + + p.animate({r: 10}, 500, "elastic"); + }); + p.mouseout(function(evt) { + document.body.removeChild(p.popup); + p.animate({r: 5}, 100); + }); + } +}; + diff --git a/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/loggraph.session.js b/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/loggraph.session.js new file mode 100644 index 0000000..5a314d8 --- /dev/null +++ b/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/loggraph.session.js @@ -0,0 +1,202 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +LogGraph.SessionGraph = function (asyncq, canvas, starttime, endtime, filter) { + this.sessions = new Array(); + this.counter = 0; + this.exceptions = new Array(); + + this.pix_per_ticks = 4; + this.pix_per_session = 7; + + var paper = Raphael(canvas, 1, 1); + this.ticker = new LogGraph.ticker(); + var self = this; + + this.starttime = starttime; + this.endtime = endtime; + this.filter = filter; + + this.findOrCreateSession = function(id) { + if (this.sessions[id] == undefined) { + this.sessions[id] = new LogGraph.SessionGraph.session(this, ++this.counter, id); + } + return this.sessions[id]; + } + + this.height = function () { return this.counter * this.pix_per_session + 10; }; + this.width = function () { return (self.ticker.current() * this.pix_per_ticks); }; + + this.draw = function(paper) { + + + var line = paper.path("M0 0 L0 " + this.height()); + line.attr({"stroke": "red", "stroke-dasharray": "- "}); + var base = canvas.offsetLeft; + var width = this.width(); + canvas.onmousemove = function (evt) { + var x = evt.clientX - base; + + line.attr({"path": "M" + x + " 0 L" + x + " " + self.height() }); + }; + + for (var i in this.sessions) { + var s = this.sessions[i]; + s.draw(paper); + } + }; + + var processdata = function(data) { + var count = 0; + for (var i in data.events) { + var e = data.events[i]; + if (e.type == "transaction") { + e.tick = self.ticker.tick(e.time, true); + var session = self.findOrCreateSession(e.client); + session.addEvent(e); + count++; + } + } + paper.setSize(self.width(), self.height()); + + if (count != 0) { + self.draw(paper); + return true; + } else { + return false; + } + }; + + var uri = "/data?start=" + self.starttime + "&end=" + self.endtime + "&filter=" + filter; + + LogGraph.loadData(asyncq, uri, processdata); +}; + +LogGraph.SessionGraph.sessionevent = function () { + this.time = time; + this.type = type; + this.client = client; + this.cxid = cxid; + this.zxid = zxid; + this.op = op; + this.extra = extra; +}; + +LogGraph.SessionGraph.sessionEventPopup = function (obj, e, x, y) { + obj.click(function(evt) { + var popup = document.createElement("div"); + popup.className = "popUp"; + + var closebutton = document.createElement("div"); + closebutton.className = "closebutton"; + closebutton.title = "Close popup"; + closebutton.innerHTML = "×"; + popup.appendChild(closebutton); + closebutton.onclick= function(evt) { popup.style.visibility = "hidden"; document.body.removeChild(popup) }; + var txt = document.createElement("span"); + txt.innerHTML = "session: " + e.client + "
op: " + e.op + "
zxid: " + e.zxid + "
time: " + e.time + "
extra: " + e.extra; + popup.appendChild(txt); + + popup.style.top = y; + popup.style.left = x; + document.body.appendChild(popup); + + YUI().use('dd-drag', function(Y) { + //Selector of the node to make draggable + var dd = new Y.DD.Drag({ + node: popup + }); + }); + }); +}; + +LogGraph.SessionGraph.session = function (graph, index, id) { + this.index = index; + this.id = id; + this.graph = graph; + + this.events = new Array(); + this.starttick = 0; + this.endtick = undefined; + + this.addEvent = function(e) { + this.events.push(e); + + if (e.op == "createSession") { + // document.write("createSession for " + id.toString(16)); + this.starttick = e.tick; + } else if (e.op == "closeSession") { + this.endtick = e.tick; + } + }, + + this._attach_action = function (sess, label) { + sess.mouseover(function(evt) { + label.show(); + sess.attr({stroke: "gray"}); + }); + + sess.mouseout(function(evt) { + label.hide(); + sess.attr({stroke: "black"}); + }); + }, + + this.drawEvent = function (paper, y, e) { + var x = e.tick * this.graph.pix_per_ticks;; + var s = paper.path("M" + x + " " + (y - 3) + " L" + x + " " + (y + 3)); + s.attr({"stroke-width": 2}); + if (e.op == "error") { + s.attr({"stroke": "red"}); + } + s.mouseover(function(evt) { + s.attr({"stroke-width": 5}); + }); + + s.mouseout(function(evt) { + s.attr({"stroke-width": 2}); + }); + + LogGraph.SessionGraph.sessionEventPopup(s, e, x, y); + }, + + this.draw = function(paper) { + var y = this.index*this.graph.pix_per_session;; + var start = this.starttick * this.graph.pix_per_ticks; + var end = this.endtick * this.graph.pix_per_ticks; + + var sess = paper.set(); + + if (this.endtick == undefined) { + end = this.graph.width(); + } + + sess.push(paper.path("M" + start + " " + y + " L" + end + " " + y)); + for (var i in this.events) { + var e = this.events[i]; + this.drawEvent(paper, y, e); + } + + //sess.attr({"stroke-width": 3}); + label = paper.text(start + 100, y, this.id); + label.attr({"font-size": "14px"}); + label.hide(); + this._attach_action(sess, label); + } +}; + diff --git a/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/loggraph.stats.js b/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/loggraph.stats.js new file mode 100644 index 0000000..0a8ac4f --- /dev/null +++ b/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/loggraph.stats.js @@ -0,0 +1,44 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +LogGraph.StatsGraph = function (asyncq, canvas, starttime, endtime, filter) { + var processdata = function(data) { + var r = Raphael(canvas); + var x = data.map(function (x) { return x.time; }); + var y = data.map(function (x) { return x.count; }); + var xlabels = data.map(function (x) { return dateFormat(x.time, "HH:MM:ss,l"); } ); + var h1 = function () { + this.tags = r.set(); + for (var i = 0, ii = this.y.length; i < ii; i++) { + this.tags.push(r.g.tag(this.x, this.y[i], this.values[i], 160, 10).insertBefore(this).attr([{fill: "#fff"}, {fill: this.symbols[i].attr("fill")}])); + } + }; + var h2 = function () { + this.tags && this.tags.remove(); + }; + r.g.linechart(40, 40, 1000, 500, x, y, {shade: true, axis: "0 0 1 1", symbol: "x", southlabels: xlabels, axisxstep: xlabels.length - 1 , westAxisLabel: "Write requests", southAxisLabel: "Time (min)"}).hoverColumn(h1, h2); + + return true; + //r.g.barchart(0, 0, 1000, 100, y, {shade: true, symbol: "x"}).hoverColumn(h1, h2); + }; + + var uri = "/throughput?scale=minutes"; + LogGraph.loadData(asyncq, uri, processdata); +}; + + diff --git a/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/loggraph.ui.js b/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/loggraph.ui.js new file mode 100644 index 0000000..819765a --- /dev/null +++ b/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/loggraph.ui.js @@ -0,0 +1,377 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Opens a window to load files into the engine +LogGraph.fileSelector = function(callback) { + var self = this; + this.callback = callback; + this.selectedFiles = new Array(); + + var divTag = document.createElement("div"); + divTag.id = "fileSelector" + Math.round(Math.random()*100000); + // divTag.className = "popUp"; + divTag.className = "selector fileSelector"; + document.body.appendChild(divTag); + + YUI().use('dd-drag', function(Y) { + //Selector of the node to make draggable + var dd = new Y.DD.Drag({ + node: '#' + divTag.id + }); + }); + + var list = document.createElement("ul"); + divTag.appendChild(list); + var selectedList = document.createElement("selectedlist"); + divTag.appendChild(selectedList); + + var clearanchor = document.createElement("span"); + clearanchor.innerHTML = "Remove All"; + clearanchor.className = "actionbutton"; + clearanchor.style.cssFloat = "right"; + clearanchor.onclick = function () { + self.selectedFiles = new Array(); + self.updateSelectedList(); + }; + divTag.appendChild(clearanchor); + + var doneanchor = document.createElement("span"); + doneanchor.innerHTML = "Process Files"; + doneanchor.className = "actionbutton"; + doneanchor.style.cssFloat = "left"; + doneanchor.onclick = function () { + self.callback(self.selectedFiles); + document.body.removeChild(divTag); + delete divTag; + }; + divTag.appendChild(doneanchor); + + var cancelanchor = document.createElement("span"); + cancelanchor.innerHTML = "Cancel"; + cancelanchor.className = "actionbutton"; + cancelanchor.style.cssFloat = "left"; + cancelanchor.onclick = function () { + document.body.removeChild(divTag); + delete divTag; + }; + divTag.appendChild(cancelanchor); + + this.createFileListItem = function (file) { + var li = document.createElement("li"); + var a = document.createElement("a"); + if (file.type == "D") { + a.innerHTML = file.file + "/"; + a.onclick = function () { self.updateList(file.path); }; + } else { + a.innerHTML = file.file; + a.onclick = function () { self.addSelectedFile(file.path); }; + } + + a.fullpath = file.path;; + li.appendChild(a); + return li; + }; + + this.addSelectedFile = function (file) { + if (this.selectedFiles.indexOf(file) == -1) { + this.selectedFiles.push(file); + this.updateSelectedList(); + } + }; + + this.removeSelectedFile = function (file) { + this.selectedFiles = this.selectedFiles.filter(function(f) { return !(file == f); }); + this.updateSelectedList(); + }; + + this.createSelectedListItem = function (file) { + var li = document.createElement("li"); + var a = document.createElement("a"); + li.className = "selectedFile"; + a.onclick = function () { self.removeSelectedFile(file); }; + a.innerHTML = file; + li.appendChild(a); + return li; + }; + + this.updateSelectedList = function () { + while (selectedList.firstChild) { selectedList.removeChild(selectedList.firstChild); } + + for (var i in this.selectedFiles) { + var f = this.selectedFiles[i]; + selectedList.appendChild(this.createSelectedListItem(f)); + } + }; + + this.updateList = function (base) { + while (list.firstChild) list.removeChild(list.firstChild); + + // Create a YUI instance using io-base module. + YUI().use("io-base", function(Y) { + var uri = "/fs?path=" + base; + + // Define a function to handle the response data. + function complete(id, o, args) { + var id = id; // Transaction ID. + var data = eval("(" + o.responseText + ")"); // Response data. + var parts = base.split("/").slice(0,-1); + var parent = "" + if (parts.length < 2) { + parent = "/"; + } else { + parent = parts.join("/"); + } + if (base != "/") { + var li = self.createFileListItem({"file": "..", type: "D", path: parent}); + list.appendChild(li); + } + for (var i in data) { + var f = data[i]; + if (f.file[0] != '.') { + var li = self.createFileListItem(f); + list.appendChild(li); + } + } + }; + + Y.on('io:complete', complete, Y, []); + var request = Y.io(uri); + }); + }; + + this.updateList("/"); +}; + +// Open a window which loads files into the engine +LogGraph.fileLoader = function(files) { + var div = document.createElement("div"); + div.id = "fileLoader"; + + var imgArray = new Array(); + var pArray = new Array(); + for (var index in files) { + var f = files[index]; + var p = document.createElement("p"); + var i = document.createElement("img"); + i.src = "load.gif"; + i.style.visibility = "hidden"; + imgArray.push(i); + pArray.push(p); + var span = document.createElement("span"); + span.innerHTML = f; + + p.appendChild(span); + p.appendChild(i); + + div.appendChild(p); + } + + var loadFile = function (index) { + // Create a YUI instance using io-base module. + YUI().use("io-base", function(Y) { + var file = files[index]; + var uri = "/loadfile?path=" + file; + imgArray[index].style.visibility = "visible"; + + // Define a function to handle the response data. + function complete(id, o, args) { + var id = id; // Transaction ID. + var data = eval("(" + o.responseText + ")"); // Response data. + if (data.status == "ERR") { + var err = document.createElement("div"); + err.innerHTML = data.error; + pArray[index].appendChild(err); + } else if (data.status == "OK") { + var ok = document.createElement("div"); + ok.innerHTML = "OK"; + pArray[index].appendChild(ok); + } + + imgArray[index].style.visibility = "hidden"; + if (index + 1 < files.length) { + loadFile(index + 1); + } else { + //alert("DONE"); + } + }; + + Y.on('io:complete', complete, Y, []); + var request = Y.io(uri); + }); + }; + + var doneanchor = document.createElement("a"); + doneanchor.className = "actionbutton"; + doneanchor.innerHTML = "Done"; + doneanchor.onclick = function () { + document.body.removeChild(div); + delete div; + }; + + document.body.appendChild(div); + if (files.length > 0) { + loadFile(0); + } else { + div.innerHTML ="No files to load"; + } + div.appendChild(doneanchor); +} + +// select a time period +LogGraph.filterSelector = function(starttime, period, filter, callback) { + var self = this; + this.callback = callback; + + // Container other widgets will be in + var container = document.createElement("div"); + container.id = "filterSelector" + Math.round(Math.random()*100000); + container.className = "selector filterSelector"; + document.body.appendChild(container); + + YUI().use('dd-drag', function(Y) { + //Selector of the node to make draggable + var dd = new Y.DD.Drag({ + node: '#' + container.id + }); + }); + + // Temporary loading screen + var loadingp = document.createElement("p"); + loadingp.innerHTML = "Loading..."; + var loadimg = document.createElement("img"); + loadimg.src = "load.gif"; + loadingp.appendChild(loadimg); + container.appendChild(loadingp); + + var addWithLabel = function (container, labeltxt, object) { + var p = document.createElement("p"); + var label = document.createElement("label"); + label.innerHTML = labeltxt + ":"; + p.appendChild(label); + p.appendChild(object); + container.appendChild(p); + }; + var draw = function(minstart, maxstart, entries) { + container.removeChild(loadingp); + var inittime = minstart > starttime ? minstart : starttime; + + var numEntries = 0; + var startspan = document.createElement("span"); + addWithLabel(container, "Start time", startspan); + var startinput = document.createElement("input"); + startinput.type = "hidden"; + startinput.value = inittime; + container.appendChild(startinput); + var sliderspan = document.createElement("span"); + container.appendChild(sliderspan); + + var countspan = document.createElement("p"); + countspan.innerHTML = entries + " entries";; + container.appendChild(countspan); + + var windowinput = document.createElement("input"); + windowinput.type = "text"; + windowinput.value = period; + addWithLabel(container, "Time window (ms)", windowinput); + + var filterinput = document.createElement("textarea"); + filterinput.id = "filterinput"; + filterinput.value = filter; + addWithLabel(container, "Filter", filterinput); + + /* done link, when clicked time is updated, */ + var doneanchor = document.createElement("a"); + doneanchor.className = "actionbutton"; + doneanchor.innerHTML = "Done"; + doneanchor.onclick = function () { + var start = parseInt(startinput.value); + var period = parseInt(windowinput.value); + var filter = filterinput.value; + document.body.removeChild(container); + delete container; + + update(start, period, filter, function() { + callback(start, period, filter, numEntries); + }); + }; + container.appendChild(doneanchor); + + var update = function(start, period, filter, thenrun) { + startspan.innerHTML = dateFormat(start, "HH:MM:ss,l"); + // get the min and max start time + YUI().use("io-base", function(Y) { + var uri = "/info?start=" + start + "&period=" + period + "&filter=" + filter; + function complete(id, o, args) { + var data = eval("(" + o.responseText + ")"); + countspan.innerHTML = data.numEntries + " entries"; + numEntries = data.numEntries; + if (thenrun) { + thenrun(); + } + }; + + Y.on('io:complete', complete, Y, []); + var request = Y.io(uri); + }); + }; + + var updatewindow = function(evt) { + var start = parseInt(startinput.value); + var period = parseInt(windowinput.value); + var filter = filterinput.value; + update(start, period, filter); + }; + windowinput.onkeyup = updatewindow; + + + YUI().use("slider", function (Y) { + var input, slider; + + function updateInput( e ) { + this.set( "value", e.newVal ); + + update(parseInt(startinput.value), parseInt(windowinput.value), filterinput.value); + } + + xSlider = new Y.Slider({min: minstart, max: maxstart, value: inittime, length: "1000px" }); + + // Link the input value to the Slider + xInput = Y.one( startinput ); + xInput.setData( { slider: xSlider } ); + + // Pass the input as the 'this' object inside updateInput + xSlider.after( "valueChange", updateInput, xInput ); + + // Render the Slider next to the input + xSlider.render(sliderspan); + }); + update(inittime, windowinput.value, filterinput); + }; + + // get the min and max start time + YUI().use("io-base", function(Y) { + var uri = "/info"; + function complete(id, o, args) { + var data = eval("(" + o.responseText + ")"); + draw(data.startTime, data.endTime, data.numEntries); + }; + + Y.on('io:complete', complete, Y, []); + var request = Y.io(uri); + }); +} \ No newline at end of file diff --git a/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/main.html b/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/main.html new file mode 100644 index 0000000..b9affe6 --- /dev/null +++ b/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/main.html @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
+ Edit Filters + Add logs +
+
+ Log view + Servers view + Sessions view + Statistics +
+
+
+
+
+ + diff --git a/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/raphael.js b/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/raphael.js new file mode 100644 index 0000000..3740d0f --- /dev/null +++ b/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/raphael.js @@ -0,0 +1,3296 @@ +/*! + * Raphael 1.3.2 - JavaScript Vector Library + * + * Copyright (c) 2009 Dmitry Baranovskiy (http://raphaeljs.com) + * Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license. + */ + +Raphael = (function () { + var separator = /[, ]+/, + elements = /^(circle|rect|path|ellipse|text|image)$/, + proto = "prototype", + has = "hasOwnProperty", + doc = document, + win = window, + oldRaphael = { + was: Object[proto][has].call(win, "Raphael"), + is: win.Raphael + }, + R = function () { + if (R.is(arguments[0], "array")) { + var a = arguments[0], + cnv = create[apply](R, a.splice(0, 3 + R.is(a[0], nu))), + res = cnv.set(); + for (var i = 0, ii = a[length]; i < ii; i++) { + var j = a[i] || {}; + elements.test(j.type) && res[push](cnv[j.type]().attr(j)); + } + return res; + } + return create[apply](R, arguments); + }, + Paper = function () {}, + appendChild = "appendChild", + apply = "apply", + concat = "concat", + E = "", + S = " ", + split = "split", + events = "click dblclick mousedown mousemove mouseout mouseover mouseup"[split](S), + join = "join", + length = "length", + lowerCase = String[proto].toLowerCase, + math = Math, + mmax = math.max, + mmin = math.min, + nu = "number", + toString = "toString", + objectToString = Object[proto][toString], + paper = {}, + pow = math.pow, + push = "push", + rg = /^(?=[\da-f]$)/, + ISURL = /^url\(['"]?([^\)]+?)['"]?\)$/i, //" + colourRegExp = /^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgb\(\s*([\d\.]+\s*,\s*[\d\.]+\s*,\s*[\d\.]+)\s*\)|rgb\(\s*([\d\.]+%\s*,\s*[\d\.]+%\s*,\s*[\d\.]+%)\s*\)|hs[bl]\(\s*([\d\.]+\s*,\s*[\d\.]+\s*,\s*[\d\.]+)\s*\)|hs[bl]\(\s*([\d\.]+%\s*,\s*[\d\.]+%\s*,\s*[\d\.]+%)\s*\))\s*$/i, + round = math.round, + setAttribute = "setAttribute", + toFloat = parseFloat, + toInt = parseInt, + upperCase = String[proto].toUpperCase, + availableAttrs = {blur: 0, "clip-rect": "0 0 1e9 1e9", cursor: "default", cx: 0, cy: 0, fill: "#fff", "fill-opacity": 1, font: '10px "Arial"', "font-family": '"Arial"', "font-size": "10", "font-style": "normal", "font-weight": 400, gradient: 0, height: 0, href: "http://raphaeljs.com/", opacity: 1, path: "M0,0", r: 0, rotation: 0, rx: 0, ry: 0, scale: "1 1", src: "", stroke: "#000", "stroke-dasharray": "", "stroke-linecap": "butt", "stroke-linejoin": "butt", "stroke-miterlimit": 0, "stroke-opacity": 1, "stroke-width": 1, target: "_blank", "text-anchor": "middle", title: "Raphael", translation: "0 0", width: 0, x: 0, y: 0}, + availableAnimAttrs = {along: "along", blur: nu, "clip-rect": "csv", cx: nu, cy: nu, fill: "colour", "fill-opacity": nu, "font-size": nu, height: nu, opacity: nu, path: "path", r: nu, rotation: "csv", rx: nu, ry: nu, scale: "csv", stroke: "colour", "stroke-opacity": nu, "stroke-width": nu, translation: "csv", width: nu, x: nu, y: nu}, + rp = "replace"; + R.version = "1.3.2"; + R.type = (win.SVGAngle || doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") ? "SVG" : "VML"); + if (R.type == "VML") { + var d = doc.createElement("div"); + d.innerHTML = ''; + if (d.childNodes[length] != 2) { + return R.type = null; + } + d = null; + } + R.svg = !(R.vml = R.type == "VML"); + Paper[proto] = R[proto]; + R._id = 0; + R._oid = 0; + R.fn = {}; + R.is = function (o, type) { + type = lowerCase.call(type); + return ((type == "object" || type == "undefined") && typeof o == type) || (o == null && type == "null") || lowerCase.call(objectToString.call(o).slice(8, -1)) == type; + }; + R.setWindow = function (newwin) { + win = newwin; + doc = win.document; + }; + // colour utilities + var toHex = function (color) { + if (R.vml) { + // http://dean.edwards.name/weblog/2009/10/convert-any-colour-value-to-hex-in-msie/ + var trim = /^\s+|\s+$/g; + toHex = cacher(function (color) { + var bod; + color = (color + E)[rp](trim, E); + try { + var docum = new win.ActiveXObject("htmlfile"); + docum.write(""); + docum.close(); + bod = docum.body; + } catch(e) { + bod = win.createPopup().document.body; + } + var range = bod.createTextRange(); + try { + bod.style.color = color; + var value = range.queryCommandValue("ForeColor"); + value = ((value & 255) << 16) | (value & 65280) | ((value & 16711680) >>> 16); + return "#" + ("000000" + value[toString](16)).slice(-6); + } catch(e) { + return "none"; + } + }); + } else { + var i = doc.createElement("i"); + i.title = "Rapha\xebl Colour Picker"; + i.style.display = "none"; + doc.body[appendChild](i); + toHex = cacher(function (color) { + i.style.color = color; + return doc.defaultView.getComputedStyle(i, E).getPropertyValue("color"); + }); + } + return toHex(color); + }; + var hsbtoString = function () { + return "hsb(" + [this.h, this.s, this.b] + ")"; + }, + rgbtoString = function () { + return this.hex; + }; + R.hsb2rgb = cacher(function (hue, saturation, brightness) { + if (R.is(hue, "object") && "h" in hue && "s" in hue && "b" in hue) { + brightness = hue.b; + saturation = hue.s; + hue = hue.h; + } + var red, + green, + blue; + if (brightness == 0) { + return {r: 0, g: 0, b: 0, hex: "#000"}; + } + if (hue > 1 || saturation > 1 || brightness > 1) { + hue /= 255; + saturation /= 255; + brightness /= 255; + } + var i = ~~(hue * 6), + f = (hue * 6) - i, + p = brightness * (1 - saturation), + q = brightness * (1 - (saturation * f)), + t = brightness * (1 - (saturation * (1 - f))); + red = [brightness, q, p, p, t, brightness, brightness][i]; + green = [t, brightness, brightness, q, p, p, t][i]; + blue = [p, p, t, brightness, brightness, q, p][i]; + red *= 255; + green *= 255; + blue *= 255; + var rgb = {r: red, g: green, b: blue, toString: rgbtoString}, + r = (~~red)[toString](16), + g = (~~green)[toString](16), + b = (~~blue)[toString](16); + r = r[rp](rg, "0"); + g = g[rp](rg, "0"); + b = b[rp](rg, "0"); + rgb.hex = "#" + r + g + b; + return rgb; + }, R); + R.rgb2hsb = cacher(function (red, green, blue) { + if (R.is(red, "object") && "r" in red && "g" in red && "b" in red) { + blue = red.b; + green = red.g; + red = red.r; + } + if (R.is(red, "string")) { + var clr = R.getRGB(red); + red = clr.r; + green = clr.g; + blue = clr.b; + } + if (red > 1 || green > 1 || blue > 1) { + red /= 255; + green /= 255; + blue /= 255; + } + var max = mmax(red, green, blue), + min = mmin(red, green, blue), + hue, + saturation, + brightness = max; + if (min == max) { + return {h: 0, s: 0, b: max}; + } else { + var delta = (max - min); + saturation = delta / max; + if (red == max) { + hue = (green - blue) / delta; + } else if (green == max) { + hue = 2 + ((blue - red) / delta); + } else { + hue = 4 + ((red - green) / delta); + } + hue /= 6; + hue < 0 && hue++; + hue > 1 && hue--; + } + return {h: hue, s: saturation, b: brightness, toString: hsbtoString}; + }, R); + var p2s = /,?([achlmqrstvxz]),?/gi; + R._path2string = function () { + return this.join(",")[rp](p2s, "$1"); + }; + function cacher(f, scope, postprocessor) { + function newf() { + var arg = Array[proto].slice.call(arguments, 0), + args = arg[join]("\u25ba"), + cache = newf.cache = newf.cache || {}, + count = newf.count = newf.count || []; + if (cache[has](args)) { + return postprocessor ? postprocessor(cache[args]) : cache[args]; + } + count[length] >= 1e3 && delete cache[count.shift()]; + count[push](args); + cache[args] = f[apply](scope, arg); + return postprocessor ? postprocessor(cache[args]) : cache[args]; + } + return newf; + } + + R.getRGB = cacher(function (colour) { + if (!colour || !!((colour = colour + E).indexOf("-") + 1)) { + return {r: -1, g: -1, b: -1, hex: "none", error: 1}; + } + if (colour == "none") { + return {r: -1, g: -1, b: -1, hex: "none"}; + } + !(({hs: 1, rg: 1})[has](colour.substring(0, 2)) || colour.charAt() == "#") && (colour = toHex(colour)); + var res, + red, + green, + blue, + t, + rgb = colour.match(colourRegExp); + if (rgb) { + if (rgb[2]) { + blue = toInt(rgb[2].substring(5), 16); + green = toInt(rgb[2].substring(3, 5), 16); + red = toInt(rgb[2].substring(1, 3), 16); + } + if (rgb[3]) { + blue = toInt((t = rgb[3].charAt(3)) + t, 16); + green = toInt((t = rgb[3].charAt(2)) + t, 16); + red = toInt((t = rgb[3].charAt(1)) + t, 16); + } + if (rgb[4]) { + rgb = rgb[4][split](/\s*,\s*/); + red = toFloat(rgb[0]); + green = toFloat(rgb[1]); + blue = toFloat(rgb[2]); + } + if (rgb[5]) { + rgb = rgb[5][split](/\s*,\s*/); + red = toFloat(rgb[0]) * 2.55; + green = toFloat(rgb[1]) * 2.55; + blue = toFloat(rgb[2]) * 2.55; + } + if (rgb[6]) { + rgb = rgb[6][split](/\s*,\s*/); + red = toFloat(rgb[0]); + green = toFloat(rgb[1]); + blue = toFloat(rgb[2]); + return R.hsb2rgb(red, green, blue); + } + if (rgb[7]) { + rgb = rgb[7][split](/\s*,\s*/); + red = toFloat(rgb[0]) * 2.55; + green = toFloat(rgb[1]) * 2.55; + blue = toFloat(rgb[2]) * 2.55; + return R.hsb2rgb(red, green, blue); + } + rgb = {r: red, g: green, b: blue}; + var r = (~~red)[toString](16), + g = (~~green)[toString](16), + b = (~~blue)[toString](16); + r = r[rp](rg, "0"); + g = g[rp](rg, "0"); + b = b[rp](rg, "0"); + rgb.hex = "#" + r + g + b; + return rgb; + } + return {r: -1, g: -1, b: -1, hex: "none", error: 1}; + }, R); + R.getColor = function (value) { + var start = this.getColor.start = this.getColor.start || {h: 0, s: 1, b: value || .75}, + rgb = this.hsb2rgb(start.h, start.s, start.b); + start.h += .075; + if (start.h > 1) { + start.h = 0; + start.s -= .2; + start.s <= 0 && (this.getColor.start = {h: 0, s: 1, b: start.b}); + } + return rgb.hex; + }; + R.getColor.reset = function () { + delete this.start; + }; + // path utilities + var pathCommand = /([achlmqstvz])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?\s*,?\s*)+)/ig, + pathValues = /(-?\d*\.?\d*(?:e[-+]?\d+)?)\s*,?\s*/ig; + R.parsePathString = cacher(function (pathString) { + if (!pathString) { + return null; + } + var paramCounts = {a: 7, c: 6, h: 1, l: 2, m: 2, q: 4, s: 4, t: 2, v: 1, z: 0}, + data = []; + if (R.is(pathString, "array") && R.is(pathString[0], "array")) { // rough assumption + data = pathClone(pathString); + } + if (!data[length]) { + (pathString + E)[rp](pathCommand, function (a, b, c) { + var params = [], + name = lowerCase.call(b); + c[rp](pathValues, function (a, b) { + b && params[push](+b); + }); + if (name == "m" && params[length] > 2) { + data[push]([b][concat](params.splice(0, 2))); + name = "l"; + b = b == "m" ? "l" : "L"; + } + while (params[length] >= paramCounts[name]) { + data[push]([b][concat](params.splice(0, paramCounts[name]))); + if (!paramCounts[name]) { + break; + } + } + }); + } + data[toString] = R._path2string; + return data; + }); + R.findDotsAtSegment = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) { + var t1 = 1 - t, + x = pow(t1, 3) * p1x + pow(t1, 2) * 3 * t * c1x + t1 * 3 * t * t * c2x + pow(t, 3) * p2x, + y = pow(t1, 3) * p1y + pow(t1, 2) * 3 * t * c1y + t1 * 3 * t * t * c2y + pow(t, 3) * p2y, + mx = p1x + 2 * t * (c1x - p1x) + t * t * (c2x - 2 * c1x + p1x), + my = p1y + 2 * t * (c1y - p1y) + t * t * (c2y - 2 * c1y + p1y), + nx = c1x + 2 * t * (c2x - c1x) + t * t * (p2x - 2 * c2x + c1x), + ny = c1y + 2 * t * (c2y - c1y) + t * t * (p2y - 2 * c2y + c1y), + ax = (1 - t) * p1x + t * c1x, + ay = (1 - t) * p1y + t * c1y, + cx = (1 - t) * c2x + t * p2x, + cy = (1 - t) * c2y + t * p2y, + alpha = (90 - math.atan((mx - nx) / (my - ny)) * 180 / math.PI); + (mx > nx || my < ny) && (alpha += 180); + return {x: x, y: y, m: {x: mx, y: my}, n: {x: nx, y: ny}, start: {x: ax, y: ay}, end: {x: cx, y: cy}, alpha: alpha}; + }; + var pathDimensions = cacher(function (path) { + if (!path) { + return {x: 0, y: 0, width: 0, height: 0}; + } + path = path2curve(path); + var x = 0, + y = 0, + X = [], + Y = [], + p; + for (var i = 0, ii = path[length]; i < ii; i++) { + p = path[i]; + if (p[0] == "M") { + x = p[1]; + y = p[2]; + X[push](x); + Y[push](y); + } else { + var dim = curveDim(x, y, p[1], p[2], p[3], p[4], p[5], p[6]); + X = X[concat](dim.min.x, dim.max.x); + Y = Y[concat](dim.min.y, dim.max.y); + x = p[5]; + y = p[6]; + } + } + var xmin = mmin[apply](0, X), + ymin = mmin[apply](0, Y); + return { + x: xmin, + y: ymin, + width: mmax[apply](0, X) - xmin, + height: mmax[apply](0, Y) - ymin + }; + }), + pathClone = function (pathArray) { + var res = []; + if (!R.is(pathArray, "array") || !R.is(pathArray && pathArray[0], "array")) { // rough assumption + pathArray = R.parsePathString(pathArray); + } + for (var i = 0, ii = pathArray[length]; i < ii; i++) { + res[i] = []; + for (var j = 0, jj = pathArray[i][length]; j < jj; j++) { + res[i][j] = pathArray[i][j]; + } + } + res[toString] = R._path2string; + return res; + }, + pathToRelative = cacher(function (pathArray) { + if (!R.is(pathArray, "array") || !R.is(pathArray && pathArray[0], "array")) { // rough assumption + pathArray = R.parsePathString(pathArray); + } + var res = [], + x = 0, + y = 0, + mx = 0, + my = 0, + start = 0; + if (pathArray[0][0] == "M") { + x = pathArray[0][1]; + y = pathArray[0][2]; + mx = x; + my = y; + start++; + res[push](["M", x, y]); + } + for (var i = start, ii = pathArray[length]; i < ii; i++) { + var r = res[i] = [], + pa = pathArray[i]; + if (pa[0] != lowerCase.call(pa[0])) { + r[0] = lowerCase.call(pa[0]); + switch (r[0]) { + case "a": + r[1] = pa[1]; + r[2] = pa[2]; + r[3] = pa[3]; + r[4] = pa[4]; + r[5] = pa[5]; + r[6] = +(pa[6] - x).toFixed(3); + r[7] = +(pa[7] - y).toFixed(3); + break; + case "v": + r[1] = +(pa[1] - y).toFixed(3); + break; + case "m": + mx = pa[1]; + my = pa[2]; + default: + for (var j = 1, jj = pa[length]; j < jj; j++) { + r[j] = +(pa[j] - ((j % 2) ? x : y)).toFixed(3); + } + } + } else { + r = res[i] = []; + if (pa[0] == "m") { + mx = pa[1] + x; + my = pa[2] + y; + } + for (var k = 0, kk = pa[length]; k < kk; k++) { + res[i][k] = pa[k]; + } + } + var len = res[i][length]; + switch (res[i][0]) { + case "z": + x = mx; + y = my; + break; + case "h": + x += +res[i][len - 1]; + break; + case "v": + y += +res[i][len - 1]; + break; + default: + x += +res[i][len - 2]; + y += +res[i][len - 1]; + } + } + res[toString] = R._path2string; + return res; + }, 0, pathClone), + pathToAbsolute = cacher(function (pathArray) { + if (!R.is(pathArray, "array") || !R.is(pathArray && pathArray[0], "array")) { // rough assumption + pathArray = R.parsePathString(pathArray); + } + var res = [], + x = 0, + y = 0, + mx = 0, + my = 0, + start = 0; + if (pathArray[0][0] == "M") { + x = +pathArray[0][1]; + y = +pathArray[0][2]; + mx = x; + my = y; + start++; + res[0] = ["M", x, y]; + } + for (var i = start, ii = pathArray[length]; i < ii; i++) { + var r = res[i] = [], + pa = pathArray[i]; + if (pa[0] != upperCase.call(pa[0])) { + r[0] = upperCase.call(pa[0]); + switch (r[0]) { + case "A": + r[1] = pa[1]; + r[2] = pa[2]; + r[3] = pa[3]; + r[4] = pa[4]; + r[5] = pa[5]; + r[6] = +(pa[6] + x); + r[7] = +(pa[7] + y); + break; + case "V": + r[1] = +pa[1] + y; + break; + case "H": + r[1] = +pa[1] + x; + break; + case "M": + mx = +pa[1] + x; + my = +pa[2] + y; + default: + for (var j = 1, jj = pa[length]; j < jj; j++) { + r[j] = +pa[j] + ((j % 2) ? x : y); + } + } + } else { + for (var k = 0, kk = pa[length]; k < kk; k++) { + res[i][k] = pa[k]; + } + } + switch (r[0]) { + case "Z": + x = mx; + y = my; + break; + case "H": + x = r[1]; + break; + case "V": + y = r[1]; + break; + default: + x = res[i][res[i][length] - 2]; + y = res[i][res[i][length] - 1]; + } + } + res[toString] = R._path2string; + return res; + }, null, pathClone), + l2c = function (x1, y1, x2, y2) { + return [x1, y1, x2, y2, x2, y2]; + }, + q2c = function (x1, y1, ax, ay, x2, y2) { + var _13 = 1 / 3, + _23 = 2 / 3; + return [ + _13 * x1 + _23 * ax, + _13 * y1 + _23 * ay, + _13 * x2 + _23 * ax, + _13 * y2 + _23 * ay, + x2, + y2 + ]; + }, + a2c = function (x1, y1, rx, ry, angle, large_arc_flag, sweep_flag, x2, y2, recursive) { + // for more information of where this math came from visit: + // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes + var PI = math.PI, + _120 = PI * 120 / 180, + rad = PI / 180 * (+angle || 0), + res = [], + xy, + rotate = cacher(function (x, y, rad) { + var X = x * math.cos(rad) - y * math.sin(rad), + Y = x * math.sin(rad) + y * math.cos(rad); + return {x: X, y: Y}; + }); + if (!recursive) { + xy = rotate(x1, y1, -rad); + x1 = xy.x; + y1 = xy.y; + xy = rotate(x2, y2, -rad); + x2 = xy.x; + y2 = xy.y; + var cos = math.cos(PI / 180 * angle), + sin = math.sin(PI / 180 * angle), + x = (x1 - x2) / 2, + y = (y1 - y2) / 2; + // rx = mmax(rx, math.abs(x)); + // ry = mmax(ry, math.abs(y)); + var h = (x * x) / (rx * rx) + (y * y) / (ry * ry); + if (h > 1) { + h = math.sqrt(h); + rx = h * rx; + ry = h * ry; + } + var rx2 = rx * rx, + ry2 = ry * ry, + k = (large_arc_flag == sweep_flag ? -1 : 1) * + math.sqrt(math.abs((rx2 * ry2 - rx2 * y * y - ry2 * x * x) / (rx2 * y * y + ry2 * x * x))), + cx = k * rx * y / ry + (x1 + x2) / 2, + cy = k * -ry * x / rx + (y1 + y2) / 2, + f1 = math.asin(((y1 - cy) / ry).toFixed(7)), + f2 = math.asin(((y2 - cy) / ry).toFixed(7)); + + f1 = x1 < cx ? PI - f1 : f1; + f2 = x2 < cx ? PI - f2 : f2; + f1 < 0 && (f1 = PI * 2 + f1); + f2 < 0 && (f2 = PI * 2 + f2); + if (sweep_flag && f1 > f2) { + f1 = f1 - PI * 2; + } + if (!sweep_flag && f2 > f1) { + f2 = f2 - PI * 2; + } + } else { + f1 = recursive[0]; + f2 = recursive[1]; + cx = recursive[2]; + cy = recursive[3]; + } + var df = f2 - f1; + if (math.abs(df) > _120) { + var f2old = f2, + x2old = x2, + y2old = y2; + f2 = f1 + _120 * (sweep_flag && f2 > f1 ? 1 : -1); + x2 = cx + rx * math.cos(f2); + y2 = cy + ry * math.sin(f2); + res = a2c(x2, y2, rx, ry, angle, 0, sweep_flag, x2old, y2old, [f2, f2old, cx, cy]); + } + df = f2 - f1; + var c1 = math.cos(f1), + s1 = math.sin(f1), + c2 = math.cos(f2), + s2 = math.sin(f2), + t = math.tan(df / 4), + hx = 4 / 3 * rx * t, + hy = 4 / 3 * ry * t, + m1 = [x1, y1], + m2 = [x1 + hx * s1, y1 - hy * c1], + m3 = [x2 + hx * s2, y2 - hy * c2], + m4 = [x2, y2]; + m2[0] = 2 * m1[0] - m2[0]; + m2[1] = 2 * m1[1] - m2[1]; + if (recursive) { + return [m2, m3, m4][concat](res); + } else { + res = [m2, m3, m4][concat](res)[join]()[split](","); + var newres = []; + for (var i = 0, ii = res[length]; i < ii; i++) { + newres[i] = i % 2 ? rotate(res[i - 1], res[i], rad).y : rotate(res[i], res[i + 1], rad).x; + } + // alert(newres); + return newres; + } + }, + findDotAtSegment = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) { + var t1 = 1 - t; + return { + x: pow(t1, 3) * p1x + pow(t1, 2) * 3 * t * c1x + t1 * 3 * t * t * c2x + pow(t, 3) * p2x, + y: pow(t1, 3) * p1y + pow(t1, 2) * 3 * t * c1y + t1 * 3 * t * t * c2y + pow(t, 3) * p2y + }; + }, + curveDim = cacher(function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y) { + var a = (c2x - 2 * c1x + p1x) - (p2x - 2 * c2x + c1x), + b = 2 * (c1x - p1x) - 2 * (c2x - c1x), + c = p1x - c1x, + t1 = (-b + math.sqrt(b * b - 4 * a * c)) / 2 / a, + t2 = (-b - math.sqrt(b * b - 4 * a * c)) / 2 / a, + y = [p1y, p2y], + x = [p1x, p2x], + dot; + math.abs(t1) > 1e12 && (t1 = .5); + math.abs(t2) > 1e12 && (t2 = .5); + if (t1 > 0 && t1 < 1) { + dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t1); + x[push](dot.x); + y[push](dot.y); + } + if (t2 > 0 && t2 < 1) { + dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t2); + x[push](dot.x); + y[push](dot.y); + } + a = (c2y - 2 * c1y + p1y) - (p2y - 2 * c2y + c1y); + b = 2 * (c1y - p1y) - 2 * (c2y - c1y); + c = p1y - c1y; + t1 = (-b + math.sqrt(b * b - 4 * a * c)) / 2 / a; + t2 = (-b - math.sqrt(b * b - 4 * a * c)) / 2 / a; + math.abs(t1) > 1e12 && (t1 = .5); + math.abs(t2) > 1e12 && (t2 = .5); + if (t1 > 0 && t1 < 1) { + dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t1); + x[push](dot.x); + y[push](dot.y); + } + if (t2 > 0 && t2 < 1) { + dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t2); + x[push](dot.x); + y[push](dot.y); + } + return { + min: {x: mmin[apply](0, x), y: mmin[apply](0, y)}, + max: {x: mmax[apply](0, x), y: mmax[apply](0, y)} + }; + }), + path2curve = cacher(function (path, path2) { + var p = pathToAbsolute(path), + p2 = path2 && pathToAbsolute(path2), + attrs = {x: 0, y: 0, bx: 0, by: 0, X: 0, Y: 0, qx: null, qy: null}, + attrs2 = {x: 0, y: 0, bx: 0, by: 0, X: 0, Y: 0, qx: null, qy: null}, + processPath = function (path, d) { + var nx, ny; + if (!path) { + return ["C", d.x, d.y, d.x, d.y, d.x, d.y]; + } + !(path[0] in {T:1, Q:1}) && (d.qx = d.qy = null); + switch (path[0]) { + case "M": + d.X = path[1]; + d.Y = path[2]; + break; + case "A": + path = ["C"][concat](a2c[apply](0, [d.x, d.y][concat](path.slice(1)))); + break; + case "S": + nx = d.x + (d.x - (d.bx || d.x)); + ny = d.y + (d.y - (d.by || d.y)); + path = ["C", nx, ny][concat](path.slice(1)); + break; + case "T": + d.qx = d.x + (d.x - (d.qx || d.x)); + d.qy = d.y + (d.y - (d.qy || d.y)); + path = ["C"][concat](q2c(d.x, d.y, d.qx, d.qy, path[1], path[2])); + break; + case "Q": + d.qx = path[1]; + d.qy = path[2]; + path = ["C"][concat](q2c(d.x, d.y, path[1], path[2], path[3], path[4])); + break; + case "L": + path = ["C"][concat](l2c(d.x, d.y, path[1], path[2])); + break; + case "H": + path = ["C"][concat](l2c(d.x, d.y, path[1], d.y)); + break; + case "V": + path = ["C"][concat](l2c(d.x, d.y, d.x, path[1])); + break; + case "Z": + path = ["C"][concat](l2c(d.x, d.y, d.X, d.Y)); + break; + } + return path; + }, + fixArc = function (pp, i) { + if (pp[i][length] > 7) { + pp[i].shift(); + var pi = pp[i]; + while (pi[length]) { + pp.splice(i++, 0, ["C"][concat](pi.splice(0, 6))); + } + pp.splice(i, 1); + ii = mmax(p[length], p2 && p2[length] || 0); + } + }, + fixM = function (path1, path2, a1, a2, i) { + if (path1 && path2 && path1[i][0] == "M" && path2[i][0] != "M") { + path2.splice(i, 0, ["M", a2.x, a2.y]); + a1.bx = 0; + a1.by = 0; + a1.x = path1[i][1]; + a1.y = path1[i][2]; + ii = mmax(p[length], p2 && p2[length] || 0); + } + }; + for (var i = 0, ii = mmax(p[length], p2 && p2[length] || 0); i < ii; i++) { + p[i] = processPath(p[i], attrs); + fixArc(p, i); + p2 && (p2[i] = processPath(p2[i], attrs2)); + p2 && fixArc(p2, i); + fixM(p, p2, attrs, attrs2, i); + fixM(p2, p, attrs2, attrs, i); + var seg = p[i], + seg2 = p2 && p2[i], + seglen = seg[length], + seg2len = p2 && seg2[length]; + attrs.x = seg[seglen - 2]; + attrs.y = seg[seglen - 1]; + attrs.bx = toFloat(seg[seglen - 4]) || attrs.x; + attrs.by = toFloat(seg[seglen - 3]) || attrs.y; + attrs2.bx = p2 && (toFloat(seg2[seg2len - 4]) || attrs2.x); + attrs2.by = p2 && (toFloat(seg2[seg2len - 3]) || attrs2.y); + attrs2.x = p2 && seg2[seg2len - 2]; + attrs2.y = p2 && seg2[seg2len - 1]; + } + return p2 ? [p, p2] : p; + }, null, pathClone), + parseDots = cacher(function (gradient) { + var dots = []; + for (var i = 0, ii = gradient[length]; i < ii; i++) { + var dot = {}, + par = gradient[i].match(/^([^:]*):?([\d\.]*)/); + dot.color = R.getRGB(par[1]); + if (dot.color.error) { + return null; + } + dot.color = dot.color.hex; + par[2] && (dot.offset = par[2] + "%"); + dots[push](dot); + } + for (i = 1, ii = dots[length] - 1; i < ii; i++) { + if (!dots[i].offset) { + var start = toFloat(dots[i - 1].offset || 0), + end = 0; + for (var j = i + 1; j < ii; j++) { + if (dots[j].offset) { + end = dots[j].offset; + break; + } + } + if (!end) { + end = 100; + j = ii; + } + end = toFloat(end); + var d = (end - start) / (j - i + 1); + for (; i < j; i++) { + start += d; + dots[i].offset = start + "%"; + } + } + } + return dots; + }), + getContainer = function (x, y, w, h) { + var container; + if (R.is(x, "string") || R.is(x, "object")) { + container = R.is(x, "string") ? doc.getElementById(x) : x; + if (container.tagName) { + if (y == null) { + return { + container: container, + width: container.style.pixelWidth || container.offsetWidth, + height: container.style.pixelHeight || container.offsetHeight + }; + } else { + return {container: container, width: y, height: w}; + } + } + } else if (R.is(x, nu) && h != null) { + return {container: 1, x: x, y: y, width: w, height: h}; + } + }, + plugins = function (con, add) { + var that = this; + for (var prop in add) { + if (add[has](prop) && !(prop in con)) { + switch (typeof add[prop]) { + case "function": + (function (f) { + con[prop] = con === that ? f : function () { return f[apply](that, arguments); }; + })(add[prop]); + break; + case "object": + con[prop] = con[prop] || {}; + plugins.call(this, con[prop], add[prop]); + break; + default: + con[prop] = add[prop]; + break; + } + } + } + }, + tear = function (el, paper) { + el == paper.top && (paper.top = el.prev); + el == paper.bottom && (paper.bottom = el.next); + el.next && (el.next.prev = el.prev); + el.prev && (el.prev.next = el.next); + }, + tofront = function (el, paper) { + if (paper.top === el) { + return; + } + tear(el, paper); + el.next = null; + el.prev = paper.top; + paper.top.next = el; + paper.top = el; + }, + toback = function (el, paper) { + if (paper.bottom === el) { + return; + } + tear(el, paper); + el.next = paper.bottom; + el.prev = null; + paper.bottom.prev = el; + paper.bottom = el; + }, + insertafter = function (el, el2, paper) { + tear(el, paper); + el2 == paper.top && (paper.top = el); + el2.next && (el2.next.prev = el); + el.next = el2.next; + el.prev = el2; + el2.next = el; + }, + insertbefore = function (el, el2, paper) { + tear(el, paper); + el2 == paper.bottom && (paper.bottom = el); + el2.prev && (el2.prev.next = el); + el.prev = el2.prev; + el2.prev = el; + el.next = el2; + }, + removed = function (methodname) { + return function () { + throw new Error("Rapha\xebl: you are calling to method \u201c" + methodname + "\u201d of removed object"); + }; + }, + radial_gradient = /^r(?:\(([^,]+?)\s*,\s*([^\)]+?)\))?/; + + // SVG + if (R.svg) { + Paper[proto].svgns = "http://www.w3.org/2000/svg"; + Paper[proto].xlink = "http://www.w3.org/1999/xlink"; + round = function (num) { + return +num + (~~num === num) * .5; + }; + var roundPath = function (path) { + for (var i = 0, ii = path[length]; i < ii; i++) { + if (lowerCase.call(path[i][0]) != "a") { + for (var j = 1, jj = path[i][length]; j < jj; j++) { + path[i][j] = round(path[i][j]); + } + } else { + path[i][6] = round(path[i][6]); + path[i][7] = round(path[i][7]); + } + } + return path; + }, + $ = function (el, attr) { + if (attr) { + for (var key in attr) { + if (attr[has](key)) { + el[setAttribute](key, attr[key] + E); + } + } + } else { + return doc.createElementNS(Paper[proto].svgns, el); + } + }; + R[toString] = function () { + return "Your browser supports SVG.\nYou are running Rapha\xebl " + this.version; + }; + var thePath = function (pathString, SVG) { + var el = $("path"); + SVG.canvas && SVG.canvas[appendChild](el); + var p = new Element(el, SVG); + p.type = "path"; + setFillAndStroke(p, {fill: "none", stroke: "#000", path: pathString}); + return p; + }; + var addGradientFill = function (o, gradient, SVG) { + var type = "linear", + fx = .5, fy = .5, + s = o.style; + gradient = (gradient + E)[rp](radial_gradient, function (all, _fx, _fy) { + type = "radial"; + if (_fx && _fy) { + fx = toFloat(_fx); + fy = toFloat(_fy); + var dir = ((fy > .5) * 2 - 1); + pow(fx - .5, 2) + pow(fy - .5, 2) > .25 && + (fy = math.sqrt(.25 - pow(fx - .5, 2)) * dir + .5) && + fy != .5 && + (fy = fy.toFixed(5) - 1e-5 * dir); + } + return E; + }); + gradient = gradient[split](/\s*\-\s*/); + if (type == "linear") { + var angle = gradient.shift(); + angle = -toFloat(angle); + if (isNaN(angle)) { + return null; + } + var vector = [0, 0, math.cos(angle * math.PI / 180), math.sin(angle * math.PI / 180)], + max = 1 / (mmax(math.abs(vector[2]), math.abs(vector[3])) || 1); + vector[2] *= max; + vector[3] *= max; + if (vector[2] < 0) { + vector[0] = -vector[2]; + vector[2] = 0; + } + if (vector[3] < 0) { + vector[1] = -vector[3]; + vector[3] = 0; + } + } + var dots = parseDots(gradient); + if (!dots) { + return null; + } + var id = o.getAttribute("fill"); + id = id.match(/^url\(#(.*)\)$/); + id && SVG.defs.removeChild(doc.getElementById(id[1])); + + var el = $(type + "Gradient"); + el.id = "r" + (R._id++)[toString](36); + $(el, type == "radial" ? {fx: fx, fy: fy} : {x1: vector[0], y1: vector[1], x2: vector[2], y2: vector[3]}); + SVG.defs[appendChild](el); + for (var i = 0, ii = dots[length]; i < ii; i++) { + var stop = $("stop"); + $(stop, { + offset: dots[i].offset ? dots[i].offset : !i ? "0%" : "100%", + "stop-color": dots[i].color || "#fff" + }); + el[appendChild](stop); + } + $(o, { + fill: "url(#" + el.id + ")", + opacity: 1, + "fill-opacity": 1 + }); + s.fill = E; + s.opacity = 1; + s.fillOpacity = 1; + return 1; + }; + var updatePosition = function (o) { + var bbox = o.getBBox(); + $(o.pattern, {patternTransform: R.format("translate({0},{1})", bbox.x, bbox.y)}); + }; + var setFillAndStroke = function (o, params) { + var dasharray = { + "": [0], + "none": [0], + "-": [3, 1], + ".": [1, 1], + "-.": [3, 1, 1, 1], + "-..": [3, 1, 1, 1, 1, 1], + ". ": [1, 3], + "- ": [4, 3], + "--": [8, 3], + "- .": [4, 3, 1, 3], + "--.": [8, 3, 1, 3], + "--..": [8, 3, 1, 3, 1, 3] + }, + node = o.node, + attrs = o.attrs, + rot = o.rotate(), + addDashes = function (o, value) { + value = dasharray[lowerCase.call(value)]; + if (value) { + var width = o.attrs["stroke-width"] || "1", + butt = {round: width, square: width, butt: 0}[o.attrs["stroke-linecap"] || params["stroke-linecap"]] || 0, + dashes = []; + var i = value[length]; + while (i--) { + dashes[i] = value[i] * width + ((i % 2) ? 1 : -1) * butt; + } + $(node, {"stroke-dasharray": dashes[join](",")}); + } + }; + params[has]("rotation") && (rot = params.rotation); + var rotxy = (rot + E)[split](separator); + if (!(rotxy.length - 1)) { + rotxy = null; + } else { + rotxy[1] = +rotxy[1]; + rotxy[2] = +rotxy[2]; + } + toFloat(rot) && o.rotate(0, true); + for (var att in params) { + if (params[has](att)) { + if (!availableAttrs[has](att)) { + continue; + } + var value = params[att]; + attrs[att] = value; + switch (att) { + case "blur": + o.blur(value); + break; + case "rotation": + o.rotate(value, true); + break; + // Hyperlink + case "href": + case "title": + case "target": + var pn = node.parentNode; + if (lowerCase.call(pn.tagName) != "a") { + var hl = $("a"); + pn.insertBefore(hl, node); + hl[appendChild](node); + pn = hl; + } + pn.setAttributeNS(o.paper.xlink, att, value); + break; + case "cursor": + node.style.cursor = value; + break; + case "clip-rect": + var rect = (value + E)[split](separator); + if (rect[length] == 4) { + o.clip && o.clip.parentNode.parentNode.removeChild(o.clip.parentNode); + var el = $("clipPath"), + rc = $("rect"); + el.id = "r" + (R._id++)[toString](36); + $(rc, { + x: rect[0], + y: rect[1], + width: rect[2], + height: rect[3] + }); + el[appendChild](rc); + o.paper.defs[appendChild](el); + $(node, {"clip-path": "url(#" + el.id + ")"}); + o.clip = rc; + } + if (!value) { + var clip = doc.getElementById(node.getAttribute("clip-path")[rp](/(^url\(#|\)$)/g, E)); + clip && clip.parentNode.removeChild(clip); + $(node, {"clip-path": E}); + delete o.clip; + } + break; + case "path": + if (o.type == "path") { + $(node, {d: value ? attrs.path = roundPath(pathToAbsolute(value)) : "M0,0"}); + } + break; + case "width": + node[setAttribute](att, value); + if (attrs.fx) { + att = "x"; + value = attrs.x; + } else { + break; + } + case "x": + if (attrs.fx) { + value = -attrs.x - (attrs.width || 0); + } + case "rx": + if (att == "rx" && o.type == "rect") { + break; + } + case "cx": + rotxy && (att == "x" || att == "cx") && (rotxy[1] += value - attrs[att]); + node[setAttribute](att, round(value)); + o.pattern && updatePosition(o); + break; + case "height": + node[setAttribute](att, value); + if (attrs.fy) { + att = "y"; + value = attrs.y; + } else { + break; + } + case "y": + if (attrs.fy) { + value = -attrs.y - (attrs.height || 0); + } + case "ry": + if (att == "ry" && o.type == "rect") { + break; + } + case "cy": + rotxy && (att == "y" || att == "cy") && (rotxy[2] += value - attrs[att]); + node[setAttribute](att, round(value)); + o.pattern && updatePosition(o); + break; + case "r": + if (o.type == "rect") { + $(node, {rx: value, ry: value}); + } else { + node[setAttribute](att, value); + } + break; + case "src": + if (o.type == "image") { + node.setAttributeNS(o.paper.xlink, "href", value); + } + break; + case "stroke-width": + node.style.strokeWidth = value; + // Need following line for Firefox + node[setAttribute](att, value); + if (attrs["stroke-dasharray"]) { + addDashes(o, attrs["stroke-dasharray"]); + } + break; + case "stroke-dasharray": + addDashes(o, value); + break; + case "translation": + var xy = (value + E)[split](separator); + xy[0] = +xy[0] || 0; + xy[1] = +xy[1] || 0; + if (rotxy) { + rotxy[1] += xy[0]; + rotxy[2] += xy[1]; + } + translate.call(o, xy[0], xy[1]); + break; + case "scale": + xy = (value + E)[split](separator); + o.scale(+xy[0] || 1, +xy[1] || +xy[0] || 1, isNaN(toFloat(xy[2])) ? null : +xy[2], isNaN(toFloat(xy[3])) ? null : +xy[3]); + break; + case "fill": + var isURL = (value + E).match(ISURL); + if (isURL) { + el = $("pattern"); + var ig = $("image"); + el.id = "r" + (R._id++)[toString](36); + $(el, {x: 0, y: 0, patternUnits: "userSpaceOnUse", height: 1, width: 1}); + $(ig, {x: 0, y: 0}); + ig.setAttributeNS(o.paper.xlink, "href", isURL[1]); + el[appendChild](ig); + + var img = doc.createElement("img"); + img.style.cssText = "position:absolute;left:-9999em;top-9999em"; + img.onload = function () { + $(el, {width: this.offsetWidth, height: this.offsetHeight}); + $(ig, {width: this.offsetWidth, height: this.offsetHeight}); + doc.body.removeChild(this); + o.paper.safari(); + }; + doc.body[appendChild](img); + img.src = isURL[1]; + o.paper.defs[appendChild](el); + node.style.fill = "url(#" + el.id + ")"; + $(node, {fill: "url(#" + el.id + ")"}); + o.pattern = el; + o.pattern && updatePosition(o); + break; + } + if (!R.getRGB(value).error) { + delete params.gradient; + delete attrs.gradient; + !R.is(attrs.opacity, "undefined") && + R.is(params.opacity, "undefined") && + $(node, {opacity: attrs.opacity}); + !R.is(attrs["fill-opacity"], "undefined") && + R.is(params["fill-opacity"], "undefined") && + $(node, {"fill-opacity": attrs["fill-opacity"]}); + } else if ((({circle: 1, ellipse: 1})[has](o.type) || (value + E).charAt() != "r") && addGradientFill(node, value, o.paper)) { + attrs.gradient = value; + attrs.fill = "none"; + break; + } + case "stroke": + node[setAttribute](att, R.getRGB(value).hex); + break; + case "gradient": + (({circle: 1, ellipse: 1})[has](o.type) || (value + E).charAt() != "r") && addGradientFill(node, value, o.paper); + break; + case "opacity": + case "fill-opacity": + if (attrs.gradient) { + var gradient = doc.getElementById(node.getAttribute("fill")[rp](/^url\(#|\)$/g, E)); + if (gradient) { + var stops = gradient.getElementsByTagName("stop"); + stops[stops[length] - 1][setAttribute]("stop-opacity", value); + } + break; + } + default: + att == "font-size" && (value = toInt(value, 10) + "px"); + var cssrule = att[rp](/(\-.)/g, function (w) { + return upperCase.call(w.substring(1)); + }); + node.style[cssrule] = value; + // Need following line for Firefox + node[setAttribute](att, value); + break; + } + } + } + + tuneText(o, params); + if (rotxy) { + o.rotate(rotxy.join(S)); + } else { + toFloat(rot) && o.rotate(rot, true); + } + }; + var leading = 1.2, + tuneText = function (el, params) { + if (el.type != "text" || !(params[has]("text") || params[has]("font") || params[has]("font-size") || params[has]("x") || params[has]("y"))) { + return; + } + var a = el.attrs, + node = el.node, + fontSize = node.firstChild ? toInt(doc.defaultView.getComputedStyle(node.firstChild, E).getPropertyValue("font-size"), 10) : 10; + + if (params[has]("text")) { + a.text = params.text; + while (node.firstChild) { + node.removeChild(node.firstChild); + } + var texts = (params.text + E)[split]("\n"); + for (var i = 0, ii = texts[length]; i < ii; i++) if (texts[i]) { + var tspan = $("tspan"); + i && $(tspan, {dy: fontSize * leading, x: a.x}); + tspan[appendChild](doc.createTextNode(texts[i])); + node[appendChild](tspan); + } + } else { + texts = node.getElementsByTagName("tspan"); + for (i = 0, ii = texts[length]; i < ii; i++) { + i && $(texts[i], {dy: fontSize * leading, x: a.x}); + } + } + $(node, {y: a.y}); + var bb = el.getBBox(), + dif = a.y - (bb.y + bb.height / 2); + dif && isFinite(dif) && $(node, {y: a.y + dif}); + }, + Element = function (node, svg) { + var X = 0, + Y = 0; + this[0] = node; + this.id = R._oid++; + this.node = node; + node.raphael = this; + this.paper = svg; + this.attrs = this.attrs || {}; + this.transformations = []; // rotate, translate, scale + this._ = { + tx: 0, + ty: 0, + rt: {deg: 0, cx: 0, cy: 0}, + sx: 1, + sy: 1 + }; + !svg.bottom && (svg.bottom = this); + this.prev = svg.top; + svg.top && (svg.top.next = this); + svg.top = this; + this.next = null; + }; + Element[proto].rotate = function (deg, cx, cy) { + if (this.removed) { + return this; + } + if (deg == null) { + if (this._.rt.cx) { + return [this._.rt.deg, this._.rt.cx, this._.rt.cy][join](S); + } + return this._.rt.deg; + } + var bbox = this.getBBox(); + deg = (deg + E)[split](separator); + if (deg[length] - 1) { + cx = toFloat(deg[1]); + cy = toFloat(deg[2]); + } + deg = toFloat(deg[0]); + if (cx != null) { + this._.rt.deg = deg; + } else { + this._.rt.deg += deg; + } + (cy == null) && (cx = null); + this._.rt.cx = cx; + this._.rt.cy = cy; + cx = cx == null ? bbox.x + bbox.width / 2 : cx; + cy = cy == null ? bbox.y + bbox.height / 2 : cy; + if (this._.rt.deg) { + this.transformations[0] = R.format("rotate({0} {1} {2})", this._.rt.deg, cx, cy); + this.clip && $(this.clip, {transform: R.format("rotate({0} {1} {2})", -this._.rt.deg, cx, cy)}); + } else { + this.transformations[0] = E; + this.clip && $(this.clip, {transform: E}); + } + $(this.node, {transform: this.transformations[join](S)}); + return this; + }; + Element[proto].hide = function () { + !this.removed && (this.node.style.display = "none"); + return this; + }; + Element[proto].show = function () { + !this.removed && (this.node.style.display = ""); + return this; + }; + Element[proto].remove = function () { + if (this.removed) { + return; + } + tear(this, this.paper); + this.node.parentNode.removeChild(this.node); + for (var i in this) { + delete this[i]; + } + this.removed = true; + }; + Element[proto].getBBox = function () { + if (this.removed) { + return this; + } + if (this.type == "path") { + return pathDimensions(this.attrs.path); + } + if (this.node.style.display == "none") { + this.show(); + var hide = true; + } + var bbox = {}; + try { + bbox = this.node.getBBox(); + } catch(e) { + // Firefox 3.0.x plays badly here + } finally { + bbox = bbox || {}; + } + if (this.type == "text") { + bbox = {x: bbox.x, y: Infinity, width: 0, height: 0}; + for (var i = 0, ii = this.node.getNumberOfChars(); i < ii; i++) { + var bb = this.node.getExtentOfChar(i); + (bb.y < bbox.y) && (bbox.y = bb.y); + (bb.y + bb.height - bbox.y > bbox.height) && (bbox.height = bb.y + bb.height - bbox.y); + (bb.x + bb.width - bbox.x > bbox.width) && (bbox.width = bb.x + bb.width - bbox.x); + } + } + hide && this.hide(); + return bbox; + }; + Element[proto].attr = function (name, value) { + if (this.removed) { + return this; + } + if (name == null) { + var res = {}; + for (var i in this.attrs) if (this.attrs[has](i)) { + res[i] = this.attrs[i]; + } + this._.rt.deg && (res.rotation = this.rotate()); + (this._.sx != 1 || this._.sy != 1) && (res.scale = this.scale()); + res.gradient && res.fill == "none" && (res.fill = res.gradient) && delete res.gradient; + return res; + } + if (value == null && R.is(name, "string")) { + if (name == "translation") { + return translate.call(this); + } + if (name == "rotation") { + return this.rotate(); + } + if (name == "scale") { + return this.scale(); + } + if (name == "fill" && this.attrs.fill == "none" && this.attrs.gradient) { + return this.attrs.gradient; + } + return this.attrs[name]; + } + if (value == null && R.is(name, "array")) { + var values = {}; + for (var j = 0, jj = name.length; j < jj; j++) { + values[name[j]] = this.attr(name[j]); + } + return values; + } + if (value != null) { + var params = {}; + params[name] = value; + setFillAndStroke(this, params); + } else if (name != null && R.is(name, "object")) { + setFillAndStroke(this, name); + } + return this; + }; + Element[proto].toFront = function () { + if (this.removed) { + return this; + } + this.node.parentNode[appendChild](this.node); + var svg = this.paper; + svg.top != this && tofront(this, svg); + return this; + }; + Element[proto].toBack = function () { + if (this.removed) { + return this; + } + if (this.node.parentNode.firstChild != this.node) { + this.node.parentNode.insertBefore(this.node, this.node.parentNode.firstChild); + toback(this, this.paper); + var svg = this.paper; + } + return this; + }; + Element[proto].insertAfter = function (element) { + if (this.removed) { + return this; + } + var node = element.node; + if (node.nextSibling) { + node.parentNode.insertBefore(this.node, node.nextSibling); + } else { + node.parentNode[appendChild](this.node); + } + insertafter(this, element, this.paper); + return this; + }; + Element[proto].insertBefore = function (element) { + if (this.removed) { + return this; + } + var node = element.node; + node.parentNode.insertBefore(this.node, node); + insertbefore(this, element, this.paper); + return this; + }; + Element[proto].blur = function (size) { + // Experimental. No Safari support. Use it on your own risk. + var t = this; + if (+size !== 0) { + var fltr = $("filter"), + blur = $("feGaussianBlur"); + t.attrs.blur = size; + fltr.id = "r" + (R._id++)[toString](36); + $(blur, {stdDeviation: +size || 1.5}); + fltr.appendChild(blur); + t.paper.defs.appendChild(fltr); + t._blur = fltr; + $(t.node, {filter: "url(#" + fltr.id + ")"}); + } else { + if (t._blur) { + t._blur.parentNode.removeChild(t._blur); + delete t._blur; + delete t.attrs.blur; + } + t.node.removeAttribute("filter"); + } + }; + var theCircle = function (svg, x, y, r) { + x = round(x); + y = round(y); + var el = $("circle"); + svg.canvas && svg.canvas[appendChild](el); + var res = new Element(el, svg); + res.attrs = {cx: x, cy: y, r: r, fill: "none", stroke: "#000"}; + res.type = "circle"; + $(el, res.attrs); + return res; + }; + var theRect = function (svg, x, y, w, h, r) { + x = round(x); + y = round(y); + var el = $("rect"); + svg.canvas && svg.canvas[appendChild](el); + var res = new Element(el, svg); + res.attrs = {x: x, y: y, width: w, height: h, r: r || 0, rx: r || 0, ry: r || 0, fill: "none", stroke: "#000"}; + res.type = "rect"; + $(el, res.attrs); + return res; + }; + var theEllipse = function (svg, x, y, rx, ry) { + x = round(x); + y = round(y); + var el = $("ellipse"); + svg.canvas && svg.canvas[appendChild](el); + var res = new Element(el, svg); + res.attrs = {cx: x, cy: y, rx: rx, ry: ry, fill: "none", stroke: "#000"}; + res.type = "ellipse"; + $(el, res.attrs); + return res; + }; + var theImage = function (svg, src, x, y, w, h) { + var el = $("image"); + $(el, {x: x, y: y, width: w, height: h, preserveAspectRatio: "none"}); + el.setAttributeNS(svg.xlink, "href", src); + svg.canvas && svg.canvas[appendChild](el); + var res = new Element(el, svg); + res.attrs = {x: x, y: y, width: w, height: h, src: src}; + res.type = "image"; + return res; + }; + var theText = function (svg, x, y, text) { + var el = $("text"); + $(el, {x: x, y: y, "text-anchor": "middle"}); + svg.canvas && svg.canvas[appendChild](el); + var res = new Element(el, svg); + res.attrs = {x: x, y: y, "text-anchor": "middle", text: text, font: availableAttrs.font, stroke: "none", fill: "#000"}; + res.type = "text"; + setFillAndStroke(res, res.attrs); + return res; + }; + var setSize = function (width, height) { + this.width = width || this.width; + this.height = height || this.height; + this.canvas[setAttribute]("width", this.width); + this.canvas[setAttribute]("height", this.height); + return this; + }; + var create = function () { + var con = getContainer[apply](0, arguments), + container = con && con.container, + x = con.x, + y = con.y, + width = con.width, + height = con.height; + if (!container) { + throw new Error("SVG container not found."); + } + var cnvs = $("svg"); + width = width || 512; + height = height || 342; + $(cnvs, { + xmlns: "http://www.w3.org/2000/svg", + version: 1.1, + width: width, + height: height + }); + if (container == 1) { + cnvs.style.cssText = "position:absolute;left:" + x + "px;top:" + y + "px"; + doc.body[appendChild](cnvs); + } else { + if (container.firstChild) { + container.insertBefore(cnvs, container.firstChild); + } else { + container[appendChild](cnvs); + } + } + container = new Paper; + container.width = width; + container.height = height; + container.canvas = cnvs; + plugins.call(container, container, R.fn); + container.clear(); + return container; + }; + Paper[proto].clear = function () { + var c = this.canvas; + while (c.firstChild) { + c.removeChild(c.firstChild); + } + this.bottom = this.top = null; + (this.desc = $("desc"))[appendChild](doc.createTextNode("Created with Rapha\xebl")); + c[appendChild](this.desc); + c[appendChild](this.defs = $("defs")); + }; + Paper[proto].remove = function () { + this.canvas.parentNode && this.canvas.parentNode.removeChild(this.canvas); + for (var i in this) { + this[i] = removed(i); + } + }; + } + + // VML + if (R.vml) { + var map = {M: "m", L: "l", C: "c", Z: "x", m: "t", l: "r", c: "v", z: "x"}, + bites = /([clmz]),?([^clmz]*)/gi, + val = /-?[^,\s-]+/g, + coordsize = 1e3 + S + 1e3, + zoom = 10, + path2vml = function (path) { + var total = /[ahqstv]/ig, + command = pathToAbsolute; + (path + E).match(total) && (command = path2curve); + total = /[clmz]/g; + if (command == pathToAbsolute && !(path + E).match(total)) { + var res = (path + E)[rp](bites, function (all, command, args) { + var vals = [], + isMove = lowerCase.call(command) == "m", + res = map[command]; + args[rp](val, function (value) { + if (isMove && vals[length] == 2) { + res += vals + map[command == "m" ? "l" : "L"]; + vals = []; + } + vals[push](round(value * zoom)); + }); + return res + vals; + }); + return res; + } + var pa = command(path), p, r; + res = []; + for (var i = 0, ii = pa[length]; i < ii; i++) { + p = pa[i]; + r = lowerCase.call(pa[i][0]); + r == "z" && (r = "x"); + for (var j = 1, jj = p[length]; j < jj; j++) { + r += round(p[j] * zoom) + (j != jj - 1 ? "," : E); + } + res[push](r); + } + return res[join](S); + }; + + R[toString] = function () { + return "Your browser doesn\u2019t support SVG. Falling down to VML.\nYou are running Rapha\xebl " + this.version; + }; + thePath = function (pathString, vml) { + var g = createNode("group"); + g.style.cssText = "position:absolute;left:0;top:0;width:" + vml.width + "px;height:" + vml.height + "px"; + g.coordsize = vml.coordsize; + g.coordorigin = vml.coordorigin; + var el = createNode("shape"), ol = el.style; + ol.width = vml.width + "px"; + ol.height = vml.height + "px"; + el.coordsize = coordsize; + el.coordorigin = vml.coordorigin; + g[appendChild](el); + var p = new Element(el, g, vml), + attr = {fill: "none", stroke: "#000"}; + pathString && (attr.path = pathString); + p.isAbsolute = true; + p.type = "path"; + p.path = []; + p.Path = E; + setFillAndStroke(p, attr); + vml.canvas[appendChild](g); + return p; + }; + setFillAndStroke = function (o, params) { + o.attrs = o.attrs || {}; + var node = o.node, + a = o.attrs, + s = node.style, + xy, + res = o; + for (var par in params) if (params[has](par)) { + a[par] = params[par]; + } + params.href && (node.href = params.href); + params.title && (node.title = params.title); + params.target && (node.target = params.target); + params.cursor && (s.cursor = params.cursor); + "blur" in params && o.blur(params.blur); + if (params.path && o.type == "path") { + a.path = params.path; + node.path = path2vml(a.path); + } + if (params.rotation != null) { + o.rotate(params.rotation, true); + } + if (params.translation) { + xy = (params.translation + E)[split](separator); + translate.call(o, xy[0], xy[1]); + if (o._.rt.cx != null) { + o._.rt.cx +=+ xy[0]; + o._.rt.cy +=+ xy[1]; + o.setBox(o.attrs, xy[0], xy[1]); + } + } + if (params.scale) { + xy = (params.scale + E)[split](separator); + o.scale(+xy[0] || 1, +xy[1] || +xy[0] || 1, +xy[2] || null, +xy[3] || null); + } + if ("clip-rect" in params) { + var rect = (params["clip-rect"] + E)[split](separator); + if (rect[length] == 4) { + rect[2] = +rect[2] + (+rect[0]); + rect[3] = +rect[3] + (+rect[1]); + var div = node.clipRect || doc.createElement("div"), + dstyle = div.style, + group = node.parentNode; + dstyle.clip = R.format("rect({1}px {2}px {3}px {0}px)", rect); + if (!node.clipRect) { + dstyle.position = "absolute"; + dstyle.top = 0; + dstyle.left = 0; + dstyle.width = o.paper.width + "px"; + dstyle.height = o.paper.height + "px"; + group.parentNode.insertBefore(div, group); + div[appendChild](group); + node.clipRect = div; + } + } + if (!params["clip-rect"]) { + node.clipRect && (node.clipRect.style.clip = E); + } + } + if (o.type == "image" && params.src) { + node.src = params.src; + } + if (o.type == "image" && params.opacity) { + node.filterOpacity = " progid:DXImageTransform.Microsoft.Alpha(opacity=" + (params.opacity * 100) + ")"; + s.filter = (node.filterMatrix || E) + (node.filterOpacity || E); + } + params.font && (s.font = params.font); + params["font-family"] && (s.fontFamily = '"' + params["font-family"][split](",")[0][rp](/^['"]+|['"]+$/g, E) + '"'); //' + params["font-size"] && (s.fontSize = params["font-size"]); + params["font-weight"] && (s.fontWeight = params["font-weight"]); + params["font-style"] && (s.fontStyle = params["font-style"]); + if (params.opacity != null || + params["stroke-width"] != null || + params.fill != null || + params.stroke != null || + params["stroke-width"] != null || + params["stroke-opacity"] != null || + params["fill-opacity"] != null || + params["stroke-dasharray"] != null || + params["stroke-miterlimit"] != null || + params["stroke-linejoin"] != null || + params["stroke-linecap"] != null) { + node = o.shape || node; + var fill = (node.getElementsByTagName("fill") && node.getElementsByTagName("fill")[0]), + newfill = false; + !fill && (newfill = fill = createNode("fill")); + if ("fill-opacity" in params || "opacity" in params) { + var opacity = ((+a["fill-opacity"] + 1 || 2) - 1) * ((+a.opacity + 1 || 2) - 1); + opacity < 0 && (opacity = 0); + opacity > 1 && (opacity = 1); + fill.opacity = opacity; + } + params.fill && (fill.on = true); + if (fill.on == null || params.fill == "none") { + fill.on = false; + } + if (fill.on && params.fill) { + var isURL = params.fill.match(ISURL); + if (isURL) { + fill.src = isURL[1]; + fill.type = "tile"; + } else { + fill.color = R.getRGB(params.fill).hex; + fill.src = E; + fill.type = "solid"; + if (R.getRGB(params.fill).error && (res.type in {circle: 1, ellipse: 1} || (params.fill + E).charAt() != "r") && addGradientFill(res, params.fill)) { + a.fill = "none"; + a.gradient = params.fill; + } + } + } + newfill && node[appendChild](fill); + var stroke = (node.getElementsByTagName("stroke") && node.getElementsByTagName("stroke")[0]), + newstroke = false; + !stroke && (newstroke = stroke = createNode("stroke")); + if ((params.stroke && params.stroke != "none") || + params["stroke-width"] || + params["stroke-opacity"] != null || + params["stroke-dasharray"] || + params["stroke-miterlimit"] || + params["stroke-linejoin"] || + params["stroke-linecap"]) { + stroke.on = true; + } + (params.stroke == "none" || stroke.on == null || params.stroke == 0 || params["stroke-width"] == 0) && (stroke.on = false); + stroke.on && params.stroke && (stroke.color = R.getRGB(params.stroke).hex); + opacity = ((+a["stroke-opacity"] + 1 || 2) - 1) * ((+a.opacity + 1 || 2) - 1); + var width = (toFloat(params["stroke-width"]) || 1) * .75; + opacity < 0 && (opacity = 0); + opacity > 1 && (opacity = 1); + params["stroke-width"] == null && (width = a["stroke-width"]); + params["stroke-width"] && (stroke.weight = width); + width && width < 1 && (opacity *= width) && (stroke.weight = 1); + stroke.opacity = opacity; + + params["stroke-linejoin"] && (stroke.joinstyle = params["stroke-linejoin"] || "miter"); + stroke.miterlimit = params["stroke-miterlimit"] || 8; + params["stroke-linecap"] && (stroke.endcap = params["stroke-linecap"] == "butt" ? "flat" : params["stroke-linecap"] == "square" ? "square" : "round"); + if (params["stroke-dasharray"]) { + var dasharray = { + "-": "shortdash", + ".": "shortdot", + "-.": "shortdashdot", + "-..": "shortdashdotdot", + ". ": "dot", + "- ": "dash", + "--": "longdash", + "- .": "dashdot", + "--.": "longdashdot", + "--..": "longdashdotdot" + }; + stroke.dashstyle = dasharray[has](params["stroke-dasharray"]) ? dasharray[params["stroke-dasharray"]] : E; + } + newstroke && node[appendChild](stroke); + } + if (res.type == "text") { + s = res.paper.span.style; + a.font && (s.font = a.font); + a["font-family"] && (s.fontFamily = a["font-family"]); + a["font-size"] && (s.fontSize = a["font-size"]); + a["font-weight"] && (s.fontWeight = a["font-weight"]); + a["font-style"] && (s.fontStyle = a["font-style"]); + res.node.string && (res.paper.span.innerHTML = (res.node.string + E)[rp](/")); + res.W = a.w = res.paper.span.offsetWidth; + res.H = a.h = res.paper.span.offsetHeight; + res.X = a.x; + res.Y = a.y + round(res.H / 2); + + // text-anchor emulationm + switch (a["text-anchor"]) { + case "start": + res.node.style["v-text-align"] = "left"; + res.bbx = round(res.W / 2); + break; + case "end": + res.node.style["v-text-align"] = "right"; + res.bbx = -round(res.W / 2); + break; + default: + res.node.style["v-text-align"] = "center"; + break; + } + } + }; + addGradientFill = function (o, gradient) { + o.attrs = o.attrs || {}; + var attrs = o.attrs, + fill = o.node.getElementsByTagName("fill"), + type = "linear", + fxfy = ".5 .5"; + o.attrs.gradient = gradient; + gradient = (gradient + E)[rp](radial_gradient, function (all, fx, fy) { + type = "radial"; + if (fx && fy) { + fx = toFloat(fx); + fy = toFloat(fy); + pow(fx - .5, 2) + pow(fy - .5, 2) > .25 && (fy = math.sqrt(.25 - pow(fx - .5, 2)) * ((fy > .5) * 2 - 1) + .5); + fxfy = fx + S + fy; + } + return E; + }); + gradient = gradient[split](/\s*\-\s*/); + if (type == "linear") { + var angle = gradient.shift(); + angle = -toFloat(angle); + if (isNaN(angle)) { + return null; + } + } + var dots = parseDots(gradient); + if (!dots) { + return null; + } + o = o.shape || o.node; + fill = fill[0] || createNode("fill"); + if (dots[length]) { + fill.on = true; + fill.method = "none"; + fill.type = (type == "radial") ? "gradientradial" : "gradient"; + fill.color = dots[0].color; + fill.color2 = dots[dots[length] - 1].color; + var clrs = []; + for (var i = 0, ii = dots[length]; i < ii; i++) { + dots[i].offset && clrs[push](dots[i].offset + S + dots[i].color); + } + fill.colors && (fill.colors.value = clrs[length] ? clrs[join](",") : "0% " + fill.color); + if (type == "radial") { + fill.focus = "100%"; + fill.focussize = fxfy; + fill.focusposition = fxfy; + } else { + fill.angle = (270 - angle) % 360; + } + } + return 1; + }; + Element = function (node, group, vml) { + var Rotation = 0, + RotX = 0, + RotY = 0, + Scale = 1; + this[0] = node; + this.id = R._oid++; + this.node = node; + node.raphael = this; + this.X = 0; + this.Y = 0; + this.attrs = {}; + this.Group = group; + this.paper = vml; + this._ = { + tx: 0, + ty: 0, + rt: {deg:0}, + sx: 1, + sy: 1 + }; + !vml.bottom && (vml.bottom = this); + this.prev = vml.top; + vml.top && (vml.top.next = this); + vml.top = this; + this.next = null; + }; + Element[proto].rotate = function (deg, cx, cy) { + if (this.removed) { + return this; + } + if (deg == null) { + if (this._.rt.cx) { + return [this._.rt.deg, this._.rt.cx, this._.rt.cy][join](S); + } + return this._.rt.deg; + } + deg = (deg + E)[split](separator); + if (deg[length] - 1) { + cx = toFloat(deg[1]); + cy = toFloat(deg[2]); + } + deg = toFloat(deg[0]); + if (cx != null) { + this._.rt.deg = deg; + } else { + this._.rt.deg += deg; + } + cy == null && (cx = null); + this._.rt.cx = cx; + this._.rt.cy = cy; + this.setBox(this.attrs, cx, cy); + this.Group.style.rotation = this._.rt.deg; + // gradient fix for rotation. TODO + // var fill = (this.shape || this.node).getElementsByTagName("fill"); + // fill = fill[0] || {}; + // var b = ((360 - this._.rt.deg) - 270) % 360; + // !R.is(fill.angle, "undefined") && (fill.angle = b); + return this; + }; + Element[proto].setBox = function (params, cx, cy) { + if (this.removed) { + return this; + } + var gs = this.Group.style, + os = (this.shape && this.shape.style) || this.node.style; + params = params || {}; + for (var i in params) if (params[has](i)) { + this.attrs[i] = params[i]; + } + cx = cx || this._.rt.cx; + cy = cy || this._.rt.cy; + var attr = this.attrs, + x, + y, + w, + h; + switch (this.type) { + case "circle": + x = attr.cx - attr.r; + y = attr.cy - attr.r; + w = h = attr.r * 2; + break; + case "ellipse": + x = attr.cx - attr.rx; + y = attr.cy - attr.ry; + w = attr.rx * 2; + h = attr.ry * 2; + break; + case "rect": + case "image": + x = +attr.x; + y = +attr.y; + w = attr.width || 0; + h = attr.height || 0; + break; + case "text": + this.textpath.v = ["m", round(attr.x), ", ", round(attr.y - 2), "l", round(attr.x) + 1, ", ", round(attr.y - 2)][join](E); + x = attr.x - round(this.W / 2); + y = attr.y - this.H / 2; + w = this.W; + h = this.H; + break; + case "path": + if (!this.attrs.path) { + x = 0; + y = 0; + w = this.paper.width; + h = this.paper.height; + } else { + var dim = pathDimensions(this.attrs.path); + x = dim.x; + y = dim.y; + w = dim.width; + h = dim.height; + } + break; + default: + x = 0; + y = 0; + w = this.paper.width; + h = this.paper.height; + break; + } + cx = (cx == null) ? x + w / 2 : cx; + cy = (cy == null) ? y + h / 2 : cy; + var left = cx - this.paper.width / 2, + top = cy - this.paper.height / 2, t; + gs.left != (t = left + "px") && (gs.left = t); + gs.top != (t = top + "px") && (gs.top = t); + this.X = this.type == "path" ? -left : x; + this.Y = this.type == "path" ? -top : y; + this.W = w; + this.H = h; + if (this.type == "path") { + os.left != (t = -left * zoom + "px") && (os.left = t); + os.top != (t = -top * zoom + "px") && (os.top = t); + } else if (this.type == "text") { + os.left != (t = -left + "px") && (os.left = t); + os.top != (t = -top + "px") && (os.top = t); + } else { + gs.width != (t = this.paper.width + "px") && (gs.width = t); + gs.height != (t = this.paper.height + "px") && (gs.height = t); + os.left != (t = x - left + "px") && (os.left = t); + os.top != (t = y - top + "px") && (os.top = t); + os.width != (t = w + "px") && (os.width = t); + os.height != (t = h + "px") && (os.height = t); + var arcsize = (+params.r || 0) / mmin(w, h); + if (this.type == "rect" && this.arcsize.toFixed(4) != arcsize.toFixed(4) && (arcsize || this.arcsize)) { + // We should replace element with the new one + var o = createNode("roundrect"), + a = {}, + ii = this.events && this.events[length]; + i = 0; + o.arcsize = arcsize; + o.raphael = this; + this.Group[appendChild](o); + this.Group.removeChild(this.node); + this[0] = this.node = o; + this.arcsize = arcsize; + for (i in attr) { + a[i] = attr[i]; + } + delete a.scale; + this.attr(a); + if (this.events) for (; i < ii; i++) { + this.events[i].unbind = addEvent(this.node, this.events[i].name, this.events[i].f, this); + } + } + } + }; + Element[proto].hide = function () { + !this.removed && (this.Group.style.display = "none"); + return this; + }; + Element[proto].show = function () { + !this.removed && (this.Group.style.display = "block"); + return this; + }; + Element[proto].getBBox = function () { + if (this.removed) { + return this; + } + if (this.type == "path") { + return pathDimensions(this.attrs.path); + } + return { + x: this.X + (this.bbx || 0), + y: this.Y, + width: this.W, + height: this.H + }; + }; + Element[proto].remove = function () { + if (this.removed) { + return; + } + tear(this, this.paper); + this.node.parentNode.removeChild(this.node); + this.Group.parentNode.removeChild(this.Group); + this.shape && this.shape.parentNode.removeChild(this.shape); + for (var i in this) { + delete this[i]; + } + this.removed = true; + }; + Element[proto].attr = function (name, value) { + if (this.removed) { + return this; + } + if (name == null) { + var res = {}; + for (var i in this.attrs) if (this.attrs[has](i)) { + res[i] = this.attrs[i]; + } + this._.rt.deg && (res.rotation = this.rotate()); + (this._.sx != 1 || this._.sy != 1) && (res.scale = this.scale()); + res.gradient && res.fill == "none" && (res.fill = res.gradient) && delete res.gradient; + return res; + } + if (value == null && R.is(name, "string")) { + if (name == "translation") { + return translate.call(this); + } + if (name == "rotation") { + return this.rotate(); + } + if (name == "scale") { + return this.scale(); + } + if (name == "fill" && this.attrs.fill == "none" && this.attrs.gradient) { + return this.attrs.gradient; + } + return this.attrs[name]; + } + if (this.attrs && value == null && R.is(name, "array")) { + var ii, values = {}; + for (i = 0, ii = name[length]; i < ii; i++) { + values[name[i]] = this.attr(name[i]); + } + return values; + } + var params; + if (value != null) { + params = {}; + params[name] = value; + } + value == null && R.is(name, "object") && (params = name); + if (params) { + if (params.text && this.type == "text") { + this.node.string = params.text; + } + setFillAndStroke(this, params); + if (params.gradient && (({circle: 1, ellipse: 1})[has](this.type) || (params.gradient + E).charAt() != "r")) { + addGradientFill(this, params.gradient); + } + (this.type != "path" || this._.rt.deg) && this.setBox(this.attrs); + } + return this; + }; + Element[proto].toFront = function () { + !this.removed && this.Group.parentNode[appendChild](this.Group); + this.paper.top != this && tofront(this, this.paper); + return this; + }; + Element[proto].toBack = function () { + if (this.removed) { + return this; + } + if (this.Group.parentNode.firstChild != this.Group) { + this.Group.parentNode.insertBefore(this.Group, this.Group.parentNode.firstChild); + toback(this, this.paper); + } + return this; + }; + Element[proto].insertAfter = function (element) { + if (this.removed) { + return this; + } + if (element.Group.nextSibling) { + element.Group.parentNode.insertBefore(this.Group, element.Group.nextSibling); + } else { + element.Group.parentNode[appendChild](this.Group); + } + insertafter(this, element, this.paper); + return this; + }; + Element[proto].insertBefore = function (element) { + if (this.removed) { + return this; + } + element.Group.parentNode.insertBefore(this.Group, element.Group); + insertbefore(this, element, this.paper); + return this; + }; + var blurregexp = / progid:\S+Blur\([^\)]+\)/g; + Element[proto].blur = function (size) { + var s = this.node.style, + f = s.filter; + f = f.replace(blurregexp, ""); + if (+size !== 0) { + this.attrs.blur = size; + s.filter = f + " progid:DXImageTransform.Microsoft.Blur(pixelradius=" + (+size || 1.5) + ")"; + s.margin = Raphael.format("-{0}px 0 0 -{0}px", Math.round(+size || 1.5)); + } else { + s.filter = f; + s.margin = 0; + delete this.attrs.blur; + } + }; + + theCircle = function (vml, x, y, r) { + var g = createNode("group"), + o = createNode("oval"), + ol = o.style; + g.style.cssText = "position:absolute;left:0;top:0;width:" + vml.width + "px;height:" + vml.height + "px"; + g.coordsize = coordsize; + g.coordorigin = vml.coordorigin; + g[appendChild](o); + var res = new Element(o, g, vml); + res.type = "circle"; + setFillAndStroke(res, {stroke: "#000", fill: "none"}); + res.attrs.cx = x; + res.attrs.cy = y; + res.attrs.r = r; + res.setBox({x: x - r, y: y - r, width: r * 2, height: r * 2}); + vml.canvas[appendChild](g); + return res; + }; + theRect = function (vml, x, y, w, h, r) { + var g = createNode("group"), + o = createNode("roundrect"), + arcsize = (+r || 0) / (mmin(w, h)); + g.style.cssText = "position:absolute;left:0;top:0;width:" + vml.width + "px;height:" + vml.height + "px"; + g.coordsize = coordsize; + g.coordorigin = vml.coordorigin; + g[appendChild](o); + o.arcsize = arcsize; + var res = new Element(o, g, vml); + res.type = "rect"; + setFillAndStroke(res, {stroke: "#000"}); + res.arcsize = arcsize; + res.setBox({x: x, y: y, width: w, height: h, r: r}); + vml.canvas[appendChild](g); + return res; + }; + theEllipse = function (vml, x, y, rx, ry) { + var g = createNode("group"), + o = createNode("oval"), + ol = o.style; + g.style.cssText = "position:absolute;left:0;top:0;width:" + vml.width + "px;height:" + vml.height + "px"; + g.coordsize = coordsize; + g.coordorigin = vml.coordorigin; + g[appendChild](o); + var res = new Element(o, g, vml); + res.type = "ellipse"; + setFillAndStroke(res, {stroke: "#000"}); + res.attrs.cx = x; + res.attrs.cy = y; + res.attrs.rx = rx; + res.attrs.ry = ry; + res.setBox({x: x - rx, y: y - ry, width: rx * 2, height: ry * 2}); + vml.canvas[appendChild](g); + return res; + }; + theImage = function (vml, src, x, y, w, h) { + var g = createNode("group"), + o = createNode("image"), + ol = o.style; + g.style.cssText = "position:absolute;left:0;top:0;width:" + vml.width + "px;height:" + vml.height + "px"; + g.coordsize = coordsize; + g.coordorigin = vml.coordorigin; + o.src = src; + g[appendChild](o); + var res = new Element(o, g, vml); + res.type = "image"; + res.attrs.src = src; + res.attrs.x = x; + res.attrs.y = y; + res.attrs.w = w; + res.attrs.h = h; + res.setBox({x: x, y: y, width: w, height: h}); + vml.canvas[appendChild](g); + return res; + }; + theText = function (vml, x, y, text) { + var g = createNode("group"), + el = createNode("shape"), + ol = el.style, + path = createNode("path"), + ps = path.style, + o = createNode("textpath"); + g.style.cssText = "position:absolute;left:0;top:0;width:" + vml.width + "px;height:" + vml.height + "px"; + g.coordsize = coordsize; + g.coordorigin = vml.coordorigin; + path.v = R.format("m{0},{1}l{2},{1}", round(x * 10), round(y * 10), round(x * 10) + 1); + path.textpathok = true; + ol.width = vml.width; + ol.height = vml.height; + o.string = text + E; + o.on = true; + el[appendChild](o); + el[appendChild](path); + g[appendChild](el); + var res = new Element(o, g, vml); + res.shape = el; + res.textpath = path; + res.type = "text"; + res.attrs.text = text; + res.attrs.x = x; + res.attrs.y = y; + res.attrs.w = 1; + res.attrs.h = 1; + setFillAndStroke(res, {font: availableAttrs.font, stroke: "none", fill: "#000"}); + res.setBox(); + vml.canvas[appendChild](g); + return res; + }; + setSize = function (width, height) { + var cs = this.canvas.style; + width == +width && (width += "px"); + height == +height && (height += "px"); + cs.width = width; + cs.height = height; + cs.clip = "rect(0 " + width + " " + height + " 0)"; + return this; + }; + var createNode; + doc.createStyleSheet().addRule(".rvml", "behavior:url(#default#VML)"); + try { + !doc.namespaces.rvml && doc.namespaces.add("rvml", "urn:schemas-microsoft-com:vml"); + createNode = function (tagName) { + return doc.createElement(''); + }; + } catch (e) { + createNode = function (tagName) { + return doc.createElement('<' + tagName + ' xmlns="urn:schemas-microsoft.com:vml" class="rvml">'); + }; + } + create = function () { + var con = getContainer[apply](0, arguments), + container = con.container, + height = con.height, + s, + width = con.width, + x = con.x, + y = con.y; + if (!container) { + throw new Error("VML container not found."); + } + var res = new Paper, + c = res.canvas = doc.createElement("div"), + cs = c.style; + width = width || 512; + height = height || 342; + width == +width && (width += "px"); + height == +height && (height += "px"); + res.width = 1e3; + res.height = 1e3; + res.coordsize = zoom * 1e3 + S + zoom * 1e3; + res.coordorigin = "0 0"; + res.span = doc.createElement("span"); + res.span.style.cssText = "position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;"; + c[appendChild](res.span); + cs.cssText = R.format("width:{0};height:{1};position:absolute;clip:rect(0 {0} {1} 0);overflow:hidden", width, height); + if (container == 1) { + doc.body[appendChild](c); + cs.left = x + "px"; + cs.top = y + "px"; + } else { + container.style.width = width; + container.style.height = height; + if (container.firstChild) { + container.insertBefore(c, container.firstChild); + } else { + container[appendChild](c); + } + } + plugins.call(res, res, R.fn); + return res; + }; + Paper[proto].clear = function () { + this.canvas.innerHTML = E; + this.span = doc.createElement("span"); + this.span.style.cssText = "position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;"; + this.canvas[appendChild](this.span); + this.bottom = this.top = null; + }; + Paper[proto].remove = function () { + this.canvas.parentNode.removeChild(this.canvas); + for (var i in this) { + this[i] = removed(i); + } + return true; + }; + } + + // rest + // Safari or Chrome (WebKit) rendering bug workaround method + if ((/^Apple|^Google/).test(win.navigator.vendor) && !(win.navigator.userAgent.indexOf("Version/4.0") + 1)) { + Paper[proto].safari = function () { + var rect = this.rect(-99, -99, this.width + 99, this.height + 99); + win.setTimeout(function () {rect.remove();}); + }; + } else { + Paper[proto].safari = function () {}; + } + + // Events + var addEvent = (function () { + if (doc.addEventListener) { + return function (obj, type, fn, element) { + var f = function (e) { + return fn.call(element, e); + }; + obj.addEventListener(type, f, false); + return function () { + obj.removeEventListener(type, f, false); + return true; + }; + }; + } else if (doc.attachEvent) { + return function (obj, type, fn, element) { + var f = function (e) { + return fn.call(element, e || win.event); + }; + obj.attachEvent("on" + type, f); + var detacher = function () { + obj.detachEvent("on" + type, f); + return true; + }; + return detacher; + }; + } + })(); + for (var i = events[length]; i--;) { + (function (eventName) { + Element[proto][eventName] = function (fn) { + if (R.is(fn, "function")) { + this.events = this.events || []; + this.events.push({name: eventName, f: fn, unbind: addEvent(this.shape || this.node, eventName, fn, this)}); + } + return this; + }; + Element[proto]["un" + eventName] = function (fn) { + var events = this.events, + l = events[length]; + while (l--) if (events[l].name == eventName && events[l].f == fn) { + events[l].unbind(); + events.splice(l, 1); + !events.length && delete this.events; + return this; + } + return this; + }; + })(events[i]); + } + Element[proto].hover = function (f_in, f_out) { + return this.mouseover(f_in).mouseout(f_out); + }; + Element[proto].unhover = function (f_in, f_out) { + return this.unmouseover(f_in).unmouseout(f_out); + }; + Paper[proto].circle = function (x, y, r) { + return theCircle(this, x || 0, y || 0, r || 0); + }; + Paper[proto].rect = function (x, y, w, h, r) { + return theRect(this, x || 0, y || 0, w || 0, h || 0, r || 0); + }; + Paper[proto].ellipse = function (x, y, rx, ry) { + return theEllipse(this, x || 0, y || 0, rx || 0, ry || 0); + }; + Paper[proto].path = function (pathString) { + pathString && !R.is(pathString, "string") && !R.is(pathString[0], "array") && (pathString += E); + return thePath(R.format[apply](R, arguments), this); + }; + Paper[proto].image = function (src, x, y, w, h) { + return theImage(this, src || "about:blank", x || 0, y || 0, w || 0, h || 0); + }; + Paper[proto].text = function (x, y, text) { + return theText(this, x || 0, y || 0, text || E); + }; + Paper[proto].set = function (itemsArray) { + arguments[length] > 1 && (itemsArray = Array[proto].splice.call(arguments, 0, arguments[length])); + return new Set(itemsArray); + }; + Paper[proto].setSize = setSize; + Paper[proto].top = Paper[proto].bottom = null; + Paper[proto].raphael = R; + function x_y() { + return this.x + S + this.y; + } + Element[proto].scale = function (x, y, cx, cy) { + if (x == null && y == null) { + return { + x: this._.sx, + y: this._.sy, + toString: x_y + }; + } + y = y || x; + !+y && (y = x); + var dx, + dy, + dcx, + dcy, + a = this.attrs; + if (x != 0) { + var bb = this.getBBox(), + rcx = bb.x + bb.width / 2, + rcy = bb.y + bb.height / 2, + kx = x / this._.sx, + ky = y / this._.sy; + cx = (+cx || cx == 0) ? cx : rcx; + cy = (+cy || cy == 0) ? cy : rcy; + var dirx = ~~(x / math.abs(x)), + diry = ~~(y / math.abs(y)), + s = this.node.style, + ncx = cx + (rcx - cx) * kx, + ncy = cy + (rcy - cy) * ky; + switch (this.type) { + case "rect": + case "image": + var neww = a.width * dirx * kx, + newh = a.height * diry * ky; + this.attr({ + height: newh, + r: a.r * mmin(dirx * kx, diry * ky), + width: neww, + x: ncx - neww / 2, + y: ncy - newh / 2 + }); + break; + case "circle": + case "ellipse": + this.attr({ + rx: a.rx * dirx * kx, + ry: a.ry * diry * ky, + r: a.r * mmin(dirx * kx, diry * ky), + cx: ncx, + cy: ncy + }); + break; + case "path": + var path = pathToRelative(a.path), + skip = true; + for (var i = 0, ii = path[length]; i < ii; i++) { + var p = path[i], + P0 = upperCase.call(p[0]); + if (P0 == "M" && skip) { + continue; + } else { + skip = false; + } + if (P0 == "A") { + p[path[i][length] - 2] *= kx; + p[path[i][length] - 1] *= ky; + p[1] *= dirx * kx; + p[2] *= diry * ky; + p[5] = +!(dirx + diry ? !+p[5] : +p[5]); + } else if (P0 == "H") { + for (var j = 1, jj = p[length]; j < jj; j++) { + p[j] *= kx; + } + } else if (P0 == "V") { + for (j = 1, jj = p[length]; j < jj; j++) { + p[j] *= ky; + } + } else { + for (j = 1, jj = p[length]; j < jj; j++) { + p[j] *= (j % 2) ? kx : ky; + } + } + } + var dim2 = pathDimensions(path); + dx = ncx - dim2.x - dim2.width / 2; + dy = ncy - dim2.y - dim2.height / 2; + path[0][1] += dx; + path[0][2] += dy; + this.attr({path: path}); + break; + } + if (this.type in {text: 1, image:1} && (dirx != 1 || diry != 1)) { + if (this.transformations) { + this.transformations[2] = "scale("[concat](dirx, ",", diry, ")"); + this.node[setAttribute]("transform", this.transformations[join](S)); + dx = (dirx == -1) ? -a.x - (neww || 0) : a.x; + dy = (diry == -1) ? -a.y - (newh || 0) : a.y; + this.attr({x: dx, y: dy}); + a.fx = dirx - 1; + a.fy = diry - 1; + } else { + this.node.filterMatrix = " progid:DXImageTransform.Microsoft.Matrix(M11="[concat](dirx, + ", M12=0, M21=0, M22=", diry, + ", Dx=0, Dy=0, sizingmethod='auto expand', filtertype='bilinear')"); + s.filter = (this.node.filterMatrix || E) + (this.node.filterOpacity || E); + } + } else { + if (this.transformations) { + this.transformations[2] = E; + this.node[setAttribute]("transform", this.transformations[join](S)); + a.fx = 0; + a.fy = 0; + } else { + this.node.filterMatrix = E; + s.filter = (this.node.filterMatrix || E) + (this.node.filterOpacity || E); + } + } + a.scale = [x, y, cx, cy][join](S); + this._.sx = x; + this._.sy = y; + } + return this; + }; + Element[proto].clone = function () { + var attr = this.attr(); + delete attr.scale; + delete attr.translation; + return this.paper[this.type]().attr(attr); + }; + var getPointAtSegmentLength = cacher(function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, length) { + var len = 0, + old; + for (var i = 0; i < 1.001; i+=.001) { + var dot = R.findDotsAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, i); + i && (len += pow(pow(old.x - dot.x, 2) + pow(old.y - dot.y, 2), .5)); + if (len >= length) { + return dot; + } + old = dot; + } + }), + getLengthFactory = function (istotal, subpath) { + return function (path, length, onlystart) { + path = path2curve(path); + var x, y, p, l, sp = "", subpaths = {}, point, + len = 0; + for (var i = 0, ii = path.length; i < ii; i++) { + p = path[i]; + if (p[0] == "M") { + x = +p[1]; + y = +p[2]; + } else { + l = segmentLength(x, y, p[1], p[2], p[3], p[4], p[5], p[6]); + if (len + l > length) { + if (subpath && !subpaths.start) { + point = getPointAtSegmentLength(x, y, p[1], p[2], p[3], p[4], p[5], p[6], length - len); + sp += ["C", point.start.x, point.start.y, point.m.x, point.m.y, point.x, point.y]; + if (onlystart) {return sp;} + subpaths.start = sp; + sp = ["M", point.x, point.y + "C", point.n.x, point.n.y, point.end.x, point.end.y, p[5], p[6]][join](); + len += l; + x = +p[5]; + y = +p[6]; + continue; + } + if (!istotal && !subpath) { + point = getPointAtSegmentLength(x, y, p[1], p[2], p[3], p[4], p[5], p[6], length - len); + return {x: point.x, y: point.y, alpha: point.alpha}; + } + } + len += l; + x = +p[5]; + y = +p[6]; + } + sp += p; + } + subpaths.end = sp; + point = istotal ? len : subpath ? subpaths : R.findDotsAtSegment(x, y, p[1], p[2], p[3], p[4], p[5], p[6], 1); + point.alpha && (point = {x: point.x, y: point.y, alpha: point.alpha}); + return point; + }; + }, + segmentLength = cacher(function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y) { + var old = {x: 0, y: 0}, + len = 0; + for (var i = 0; i < 1.01; i+=.01) { + var dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, i); + i && (len += pow(pow(old.x - dot.x, 2) + pow(old.y - dot.y, 2), .5)); + old = dot; + } + return len; + }); + var getTotalLength = getLengthFactory(1), + getPointAtLength = getLengthFactory(), + getSubpathsAtLength = getLengthFactory(0, 1); + Element[proto].getTotalLength = function () { + if (this.type != "path") {return;} + return getTotalLength(this.attrs.path); + }; + Element[proto].getPointAtLength = function (length) { + if (this.type != "path") {return;} + return getPointAtLength(this.attrs.path, length); + }; + Element[proto].getSubpath = function (from, to) { + if (this.type != "path") {return;} + if (math.abs(this.getTotalLength() - to) < 1e-6) { + return getSubpathsAtLength(this.attrs.path, from).end; + } + var a = getSubpathsAtLength(this.attrs.path, to, 1); + return from ? getSubpathsAtLength(a, from).end : a; + }; + + // animation easing formulas + R.easing_formulas = { + linear: function (n) { + return n; + }, + "<": function (n) { + return pow(n, 3); + }, + ">": function (n) { + return pow(n - 1, 3) + 1; + }, + "<>": function (n) { + n = n * 2; + if (n < 1) { + return pow(n, 3) / 2; + } + n -= 2; + return (pow(n, 3) + 2) / 2; + }, + backIn: function (n) { + var s = 1.70158; + return n * n * ((s + 1) * n - s); + }, + backOut: function (n) { + n = n - 1; + var s = 1.70158; + return n * n * ((s + 1) * n + s) + 1; + }, + elastic: function (n) { + if (n == 0 || n == 1) { + return n; + } + var p = .3, + s = p / 4; + return pow(2, -10 * n) * math.sin((n - s) * (2 * math.PI) / p) + 1; + }, + bounce: function (n) { + var s = 7.5625, + p = 2.75, + l; + if (n < (1 / p)) { + l = s * n * n; + } else { + if (n < (2 / p)) { + n -= (1.5 / p); + l = s * n * n + .75; + } else { + if (n < (2.5 / p)) { + n -= (2.25 / p); + l = s * n * n + .9375; + } else { + n -= (2.625 / p); + l = s * n * n + .984375; + } + } + } + return l; + } + }; + + var animationElements = {length : 0}, + animation = function () { + var Now = +new Date; + for (var l in animationElements) if (l != "length" && animationElements[has](l)) { + var e = animationElements[l]; + if (e.stop || e.el.removed) { + delete animationElements[l]; + animationElements[length]--; + continue; + } + var time = Now - e.start, + ms = e.ms, + easing = e.easing, + from = e.from, + diff = e.diff, + to = e.to, + t = e.t, + prev = e.prev || 0, + that = e.el, + callback = e.callback, + set = {}, + now; + if (time < ms) { + var pos = R.easing_formulas[easing] ? R.easing_formulas[easing](time / ms) : time / ms; + for (var attr in from) if (from[has](attr)) { + switch (availableAnimAttrs[attr]) { + case "along": + now = pos * ms * diff[attr]; + to.back && (now = to.len - now); + var point = getPointAtLength(to[attr], now); + that.translate(diff.sx - diff.x || 0, diff.sy - diff.y || 0); + diff.x = point.x; + diff.y = point.y; + that.translate(point.x - diff.sx, point.y - diff.sy); + to.rot && that.rotate(diff.r + point.alpha, point.x, point.y); + break; + case "number": + now = +from[attr] + pos * ms * diff[attr]; + break; + case "colour": + now = "rgb(" + [ + upto255(round(from[attr].r + pos * ms * diff[attr].r)), + upto255(round(from[attr].g + pos * ms * diff[attr].g)), + upto255(round(from[attr].b + pos * ms * diff[attr].b)) + ][join](",") + ")"; + break; + case "path": + now = []; + for (var i = 0, ii = from[attr][length]; i < ii; i++) { + now[i] = [from[attr][i][0]]; + for (var j = 1, jj = from[attr][i][length]; j < jj; j++) { + now[i][j] = +from[attr][i][j] + pos * ms * diff[attr][i][j]; + } + now[i] = now[i][join](S); + } + now = now[join](S); + break; + case "csv": + switch (attr) { + case "translation": + var x = diff[attr][0] * (time - prev), + y = diff[attr][1] * (time - prev); + t.x += x; + t.y += y; + now = x + S + y; + break; + case "rotation": + now = +from[attr][0] + pos * ms * diff[attr][0]; + from[attr][1] && (now += "," + from[attr][1] + "," + from[attr][2]); + break; + case "scale": + now = [+from[attr][0] + pos * ms * diff[attr][0], +from[attr][1] + pos * ms * diff[attr][1], (2 in to[attr] ? to[attr][2] : E), (3 in to[attr] ? to[attr][3] : E)][join](S); + break; + case "clip-rect": + now = []; + i = 4; + while (i--) { + now[i] = +from[attr][i] + pos * ms * diff[attr][i]; + } + break; + } + break; + } + set[attr] = now; + } + that.attr(set); + that._run && that._run.call(that); + } else { + if (to.along) { + point = getPointAtLength(to.along, to.len * !to.back); + that.translate(diff.sx - (diff.x || 0) + point.x - diff.sx, diff.sy - (diff.y || 0) + point.y - diff.sy); + to.rot && that.rotate(diff.r + point.alpha, point.x, point.y); + } + (t.x || t.y) && that.translate(-t.x, -t.y); + to.scale && (to.scale = to.scale + E); + that.attr(to); + delete animationElements[l]; + animationElements[length]--; + that.in_animation = null; + R.is(callback, "function") && callback.call(that); + } + e.prev = time; + } + R.svg && that && that.paper.safari(); + animationElements[length] && win.setTimeout(animation); + }, + upto255 = function (color) { + return color > 255 ? 255 : (color < 0 ? 0 : color); + }, + translate = function (x, y) { + if (x == null) { + return {x: this._.tx, y: this._.ty, toString: x_y}; + } + this._.tx += +x; + this._.ty += +y; + switch (this.type) { + case "circle": + case "ellipse": + this.attr({cx: +x + this.attrs.cx, cy: +y + this.attrs.cy}); + break; + case "rect": + case "image": + case "text": + this.attr({x: +x + this.attrs.x, y: +y + this.attrs.y}); + break; + case "path": + var path = pathToRelative(this.attrs.path); + path[0][1] += +x; + path[0][2] += +y; + this.attr({path: path}); + break; + } + return this; + }; + Element[proto].animateWith = function (element, params, ms, easing, callback) { + animationElements[element.id] && (params.start = animationElements[element.id].start); + return this.animate(params, ms, easing, callback); + }; + Element[proto].animateAlong = along(); + Element[proto].animateAlongBack = along(1); + function along(isBack) { + return function (path, ms, rotate, callback) { + var params = {back: isBack}; + R.is(rotate, "function") ? (callback = rotate) : (params.rot = rotate); + path && path.constructor == Element && (path = path.attrs.path); + path && (params.along = path); + return this.animate(params, ms, callback); + }; + } + Element[proto].onAnimation = function (f) { + this._run = f || 0; + return this; + }; + Element[proto].animate = function (params, ms, easing, callback) { + if (R.is(easing, "function") || !easing) { + callback = easing || null; + } + var from = {}, + to = {}, + diff = {}; + for (var attr in params) if (params[has](attr)) { + if (availableAnimAttrs[has](attr)) { + from[attr] = this.attr(attr); + (from[attr] == null) && (from[attr] = availableAttrs[attr]); + to[attr] = params[attr]; + switch (availableAnimAttrs[attr]) { + case "along": + var len = getTotalLength(params[attr]), + point = getPointAtLength(params[attr], len * !!params.back), + bb = this.getBBox(); + diff[attr] = len / ms; + diff.tx = bb.x; + diff.ty = bb.y; + diff.sx = point.x; + diff.sy = point.y; + to.rot = params.rot; + to.back = params.back; + to.len = len; + params.rot && (diff.r = toFloat(this.rotate()) || 0); + break; + case "number": + diff[attr] = (to[attr] - from[attr]) / ms; + break; + case "colour": + from[attr] = R.getRGB(from[attr]); + var toColour = R.getRGB(to[attr]); + diff[attr] = { + r: (toColour.r - from[attr].r) / ms, + g: (toColour.g - from[attr].g) / ms, + b: (toColour.b - from[attr].b) / ms + }; + break; + case "path": + var pathes = path2curve(from[attr], to[attr]); + from[attr] = pathes[0]; + var toPath = pathes[1]; + diff[attr] = []; + for (var i = 0, ii = from[attr][length]; i < ii; i++) { + diff[attr][i] = [0]; + for (var j = 1, jj = from[attr][i][length]; j < jj; j++) { + diff[attr][i][j] = (toPath[i][j] - from[attr][i][j]) / ms; + } + } + break; + case "csv": + var values = (params[attr] + E)[split](separator), + from2 = (from[attr] + E)[split](separator); + switch (attr) { + case "translation": + from[attr] = [0, 0]; + diff[attr] = [values[0] / ms, values[1] / ms]; + break; + case "rotation": + from[attr] = (from2[1] == values[1] && from2[2] == values[2]) ? from2 : [0, values[1], values[2]]; + diff[attr] = [(values[0] - from[attr][0]) / ms, 0, 0]; + break; + case "scale": + params[attr] = values; + from[attr] = (from[attr] + E)[split](separator); + diff[attr] = [(values[0] - from[attr][0]) / ms, (values[1] - from[attr][1]) / ms, 0, 0]; + break; + case "clip-rect": + from[attr] = (from[attr] + E)[split](separator); + diff[attr] = []; + i = 4; + while (i--) { + diff[attr][i] = (values[i] - from[attr][i]) / ms; + } + break; + } + to[attr] = values; + } + } + } + this.stop(); + this.in_animation = 1; + animationElements[this.id] = { + start: params.start || +new Date, + ms: ms, + easing: easing, + from: from, + diff: diff, + to: to, + el: this, + callback: callback, + t: {x: 0, y: 0} + }; + ++animationElements[length] == 1 && animation(); + return this; + }; + Element[proto].stop = function () { + animationElements[this.id] && animationElements[length]--; + delete animationElements[this.id]; + return this; + }; + Element[proto].translate = function (x, y) { + return this.attr({translation: x + " " + y}); + }; + Element[proto][toString] = function () { + return "Rapha\xebl\u2019s object"; + }; + R.ae = animationElements; + + // Set + var Set = function (items) { + this.items = []; + this[length] = 0; + if (items) { + for (var i = 0, ii = items[length]; i < ii; i++) { + if (items[i] && (items[i].constructor == Element || items[i].constructor == Set)) { + this[this.items[length]] = this.items[this.items[length]] = items[i]; + this[length]++; + } + } + } + }; + Set[proto][push] = function () { + var item, + len; + for (var i = 0, ii = arguments[length]; i < ii; i++) { + item = arguments[i]; + if (item && (item.constructor == Element || item.constructor == Set)) { + len = this.items[length]; + this[len] = this.items[len] = item; + this[length]++; + } + } + return this; + }; + Set[proto].pop = function () { + delete this[this[length]--]; + return this.items.pop(); + }; + for (var method in Element[proto]) if (Element[proto][has](method)) { + Set[proto][method] = (function (methodname) { + return function () { + for (var i = 0, ii = this.items[length]; i < ii; i++) { + this.items[i][methodname][apply](this.items[i], arguments); + } + return this; + }; + })(method); + } + Set[proto].attr = function (name, value) { + if (name && R.is(name, "array") && R.is(name[0], "object")) { + for (var j = 0, jj = name[length]; j < jj; j++) { + this.items[j].attr(name[j]); + } + } else { + for (var i = 0, ii = this.items[length]; i < ii; i++) { + this.items[i].attr(name, value); + } + } + return this; + }; + Set[proto].animate = function (params, ms, easing, callback) { + (R.is(easing, "function") || !easing) && (callback = easing || null); + var len = this.items[length], + i = len, + set = this, + collector; + callback && (collector = function () { + !--len && callback.call(set); + }); + this.items[--i].animate(params, ms, easing || collector, collector); + while (i--) { + this.items[i].animateWith(this.items[len - 1], params, ms, easing || collector, collector); + } + return this; + }; + Set[proto].insertAfter = function (el) { + var i = this.items[length]; + while (i--) { + this.items[i].insertAfter(el); + } + return this; + }; + Set[proto].getBBox = function () { + var x = [], + y = [], + w = [], + h = []; + for (var i = this.items[length]; i--;) { + var box = this.items[i].getBBox(); + x[push](box.x); + y[push](box.y); + w[push](box.x + box.width); + h[push](box.y + box.height); + } + x = mmin[apply](0, x); + y = mmin[apply](0, y); + return { + x: x, + y: y, + width: mmax[apply](0, w) - x, + height: mmax[apply](0, h) - y + }; + }; + Set[proto].clone = function (s) { + s = new Set; + for (var i = 0, ii = this.items[length]; i < ii; i++) { + s[push](this.items[i].clone()); + } + return s; + }; + + R.registerFont = function (font) { + if (!font.face) { + return font; + } + this.fonts = this.fonts || {}; + var fontcopy = { + w: font.w, + face: {}, + glyphs: {} + }, + family = font.face["font-family"]; + for (var prop in font.face) if (font.face[has](prop)) { + fontcopy.face[prop] = font.face[prop]; + } + if (this.fonts[family]) { + this.fonts[family][push](fontcopy); + } else { + this.fonts[family] = [fontcopy]; + } + if (!font.svg) { + fontcopy.face["units-per-em"] = toInt(font.face["units-per-em"], 10); + for (var glyph in font.glyphs) if (font.glyphs[has](glyph)) { + var path = font.glyphs[glyph]; + fontcopy.glyphs[glyph] = { + w: path.w, + k: {}, + d: path.d && "M" + path.d[rp](/[mlcxtrv]/g, function (command) { + return {l: "L", c: "C", x: "z", t: "m", r: "l", v: "c"}[command] || "M"; + }) + "z" + }; + if (path.k) { + for (var k in path.k) if (path[has](k)) { + fontcopy.glyphs[glyph].k[k] = path.k[k]; + } + } + } + } + return font; + }; + Paper[proto].getFont = function (family, weight, style, stretch) { + stretch = stretch || "normal"; + style = style || "normal"; + weight = +weight || {normal: 400, bold: 700, lighter: 300, bolder: 800}[weight] || 400; + var font = R.fonts[family]; + if (!font) { + var name = new RegExp("(^|\\s)" + family[rp](/[^\w\d\s+!~.:_-]/g, E) + "(\\s|$)", "i"); + for (var fontName in R.fonts) if (R.fonts[has](fontName)) { + if (name.test(fontName)) { + font = R.fonts[fontName]; + break; + } + } + } + var thefont; + if (font) { + for (var i = 0, ii = font[length]; i < ii; i++) { + thefont = font[i]; + if (thefont.face["font-weight"] == weight && (thefont.face["font-style"] == style || !thefont.face["font-style"]) && thefont.face["font-stretch"] == stretch) { + break; + } + } + } + return thefont; + }; + Paper[proto].print = function (x, y, string, font, size, origin) { + origin = origin || "middle"; // baseline|middle + var out = this.set(), + letters = (string + E)[split](E), + shift = 0, + path = E, + scale; + R.is(font, "string") && (font = this.getFont(font)); + if (font) { + scale = (size || 16) / font.face["units-per-em"]; + var bb = font.face.bbox.split(separator), + top = +bb[0], + height = +bb[1] + (origin == "baseline" ? bb[3] - bb[1] + (+font.face.descent) : (bb[3] - bb[1]) / 2); + for (var i = 0, ii = letters[length]; i < ii; i++) { + var prev = i && font.glyphs[letters[i - 1]] || {}, + curr = font.glyphs[letters[i]]; + shift += i ? (prev.w || font.w) + (prev.k && prev.k[letters[i]] || 0) : 0; + curr && curr.d && out[push](this.path(curr.d).attr({fill: "#000", stroke: "none", translation: [shift, 0]})); + } + out.scale(scale, scale, top, height).translate(x - top, y - height); + } + return out; + }; + + var formatrg = /\{(\d+)\}/g; + R.format = function (token, array) { + var args = R.is(array, "array") ? [0][concat](array) : arguments; + token && R.is(token, "string") && args[length] - 1 && (token = token[rp](formatrg, function (str, i) { + return args[++i] == null ? E : args[i]; + })); + return token || E; + }; + R.ninja = function () { + oldRaphael.was ? (Raphael = oldRaphael.is) : delete Raphael; + return R; + }; + R.el = Element[proto]; + return R; +})(); \ No newline at end of file diff --git a/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/yui-min.js b/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/yui-min.js new file mode 100644 index 0000000..55f017d --- /dev/null +++ b/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/yui-min.js @@ -0,0 +1,12 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.1.0 +build: 2026 +*/ +if(typeof YUI==="undefined"){var YUI=function(F,E,D,C,A){var B=this,J=arguments,I,G=J.length,H=(typeof YUI_config!=="undefined")&&YUI_config;if(!(B instanceof YUI)){return new YUI(F,E,D,C,A);}else{B._init();if(H){B._config(H);}for(I=0;I-1){M="3.0.0";}YUI.prototype={_config:function(Y){Y=Y||{};var T,V,W,U=this.config,X=U.modules,S=U.groups;for(V in Y){T=Y[V];if(X&&V=="modules"){for(W in T){X[W]=T[W];}}else{if(S&&V=="groups"){for(W in T){S[W]=T[W];}}else{if(V=="win"){U[V]=T.contentWindow||T;U.doc=U[V].document;}else{U[V]=T;}}}}},_init:function(){var U,V=this,S=YUI.Env,T=V.Env;V.version=M;if(!T){V.Env={mods:{},base:K,cdn:K+M+"/build/",bootstrapped:false,_idx:0,_used:{},_attached:{},_yidx:0,_uidx:0,_guidp:"y",_loaded:{},getBase:function(c,a){var W,X,Z,d,Y;X=(R&&R.getElementsByTagName("script"))||[];for(Z=0;ZJ)?H[J]:true;}}return L;};F.indexOf=(D.indexOf)?function(G,H){return D.indexOf.call(G,H);}:function(G,I){for(var H=0;H-1);};E.owns=F;E.each=function(K,J,L,I){var H=L||B,G;for(G in K){if(I||F(K,G)){J.call(H,K[G],G,K);}}return B;};E.some=function(K,J,L,I){var H=L||B,G;for(G in K){if(I||F(K,G)){if(J.call(H,K[G],G,K)){return true;}}}return false;};E.getValue=function(K,J){if(!B.Lang.isObject(K)){return D;}var H,I=B.Array(J),G=I.length;for(H=0;K!==D&&H=0){for(G=0;H!==D&&G0){C=D(I);if(C){return C;}else{E=I.lastIndexOf("-");if(E>=0){I=I.substring(0,E);if(E>=2&&I.charAt(E-2)==="-"){I=I.substring(0,E-2);}}else{break;}}}}return"";}});},"3.1.0",{requires:["yui-base"]});YUI.add("yui-log",function(A){(function(){var E,D=A,F="yui:log",B="undefined",C={debug:1,info:1,warn:1,error:1};D.log=function(I,Q,G,O){var K,N,L,J,M,H=D,P=H.config;if(P.debug){if(G){N=P.logExclude;L=P.logInclude;if(L&&!(G in L)){K=1;}else{if(N&&(G in N)){K=1;}}}if(!K){if(P.useBrowserConsole){J=(G)?G+": "+I:I;if(H.Lang.isFunction(P.logFn)){P.logFn(I,Q,G);}else{if(typeof console!=B&&console.log){M=(Q&&console[Q]&&(Q in C))?Q:"log";console[M](J);}else{if(typeof opera!=B){opera.postError(J);}}}}if(H.fire&&!O){if(!E){H.publish(F,{broadcast:2});E=1;}H.fire(F,{msg:I,cat:Q,src:G});}}}return H;};D.message=function(){return D.log.apply(D,arguments);};})();},"3.1.0",{requires:["yui-base"]});YUI.add("yui-later",function(A){(function(){var B=A.Lang,C=function(K,E,L,G,H){K=K||0;E=E||{};var F=L,J=A.Array(G),I,D;if(B.isString(L)){F=E[L];}if(!F){}I=function(){F.apply(E,J);};D=(H)?setInterval(I,K):setTimeout(I,K);return{id:D,interval:H,cancel:function(){if(this.interval){clearInterval(D);}else{clearTimeout(D);}}};};A.later=C;B.later=C;})();},"3.1.0",{requires:["yui-base"]});YUI.add("yui-throttle",function(Y){ +/* Based on work by Simon Willison: http://gist.github.com/292562 */ +var throttle=function(fn,ms){ms=(ms)?ms:(Y.config.throttleTime||150);if(ms===-1){return(function(){fn.apply(null,arguments);});}var last=(new Date()).getTime();return(function(){var now=(new Date()).getTime();if(now-last>ms){last=now;fn.apply(null,arguments);}});};Y.throttle=throttle;},"3.1.0",{requires:["yui-base"]});YUI.add("yui",function(A){},"3.1.0",{use:["yui-base","get","intl-base","yui-log","yui-later","yui-throttle"]}); \ No newline at end of file diff --git a/src/contrib/monitoring/JMX-RESOURCES b/src/contrib/monitoring/JMX-RESOURCES new file mode 100644 index 0000000..1d1aa98 --- /dev/null +++ b/src/contrib/monitoring/JMX-RESOURCES @@ -0,0 +1,38 @@ + +Resources for monitoring ZooKeeper using JMX +-------------------------------------------- + +JMX/REST Bridge +--------------- + +http://code.google.com/p/polarrose-jmx-rest-bridge/ + +"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." + +JMXetric +-------- + +http://code.google.com/p/jmxetric/ + +"JMXetric is a 100% java, configurable JVM agent that periodically polls MBean attributes and reports their values to Ganglia." + +jmxquery +-------- + +http://code.google.com/p/jmxquery/ + +"a plugin for nagios to check jmx" + +check_jmx +--------- + +http://exchange.nagios.org/directory/Plugins/Java-Applications-and-Servers/check_jmx/details + + +jmx2snmp +-------- + +http://github.com/tcurdt/jmx2snmp + +Expose application JMX properties via SNMP + diff --git a/src/contrib/monitoring/README b/src/contrib/monitoring/README new file mode 100644 index 0000000..a2206e8 --- /dev/null +++ b/src/contrib/monitoring/README @@ -0,0 +1,85 @@ + +Tools and Recipes for ZooKeeper Monitoring +------------------------------------------ + +How To Monitor +-------------- + +A ZooKeeper cluster can be monitored in two ways: + 1. by using the 'mntr' 4letterword command + 2. by using JMX to query the MBeans + +This repo contains tools and recipes for monitoring ZooKeeper using the first method. + +Check the file JMX-RESOURCE for some links to resources that could help you monitor a ZooKeeper cluster using the JMX interface. + +Requirements +------------ + +ZooKeeper 3.4.0 or later or you can apply ZOOKEEPER-744 patch over the latest 3.3.x release. +The server should understand the 'mntr' 4letterword command. + +$ echo 'mntr' | nc localhost 2181 +zk_version 3.4.0--1, built on 06/19/2010 15:07 GMT +zk_avg_latency 141 +zk_max_latency 1788 +zk_min_latency 0 +zk_packets_received 385466 +zk_packets_sent 435364 +zk_outstanding_requests 0 +zk_server_state follower +zk_znode_count 5 +zk_watch_count 0 +zk_ephemerals_count 0 +zk_approximate_data_size 41 +zk_open_file_descriptor_count 20 +zk_max_file_descriptor_count 1024 +zk_fsync_threshold_exceed_count 0 + +Python 2.6 (maybe it works on previous version but it's not tested yet). + +In a nutshell +------------- + +All you need is check_zookeeper.py It has no external dependencies. + + +*** On Nagios call the script like this: + +./check_zookeeper.py -o nagios -s "" -k -w -c + + +*** On Cacti define a custom data input method using the script like this: + +./check_zookeeper.py -o cacti -s "" -k --leader + +-- outputs a single value for the given key fetched from the cluster leader + +OR + +./check_zookeeper.py -o cacti -s "" -k + +-- outputs multiple values on for each cluster node +ex: localhost_2182:0 localhost_2183:0 localhost_2181:0 localhost_2184:0 localhost_2185:0 + +*** On Ganglia: + +install the plugin found in the ganglia/ subfolder OR + +./check_zookeeper.py -o ganglia -s "" + +it will use gmetric to send zookeeper node status data. + + +Check the subfolders for configuration details and samples for each platform. + +License +------- + +Apache License 2.0 or later. + +ZooKeeper 4letterwords Commands +------------------------------- + +http://zookeeper.apache.org/docs/current/zookeeperAdmin.html#sc_zkCommands + diff --git a/src/contrib/monitoring/cacti/README b/src/contrib/monitoring/cacti/README new file mode 100644 index 0000000..8188723 --- /dev/null +++ b/src/contrib/monitoring/cacti/README @@ -0,0 +1,56 @@ +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +Recipes for ZooKeeper monitoring using Cacti +-------------------------------------------- + +Cacti install guide: https://help.ubuntu.com/community/Cacti + +Cacti Manual: http://www.cacti.net/downloads/docs/html/ +PDF version: http://www.cacti.net/downloads/docs/pdf/manual.pdf + +Check Chapter 16: Simplest Method of Going from Script to Graph + http://www.cacti.net/downloads/docs/html/how_to.html#SCRIPT_TO_GRAPH + +WARNING: I have wrote these instructions while installing and configuring the plugin on my desktop computer running Ubuntu 9.10. I've installed Cacti using apt-get. + +WARNING: I'm going to make the assumption that you know how to work with Cacti and how to setup Data Input Methods for custom scripts. I'm also going to assume that you have already installed Cacti and everything works as expected. + +You can extend the Cacti's data gathering functionality through external scripts. Cacti comes with a number of scripts out of the box wich are localted in the scripts/ directory. + + +The check_zookeeper.py script can be used a custom data input method for Cacti. + +Single value (check cluster status by sending queries to the leader): +--------------------------------------------------------------------- + +python scripts/check_zookeeper.py -s "localhost:2181,localhost:2182,localhost:2183,localhost:2184,localhost:2185" -k -o cacti --leader + +When you will call the script this way it will about a single value representing the value attached to this . + + +Multiple values (one for each cluster node): +-------------------------------------------- + +python scripts/check_zookeeper.py -s "localhost:2181,localhost:2182,localhost:2183,localhost:2184,localhost:2185" -k -o cacti + +Output: +localhost_2182:0 localhost_2183:0 localhost_2181:0 localhost_2184:0 localhost_2185:0 + + +TBD: Step by step guide + + diff --git a/src/contrib/monitoring/check_zookeeper.py b/src/contrib/monitoring/check_zookeeper.py new file mode 100644 index 0000000..2c25afb --- /dev/null +++ b/src/contrib/monitoring/check_zookeeper.py @@ -0,0 +1,395 @@ +#! /usr/bin/env python +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" Check Zookeeper Cluster + +Generic monitoring script that could be used with multiple platforms (Ganglia, Nagios, Cacti). + +It requires ZooKeeper 3.4.0 or greater. The script needs the 'mntr' 4letter word +command (patch ZOOKEEPER-744) that was now commited to the trunk. +The script also works with ZooKeeper 3.3.x but in a limited way. +""" + +import sys +import socket +import logging +import re +import subprocess + +from StringIO import StringIO +from optparse import OptionParser, OptionGroup + +__version__ = (0, 1, 0) + +log = logging.getLogger() +logging.basicConfig(level=logging.ERROR) + +class NagiosHandler(object): + + @classmethod + def register_options(cls, parser): + group = OptionGroup(parser, 'Nagios specific options') + + group.add_option('-w', '--warning', dest='warning') + group.add_option('-c', '--critical', dest='critical') + + parser.add_option_group(group) + + def analyze(self, opts, cluster_stats): + try: + warning = int(opts.warning) + critical = int(opts.critical) + + except (TypeError, ValueError): + print >>sys.stderr, 'Invalid values for "warning" and "critical".' + return 2 + + if opts.key is None: + print >>sys.stderr, 'You should specify a key name.' + return 2 + + warning_state, critical_state, values = [], [], [] + for host, stats in cluster_stats.items(): + if opts.key in stats: + + value = stats[opts.key] + values.append('%s=%s;%s;%s' % (host, value, warning, critical)) + + if warning >= value > critical or warning <= value < critical: + warning_state.append(host) + + elif (warning < critical and critical <= value) or (warning > critical and critical >= value): + critical_state.append(host) + + if not values: + # Zookeeper may be down, not serving requests or we may have a bad configuration + print 'Critical, %s not found' % opts.key + return 2 + + values = ' '.join(values) + if critical_state: + print 'Critical "%s" %s!|%s' % (opts.key, ', '.join(critical_state), values) + return 2 + + elif warning_state: + print 'Warning "%s" %s!|%s' % (opts.key, ', '.join(warning_state), values) + return 1 + + else: + print 'Ok "%s"!|%s' % (opts.key, values) + return 0 + +class CactiHandler(object): + + @classmethod + def register_options(cls, parser): + group = OptionGroup(parser, 'Cacti specific options') + + group.add_option('-l', '--leader', dest='leader', + action="store_true", help="only query the cluster leader") + + parser.add_option_group(group) + + def analyze(self, opts, cluster_stats): + if opts.key is None: + print >>sys.stderr, 'The key name is mandatory.' + return 1 + + if opts.leader is True: + try: + leader = [x for x in cluster_stats.values() \ + if x.get('zk_server_state', '') == 'leader'][0] + + except IndexError: + print >>sys.stderr, 'No leader found.' + return 3 + + if opts.key in leader: + print leader[opts.key] + return 0 + + else: + print >>sys.stderr, 'Unknown key: "%s"' % opts.key + return 2 + else: + for host, stats in cluster_stats.items(): + if opts.key not in stats: + continue + + host = host.replace(':', '_') + print '%s:%s' % (host, stats[opts.key]), + + +class GangliaHandler(object): + + @classmethod + def register_options(cls, parser): + group = OptionGroup(parser, 'Ganglia specific options') + + group.add_option('-g', '--gmetric', dest='gmetric', + default='/usr/bin/gmetric', help='ganglia gmetric binary '\ + 'location: /usr/bin/gmetric') + + parser.add_option_group(group) + + def call(self, *args, **kwargs): + subprocess.call(*args, **kwargs) + + def analyze(self, opts, cluster_stats): + if len(cluster_stats) != 1: + print >>sys.stderr, 'Only allowed to monitor a single node.' + return 1 + + for host, stats in cluster_stats.items(): + for k, v in stats.items(): + try: + self.call([opts.gmetric, '-n', k, '-v', str(int(v)), '-t', 'uint32']) + except (TypeError, ValueError): + pass + +class ZooKeeperServer(object): + + def __init__(self, host='localhost', port='2181', timeout=1): + self._address = (host, int(port)) + self._timeout = timeout + + def get_stats(self): + """ Get ZooKeeper server stats as a map """ + data = self._send_cmd('mntr') + stat = self._parse_stat(self._send_cmd('stat')) + if data: + mntr = self._parse(data) + missing = ['zk_zxid', 'zk_zxid_counter', 'zk_zxid_epoch'] + for m in missing: + if m in stat: + mntr[m] = stat[m] + return mntr + else: + return stat + + def _create_socket(self): + return socket.socket() + + def _send_cmd(self, cmd): + """ Send a 4letter word command to the server """ + s = self._create_socket() + s.settimeout(self._timeout) + + s.connect(self._address) + s.send(cmd) + + data = s.recv(2048) + s.close() + + return data + + def _parse(self, data): + """ Parse the output from the 'mntr' 4letter word command """ + h = StringIO(data) + + result = {} + for line in h.readlines(): + try: + key, value = self._parse_line(line) + result[key] = value + except ValueError: + pass # ignore broken lines + + return result + + def _parse_stat(self, data): + """ Parse the output from the 'stat' 4letter word command """ + h = StringIO(data) + + result = {} + + version = h.readline() + if version: + result['zk_version'] = version[version.index(':')+1:].strip() + + # skip all lines until we find the empty one + while h.readline().strip(): pass + + for line in h.readlines(): + m = re.match('Latency min/avg/max: (\d+)/(\d+)/(\d+)', line) + if m is not None: + result['zk_min_latency'] = int(m.group(1)) + result['zk_avg_latency'] = int(m.group(2)) + result['zk_max_latency'] = int(m.group(3)) + continue + + m = re.match('Received: (\d+)', line) + if m is not None: + result['zk_packets_received'] = int(m.group(1)) + continue + + m = re.match('Sent: (\d+)', line) + if m is not None: + result['zk_packets_sent'] = int(m.group(1)) + continue + + m = re.match('Outstanding: (\d+)', line) + if m is not None: + result['zk_outstanding_requests'] = int(m.group(1)) + continue + + m = re.match('Mode: (.*)', line) + if m is not None: + result['zk_server_state'] = m.group(1) + continue + + m = re.match('Node count: (\d+)', line) + if m is not None: + result['zk_znode_count'] = int(m.group(1)) + continue + + m = re.match('Watch count: (\d+)', line) + if m is not None: + result['zk_watch_count'] = int(m.group(1)) + continue + + m = re.match('Ephemerals count: (\d+)', line) + if m is not None: + result['zk_ephemerals_count'] = int(m.group(1)) + continue + + m = re.match('Approximate data size: (\d+)', line) + if m is not None: + result['zk_approximate_data_size'] = int(m.group(1)) + continue + + m = re.match('Open file descriptor count: (\d+)', line) + if m is not None: + result['zk_open_file_descriptor_count'] = int(m.group(1)) + continue + + m = re.match('Max file descriptor count: (\d+)', line) + if m is not None: + result['zk_max_file_descriptor_count'] = int(m.group(1)) + continue + + m = re.match('Zxid: (0x[0-9a-fA-F]+)', line) + if m is not None: + result['zk_zxid'] = m.group(1) + result['zk_zxid_counter'] = int(m.group(1), 16) & int('0xffffffff', 16) # lower 32 bits + result['zk_zxid_epoch'] = int(m.group(1), 16) >>32 # high 32 bits + continue + + return result + + def _parse_line(self, line): + try: + key, value = map(str.strip, line.split('\t')) + except ValueError: + raise ValueError('Found invalid line: %s' % line) + + if not key: + raise ValueError('The key is mandatory and should not be empty') + + try: + value = int(value) + except (TypeError, ValueError): + pass + + return key, value + +def main(): + opts, args = parse_cli() + + cluster_stats = get_cluster_stats(opts.servers) + if opts.output is None: + dump_stats(cluster_stats) + return 0 + + handler = create_handler(opts.output) + if handler is None: + log.error('undefined handler: %s' % opts.output) + sys.exit(1) + + return handler.analyze(opts, cluster_stats) + +def create_handler(name): + """ Return an instance of a platform specific analyzer """ + try: + return globals()['%sHandler' % name.capitalize()]() + except KeyError: + return None + +def get_all_handlers(): + """ Get a list containing all the platform specific analyzers """ + return [NagiosHandler, CactiHandler, GangliaHandler] + +def dump_stats(cluster_stats): + """ Dump cluster statistics in an user friendly format """ + for server, stats in cluster_stats.items(): + print 'Server:', server + + for key, value in stats.items(): + print "%30s" % key, ' ', value + print + +def get_cluster_stats(servers): + """ Get stats for all the servers in the cluster """ + stats = {} + for host, port in servers: + try: + zk = ZooKeeperServer(host, port) + stats["%s:%s" % (host, port)] = zk.get_stats() + + except socket.error, e: + # ignore because the cluster can still work even + # if some servers fail completely + + # this error should be also visible in a variable + # exposed by the server in the statistics + + logging.info('unable to connect to server '\ + '"%s" on port "%s"' % (host, port)) + + return stats + + +def get_version(): + return '.'.join(map(str, __version__)) + + +def parse_cli(): + parser = OptionParser(usage='./check_zookeeper.py ', version=get_version()) + + parser.add_option('-s', '--servers', dest='servers', + help='a list of SERVERS', metavar='SERVERS') + + parser.add_option('-o', '--output', dest='output', + help='output HANDLER: nagios, ganglia, cacti', metavar='HANDLER') + + parser.add_option('-k', '--key', dest='key') + + for handler in get_all_handlers(): + handler.register_options(parser) + + opts, args = parser.parse_args() + + if opts.servers is None: + parser.error('The list of servers is mandatory') + + opts.servers = [s.split(':') for s in opts.servers.split(',')] + + return (opts, args) + + +if __name__ == '__main__': + sys.exit(main()) + diff --git a/src/contrib/monitoring/ganglia/README b/src/contrib/monitoring/ganglia/README new file mode 100644 index 0000000..578adfe --- /dev/null +++ b/src/contrib/monitoring/ganglia/README @@ -0,0 +1,48 @@ +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +Recipes for ZooKeeper monitoring using Ganglia +---------------------------------------------- + +Ganglia Install guide: http://sourceforge.net/apps/trac/ganglia/wiki/Ganglia%203.1.x%20Installation%20and%20Configuration + +Gmond configuration: http://sourceforge.net/apps/trac/ganglia/wiki/Gmond%203.1.x%20General%20Configuration + +WARNING: I have wrote these instructions while installing and configuring the plugin on my desktop computer running Ubuntu 9.10. I've installed Ganglia using apt-get. + +WARNING: I'm going to make the assumption that you know how to work with Ganglia. I'm also going to assume that you have already installed Gangli and everything works as expected. + +You can monitoring ZooKeeper using Ganglia in two ways: + +1. Using a python module: + + WARNING! The python module only works with Ganglia 3.1.x + + a. enable python modules: you can find instructions in modpython.confg + b. copy zookeeper.pyconf in /etc/ganglia/conf.d/ + c. copy zookeeper_ganglia.py in /usr/lib/ganglia/python_plugins + d. restart the ganglia-monitor + + This is the recommended way! + +2. OR Using check_zookeeper.py and gmetric: + + Monitoring ZooKeeper using Ganglia is a simple as calling: + + ./check_zookeeper.py -o ganglia -s localhost:2181 + + on each of the ZooKeeper cluster nodes. I'm making the assumption that you have already configured gmond and installed gmetric on each node. + diff --git a/src/contrib/monitoring/ganglia/Screenshot.png b/src/contrib/monitoring/ganglia/Screenshot.png new file mode 100644 index 0000000000000000000000000000000000000000..bc0e41d5f644bdebd680aa8e97e3d3f08039fcdc GIT binary patch literal 111055 zcmagG1zc3?+BZC+ARz(*q9`ILAT2G8q_nhvfPi!(or)+8N=tWl2}22r64E6tDBa!g zU4!oTIr};9_j}jb`|J_NnYHe?u7BP7J(iQe#U{l@AP~5ck3^{9LBgta*;s&!p(gI;x@j+ zU}!7ZK6Y{2QJ;-tGwN{dtogvrw#iLuVPSCr?&9ovOw3Mk?w?=S+5MlF=wg~*XQexv zU(Nmf%_M;z+aJT%ud}4!{QZegx{w6PKYx@5`OhoF|LbK}H~K&C{r`Kp{9s8C@1PpF zb>rDAe%#(w!P1*fYIdhTP7){B>rXv3^*e&vm6k9nEu02!J5b9Odhl8Eq^DfBMa>Ib zUERx;^$a{G!jE;zmkno5?Y2H;r}a2g`&#tl34gt`F?M=UGbYo@g_!uLB_WjJ_4Q$I z{GJ`o6n}Ia_H(J zFX3FEF`4H9M zOW60pn}0=q>F>BOVYAp*QJwY?UAz(1ASZ&si+g>E{l}2$%lL?2afx&zm=v;aie01R zZgIGb&e^OK^wu4$G{ibS_3>Al7yhx&Qhn8(Z`3{S z@EX_dOO8`##jyhq&sVWOJa0y`kD@;L^AvgEvepC3=-2%SAKgUD%J88s>Wxn`UZvy; zVYZoxo_1!7^`m5Y7(djxzaLlakiYpoyzE2cSm8cpYGoj}l**ytIlx6cI>guBKW_Rd z$)>F%t!_F_)`|O@hsQ5Q+6OH9&F>oI?qn?0xC%czr^o6Mx6IjW_%gnKOWI0<+xeu% zb^Xhv<*k)p;&{7pJ52*G@aQ!#DJ*cWM>QG+-C%Rr^0rC+DtqavBYRz%n2_K{>gl7` zAFt|T^q$`G?C#!Y#==znw1l-0HyFSENb=;~-96-_ zn4T}32x7UNmcHfCOw%x1R$oJOrzHrX7z=n7M|aIo?+yB%WO& zuaCcFFAuho)oIL+WZs}49Xs4FRM$J4sUPVysJ-LuJKid0w*C2az(9S1jovI#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F=4O`)k!2x$O&VK*wfs7ePYuDz-S%)ShSq&7jE`o}JH^dXbw4;nz{noyCU-Y) zS{HdTIV~y3m;>5!9+jNkO5f~uv6*$ukX3?1{i?PRT-vyxNj`uhQ;uz-KK%s2{A6?i zW5C00zTJ*ssK8rkkN%#0;k7+8r$o#vtuo-z999@1uc+lv;wk;P7<3wIa_!6Ng?H=6`nXmh`lDUuQ}%SV}$7me$mijV2l`?JR|n>JMLSsIPKLl`pPs zN|!2P{Dhgg1Y7D==}L@E8~R;GaA`t*jnBi}-@0(Js(R%GkEyrw-Wc&7tk2_k54!4H z+kGir*icuwsrSBwt)%Tn#8b1G+U&m)f{QAqEfA7yW1?~LF=WJZIZzW$U$e!uCmn@0 znXz1J_eM#3)H$7Oi(_nWlgHJRF!Xh9I3ymoTY0+`t2^##jlroBt`9zzY~h1v6#K+L$obM0EGt z)GRM4#6yF{#2GSn6oy&y4^~QK}gtMlEv^O^S1I16cKeL(*AR zqd0EI7XDFuOI$e;1ao<6V_}0xYa4YZz75wbB|>QOh`qws-77`b#J3!lqnChvs~Y>k z+rwtw&ydkba{hObd8+<6JoDWj?;+pD@CaNFU@jpK3-lm}iY90&yow6gVudwxAqC5&E`O?T|<552CvX&-Nzqo;W5G>x2fC f-3wtPd;K435Zs#SBd#Cauf{SGisB`r?>_zy*#mj& literal 0 HcmV?d00001 diff --git a/src/contrib/monitoring/ganglia/modpython.conf b/src/contrib/monitoring/ganglia/modpython.conf new file mode 100644 index 0000000..5cd051a --- /dev/null +++ b/src/contrib/monitoring/ganglia/modpython.conf @@ -0,0 +1,28 @@ +/* Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. */ + +/* Update gmond.conf */ + +modules { + module { + name = "python_module" + path = "/usr/lib/ganglia/modpython.so" + params = "/usr/lib/ganglia/python_modules" + } +} + +include ('/etc/ganglia/conf.d/*.pyconf') + diff --git a/src/contrib/monitoring/ganglia/zookeeper.pyconf b/src/contrib/monitoring/ganglia/zookeeper.pyconf new file mode 100644 index 0000000..029c146 --- /dev/null +++ b/src/contrib/monitoring/ganglia/zookeeper.pyconf @@ -0,0 +1,50 @@ +/* Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. */ + +/* Update /etc/ganglia/gmond.conf with the content of this file. */ + +/* ATTENTION: Change the host and the port to meet your setup. */ + +modules { + module { + name = "zookeeper_ganglia" + language = "python" + param host { value = "127.0.0.1" } + param port { value = 2181 } + } +} + +collection_group { + collect_every = 20 + time_threshold = 60 + metric { name = "zk_avg_latency" } + metric { name = "zk_max_latency" } + metric { name = "zk_min_latency" } + metric { name = "zk_packets_received" } + metric { name = "zk_packets_sent" } + metric { name = "zk_outstanding_requests" } + metric { name = "zk_znode_count" } + metric { name = "zk_watch_count" } + metric { name = "zk_ephemerals_count" } + metric { name = "zk_approximate_data_size" } + metric { name = "zk_open_file_descriptor_count" } + metric { name = "zk_max_file_descriptor_count" } + metric { name = "zk_followers" } + metric { name = "zk_synced_followers" } + metric { name = "zk_pending_syncs" } + metric { name = "zk_fsync_threshold_exceed_count" } +} + diff --git a/src/contrib/monitoring/ganglia/zookeeper_ganglia.py b/src/contrib/monitoring/ganglia/zookeeper_ganglia.py new file mode 100644 index 0000000..b20f824 --- /dev/null +++ b/src/contrib/monitoring/ganglia/zookeeper_ganglia.py @@ -0,0 +1,210 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" Python Ganglia Module for ZooKeeper monitoring + +Inspired by: http://gist.github.com/448007 + +Copy this file to /usr/lib/ganglia/python_plugins + +""" + +import sys +import socket +import time +import re + +from StringIO import StringIO + +TIME_BETWEEN_QUERIES = 20 + +class ZooKeeperServer(object): + + def __init__(self, host='localhost', port='2181', timeout=1): + self._address = (host, int(port)) + self._timeout = timeout + + def get_stats(self): + """ Get ZooKeeper server stats as a map """ + data = self._send_cmd('mntr') + if data: + return self._parse(data) + else: + data = self._send_cmd('stat') + return self._parse_stat(data) + + def _create_socket(self): + return socket.socket() + + def _send_cmd(self, cmd): + """ Send a 4letter word command to the server """ + s = self._create_socket() + s.settimeout(self._timeout) + + s.connect(self._address) + s.send(cmd) + + data = s.recv(2048) + s.close() + + return data + + def _parse(self, data): + """ Parse the output from the 'mntr' 4letter word command """ + h = StringIO(data) + + result = {} + for line in h.readlines(): + try: + key, value = self._parse_line(line) + result[key] = value + except ValueError: + pass # ignore broken lines + + return result + + def _parse_stat(self, data): + """ Parse the output from the 'stat' 4letter word command """ + h = StringIO(data) + + result = {} + + version = h.readline() + if version: + result['zk_version'] = version[version.index(':')+1:].strip() + + # skip all lines until we find the empty one + while h.readline().strip(): pass + + for line in h.readlines(): + m = re.match('Latency min/avg/max: (\d+)/(\d+)/(\d+)', line) + if m is not None: + result['zk_min_latency'] = int(m.group(1)) + result['zk_avg_latency'] = int(m.group(2)) + result['zk_max_latency'] = int(m.group(3)) + continue + + m = re.match('Received: (\d+)', line) + if m is not None: + result['zk_packets_received'] = int(m.group(1)) + continue + + m = re.match('Sent: (\d+)', line) + if m is not None: + result['zk_packets_sent'] = int(m.group(1)) + continue + + m = re.match('Outstanding: (\d+)', line) + if m is not None: + result['zk_outstanding_requests'] = int(m.group(1)) + continue + + m = re.match('Mode: (.*)', line) + if m is not None: + result['zk_server_state'] = m.group(1) + continue + + m = re.match('Node count: (\d+)', line) + if m is not None: + result['zk_znode_count'] = int(m.group(1)) + continue + + return result + + def _parse_line(self, line): + try: + key, value = map(str.strip, line.split('\t')) + except ValueError: + raise ValueError('Found invalid line: %s' % line) + + if not key: + raise ValueError('The key is mandatory and should not be empty') + + try: + value = int(value) + except (TypeError, ValueError): + pass + + return key, value + +def metric_handler(name): + if time.time() - metric_handler.timestamp > TIME_BETWEEN_QUERIES: + zk = ZooKeeperServer(metric_handler.host, metric_handler.port, 5) + try: + metric_handler.info = zk.get_stats() + except Exception, e: + print >>sys.stderr, e + metric_handler.info = {} + + return metric_handler.info.get(name, 0) + +def metric_init(params=None): + params = params or {} + + metric_handler.host = params.get('host', 'localhost') + metric_handler.port = int(params.get('port', 2181)) + metric_handler.timestamp = 0 + + metrics = { + 'zk_avg_latency': {'units': 'ms'}, + 'zk_max_latency': {'units': 'ms'}, + 'zk_min_latency': {'units': 'ms'}, + 'zk_packets_received': { + 'units': 'packets', + 'slope': 'positive' + }, + 'zk_packets_sent': { + 'units': 'packets', + 'slope': 'positive' + }, + 'zk_outstanding_requests': {'units': 'connections'}, + 'zk_znode_count': {'units': 'znodes'}, + 'zk_watch_count': {'units': 'watches'}, + 'zk_ephemerals_count': {'units': 'znodes'}, + 'zk_approximate_data_size': {'units': 'bytes'}, + 'zk_open_file_descriptor_count': {'units': 'descriptors'}, + 'zk_max_file_descriptor_count': {'units': 'descriptors'}, + 'zk_followers': {'units': 'nodes'}, + 'zk_synced_followers': {'units': 'nodes'}, + 'zk_pending_syncs': {'units': 'syncs'}, + 'zk_fsync_threshold_exceed_count': {'units': 'fsyncexceed'} + } + metric_handler.descriptors = {} + for name, updates in metrics.iteritems(): + descriptor = { + 'name': name, + 'call_back': metric_handler, + 'time_max': 90, + 'value_type': 'int', + 'units': '', + 'slope': 'both', + 'format': '%d', + 'groups': 'zookeeper', + } + descriptor.update(updates) + metric_handler.descriptors[name] = descriptor + + return metric_handler.descriptors.values() + +def metric_cleanup(): + pass + + +if __name__ == '__main__': + ds = metric_init({'host':'localhost', 'port': '2181'}) + for d in ds: + print "%s=%s" % (d['name'], metric_handler(d['name'])) + + diff --git a/src/contrib/monitoring/nagios/README.txt b/src/contrib/monitoring/nagios/README.txt new file mode 100644 index 0000000..317ae14 --- /dev/null +++ b/src/contrib/monitoring/nagios/README.txt @@ -0,0 +1,86 @@ +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +Configuration Recipe for monitoring ZooKeeper using Nagios +---------------------------------------------------------- + +I will start by making the assumption that you already have an working Nagios install. + +WARNING: I have wrote these instructions while installing and configuring the plugin on my desktop computer running Ubuntu 9.10. I've installed Nagios using apt-get. + +WARNING: You should customize the config files as suggested in order to match your Nagios and Zookeeper install. + +WARNING: This README assumes you know how to configure Nagios and how it works. + +WARNING: You should customize the warning and critical levels on service checks to meet your own needs. + +1. Install the plugin + +$ cp check_zookeeper.py /usr/lib/nagios/plugins/ + +2. Install the new commands + +$ cp zookeeper.cfg /etc/nagios-plugins/config + +3. Update the list of servers in zookeeper.cfg for the command 'check_zookeeper' and update the port for the command 'check_zk_node' (default: 2181) + +4. Create a virtual host in Nagios used for monitoring the cluster as a whole -OR- Create a hostgroup named 'zookeeper-servers' and add all the zookeeper cluster nodes. + +5. Define service checks like I have ilustrated bellow or just use the provided definitions. + +define service { + use generic-service + host_name zookeeper-cluster + service_description ... + check_command check_zookeeper!!! +} + +define service { + hostgroup_name zookeeper-servers + use generic-service + service_description ZK_Open_File_Descriptors_Count + check_command check_zk_node!!! +} + +Ex: + +a. check the number of open file descriptors + +define service{ + use generic-service + host_name zookeeper-cluster + service_description ZK_Open_File_Descriptor_Count + check_command check_zookeeper!zk_open_file_descriptor_count!500!800 +} + +b. check the number of ephemerals nodes + +define service { + use generic-service + host_name localhost + service_description ZK_Ephemerals_Count + check_command check_zookeeper!zk_ephemerals_count!10000!100000 +} + +c. check the number of open file descriptors for each host in the group + +define service { + hostgroup_name zookeeper-servers + use generic-service + service_description ZK_Open_File_Descriptors_Count + check_command check_zk_node!zk_open_file_descriptor_count!500!800 +} + diff --git a/src/contrib/monitoring/nagios/Screenshot-1.png b/src/contrib/monitoring/nagios/Screenshot-1.png new file mode 100644 index 0000000000000000000000000000000000000000..2dc55c58adcba0adf1407a093eabf3556153cd8b GIT binary patch literal 196668 zcmYhj1z1$!7Bzeb>28n|5v03YO1itdyIVp82^DD=y1P3B0cntq0qK%v==hKKe)s$S z;o+H?Gr`Px-@W(RYpqSRs3IMEI{v?3I3PWf1U!iB`CdsHc?pRC>je$L zupRg|)WCZw2~FRnzga%I1oQKQ6Ip3T%r)rDov2~D5>iqYC!G$lEOVauc189xuLoWi zk!r+|<=6V)2lQ1f;7WXXLy>H?*rjoNKiCuViOx?$G5Gr8=BB3JV|fvpcDw3vB7lMt zA@qX;pB4uN5&nZXH4e&i2!lENe{cThi2LV%NB{far9*Yy={EF3WZ z)2Yo!z2o+o_GTB*KEUB<-ovl($6t5Q$exV1*&NTR$zM3j<}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^yFy21AupsjG%>gPU z+(?fA`8@w>;r#arPJJFh8tzO-gfqfcIQa{*- zI=Kpb@JeuUJ1q!Q;iWCSX<}MqF;W#LF78}f!z#&@?tJqm-m`(>%$?eeL`U9i&Dk?; zm=;rTYL!d+8bq*mE2WXF79qFTq)NfbY`0Nh=09h0DXMz+lbprUt7~sd$A^QSbI1~I zhJOfoZd}H0SMg@R-y8c;Ocjp+i}Thlp>4dJ@e~~ezL>ZBUbEE{(%`bqGNmZZr;Qt) z31IYO_Rjuu$#ETax7Jy6wMn_a`-stYnVALf7ffyCXSG+n?d`D}R zfX9#K7T9ZWc)-4}VR_2ilB6EMQ!rH3tV|$~>;ry8>!*cJ*6(AtD)lpNTp{c<_oea1 zJ87GMK<^r6X|e;O&d(Bq0y|8|vVnW&x;xPJQ($>l&<#eQ_stLkYlcICcZZw0NPrq< zH1O_lQyRtb?uVOx?EXg!2fP1Yws3Gj(EsW?{A&vbUm5h@{1yMMg~M|s97!O)X5*cr UIOjPIG!MF^q;aEA!TiyG0f4c#8UO$Q literal 0 HcmV?d00001 diff --git a/src/contrib/monitoring/nagios/hostgroups.cfg b/src/contrib/monitoring/nagios/hostgroups.cfg new file mode 100644 index 0000000..ea59a66 --- /dev/null +++ b/src/contrib/monitoring/nagios/hostgroups.cfg @@ -0,0 +1,25 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# A group containing all the ZooKeeper nodes + +define hostgroup { + hostgroup_name zookeeper-servers + alias ZooKeeper Servers + members localhost +} + + diff --git a/src/contrib/monitoring/nagios/services.cfg b/src/contrib/monitoring/nagios/services.cfg new file mode 100644 index 0000000..dde6ab7 --- /dev/null +++ b/src/contrib/monitoring/nagios/services.cfg @@ -0,0 +1,67 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# ZooKeeper Node specific services + +define service { + hostgroup_name zookeeper-servers + use generic-service + service_description ZK_Open_File_Descriptors_Count + check_command check_zk_node!zk_open_file_descriptor_count!500!800 +} + +define service { + hostgroup_name zookeeper-servers + use generic-service + service_description ZK_Ephemerals_Count + check_command check_zk_node!zk_ephemerals_count!10000!100000 +} + +define service { + hostgroup_name zookeeper-servers + use generic-service + service_description ZK_Avg_Latency + check_command check_zk_node!zk_avg_latency!500!1000 +} + +define service { + hostgroup_name zookeeper-servers + use generic-service + service_description ZK_Max_Latency + check_command check_zk_node!zk_max_latency!1000!2000 +} + +define service { + hostgroup_name zookeeper-servers + use generic-service + service_description ZK_Min_Latency + check_command check_zk_node!zk_min_latency!500!1000 +} + +define service { + hostgroup_name zookeeper-servers + use generic-service + service_description ZK_Outstanding_Requests + check_command check_zk_node!zk_outstanding_requests!20!50 +} + +define service { + hostgroup_name zookeeper-servers + use generic-service + service_description ZK_Watch_Count + check_command check_zk_node!zk_watch_count!100!500 +} + diff --git a/src/contrib/monitoring/nagios/zookeeper.cfg b/src/contrib/monitoring/nagios/zookeeper.cfg new file mode 100644 index 0000000..ed4cfab --- /dev/null +++ b/src/contrib/monitoring/nagios/zookeeper.cfg @@ -0,0 +1,30 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# 'check_zookeeper' command definition +define command { + command_name check_zookeeper + command_line /usr/lib/nagios/plugins/check_zookeeper.py -s "localhost:2181,localhost:2182,localhost:2183" -o nagios -k '$ARG1$' -w '$ARG2$' -c '$ARG3$' + # ATTENTION: you should update the list of servers defined above +} + +# 'check_zk_node' command definition +define command { + command_name check_zk_node + command_line /usr/lib/nagios/plugins/check_zookeeper.py -s $HOSTADDRESS$:2181 -o nagios -k '$ARG1$' -w '$ARG2$' -c '$ARG3$' + # ATTENTION: you should update the port. default: 2181 +} + diff --git a/src/contrib/monitoring/test.py b/src/contrib/monitoring/test.py new file mode 100644 index 0000000..3941291 --- /dev/null +++ b/src/contrib/monitoring/test.py @@ -0,0 +1,282 @@ +#! /usr/bin/env python +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import unittest +import socket +import sys + +from StringIO import StringIO + +from check_zookeeper import ZooKeeperServer, NagiosHandler, CactiHandler, GangliaHandler + +ZK_MNTR_OUTPUT = """zk_version\t3.4.0--1, built on 06/19/2010 15:07 GMT +zk_avg_latency\t1 +zk_max_latency\t132 +zk_min_latency\t0 +zk_packets_received\t640 +zk_packets_sent\t639 +zk_outstanding_requests\t0 +zk_server_state\tfollower +zk_znode_count\t4 +zk_watch_count\t0 +zk_ephemerals_count\t0 +zk_approximate_data_size\t27 +zk_open_file_descriptor_count\t22 +zk_max_file_descriptor_count\t1024 +""" + +ZK_MNTR_OUTPUT_WITH_BROKEN_LINES = """zk_version\t3.4.0 +zk_avg_latency\t23 +broken-line + +""" + +ZK_STAT_OUTPUT = """Zookeeper version: 3.3.0-943314, built on 05/11/2010 22:20 GMT +Clients: + /0:0:0:0:0:0:0:1:34564[0](queued=0,recved=1,sent=0) + +Latency min/avg/max: 0/40/121 +Received: 11 +Sent: 10 +Outstanding: 0 +Zxid: 0x700000003 +Mode: follower +Node count: 4 +""" + +class SocketMock(object): + def __init__(self): + self.sent = [] + + def settimeout(self, timeout): + self.timeout = timeout + + def connect(self, address): + self.address = address + + def send(self, data): + self.sent.append(data) + return len(data) + + def recv(self, size): + return ZK_MNTR_OUTPUT[:size] + + def close(self): pass + +class ZK33xSocketMock(SocketMock): + def __init__(self): + SocketMock.__init__(self) + self.got_stat_cmd = False + + def recv(self, size): + if 'stat' in self.sent: + return ZK_STAT_OUTPUT[:size] + else: + return '' + +class UnableToConnectSocketMock(SocketMock): + def connect(self, _): + raise socket.error('[Errno 111] Connection refused') + +def create_server_mock(socket_class): + class ZooKeeperServerMock(ZooKeeperServer): + def _create_socket(self): + return socket_class() + return ZooKeeperServerMock() + +class TestCheckZookeeper(unittest.TestCase): + + def setUp(self): + self.zk = ZooKeeperServer() + + def test_parse_valid_line(self): + key, value = self.zk._parse_line('something\t5') + + self.assertEqual(key, 'something') + self.assertEqual(value, 5) + + def test_parse_line_raises_exception_on_invalid_output(self): + invalid_lines = ['something', '', 'a\tb\tc', '\t1'] + for line in invalid_lines: + self.assertRaises(ValueError, self.zk._parse_line, line) + + def test_parser_on_valid_output(self): + data = self.zk._parse(ZK_MNTR_OUTPUT) + + self.assertEqual(len(data), 14) + self.assertEqual(data['zk_znode_count'], 4) + + def test_parse_should_ignore_invalid_lines(self): + data = self.zk._parse(ZK_MNTR_OUTPUT_WITH_BROKEN_LINES) + + self.assertEqual(len(data), 2) + + def test_parse_stat_valid_output(self): + data = self.zk._parse_stat(ZK_STAT_OUTPUT) + + result = { + 'zk_version' : '3.3.0-943314, built on 05/11/2010 22:20 GMT', + 'zk_min_latency' : 0, + 'zk_avg_latency' : 40, + 'zk_max_latency' : 121, + 'zk_packets_received': 11, + 'zk_packets_sent': 10, + 'zk_server_state': 'follower', + 'zk_znode_count': 4 + } + for k, v in result.iteritems(): + self.assertEqual(v, data[k]) + + def test_recv_valid_output(self): + zk = create_server_mock(SocketMock) + + data = zk.get_stats() + self.assertEqual(len(data), 14) + self.assertEqual(data['zk_znode_count'], 4) + + def test_socket_unable_to_connect(self): + zk = create_server_mock(UnableToConnectSocketMock) + + self.assertRaises(socket.error, zk.get_stats) + + def test_use_stat_cmd_if_mntr_is_not_available(self): + zk = create_server_mock(ZK33xSocketMock) + + data = zk.get_stats() + self.assertEqual(data['zk_version'], '3.3.0-943314, built on 05/11/2010 22:20 GMT') + +class HandlerTestCase(unittest.TestCase): + + def setUp(self): + try: + sys._stdout + except: + sys._stdout = sys.stdout + + sys.stdout = StringIO() + + def tearDown(self): + sys.stdout = sys._stdout + + def output(self): + sys.stdout.seek(0) + return sys.stdout.read() + + +class TestNagiosHandler(HandlerTestCase): + + def _analyze(self, w, c, k, stats): + class Opts(object): + warning = w + critical = c + key = k + + return NagiosHandler().analyze(Opts(), {'localhost:2181':stats}) + + def test_ok_status(self): + r = self._analyze(10, 20, 'a', {'a': 5}) + + self.assertEqual(r, 0) + self.assertEqual(self.output(), 'Ok "a"!|localhost:2181=5;10;20\n') + + r = self._analyze(20, 10, 'a', {'a': 30}) + self.assertEqual(r, 0) + + def test_warning_status(self): + r = self._analyze(10, 20, 'a', {'a': 15}) + self.assertEqual(r, 1) + self.assertEqual(self.output(), + 'Warning "a" localhost:2181!|localhost:2181=15;10;20\n') + + r = self._analyze(20, 10, 'a', {'a': 15}) + self.assertEqual(r, 1) + + def test_critical_status(self): + r = self._analyze(10, 20, 'a', {'a': 30}) + self.assertEqual(r, 2) + self.assertEqual(self.output(), + 'Critical "a" localhost:2181!|localhost:2181=30;10;20\n') + + r = self._analyze(20, 10, 'a', {'a': 5}) + self.assertEqual(r, 2) + + def test_check_a_specific_key_on_all_hosts(self): + class Opts(object): + warning = 10 + critical = 20 + key = 'latency' + + r = NagiosHandler().analyze(Opts(), { + 's1:2181': {'latency': 5}, + 's2:2181': {'latency': 15}, + 's3:2181': {'latency': 35}, + }) + self.assertEqual(r, 2) + self.assertEqual(self.output(), + 'Critical "latency" s3:2181!|s1:2181=5;10;20 '\ + 's3:2181=35;10;20 s2:2181=15;10;20\n') + +class TestCactiHandler(HandlerTestCase): + class Opts(object): + key = 'a' + leader = False + + def __init__(self, leader=False): + self.leader = leader + + def test_output_values_for_all_hosts(self): + r = CactiHandler().analyze(TestCactiHandler.Opts(), { + 's1:2181':{'a':1}, + 's2:2181':{'a':2, 'b':3} + }) + self.assertEqual(r, None) + self.assertEqual(self.output(), 's1_2181:1 s2_2181:2') + + def test_output_single_value_for_leader(self): + r = CactiHandler().analyze(TestCactiHandler.Opts(leader=True), { + 's1:2181': {'a':1, 'zk_server_state': 'leader'}, + 's2:2181': {'a':2} + }) + self.assertEqual(r, 0) + self.assertEqual(self.output(), '1\n') + + +class TestGangliaHandler(unittest.TestCase): + + class TestableGangliaHandler(GangliaHandler): + def __init__(self): + GangliaHandler.__init__(self) + self.cli_calls = [] + + def call(self, cli): + self.cli_calls.append(' '.join(cli)) + + def test_send_single_metric(self): + class Opts(object): + @property + def gmetric(self): return '/usr/bin/gmetric' + opts = Opts() + + h = TestGangliaHandler.TestableGangliaHandler() + h.analyze(opts, {'localhost:2181':{'latency':10}}) + + cmd = "%s -n latency -v 10 -t uint32" % opts.gmetric + assert cmd in h.cli_calls + +if __name__ == '__main__': + unittest.main() + diff --git a/src/contrib/rest/NOTICE.txt b/src/contrib/rest/NOTICE.txt new file mode 100644 index 0000000..2a92254 --- /dev/null +++ b/src/contrib/rest/NOTICE.txt @@ -0,0 +1,7 @@ +This contrib module includes software developed under the +COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 + +This contrib depends on binary only jar libraries developed at: + +https://jersey.dev.java.net/ +https://grizzly.dev.java.net/ diff --git a/src/contrib/rest/README.txt b/src/contrib/rest/README.txt new file mode 100644 index 0000000..30f2e5d --- /dev/null +++ b/src/contrib/rest/README.txt @@ -0,0 +1,72 @@ + +ZooKeeper REST implementation using Jersey JAX-RS. +-------------------------------------------------- + +This is an implementation of version 2 of the ZooKeeper REST spec. + +Note: This interface is currently experimental, may change at any time, +etc... In general you should be using the Java/C client bindings to access +the ZooKeeper server. + +This REST ZooKeeper gateway is useful because most of the languages +have built-in support for working with HTTP based protocols. + +See SPEC.txt for details on the REST binding. + +Quickstart: +----------- + +1) start a zookeeper server on localhost port 2181 + +2) run "ant run" + +3) use a REST client to access the data (see below for more details) + + curl http://localhost:9998/znodes/v1/ + +or use the provided src/python scripts + + zk_dump_tree.py + + +Tests: +---------- + +1) the full testsuite can be run via "ant test" target +2) the python client library also contains a test suite + +Examples Using CURL +------------------- + +First review the spec SPEC.txt in this directory. + +#get the root node data +curl http://localhost:9998/znodes/v1/ + +#get children of the root node +curl http://localhost:9998/znodes/v1/?view=children + +#get "/cluster1/leader" as xml (default is json) +curl -H'Accept: application/xml' http://localhost:9998/znodes/v1/cluster1/leader + +#get the data as text +curl -w "\n%{http_code}\n" "http://localhost:9998/znodes/v1/cluster1/leader?dataformat=utf8" + +#set a node (data.txt contains the ascii text you want to set on the node) +curl -T data.txt -w "\n%{http_code}\n" "http://localhost:9998/znodes/v1/cluster1/leader?dataformat=utf8" + +#create a node +curl -d "data1" -H'Content-Type: application/octet-stream' -w "\n%{http_code}\n" "http://localhost:9998/znodes/v1/?op=create&name=cluster2&dataformat=utf8" + +curl -d "data2" -H'Content-Type: application/octet-stream' -w "\n%{http_code}\n" "http://localhost:9998/znodes/v1/cluster2?op=create&name=leader&dataformat=utf8" + +#create a new session +curl -d "" -H'Content-Type: application/octet-stream' -w "\n%{http_code}\n" "http://localhost:9998/sessions/v1/?op=create&expire=10" + +#session heartbeat +curl -X "PUT" -H'Content-Type: application/octet-stream' -w "\n%{http_code}\n" "http://localhost:9998/sessions/v1/02dfdcc8-8667-4e53-a6f8-ca5c2b495a72" + +#delete a session +curl -X "DELETE" -H'Content-Type: application/octet-stream' -w "\n%{http_code}\n" "http://localhost:9998/sessions/v1/02dfdcc8-8667-4e53-a6f8-ca5c2b495a72" + + diff --git a/src/contrib/rest/SPEC.txt b/src/contrib/rest/SPEC.txt new file mode 100644 index 0000000..8c5f701 --- /dev/null +++ b/src/contrib/rest/SPEC.txt @@ -0,0 +1,355 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +A REST HTTP gateway for ZooKeeper +================================= + +Specification Version: 2 + +ZooKeeper is meant to enable distributed coordination and also store +system configuration and other relatively small amounts of information +that must be stored in a persistent and consistent manner. The +information stored in ZooKeeper is meant to be highly available to a +large number of nodes in a distributed-computing cluster. + +ZooKeeper offers a client-side library that supports rich semantics +that include strict ordering guarantees on operations, the creation of +ephemeral znodes, and the ability to watch for changes to state. +However, where clients need simple "CRUD" (create, read, update, +delete) operations, the ZooKeeper libraries can be cumbersome, both to +the programmers who have to use them (who are increasingly used to +REST-style APIs), and to the operators who have to deploy and update +them (for whom deploying and updating client libraries can be very +painful). + +It turns out that most languages comes with client libraries for HTTP +that are easy and familiar to program against, and deployed as part of +the language runtime. Thus, for simple CRUD clients, an HTTP gateway +would be a less cumbersome interface than the ZooKeeper library. + +This document describes a gatway for using HTTP to interact with a +ZooKeeper repository. + +Binding ZooKeeper to HTTP +------------------------- + +Encoding +-------- + +UTF-8 unless otherwise noted + +Paths +----- + +A ZooKeeper paths are mapped to IRIs and URIs as follows. ZK paths +are converted to IRIs by simply percent-encoding any characters in the +ZK path that are not allowed in IRI paths. ZK paths are converted to +URIs by mapping them first to IRIs, then converting to URIs in the +standard way. + +Going from URIs and IRIs is the reverse of the above but for one +difference: any "." and ".." segments in an IRI or URI must be folded +before conversion. (Fortunately, ZK does not allow "." and ".." +segments in its paths.) + +ZK and IRIs recommend the same practices when it comes to Unicode +normalization: ultimately, normalization is left to application +designers, but both recommend that application designers use NFC as a +best practice. + +Root +---- + +The following examples assume that the ZooKeeper znode heirarchy is +bound to the root of the HTTP servers namespace. This may not be the +case in practice however, the gateway may bind to some prefix, for +example the URL for accessing /a/b/c may be: + + http://localhost/zookeeper/znodes/v1/a/b/c + +This is perfectly valid. Users of the REST service should be aware of +this fact and code their clients to support any root (in this case +"/zookeeper" on the server localhost). + + +Basics: GET, PUT, HEAD, and DELETE +---------------------------------- + +HTTP's GET, PUT, HEAD, and DELETE operations map naturally to +ZooKeeper's "get," "set," "exists," and "delete" operations. + +ZooKeeper znodes have a version number that changes each time the +znode's value is updated. This number is returned by "get," "set," and +"exists" operations. The "set" and "delete" operations optionally take +a version number. If one is supplied, then "set" or "delete" will fail +if the current version of the znode doesn't match the version-number +supplied in the call. This mechanism supports atomic read-modify-write +cycles. Set/delete requests may include an optional parameter +"version" which defaults to no version check. + + +Getting ZooKeeper children +-------------------------- + +We overload the GET method to return the children of a ZooKeeper. In +particular, the GET method takes an optional parameter "view" which +could be set to one of type values, either "data" or "children". The +default is "data". Thus, to get the children of a znode named +"/a/b/c", then the GET request should start: + + GET /znodes/v1/a/b/c?view=children HTTP/1.1 + +If the requested view is "data", then the data of a znode is returned +as described in the previous section. If the requested view is +"children", then a list of children is returned in either an XML +document, or in a JSON object. (The default is JSON, but this can be +controlled changed by setting the Accept header.) + + +Creating a ZooKeeper session +---------------------------- + +In order to be able to create ephemeral nodes you first need to start +a new session. + + POST /sessions/v1?op=create&expire= HTTP/1.1 + +If the session creation is successful, then a 201 code will be returned. + +A session is just an UUID that you can pass around as a parameter and +the REST server will foward your request on the attached persistent +connection. + +Keeping a session alive +----------------------- + +To keep a session alive you must send hearbeat requests: + + PUT /sessions/v1/ HTTP/1.1 + +Closing a ZooKeeper session +--------------------------- + +You can close a connection by sending a DELETE request. + + DELETE /sessions/v1/ HTTP/1.1 + +If you don't close a session it will automatically expire after +the amount of time you specified on creation. + +Creating a ZooKeeper znode +-------------------------- + +We use the POST method to create a ZooKeeper znode. For example, to +create a znode named "c" under a parent named "/a/b", then the POST +request should start: + + POST /znodes/v1/a/b?op=create&name=c HTTP/1.1 + +If the creation is successful, then a 201 code will be returned. If +it fails, then a number of different codes might be returned +(documented in a later subsection). + +ZooKeeper's create operation has a flag that tells the server to +append a sequence-number to the client-supplied znode-name in order to +make the znode-name unique. If you set this flag and ask to create a +znode named "/a/b/c", and a znode named "/a/b" already exists, then +"create" will create a znode named "/a/b/c-#" instead, where "#" is and +integer required to generate a unique name in for format %10d. + +To obtain this behavior, an additional "sequence=true" parameter +should be added to the parameters of the POST. (Note that "sequence" +is an optional parameter, that defaults to "false"; this default may +be provided explicitly if desired.) + +On success the actual path of the created znode will be returned. + +If you want to create an ephemeral node you need to specify an +additional "ephemeral=true" parameter. (Note that "ephemeral" is an optional +parameter, that defaults to "false") + +(Note: ZooKeeper also allows the client to set ACLs for the +newly-created znode. This feature is not currently supported by the +HTTP gateway to ZooKeeper.) + + +Content types and negotiation +----------------------------- + +ZooKeeper REST gateway implementations may support three content-types +for request and response messages: + +* application/octet-stream + + HEAD - returns nothing (note below: status = 204) + GET - returns the znode data as an octet-stream + PUT - send binary data, returns nothing + POST - send binary data, returns the name of the znode + DELETE - returns nothing + + For PUT and HEAD some other content-type (i.e. JSON or XML) must be + used to access the Stat information of a znode. + +* application/json, application/javascript & application/xml + + HEAD - returns nothing + GET - returns a STAT or CHILD structure + PUT - send binary data, returns a STAT structure (sans data field) + POST - send binary data, returns a PATH structure + DELETE - returns nothing + + (structures defined below) + + Results returning DATA may include an optional "dataformat" + parameter which has two possible values; base64 (default) or + utf8. This allows the caller to control the format of returned data + and may simplify usage -- for example cat'ing results to the command + line with something like curl, or accessing a url through a browser. + Care should be exercised however, if utf8 is used on non character + data errors may result. + + "application/javascript" requests may include an optional "callback" + parameter. The response is wrapped in a callback method of your + choice. e.g. appending &callback=foo to your request will result in + a response body of: foo(...). Callbacks may only contain + alphanumeric characters and underscores. + +PATH + path : string + uri: string + + path is the full path to the znode as seen by ZooKeeper + + uri is the full URI of the znode as seen by the REST server, does not + include any query parameters (i.e. it's the path to the REST resource) + +SESSION + id : string UUID + uri : string + +CHILD + PATH + child_uri_template: string + children : [ string* ] + + The children list of strings contains only the name of the child + znodes, not the full path. + + child_uri_template is a template for URI of child znodes as seen by the + REST server. e.g. "http://localhost:9998/znodes/v1/foo/{child}", where + foo is the parent node, and {child} can be substituted with the name + of each child in the children array in order to access that resource. + This template is provided to simplify child access. + +STAT + PATH + encoding : value of "base64" or "utf8" + data : base64 or utf8 encoded string + stat : + czxid : number + mzxid : number + ctime : number + mtime : number + version : number + cversion : number + aversion : number + ephemeralOwner : number + datalength : number + numChildren : number + pzxid : number + + +Error Codes +----------- + +The ZooKeeper gateway uses HTTP response codes as follows: + + * 200 (Success) - ZOK for "get" "set" "delete", "yes" case of "exists" (json/xml) + * 201 (Created) - ZOK for "create" + * 204 (No Content) - ZOK for "yes" case of "exists" (octet) + * 400 (Bad Request) - ZINVALIDACL, ZBADARGUMENTS, version param not a number + * 401 (Unauthorized) - ZAUTHFAILED + * 404 (Not Found) - ZOK for "no" case of "exists;" ZNONODE for "get," "set," and "delete" + * 409 (Conflict) - ZNODEEXISTS, ZNONODE for "create," ZNOTEMPTY, + * 412 (Precondition Failed) - ZBADVERSION + * 415 (Unsupported Media Type) - if content-type of PUT or POST is not "application/octet-stream" + * 500 (Internal Server Error) - Failure in gateway code + * 501 (Not Implemented) - HTTP method other than GET, PUT, HEAD, DELETE + * 502 (Bad Gateway) - All other ZooKeeper error codes + * 503 (Service Unavailable) - ZSESSIONEXPIRED, ZCONNECTIONLOSS, (gateway will try to reestablish the connection, but will not hold the request waiting...) + * 504 (Gateway Timeout) - ZOPERATIONTIMEOUT, or ZooKeeper does not return in a timely manner + +Note that these are the codes used by the HTTP-to-Gateway software +itself. Depending on how this software is configured into a Web +server, the resulting Web Server might behave differently, e.g., it +might do redirection, check other headers, etc. + +Error Messages +-------------- + +Error messages are returned to the caller, format is dependent on the +format requested in the call. + +* application/octet-stream + + A string containing the error message. It should include the request + and information detailing the reason for the error. + +* application/json + + { "request":"GET /a/b/c", "message":"Node doesn't exist" } + +* application/xml + + + + GET /a/b/c + Node doesn't exist + + + +Binding ZooKeeper to an HTTP server +----------------------------------- + +It might be sage to assume that everyone is happy to run an Apache +server, and thus write a "mod_zookeeper" for Apache that works only +for the Apache Web Server. However, different operational +environments prefer different Web Servers, and it would be nice to +support more than one Web server. + +Issues: + + * Configuration. + + * Defining a root: Need to provide a URL alias and associate it + with a server. Need to be able to map different aliases to + different servers (implemented via multiple ZK connections). + + * Sharing connection across multiple processes. + + * Asynchronous. + + * Adaptors. + + * Code re-use. + + +Authentication -- TBD, not currently supported + +...the config file should contain authentication material for the gateway + +...the config file should contain an ACL list to be passed along to "create" + +...would we ever want to authenticate each request to ZooKeeper?... diff --git a/src/contrib/rest/build.xml b/src/contrib/rest/build.xml new file mode 100644 index 0000000..fb628bc --- /dev/null +++ b/src/contrib/rest/build.xml @@ -0,0 +1,183 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Tests failed! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/contrib/rest/conf/keys/README b/src/contrib/rest/conf/keys/README new file mode 100644 index 0000000..085810a --- /dev/null +++ b/src/contrib/rest/conf/keys/README @@ -0,0 +1,8 @@ + +In order to generate .jks (java keystore files) you need to use keytool. + +The password for the existing .jks is "123456" (without quotes). + +Some tutorials: + - http://www.mobilefish.com/tutorials/java/java_quickguide_keytool.html + diff --git a/src/contrib/rest/conf/keys/rest.cer b/src/contrib/rest/conf/keys/rest.cer new file mode 100644 index 0000000000000000000000000000000000000000..13e5aabe562f0d0507d3c6709a3a3527ce258f19 GIT binary patch literal 595 zcmXqLV)8d=V%)KSnTe5!iNz;sF0TPE8>d#AN85K^Mn+av27??!0RuiZ=1>+kVfN6x z?7aN)JeUXvh6p=`2p5J3H--o^T*N?5oY&C6z{0@P(9qDt$S_Kr*Vxp+*vK5prL$`q z=Oc#(BP#=QV=se2V<%H%BSYWbGS>f3PJXvm4%r-kd}HQ?l{*@lYdP% zKXaEoN*khNe+YWI`;11mY-+!bZpKk1GMmr3`n#2w6gv+_ab<1?{)@-|1UO&Uzt2^?V`hx> zo~?GG?UC!1EZ6iZIv5CUjxayK`25YYdr9R_ivm4AKHV<1dRh-#_&ZUf9R~ND9?75o t@hPEFdt$!Tolof%M$N1r7$#`FG}+r_l_j^PQl#fZW6;l-MbVp5Spm(9$n*dJ literal 0 HcmV?d00001 diff --git a/src/contrib/rest/conf/keys/rest.jks b/src/contrib/rest/conf/keys/rest.jks new file mode 100644 index 0000000000000000000000000000000000000000..539e8be7ba44e0dc3cb39deb822280a4fbde67af GIT binary patch literal 1363 zcmezO_TO6u1_mY|W&~r_+{*0KN+3_m@oVinpv*3VCZ=r$d~96WY>X_7T1J%57Nhc{i> zJWVv!CM&G;pKJ1F`Eydn8DX>4x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 diff --git a/src/contrib/rest/conf/log4j.properties b/src/contrib/rest/conf/log4j.properties new file mode 100644 index 0000000..21ba7e4 --- /dev/null +++ b/src/contrib/rest/conf/log4j.properties @@ -0,0 +1,68 @@ +# +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# + +# +# ZooKeeper Logging Configuration +# + +# Format is " (, )+ + +# DEFAULT: console appender only +log4j.rootLogger=INFO, CONSOLE + +# Example with rolling log file +#log4j.rootLogger=DEBUG, CONSOLE, ROLLINGFILE + +# Example with rolling log file and tracing +#log4j.rootLogger=TRACE, CONSOLE, ROLLINGFILE, TRACEFILE + +# +# Log INFO level and above messages to the console +# +log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender +log4j.appender.CONSOLE.Threshold=INFO +log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout +log4j.appender.CONSOLE.layout.ConversionPattern=%d{ISO8601} - %-5p - [%t:%C{1}@%L] - %m%n + +# +# Add ROLLINGFILE to rootLogger to get log file output +# Log DEBUG level and above messages to a log file +log4j.appender.ROLLINGFILE=org.apache.log4j.ConsoleAppender +log4j.appender.ROLLINGFILE.Threshold=DEBUG +log4j.appender.ROLLINGFILE.File=bookkeeper.log +log4j.appender.ROLLINGFILE.layout=org.apache.log4j.PatternLayout +log4j.appender.ROLLINGFILE.layout.ConversionPattern=%d{ISO8601} - %-5p - [%t:%C{1}@%L] - %m%n + +# Max log file size of 10MB +log4j.appender.ROLLINGFILE.MaxFileSize=10MB +# uncomment the next line to limit number of backup files +#log4j.appender.ROLLINGFILE.MaxBackupIndex=10 + +# +# Add TRACEFILE to rootLogger to get log file output +# Log DEBUG level and above messages to a log file +log4j.appender.TRACEFILE=org.apache.log4j.FileAppender +log4j.appender.TRACEFILE.Threshold=TRACE +log4j.appender.TRACEFILE.File=bookkeeper_trace.log + +log4j.appender.TRACEFILE.layout=org.apache.log4j.PatternLayout +### Notice we are including log4j's NDC here (%x) +log4j.appender.TRACEFILE.layout.ConversionPattern=%d{ISO8601} - %-5p [%t:%C{1}@%L][%x] - %m%n diff --git a/src/contrib/rest/conf/rest.properties b/src/contrib/rest/conf/rest.properties new file mode 100644 index 0000000..f0abb45 --- /dev/null +++ b/src/contrib/rest/conf/rest.properties @@ -0,0 +1,70 @@ +# +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# + +# +# ZooKeeper REST Gateway Configuration file +# + +rest.port = 9998 + +# +# Endpoint definition +# + +# plain configuration ; +rest.endpoint.1 = /;localhost:2181,localhost:2182 + +# ... or chrooted to /zookeeper +# rest.endpoint.1 = /;localhost:2181,localhost:2182/zookeeper + +# HTTP Basic authentication for this endpoint +# rest.endpoint.1.http.auth = root:root1 + +# create -e /a data digest:'demo:ojnHEyje6F33LLzGVzg+yatf4Fc=':cdrwa +# any session on this endpoint will use authentication +# rest.endpoint.1.zk.digest = demo:test + +# you can easily generate the ACL using Python: +# import sha; sha.sha('demo:test').digest().encode('base64').strip() + +# +# ... you can define as many endpoints as you wish +# + +# rest.endpoint.2 = /restricted;localhost:2181 +# rest.endpoint.2.http.auth = admin:pass + +# rest.endpoint.3 = /cluster1;localhost:2181,localhost:2182 +# ** you should configure one end-point for each ZooKeeper cluster +# etc. + +# Global HTTP Basic Authentication +# You should also enable HTTPS-only access +# The authentication credentials are sent as plain text + +# rest.http.auth = guest:guest1 + +# Uncomment the lines bellow to allow https-only access + +# rest.ssl = true +# rest.ssl.jks = keys/rest.jks +# rest.ssl.jks.pass = 123456 + \ No newline at end of file diff --git a/src/contrib/rest/ivy.xml b/src/contrib/rest/ivy.xml new file mode 100644 index 0000000..903d390 --- /dev/null +++ b/src/contrib/rest/ivy.xml @@ -0,0 +1,48 @@ + + + + + + + + ZooKeeper REST + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/contrib/rest/rest.sh b/src/contrib/rest/rest.sh new file mode 100644 index 0000000..daa8198 --- /dev/null +++ b/src/contrib/rest/rest.sh @@ -0,0 +1,90 @@ +#!/bin/sh + +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# +# If this scripted is run out of /usr/bin or some other system bin directory +# it should be linked to and not copied. Things like java jar files are found +# relative to the canonical path of this script. +# + +# Only follow symlinks if readlink supports it +if readlink -f "$0" > /dev/null 2>&1 +then + ZKREST=`readlink -f "$0"` +else + ZKREST="$0" +fi +ZKREST_HOME=`dirname "$ZKREST"` + +if $cygwin +then + # cygwin has a "kill" in the shell itself, gets confused + KILL=/bin/kill +else + KILL=kill +fi + +if [ -z $ZKREST_PIDFILE ] + then ZKREST_PIDFILE=$ZKREST_HOME/server.pid +fi + +ZKREST_MAIN=org.apache.zookeeper.server.jersey.RestMain + +ZKREST_CONF=$ZKREST_HOME/conf +ZKREST_LOG=$ZKREST_HOME/zkrest.log + +CLASSPATH="$ZKREST_CONF:$CLASSPATH" + +for i in "$ZKREST_HOME"/lib/*.jar +do + CLASSPATH="$i:$CLASSPATH" +done + +for i in "$ZKREST_HOME"/zookeeper-*.jar +do + CLASSPATH="$i:$CLASSPATH" +done + +case $1 in +start) + echo "Starting ZooKeeper REST Gateway ... " + java -cp "$CLASSPATH" $JVMFLAGS $ZKREST_MAIN >$ZKREST_LOG 2>&1 & + /bin/echo -n $! > "$ZKREST_PIDFILE" + echo STARTED + ;; +stop) + echo "Stopping ZooKeeper REST Gateway ... " + if [ ! -f "$ZKREST_PIDFILE" ] + then + echo "error: could not find file $ZKREST_PIDFILE" + exit 1 + else + $KILL -9 $(cat "$ZKREST_PIDFILE") + rm "$ZKREST_PIDFILE" + echo STOPPED + fi + ;; +restart) + shift + "$0" stop ${@} + sleep 3 + "$0" start ${@} + ;; +*) + echo "Usage: $0 {start|stop|restart}" >&2 + +esac diff --git a/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/RestMain.java b/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/RestMain.java new file mode 100644 index 0000000..954ad04 --- /dev/null +++ b/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/RestMain.java @@ -0,0 +1,151 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.zookeeper.server.jersey; + +import java.io.File; +import java.io.IOException; +import java.net.URISyntaxException; +import java.net.URL; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.apache.zookeeper.server.jersey.cfg.Credentials; +import org.apache.zookeeper.server.jersey.cfg.Endpoint; +import org.apache.zookeeper.server.jersey.cfg.RestCfg; +import org.apache.zookeeper.server.jersey.filters.HTTPBasicAuth; + +import com.sun.grizzly.SSLConfig; +import com.sun.grizzly.http.embed.GrizzlyWebServer; +import com.sun.grizzly.http.servlet.ServletAdapter; +import com.sun.jersey.spi.container.servlet.ServletContainer; + +/** + * Demonstration of how to run the REST service using Grizzly + */ +public class RestMain { + + private static Logger LOG = LoggerFactory.getLogger(RestMain.class); + + private GrizzlyWebServer gws; + private RestCfg cfg; + + public RestMain(RestCfg cfg) { + this.cfg = cfg; + } + + public void start() throws IOException { + System.out.println("Starting grizzly ..."); + + boolean useSSL = cfg.useSSL(); + gws = new GrizzlyWebServer(cfg.getPort(), "/tmp/23cxv45345/2131xc2/", useSSL); + // BUG: Grizzly needs a doc root if you are going to register multiple adapters + + for (Endpoint e : cfg.getEndpoints()) { + ZooKeeperService.mapContext(e.getContext(), e); + gws.addGrizzlyAdapter(createJerseyAdapter(e), new String[] { e + .getContext() }); + } + + if (useSSL) { + System.out.println("Starting SSL ..."); + String jks = cfg.getJKS("keys/rest.jks"); + String jksPassword = cfg.getJKSPassword(); + + SSLConfig sslConfig = new SSLConfig(); + URL resource = getClass().getClassLoader().getResource(jks); + if (resource == null) { + LOG.error("Unable to find the keystore file: " + jks); + System.exit(2); + } + try { + sslConfig.setKeyStoreFile(new File(resource.toURI()) + .getAbsolutePath()); + } catch (URISyntaxException e1) { + LOG.error("Unable to load keystore: " + jks, e1); + System.exit(2); + } + sslConfig.setKeyStorePass(jksPassword); + gws.setSSLConfig(sslConfig); + } + + gws.start(); + } + + public void stop() { + gws.stop(); + ZooKeeperService.closeAll(); + } + + private ServletAdapter createJerseyAdapter(Endpoint e) { + ServletAdapter jersey = new ServletAdapter(); + + jersey.setServletInstance(new ServletContainer()); + jersey.addInitParameter("com.sun.jersey.config.property.packages", + "org.apache.zookeeper.server.jersey.resources"); + jersey.setContextPath(e.getContext()); + + Credentials c = Credentials.join(e.getCredentials(), cfg + .getCredentials()); + if (!c.isEmpty()) { + jersey.addFilter(new HTTPBasicAuth(c), e.getContext() + + "-basic-auth", null); + } + + return jersey; + } + + /** + * The entry point for starting the server + * + */ + public static void main(String[] args) throws Exception { + RestCfg cfg = new RestCfg("rest.properties"); + + final RestMain main = new RestMain(cfg); + main.start(); + + Runtime.getRuntime().addShutdownHook(new Thread() { + @Override + public void run() { + main.stop(); + System.out.println("Got exit request. Bye."); + } + }); + + printEndpoints(cfg); + System.out.println("Server started."); + } + + private static void printEndpoints(RestCfg cfg) { + int port = cfg.getPort(); + + for (Endpoint e : cfg.getEndpoints()) { + + String context = e.getContext(); + if (context.charAt(context.length() - 1) != '/') { + context += "/"; + } + + System.out.println(String.format( + "Started %s - WADL: http://localhost:%d%sapplication.wadl", + context, port, context)); + } + } + +} diff --git a/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/ZooKeeperService.java b/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/ZooKeeperService.java new file mode 100644 index 0000000..21d27a9 --- /dev/null +++ b/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/ZooKeeperService.java @@ -0,0 +1,242 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.zookeeper.server.jersey; + +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; +import java.util.Set; +import java.util.Timer; +import java.util.TimerTask; +import java.util.TreeSet; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.apache.zookeeper.WatchedEvent; +import org.apache.zookeeper.Watcher; +import org.apache.zookeeper.ZooKeeper; +import org.apache.zookeeper.Watcher.Event.KeeperState; +import org.apache.zookeeper.server.jersey.cfg.Endpoint; + +/** + * Singleton which provides JAX-RS resources access to the ZooKeeper client. + * There's a single session for each base uri (so usually just one). + */ +public class ZooKeeperService { + + private static Logger LOG = LoggerFactory.getLogger(ZooKeeperService.class); + + /** Map base uri to ZooKeeper host:port parameters */ + private static Map contextMap = new HashMap(); + + /** Map base uri to ZooKeeper session */ + private static Map zkMap = new HashMap(); + + /** Session timers */ + private static Map zkSessionTimers = new HashMap(); + private static Timer timer = new Timer(); + + /** Track the status of the ZooKeeper session */ + private static class MyWatcher implements Watcher { + final String contextPath; + + /** Separate watcher for each base uri */ + public MyWatcher(String contextPath) { + this.contextPath = contextPath; + } + + /** + * Track state - in particular watch for expiration. if it happens for + * re-creation of the ZK client session + */ + synchronized public void process(WatchedEvent event) { + if (event.getState() == KeeperState.Expired) { + close(contextPath); + } + } + } + + /** ZooKeeper session timer */ + private static class SessionTimerTask extends TimerTask { + + private int delay; + private String contextPath, session; + private Timer timer; + + public SessionTimerTask(int delayInSeconds, String session, + String contextPath, Timer timer) { + delay = delayInSeconds * 1000; // convert to milliseconds + this.contextPath = contextPath; + this.session = session; + this.timer = timer; + reset(); + } + + public SessionTimerTask(SessionTimerTask t) { + this(t.delay / 1000, t.session, t.contextPath, t.timer); + } + + @Override + public void run() { + if (LOG.isInfoEnabled()) { + LOG.info(String.format("Session '%s' expired after " + + "'%d' milliseconds.", session, delay)); + } + ZooKeeperService.close(contextPath, session); + } + + public void reset() { + timer.schedule(this, delay); + } + + } + + /** + * Specify ZooKeeper host:port for a particular context path. The host:port + * string is passed to the ZK client, so this can be formatted with more + * than a single host:port pair. + */ + synchronized public static void mapContext(String contextPath, Endpoint e) { + contextMap.put(contextPath, e); + } + + /** + * Reset timer for a session + */ + synchronized public static void resetTimer(String contextPath, + String session) { + if (session != null) { + String uri = concat(contextPath, session); + + SessionTimerTask t = zkSessionTimers.remove(uri); + t.cancel(); + + zkSessionTimers.put(uri, new SessionTimerTask(t)); + } + } + + /** + * Close the ZooKeeper session and remove it from the internal maps + */ + public static void close(String contextPath) { + close(contextPath, null); + } + + /** + * Close the ZooKeeper session and remove it + */ + synchronized public static void close(String contextPath, String session) { + String uri = concat(contextPath, session); + + TimerTask t = zkSessionTimers.remove(uri); + if (t != null) { + t.cancel(); + } + + ZooKeeper zk = zkMap.remove(uri); + if (zk == null) { + return; + } + try { + zk.close(); + } catch (InterruptedException e) { + LOG.error("Interrupted while closing ZooKeeper connection.", e); + } + } + + /** + * Close all the ZooKeeper sessions and remove them from the internal maps + */ + synchronized public static void closeAll() { + Set sessions = new TreeSet(zkMap.keySet()); + for (String key : sessions) { + close(key); + } + } + + /** + * Is there an active connection for this session? + */ + synchronized public static boolean isConnected(String contextPath, + String session) { + return zkMap.containsKey(concat(contextPath, session)); + } + + /** + * Return a ZooKeeper client not tied to a specific session. + */ + public static ZooKeeper getClient(String contextPath) throws IOException { + return getClient(contextPath, null); + } + + /** + * Return a ZooKeeper client for a session with a default expire time + * + * @throws IOException + */ + public static ZooKeeper getClient(String contextPath, String session) + throws IOException { + return getClient(contextPath, session, 5); + } + + /** + * Return a ZooKeeper client which may or may not be connected, but it will + * not be expired. This method can be called multiple times, the same object + * will be returned except in the case where the session expires (at which + * point a new session will be returned) + */ + synchronized public static ZooKeeper getClient(String contextPath, + String session, int expireTime) throws IOException { + final String connectionId = concat(contextPath, session); + + ZooKeeper zk = zkMap.get(connectionId); + if (zk == null) { + + if (LOG.isInfoEnabled()) { + LOG.info(String.format("creating new " + + "connection for : '%s'", connectionId)); + } + Endpoint e = contextMap.get(contextPath); + zk = new ZooKeeper(e.getHostPort(), 30000, new MyWatcher( + connectionId)); + + for (Map.Entry p : e.getZooKeeperAuthInfo().entrySet()) { + zk.addAuthInfo("digest", String.format("%s:%s", p.getKey(), + p.getValue()).getBytes()); + } + + zkMap.put(connectionId, zk); + + // a session should automatically expire after an amount of time + if (session != null) { + zkSessionTimers.put(connectionId, new SessionTimerTask( + expireTime, session, contextPath, timer)); + } + } + return zk; + } + + private static String concat(String contextPath, String session) { + if (session != null) { + return String.format("%s@%s", contextPath, session); + } + return contextPath; + } + +} diff --git a/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/cfg/Credentials.java b/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/cfg/Credentials.java new file mode 100644 index 0000000..0730be5 --- /dev/null +++ b/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/cfg/Credentials.java @@ -0,0 +1,47 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.zookeeper.server.jersey.cfg; + +import java.util.HashMap; + +public class Credentials extends HashMap { + + public static Credentials join(Credentials a, Credentials b) { + Credentials result = new Credentials(); + result.putAll(a); + result.putAll(b); + return result; + } + + public Credentials() { + super(); + } + + public Credentials(String credentials) { + super(); + + if (!credentials.trim().equals("")) { + String[] parts = credentials.split(","); + for(String p : parts) { + String[] userPass = p.split(":"); + put(userPass[0], userPass[1]); + } + } + } +} diff --git a/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/cfg/Endpoint.java b/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/cfg/Endpoint.java new file mode 100644 index 0000000..2a62782 --- /dev/null +++ b/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/cfg/Endpoint.java @@ -0,0 +1,72 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.zookeeper.server.jersey.cfg; + +public class Endpoint { + + private String context; + private HostPortSet hostPort; + private Credentials credentials; + private Credentials zookeeperAuth; + + public Endpoint(String context, String hostPortList) { + this.context = context; + this.hostPort = new HostPortSet(hostPortList); + } + + public String getContext() { + return context; + } + + public String getHostPort() { + return hostPort.toString(); + } + + public Credentials getCredentials() { + return credentials; + } + + public void setCredentials(String c) { + this.credentials = new Credentials(c); + } + + public void setZooKeeperAuthInfo(String digest) { + zookeeperAuth = new Credentials(digest); + } + + public final Credentials getZooKeeperAuthInfo() { + return zookeeperAuth; + } + + @Override + public boolean equals(Object o) { + Endpoint e = (Endpoint) o; + return context.equals(e.context); + } + + @Override + public int hashCode() { + return context.hashCode(); + } + + @Override + public String toString() { + return String.format("", context, hostPort.toString()); + } +} diff --git a/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/cfg/HostPort.java b/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/cfg/HostPort.java new file mode 100644 index 0000000..51a1bdd --- /dev/null +++ b/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/cfg/HostPort.java @@ -0,0 +1,51 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.zookeeper.server.jersey.cfg; + +public class HostPort { + + private String host; + private int port; + + public HostPort(String hostPort) { + String[] parts = hostPort.split(":"); + host = parts[0]; + port = Integer.parseInt(parts[1]); + } + + public String getHost() { + return host; + } + + public int getPort() { + return port; + } + + @Override + public boolean equals(Object o) { + HostPort p = (HostPort) o; + return host.equals(p.host) && port == p.port; + } + + @Override + public int hashCode() { + return String.format("%s:%d", host, port).hashCode(); + } + +} diff --git a/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/cfg/HostPortSet.java b/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/cfg/HostPortSet.java new file mode 100644 index 0000000..301a565 --- /dev/null +++ b/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/cfg/HostPortSet.java @@ -0,0 +1,51 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.zookeeper.server.jersey.cfg; + +import java.util.HashSet; +import java.util.Set; + +public class HostPortSet { + + private Set hostPortSet = new HashSet(); + private String original; + + public HostPortSet(String hostPortList) { + original = hostPortList; + + int chrootStart = hostPortList.indexOf('/'); + String hostPortPairs; + if (chrootStart != -1) { + hostPortPairs = hostPortList.substring(0, chrootStart); + } else { + hostPortPairs = hostPortList; + } + + String[] parts = hostPortPairs.split(","); + for(String p : parts) { + hostPortSet.add(new HostPort(p)); + } + } + + @Override + public String toString() { + return original; + } + +} diff --git a/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/cfg/RestCfg.java b/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/cfg/RestCfg.java new file mode 100644 index 0000000..93dd632 --- /dev/null +++ b/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/cfg/RestCfg.java @@ -0,0 +1,110 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.zookeeper.server.jersey.cfg; + +import java.io.IOException; +import java.io.InputStream; +import java.util.HashSet; +import java.util.Properties; +import java.util.Set; + +public class RestCfg { + + private Properties cfg = new Properties(); + + private Set endpoints = new HashSet(); + private Credentials credentials = new Credentials(); + + public RestCfg(String resource) throws IOException { + this(RestCfg.class.getClassLoader().getResourceAsStream(resource)); + } + + public RestCfg(InputStream io) throws IOException { + try { + cfg.load(io); + extractEndpoints(); + extractCredentials(); + } finally { + io.close(); + } + } + + private void extractCredentials() { + if (cfg.containsKey("rest.http.auth")) { + credentials = new Credentials(cfg.getProperty("rest.http.auth", "")); + } + } + + private void extractEndpoints() { + int count = 1; + while (true) { + String e = cfg.getProperty( + String.format("rest.endpoint.%d", count), null); + if (e == null) { + break; + } + + String[] parts = e.split(";"); + if (parts.length != 2) { + count++; + continue; + } + Endpoint point = new Endpoint(parts[0], parts[1]); + + String c = cfg.getProperty(String.format( + "rest.endpoint.%d.http.auth", count), ""); + point.setCredentials(c); + + String digest = cfg.getProperty(String.format( + "rest.endpoint.%d.zk.digest", count), ""); + point.setZooKeeperAuthInfo(digest); + + endpoints.add(point); + count++; + } + } + + public int getPort() { + return Integer.parseInt(cfg.getProperty("rest.port", "9998")); + } + + public boolean useSSL() { + return Boolean.valueOf(cfg.getProperty("rest.ssl", "false")); + } + + public final Set getEndpoints() { + return endpoints; + } + + public final Credentials getCredentials() { + return credentials; + } + + public String getJKS() { + return cfg.getProperty("rest.ssl.jks"); + } + + public String getJKS(String def) { + return cfg.getProperty("rest.ssl.jks", def); + } + + public String getJKSPassword() { + return cfg.getProperty("rest.ssl.jks.pass"); + } +} diff --git a/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/filters/HTTPBasicAuth.java b/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/filters/HTTPBasicAuth.java new file mode 100644 index 0000000..49640b5 --- /dev/null +++ b/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/filters/HTTPBasicAuth.java @@ -0,0 +1,87 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.zookeeper.server.jersey.filters; + +import java.io.IOException; + +import javax.servlet.Filter; +import javax.servlet.FilterChain; +import javax.servlet.FilterConfig; +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.zookeeper.server.jersey.cfg.Credentials; + +import com.sun.jersey.core.util.Base64; + +public class HTTPBasicAuth implements Filter { + + private Credentials credentials; + + public HTTPBasicAuth(Credentials c) { + credentials = c; + } + + @Override + public void doFilter(ServletRequest req0, ServletResponse resp0, + FilterChain chain) throws IOException, ServletException { + + HttpServletRequest request = (HttpServletRequest) req0; + HttpServletResponse response = (HttpServletResponse) resp0; + + String authorization = request.getHeader("Authorization"); + if (authorization != null) { + String c[] = parseAuthorization(authorization); + if (c != null && credentials.containsKey(c[0]) + && credentials.get(c[0]).equals(c[1])) { + chain.doFilter(request, response); + return; + } + } + + response.setHeader("WWW-Authenticate", "Basic realm=\"Restricted\""); + response.sendError(401); + } + + private String[] parseAuthorization(String authorization) { + String parts[] = authorization.split(" "); + if (parts.length == 2 && parts[0].equalsIgnoreCase("Basic")) { + String userPass = Base64.base64Decode(parts[1]); + + int p = userPass.indexOf(":"); + if (p != -1) { + return new String[] { userPass.substring(0, p), + userPass.substring(p + 1) }; + } + } + return null; + } + + @Override + public void init(FilterConfig arg0) throws ServletException { + } + + @Override + public void destroy() { + } + +} diff --git a/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/jaxb/ZChildren.java b/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/jaxb/ZChildren.java new file mode 100644 index 0000000..b3fad55 --- /dev/null +++ b/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/jaxb/ZChildren.java @@ -0,0 +1,80 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.zookeeper.server.jersey.jaxb; + +import java.util.ArrayList; +import java.util.List; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlRootElement; + + +/** + * Represents the CHILD using JAXB. + * Special JSON version is required to get proper formatting in both + * JSON and XML output. See details in ZNodeResource. + */ +@XmlRootElement(name="child") +public class ZChildren { + public String path; + public String uri; + + public String child_uri_template; + @XmlElementWrapper(name="children") + @XmlElement(name="child") + public List children; + + public ZChildren() { + // needed by jersey + children = new ArrayList(); + } + + public ZChildren(String path, String uri, String child_uri_template, + List children) + { + this.path = path; + this.uri = uri; + this.child_uri_template = child_uri_template; + if (children != null) { + this.children = children; + } else { + this.children = new ArrayList(); + } + } + + @Override + public int hashCode() { + return path.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof ZChildren)) { + return false; + } + ZChildren o = (ZChildren) obj; + return path.equals(o.path) && children.equals(o.children); + } + + @Override + public String toString() { + return "ZChildren(" + path + "," + children + ")"; + } +} diff --git a/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/jaxb/ZChildrenJSON.java b/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/jaxb/ZChildrenJSON.java new file mode 100644 index 0000000..0dcece0 --- /dev/null +++ b/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/jaxb/ZChildrenJSON.java @@ -0,0 +1,76 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.zookeeper.server.jersey.jaxb; + +import java.util.ArrayList; +import java.util.List; + +import javax.xml.bind.annotation.XmlRootElement; + + +/** + * Represents the CHILD using JAXB. + * Special JSON version is required to get proper formatting in both + * JSON and XML output. See details in ZNodeResource. + */ +@XmlRootElement(name="child") +public class ZChildrenJSON { + public String path; + public String uri; + + public String child_uri_template; + public List children; + + public ZChildrenJSON() { + // needed by jersey + children = new ArrayList(); + } + + public ZChildrenJSON(String path, String uri, String child_uri_template, + List children) + { + this.path = path; + this.uri = uri; + this.child_uri_template = child_uri_template; + if (children != null) { + this.children = children; + } else { + this.children = new ArrayList(); + } + } + + @Override + public int hashCode() { + return path.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof ZChildrenJSON)) { + return false; + } + ZChildrenJSON o = (ZChildrenJSON) obj; + return path.equals(o.path) && children.equals(o.children); + } + + @Override + public String toString() { + return "ZChildrenJSON(" + path + "," + children + ")"; + } +} diff --git a/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/jaxb/ZError.java b/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/jaxb/ZError.java new file mode 100644 index 0000000..e976ee0 --- /dev/null +++ b/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/jaxb/ZError.java @@ -0,0 +1,41 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.zookeeper.server.jersey.jaxb; + +import javax.xml.bind.annotation.XmlRootElement; + + +/** + * Represents an ERROR using JAXB. + */ +@XmlRootElement(name="error") +public class ZError { + public String request; + public String message; + + public ZError(){ + // needed by jersey + } + + public ZError(String request, String message) { + this.request = request; + this.message = message; + } + +} diff --git a/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/jaxb/ZPath.java b/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/jaxb/ZPath.java new file mode 100644 index 0000000..4d83717 --- /dev/null +++ b/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/jaxb/ZPath.java @@ -0,0 +1,63 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.zookeeper.server.jersey.jaxb; + +import javax.xml.bind.annotation.XmlRootElement; + + +/** + * Represents a PATH using JAXB. + */ +@XmlRootElement(name="path") +public class ZPath { + public String path; + public String uri; + + public ZPath(){ + // needed by jersey + } + + public ZPath(String path) { + this(path, null); + } + + public ZPath(String path, String uri) { + this.path = path; + this.uri = uri; + } + + @Override + public int hashCode() { + return path.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof ZPath)) { + return false; + } + ZPath o = (ZPath) obj; + return path.equals(o.path); + } + + @Override + public String toString() { + return "ZPath(" + path + ")"; + } +} diff --git a/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/jaxb/ZSession.java b/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/jaxb/ZSession.java new file mode 100644 index 0000000..06ca9e5 --- /dev/null +++ b/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/jaxb/ZSession.java @@ -0,0 +1,55 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.zookeeper.server.jersey.jaxb; + +import javax.xml.bind.annotation.XmlRootElement; + +@XmlRootElement(name="session") +public class ZSession { + public String id; + public String uri; + + public ZSession() { + // needed by jersey + } + + public ZSession(String id, String uri) { + this.id = id; + this.uri = uri; + } + + @Override + public int hashCode() { + return id.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if(!(obj instanceof ZSession)) { + return false; + } + ZSession s = (ZSession) obj; + return id.equals(s.id); + } + + @Override + public String toString() { + return "ZSession(" + id +")"; + } +} diff --git a/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/jaxb/ZStat.java b/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/jaxb/ZStat.java new file mode 100644 index 0000000..af70d18 --- /dev/null +++ b/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/jaxb/ZStat.java @@ -0,0 +1,106 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.zookeeper.server.jersey.jaxb; + +import javax.xml.bind.annotation.XmlRootElement; + + +/** + * Represents a STAT using JAXB. + */ +@XmlRootElement(name="stat") +public class ZStat { + public String path; + public String uri; + public byte[] data64; + public String dataUtf8; + + public long czxid; + public long mzxid; + public long ctime; + public long mtime; + public int version; + public int cversion; + public int aversion; + public long ephemeralOwner; + public int dataLength; + public int numChildren; + public long pzxid; + + + public ZStat(){ + // needed by jersey + } + + public ZStat(String path, byte[] data64, String dataUtf8) + { + this.path = path; + this.data64 = data64; + this.dataUtf8 = dataUtf8; + } + + public ZStat(String path, String uri, byte[] data64, String dataUtf8, + long czxid, long mzxid, long ctime, long mtime, int version, + int cversion, int aversion, long ephemeralOwner, int dataLength, + int numChildren, long pzxid) + { + this.path = path; + this.uri = uri; + this.data64 = data64; + this.dataUtf8 = dataUtf8; + + this.czxid = czxid; + this.mzxid = mzxid; + this.ctime = ctime; + this.mtime = mtime; + this.version = version; + this.cversion = cversion; + this.aversion = aversion; + this.ephemeralOwner = ephemeralOwner; + this.dataLength = dataLength; + this.numChildren = numChildren; + this.pzxid = pzxid; + } + + @Override + public int hashCode() { + return path.hashCode(); + } + + /** + * This method considers two ZStats equal if their path, encoding, and + * data match. It does not compare the ZooKeeper + * org.apache.zookeeper.data.Stat class fields. + */ + @Override + public boolean equals(Object obj) { + if (!(obj instanceof ZStat)) { + return false; + } + ZStat o = (ZStat) obj; + return toString().equals(o.toString()); + } + + @Override + public String toString() { + return "ZStat(" + path + "," + "b64[" + + (data64 == null ? null : new String(data64)) + "]," + + dataUtf8 + ")"; + } +} diff --git a/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/resources/JAXBContextResolver.java b/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/resources/JAXBContextResolver.java new file mode 100644 index 0000000..0893586 --- /dev/null +++ b/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/resources/JAXBContextResolver.java @@ -0,0 +1,72 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.zookeeper.server.jersey.resources; + +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +import javax.ws.rs.ext.ContextResolver; +import javax.ws.rs.ext.Provider; +import javax.xml.bind.JAXBContext; + +import org.apache.zookeeper.server.jersey.jaxb.ZChildrenJSON; +import org.apache.zookeeper.server.jersey.jaxb.ZPath; +import org.apache.zookeeper.server.jersey.jaxb.ZStat; + +import com.sun.jersey.api.json.JSONConfiguration; +import com.sun.jersey.api.json.JSONJAXBContext; + +/** + * Tell Jersey how to resolve JSON formatting. Specifically detail the + * fields which are arrays and which are numbers (not strings). + */ +@Provider +@SuppressWarnings("unchecked") +public final class JAXBContextResolver implements ContextResolver { + private final JAXBContext context; + + private final Set typesSet; + + public JAXBContextResolver() throws Exception { + Class[] typesArr = + new Class[]{ZPath.class, ZStat.class, ZChildrenJSON.class}; + typesSet = new HashSet(Arrays.asList(typesArr)); + context = new JSONJAXBContext( + JSONConfiguration.mapped() + .arrays("children") + .nonStrings("czxid") + .nonStrings("mzxid") + .nonStrings("ctime") + .nonStrings("mtime") + .nonStrings("version") + .nonStrings("cversion") + .nonStrings("aversion") + .nonStrings("ephemeralOwner") + .nonStrings("dataLength") + .nonStrings("numChildren") + .nonStrings("pzxid") + .build(), + typesArr); + } + + public JAXBContext getContext(Class objectType) { + return (typesSet.contains(objectType)) ? context : null; + } +} diff --git a/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/resources/KeeperExceptionMapper.java b/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/resources/KeeperExceptionMapper.java new file mode 100644 index 0000000..fdfc27b --- /dev/null +++ b/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/resources/KeeperExceptionMapper.java @@ -0,0 +1,86 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.zookeeper.server.jersey.resources; + +import javax.ws.rs.core.Context; +import javax.ws.rs.core.Response; +import javax.ws.rs.core.UriInfo; +import javax.ws.rs.ext.ExceptionMapper; +import javax.ws.rs.ext.Provider; + +import org.apache.zookeeper.KeeperException; +import org.apache.zookeeper.server.jersey.jaxb.ZError; + + +/** + * Map KeeperException to HTTP status codes + */ +@Provider +public class KeeperExceptionMapper implements ExceptionMapper { + private UriInfo ui; + + public KeeperExceptionMapper(@Context UriInfo ui) { + this.ui = ui; + } + + public Response toResponse(KeeperException e) { + Response.Status status; + String message; + + String path = e.getPath(); + + switch(e.code()) { + case AUTHFAILED: + status = Response.Status.UNAUTHORIZED; + message = path + " not authorized"; + break; + case BADARGUMENTS: + status = Response.Status.BAD_REQUEST; + message = path + " bad arguments"; + break; + case BADVERSION: + status = Response.Status.PRECONDITION_FAILED; + message = path + " bad version"; + break; + case INVALIDACL: + status = Response.Status.BAD_REQUEST; + message = path + " invalid acl"; + break; + case NODEEXISTS: + status = Response.Status.CONFLICT; + message = path + " already exists"; + break; + case NONODE: + status = Response.Status.NOT_FOUND; + message = path + " not found"; + break; + case NOTEMPTY: + status = Response.Status.CONFLICT; + message = path + " not empty"; + break; + default: + status = Response.Status.fromStatusCode(502); // bad gateway + message = "Error processing request for " + path + + " : " + e.getMessage(); + } + + return Response.status(status).entity( + new ZError(ui.getRequestUri().toString(), message)).build(); + } +} diff --git a/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/resources/RuntimeExceptionMapper.java b/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/resources/RuntimeExceptionMapper.java new file mode 100644 index 0000000..46f33bb --- /dev/null +++ b/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/resources/RuntimeExceptionMapper.java @@ -0,0 +1,55 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.zookeeper.server.jersey.resources; + +import javax.ws.rs.WebApplicationException; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.Response; +import javax.ws.rs.core.UriInfo; +import javax.ws.rs.ext.ExceptionMapper; +import javax.ws.rs.ext.Provider; + +import org.apache.zookeeper.server.jersey.jaxb.ZError; + +/** + * Map RuntimeException to HTTP status codes + */ +@Provider +public class RuntimeExceptionMapper + implements ExceptionMapper +{ + private UriInfo ui; + + public RuntimeExceptionMapper(@Context UriInfo ui) { + this.ui = ui; + } + + public Response toResponse(RuntimeException e) { + // don't try to handle jersey exceptions ourselves + if (e instanceof WebApplicationException) { + WebApplicationException ie =(WebApplicationException) e; + return ie.getResponse(); + } + + return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity( + new ZError(ui.getRequestUri().toString(), + "Error processing request due to " + e + )).build(); + } +} diff --git a/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/resources/SessionsResource.java b/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/resources/SessionsResource.java new file mode 100644 index 0000000..0744604 --- /dev/null +++ b/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/resources/SessionsResource.java @@ -0,0 +1,135 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.zookeeper.server.jersey.resources; + +import java.io.IOException; +import java.net.URI; +import java.util.UUID; + +import javax.servlet.http.HttpServletRequest; +import javax.ws.rs.Consumes; +import javax.ws.rs.DELETE; +import javax.ws.rs.DefaultValue; +import javax.ws.rs.POST; +import javax.ws.rs.PUT; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.QueryParam; +import javax.ws.rs.WebApplicationException; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; +import javax.ws.rs.core.UriInfo; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.apache.zookeeper.server.jersey.ZooKeeperService; +import org.apache.zookeeper.server.jersey.jaxb.ZError; +import org.apache.zookeeper.server.jersey.jaxb.ZSession; + +import com.sun.jersey.api.json.JSONWithPadding; + +@Path("sessions/v1/{session: .*}") +public class SessionsResource { + + private static Logger LOG = LoggerFactory.getLogger(SessionsResource.class); + + private String contextPath; + + public SessionsResource(@Context HttpServletRequest request) { + contextPath = request.getContextPath(); + if (contextPath.equals("")) { + contextPath = "/"; + } + } + + @PUT + @Produces( { MediaType.APPLICATION_JSON, "application/javascript", + MediaType.APPLICATION_XML }) + @Consumes(MediaType.APPLICATION_OCTET_STREAM) + public Response keepAliveSession(@PathParam("session") String session, + @Context UriInfo ui, byte[] data) { + + if (!ZooKeeperService.isConnected(contextPath, session)) { + throwNotFound(session, ui); + } + + ZooKeeperService.resetTimer(contextPath, session); + return Response.status(Response.Status.OK).build(); + } + + @POST + @Produces( { MediaType.APPLICATION_JSON, "application/javascript", + MediaType.APPLICATION_XML }) + public Response createSession(@QueryParam("op") String op, + @DefaultValue("5") @QueryParam("expire") String expire, + @Context UriInfo ui) { + if (!op.equals("create")) { + throw new WebApplicationException(Response.status( + Response.Status.BAD_REQUEST).entity( + new ZError(ui.getRequestUri().toString(), "")).build()); + } + + int expireInSeconds; + try { + expireInSeconds = Integer.parseInt(expire); + } catch (NumberFormatException e) { + throw new WebApplicationException(Response.status( + Response.Status.BAD_REQUEST).build()); + } + + String uuid = UUID.randomUUID().toString(); + while (ZooKeeperService.isConnected(contextPath, uuid)) { + uuid = UUID.randomUUID().toString(); + } + + // establish the connection to the ZooKeeper cluster + try { + ZooKeeperService.getClient(contextPath, uuid, expireInSeconds); + } catch (IOException e) { + LOG.error("Failed while trying to create a new session", e); + + throw new WebApplicationException(Response.status( + Response.Status.INTERNAL_SERVER_ERROR).build()); + } + + URI uri = ui.getAbsolutePathBuilder().path(uuid).build(); + return Response.created(uri).entity( + new JSONWithPadding(new ZSession(uuid, uri.toString()))) + .build(); + } + + @DELETE + @Produces( { MediaType.APPLICATION_JSON, "application/javascript", + MediaType.APPLICATION_XML, MediaType.APPLICATION_OCTET_STREAM }) + public void deleteSession(@PathParam("session") String session, + @Context UriInfo ui) { + ZooKeeperService.close(contextPath, session); + } + + private static void throwNotFound(String session, UriInfo ui) + throws WebApplicationException { + throw new WebApplicationException(Response.status( + Response.Status.NOT_FOUND).entity( + new ZError(ui.getRequestUri().toString(), session + + " not found")).build()); + } + +} diff --git a/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/resources/ZErrorWriter.java b/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/resources/ZErrorWriter.java new file mode 100644 index 0000000..706ab89 --- /dev/null +++ b/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/resources/ZErrorWriter.java @@ -0,0 +1,63 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.zookeeper.server.jersey.resources; + +import java.io.IOException; +import java.io.OutputStream; +import java.io.PrintStream; +import java.lang.annotation.Annotation; +import java.lang.reflect.Type; + +import javax.ws.rs.Produces; +import javax.ws.rs.WebApplicationException; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.MultivaluedMap; +import javax.ws.rs.ext.MessageBodyWriter; +import javax.ws.rs.ext.Provider; + +import org.apache.zookeeper.server.jersey.jaxb.ZError; + +/** + * Tell Jersey how to format an octet response error message. + */ +@Produces(MediaType.APPLICATION_OCTET_STREAM) +@Provider +public class ZErrorWriter implements MessageBodyWriter { + + public long getSize(ZError t, Class type, Type genericType, + Annotation[] annotations, MediaType mediaType) { + return -1; + } + + public boolean isWriteable(Class type, Type genericType, + Annotation[] annotations, MediaType mediaType) { + return ZError.class.isAssignableFrom(type); + } + + public void writeTo(ZError t, Class type, Type genericType, + Annotation[] annotations, MediaType mediaType, + MultivaluedMap httpHeaders, + OutputStream os) + throws IOException, WebApplicationException + { + PrintStream p = new PrintStream(os); + p.print("Request " + t.request + " failed due to " + t.message); + p.flush(); + } +} diff --git a/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/resources/ZNodeResource.java b/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/resources/ZNodeResource.java new file mode 100644 index 0000000..77371ea --- /dev/null +++ b/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/resources/ZNodeResource.java @@ -0,0 +1,412 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.zookeeper.server.jersey.resources; + +import java.io.IOException; +import java.net.URI; +import java.util.ArrayList; +import java.util.List; + +import javax.servlet.http.HttpServletRequest; +import javax.ws.rs.Consumes; +import javax.ws.rs.DELETE; +import javax.ws.rs.DefaultValue; +import javax.ws.rs.GET; +import javax.ws.rs.HEAD; +import javax.ws.rs.POST; +import javax.ws.rs.PUT; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.QueryParam; +import javax.ws.rs.WebApplicationException; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; +import javax.ws.rs.core.UriInfo; + +import org.apache.zookeeper.CreateMode; +import org.apache.zookeeper.KeeperException; +import org.apache.zookeeper.ZooKeeper; +import org.apache.zookeeper.ZooDefs.Ids; +import org.apache.zookeeper.data.Stat; +import org.apache.zookeeper.server.jersey.ZooKeeperService; +import org.apache.zookeeper.server.jersey.jaxb.ZChildren; +import org.apache.zookeeper.server.jersey.jaxb.ZChildrenJSON; +import org.apache.zookeeper.server.jersey.jaxb.ZError; +import org.apache.zookeeper.server.jersey.jaxb.ZPath; +import org.apache.zookeeper.server.jersey.jaxb.ZStat; + +import com.sun.jersey.api.json.JSONWithPadding; + +/** + * Version 1 implementation of the ZooKeeper REST specification. + */ +// TODO test octet fully +@Path("znodes/v1{path: /.*}") +public class ZNodeResource { + private final ZooKeeper zk; + + public ZNodeResource(@DefaultValue("") @QueryParam("session") String session, + @Context UriInfo ui, + @Context HttpServletRequest request + ) + throws IOException { + + String contextPath = request.getContextPath(); + if (contextPath.equals("")) { + contextPath = "/"; + } + if (session.equals("")) { + session = null; + } else if (!ZooKeeperService.isConnected(contextPath, session)) { + throw new WebApplicationException(Response.status( + Response.Status.UNAUTHORIZED).build()); + } + zk = ZooKeeperService.getClient(contextPath, session); + } + + private void ensurePathNotNull(String path) { + if (path == null) { + throw new IllegalArgumentException("Invalid path \"" + path + "\""); + } + } + + @HEAD + @Produces( { MediaType.APPLICATION_JSON, "application/javascript", + MediaType.APPLICATION_XML }) + public Response existsZNode(@PathParam("path") String path, + @Context UriInfo ui) throws InterruptedException, KeeperException { + Stat stat = zk.exists(path, false); + if (stat == null) { + throwNotFound(path, ui); + } + return Response.status(Response.Status.OK).build(); + } + + @HEAD + @Produces( { MediaType.APPLICATION_OCTET_STREAM }) + public Response existsZNodeAsOctet(@PathParam("path") String path, + @Context UriInfo ui) throws InterruptedException, KeeperException { + Stat stat = zk.exists(path, false); + if (stat == null) { + throwNotFound(path, ui); + } + return Response.status(Response.Status.NO_CONTENT).build(); + } + + /* + * getZNodeList and getZNodeListJSON are bogus - but necessary. + * Unfortunately Jersey 1.0.3 is unable to render both xml and json properly + * in the case where a object contains a list/array. It's impossible to get + * it to render properly for both. As a result we need to split into two + * jaxb classes. + */ + + @GET + @Produces( { MediaType.APPLICATION_JSON, "application/javascript" }) + public Response getZNodeListJSON( + @PathParam("path") String path, + @QueryParam("callback") String callback, + @DefaultValue("data") @QueryParam("view") String view, + @DefaultValue("base64") @QueryParam("dataformat") String dataformat, + @Context UriInfo ui) throws InterruptedException, KeeperException { + return getZNodeList(true, path, callback, view, dataformat, ui); + } + + @GET + @Produces(MediaType.APPLICATION_XML) + public Response getZNodeList( + @PathParam("path") String path, + @QueryParam("callback") String callback, + @DefaultValue("data") @QueryParam("view") String view, + @DefaultValue("base64") @QueryParam("dataformat") String dataformat, + @Context UriInfo ui) throws InterruptedException, KeeperException { + return getZNodeList(false, path, callback, view, dataformat, ui); + } + + private Response getZNodeList(boolean json, String path, String callback, + String view, String dataformat, UriInfo ui) + throws InterruptedException, KeeperException { + ensurePathNotNull(path); + + if (view.equals("children")) { + List children = new ArrayList(); + for (String child : zk.getChildren(path, false)) { + children.add(child); + } + + Object child; + String childTemplate = ui.getAbsolutePath().toString(); + if (!childTemplate.endsWith("/")) { + childTemplate += "/"; + } + childTemplate += "{child}"; + if (json) { + child = new ZChildrenJSON(path, + ui.getAbsolutePath().toString(), childTemplate, + children); + } else { + child = new ZChildren(path, ui.getAbsolutePath().toString(), + childTemplate, children); + } + return Response.status(Response.Status.OK).entity( + new JSONWithPadding(child, callback)).build(); + } else { + Stat stat = new Stat(); + byte[] data = zk.getData(path, false, stat); + + byte[] data64; + String dataUtf8; + if (data == null) { + data64 = null; + dataUtf8 = null; + } else if (!dataformat.equals("utf8")) { + data64 = data; + dataUtf8 = null; + } else { + data64 = null; + dataUtf8 = new String(data); + } + ZStat zstat = new ZStat(path, ui.getAbsolutePath().toString(), + data64, dataUtf8, stat.getCzxid(), stat.getMzxid(), stat + .getCtime(), stat.getMtime(), stat.getVersion(), + stat.getCversion(), stat.getAversion(), stat + .getEphemeralOwner(), stat.getDataLength(), stat + .getNumChildren(), stat.getPzxid()); + + return Response.status(Response.Status.OK).entity( + new JSONWithPadding(zstat, callback)).build(); + } + } + + @GET + @Produces(MediaType.APPLICATION_OCTET_STREAM) + public Response getZNodeListAsOctet(@PathParam("path") String path) + throws InterruptedException, KeeperException { + ensurePathNotNull(path); + + Stat stat = new Stat(); + byte[] data = zk.getData(path, false, stat); + + if (data == null) { + return Response.status(Response.Status.NO_CONTENT).build(); + } else { + return Response.status(Response.Status.OK).entity(data).build(); + } + } + + @PUT + @Produces( { MediaType.APPLICATION_JSON, "application/javascript", + MediaType.APPLICATION_XML }) + @Consumes(MediaType.APPLICATION_OCTET_STREAM) + public Response setZNode( + @PathParam("path") String path, + @QueryParam("callback") String callback, + @DefaultValue("-1") @QueryParam("version") String versionParam, + @DefaultValue("base64") @QueryParam("dataformat") String dataformat, + @DefaultValue("false") @QueryParam("null") String setNull, + @Context UriInfo ui, byte[] data) throws InterruptedException, + KeeperException { + ensurePathNotNull(path); + + int version; + try { + version = Integer.parseInt(versionParam); + } catch (NumberFormatException e) { + throw new WebApplicationException(Response.status( + Response.Status.BAD_REQUEST).entity( + new ZError(ui.getRequestUri().toString(), path + + " bad version " + versionParam)).build()); + } + + if (setNull.equals("true")) { + data = null; + } + + Stat stat = zk.setData(path, data, version); + + ZStat zstat = new ZStat(path, ui.getAbsolutePath().toString(), null, + null, stat.getCzxid(), stat.getMzxid(), stat.getCtime(), stat + .getMtime(), stat.getVersion(), stat.getCversion(), + stat.getAversion(), stat.getEphemeralOwner(), stat + .getDataLength(), stat.getNumChildren(), stat + .getPzxid()); + + return Response.status(Response.Status.OK).entity( + new JSONWithPadding(zstat, callback)).build(); + } + + @PUT + @Produces(MediaType.APPLICATION_OCTET_STREAM) + @Consumes(MediaType.APPLICATION_OCTET_STREAM) + public void setZNodeAsOctet(@PathParam("path") String path, + @DefaultValue("-1") @QueryParam("version") String versionParam, + @DefaultValue("false") @QueryParam("null") String setNull, + @Context UriInfo ui, byte[] data) throws InterruptedException, + KeeperException { + ensurePathNotNull(path); + + int version; + try { + version = Integer.parseInt(versionParam); + } catch (NumberFormatException e) { + throw new WebApplicationException(Response.status( + Response.Status.BAD_REQUEST).entity( + new ZError(ui.getRequestUri().toString(), path + + " bad version " + versionParam)).build()); + } + + if (setNull.equals("true")) { + data = null; + } + + zk.setData(path, data, version); + } + + @POST + @Produces( { MediaType.APPLICATION_JSON, "application/javascript", + MediaType.APPLICATION_XML }) + @Consumes(MediaType.APPLICATION_OCTET_STREAM) + public Response createZNode( + @PathParam("path") String path, + @QueryParam("callback") String callback, + @DefaultValue("create") @QueryParam("op") String op, + @QueryParam("name") String name, + @DefaultValue("base64") @QueryParam("dataformat") String dataformat, + @DefaultValue("false") @QueryParam("null") String setNull, + @DefaultValue("false") @QueryParam("sequence") String sequence, + @DefaultValue("false") @QueryParam("ephemeral") String ephemeral, + @Context UriInfo ui, byte[] data) throws InterruptedException, + KeeperException { + ensurePathNotNull(path); + + if (path.equals("/")) { + path += name; + } else { + path += "/" + name; + } + + if (!op.equals("create")) { + throw new WebApplicationException(Response.status( + Response.Status.BAD_REQUEST).entity( + new ZError(ui.getRequestUri().toString(), path + + " bad operaton " + op)).build()); + } + + if (setNull.equals("true")) { + data = null; + } + + CreateMode createMode; + if (sequence.equals("true")) { + if (ephemeral.equals("false")) { + createMode = CreateMode.PERSISTENT_SEQUENTIAL; + } else { + createMode = CreateMode.EPHEMERAL_SEQUENTIAL; + } + } else if (ephemeral.equals("false")) { + createMode = CreateMode.PERSISTENT; + } else { + createMode = CreateMode.EPHEMERAL; + } + + String newPath = zk.create(path, data, Ids.OPEN_ACL_UNSAFE, createMode); + + URI uri = ui.getAbsolutePathBuilder().path(newPath).build(); + + return Response.created(uri).entity( + new JSONWithPadding(new ZPath(newPath, ui.getAbsolutePath() + .toString()))).build(); + } + + @POST + @Produces(MediaType.APPLICATION_OCTET_STREAM) + @Consumes(MediaType.APPLICATION_OCTET_STREAM) + public Response createZNodeAsOctet(@PathParam("path") String path, + @DefaultValue("create") @QueryParam("op") String op, + @QueryParam("name") String name, + @DefaultValue("false") @QueryParam("null") String setNull, + @DefaultValue("false") @QueryParam("sequence") String sequence, + @Context UriInfo ui, byte[] data) throws InterruptedException, + KeeperException { + ensurePathNotNull(path); + + if (path.equals("/")) { + path += name; + } else { + path += "/" + name; + } + + if (!op.equals("create")) { + throw new WebApplicationException(Response.status( + Response.Status.BAD_REQUEST).entity( + new ZError(ui.getRequestUri().toString(), path + + " bad operaton " + op)).build()); + } + + if (setNull.equals("true")) { + data = null; + } + + CreateMode createMode; + if (sequence.equals("true")) { + createMode = CreateMode.PERSISTENT_SEQUENTIAL; + } else { + createMode = CreateMode.PERSISTENT; + } + + String newPath = zk.create(path, data, Ids.OPEN_ACL_UNSAFE, createMode); + + URI uri = ui.getAbsolutePathBuilder().path(newPath).build(); + + return Response.created(uri).entity( + new ZPath(newPath, ui.getAbsolutePath().toString())).build(); + } + + @DELETE + @Produces( { MediaType.APPLICATION_JSON, "application/javascript", + MediaType.APPLICATION_XML, MediaType.APPLICATION_OCTET_STREAM }) + public void deleteZNode(@PathParam("path") String path, + @DefaultValue("-1") @QueryParam("version") String versionParam, + @Context UriInfo ui) throws InterruptedException, KeeperException { + ensurePathNotNull(path); + + int version; + try { + version = Integer.parseInt(versionParam); + } catch (NumberFormatException e) { + throw new WebApplicationException(Response.status( + Response.Status.BAD_REQUEST).entity( + new ZError(ui.getRequestUri().toString(), path + + " bad version " + versionParam)).build()); + } + + zk.delete(path, version); + } + + private static void throwNotFound(String path, UriInfo ui) + throws WebApplicationException { + throw new WebApplicationException(Response.status( + Response.Status.NOT_FOUND).entity( + new ZError(ui.getRequestUri().toString(), path + " not found")) + .build()); + } + +} diff --git a/src/contrib/rest/src/python/README.txt b/src/contrib/rest/src/python/README.txt new file mode 100644 index 0000000..acc8ffb --- /dev/null +++ b/src/contrib/rest/src/python/README.txt @@ -0,0 +1,9 @@ +Some basic python scripts which use the REST interface: + +zkrest.py -- basic REST ZooKeeper client +demo_master_election.py -- shows how to implement master election +demo_queue.py -- basic queue +zk_dump_tree.py -- dumps the nodes & data of a znode hierarchy + +Generally these scripts require: + * simplejson diff --git a/src/contrib/rest/src/python/demo_master_election.py b/src/contrib/rest/src/python/demo_master_election.py new file mode 100644 index 0000000..c0317c7 --- /dev/null +++ b/src/contrib/rest/src/python/demo_master_election.py @@ -0,0 +1,90 @@ +#! /usr/bin/env python + +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import sys +import threading +import time + +from zkrest import ZooKeeper + +class Agent(threading.Thread): + """ A basic agent that wants to become a master and exit """ + + root = '/election' + + def __init__(self, id): + super(Agent, self).__init__() + self.zk = ZooKeeper() + self.id = id + + def run(self): + print 'Starting #%s' % self.id + with self.zk.session(expire=5): + + # signal agent presence + r = self.zk.create("%s/agent-" % self.root, + sequence=True, ephemeral=True) + self.me = r['path'] + + while True: + children = sorted([el['path'] \ + for el in self.zk.get_children(self.root)]) + master, previous = children[0], None + try: + index = children.index(self.me) + if index != 0: + previous = children[index-1] + except ValueError: + break + + if previous is None: + self.do_master_work() + # and don't forget to send heartbeat messages + break + else: + # do slave work in another thread + pass + + # wait for the previous agent or current master to exit / finish + while self.zk.exists(previous) or self.zk.exists(master): + time.sleep(0.5) + self.zk.heartbeat() + + # TODO signal the slave thread to exit and wait for it + # and rerun the election loop + + def do_master_work(self): + print "#%s: I'm the master: %s" % (self.id, self.me) + +def main(): + zk = ZooKeeper() + + # create the root node used for master election + if not zk.exists('/election'): + zk.create('/election') + + print 'Starting 10 agents ...' + agents = [Agent(id) for id in range(0,15)] + + map(Agent.start, agents) + map(Agent.join, agents) + + zk.delete('/election') + +if __name__ == '__main__': + sys.exit(main()) diff --git a/src/contrib/rest/src/python/demo_queue.py b/src/contrib/rest/src/python/demo_queue.py new file mode 100644 index 0000000..9ca4c64 --- /dev/null +++ b/src/contrib/rest/src/python/demo_queue.py @@ -0,0 +1,99 @@ +#! /usr/bin/env python + +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# This is a simple message queue built on top of ZooKeeper. In order +# to be used in production it needs better error handling but it's +# still useful as a proof-of-concept. + +# Why use ZooKeeper as a queue? Highly available by design and has +# great performance. + +import sys +import threading +import time + +from zkrest import ZooKeeper + +class Queue(object): + def __init__(self, root, zk): + self.root = root + + self.zk = zk + + def put(self, data): + self.zk.create("%s/el-" % self.root, str(data), sequence=True, ephemeral=True) + + # creating ephemeral nodes for easy cleanup + # in a real world scenario you should create + # normal sequential znodes + + def fetch(self): + """ Pull an element from the queue + + This function is not blocking if the queue is empty, it will + just return None. + """ + children = sorted(self.zk.get_children(self.root), \ + lambda a, b: cmp(a['path'], b['path'])) + + if not children: + return None + + try: + first = children[0] + self.zk.delete(first['path'], version=first['version']) + if 'data64' not in first: + return '' + else: + return first['data64'].decode('base64') + + except (ZooKeeper.WrongVersion, ZooKeeper.NotFound): + # someone changed the znode between the get and delete + # this should not happen + # in practice you should retry the fetch + raise + + +def main(): + zk = ZooKeeper() + zk.start_session(expire=60) + + if not zk.exists('/queue'): + zk.create('/queue') + q = Queue('/queue', zk) + + print 'Pushing to queue 1 ... 5' + map(q.put, [1,2,3,4,5]) + + print 'Extracting ...' + while True: + el = q.fetch() + if el is None: + break + print el + + zk.close_session() + zk.delete('/queue') + + print 'Done.' + + +if __name__ == '__main__': + sys.exit(main()) + diff --git a/src/contrib/rest/src/python/test.py b/src/contrib/rest/src/python/test.py new file mode 100644 index 0000000..363747a --- /dev/null +++ b/src/contrib/rest/src/python/test.py @@ -0,0 +1,163 @@ +#! /usr/bin/env python + +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import time +import unittest + +from zkrest import ZooKeeper + +class ZooKeeperREST_TestCase(unittest.TestCase): + + BASE_URI = 'http://localhost:9998' + + def setUp(self): + self.zk = ZooKeeper(self.BASE_URI) + + def tearDown(self): + try: + self.zk.delete('/test') + except ZooKeeper.NotFound: + pass + + def test_get_root_node(self): + assert self.zk.get('/') is not None + + def test_get_node_not_found(self): + self.assertRaises(ZooKeeper.NotFound, \ + self.zk.get, '/dummy-node') + + def test_exists_node(self): + assert self.zk.exists('/zookeeper') is True + + def test_get_children(self): + assert any([child['path'] == '/zookeeper/quota' \ + for child in self.zk.get_children('/zookeeper')]) + + def test_create_znode(self): + try: + self.zk.create('/test') + except ZooKeeper.ZNodeExists: + pass # it's ok if already exists + assert self.zk.exists('/test') is True + + def test_create_hierarchy(self): + try: + self.zk.delete(['/a/b', '/a']) + except ZooKeeper.NotFound: + pass + + self.zk.create('/a') + self.zk.create('/a/b') + + self.zk.delete(['/a/b', '/a']) + + def test_create_with_data(self): + self.zk.create('/test', 'some-data') + + zn = self.zk.get('/test') + self.assertEqual(zn.get('data64', None), \ + 'some-data'.encode('base64').strip()) + + def test_delete_znode(self): + self.zk.create('/test') + + self.zk.delete('/test') + assert not self.zk.exists('/test') + + def test_delete_older_version(self): + self.zk.create('/test') + + zn = self.zk.get('/test') + # do one more modification in order to increase the version number + self.zk.set('/test', 'dummy-data') + + self.assertRaises(ZooKeeper.WrongVersion, \ + self.zk.delete, '/test', version=zn['version']) + + def test_delete_raise_not_found(self): + self.zk.create('/test') + + zn = self.zk.get('/test') + self.zk.delete('/test') + + self.assertRaises(ZooKeeper.NotFound, \ + self.zk.delete, '/test', version=zn['version']) + + def test_set(self): + self.zk.create('/test') + + self.zk.set('/test', 'dummy') + + self.assertEqual(self.zk.get('/test')['data64'], \ + 'dummy'.encode('base64').strip()) + + def test_set_with_older_version(self): + if not self.zk.exists('/test'): + self.zk.create('/test', 'random-data') + + zn = self.zk.get('/test') + self.zk.set('/test', 'new-data') + self.assertRaises(ZooKeeper.WrongVersion, self.zk.set, \ + '/test', 'older-version', version=zn['version']) + + def test_set_null(self): + if not self.zk.exists('/test'): + self.zk.create('/test', 'random-data') + self.zk.set('/test', 'data') + assert 'data64' in self.zk.get('/test') + + self.zk.set('/test', null=True) + assert 'data64' not in self.zk.get('/test') + + def test_create_ephemeral_node(self): + with self.zk.session(): + if self.zk.exists('/ephemeral-test'): + self.zk.delete('/ephemeral-test') + + self.zk.create('/ephemeral-test', ephemeral=True) + zn = self.zk.get('/ephemeral-test') + + assert zn['ephemeralOwner'] != 0 + + def test_create_session(self): + with self.zk.session() as sid: + self.assertEqual(len(sid), 36) # UUID + + def test_session_invalidation(self): + self.zk.start_session(expire=1) + self.zk.create('/ephemeral-test', ephemeral=True) + + # keep the session alive by sending heartbeat requests + for _ in range(1,2): + self.zk.heartbeat() + time.sleep(0.9) + + time.sleep(2) # wait for the session to expire + self.assertRaises(ZooKeeper.InvalidSession, \ + self.zk.create, '/ephemeral-test', ephemeral=True) + + def test_presence_signaling(self): + with self.zk.session(expire=1): + self.zk.create('/i-am-online', ephemeral=True) + assert self.zk.exists('/i-am-online') + assert not self.zk.exists('/i-am-online') + + +if __name__ == '__main__': + unittest.main() + diff --git a/src/contrib/rest/src/python/zk_dump_tree.py b/src/contrib/rest/src/python/zk_dump_tree.py new file mode 100644 index 0000000..517d23b --- /dev/null +++ b/src/contrib/rest/src/python/zk_dump_tree.py @@ -0,0 +1,108 @@ +#!/usr/bin/python + +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import getopt +import sys +import simplejson +import urllib2 +from base64 import b64decode + +printdata = False +fullpath = False + +def dump_node(url, depth): + """Dump the node, then dump children recursively + + Arguments: + - `url`: + - `depth`: + """ + req = urllib2.urlopen(url) + resp = simplejson.load(req) + if 'Error' in resp: + raise resp['Error'] + + if fullpath: + name = resp['path'] + else: + name = '/' + resp['path'].split('/')[-1] + + data64 = resp.get('data64') + dataUtf8 = resp.get('dataUtf8') + if data64 and printdata: + data = b64decode(data64) + print '%(indent)s%(name)s = b64(%(data64)s) str(%(data)s)' % \ + {'indent':' '*2*depth, 'name':name, 'data64':data64, 'data':data} + elif dataUtf8 and printdata: + print '%(indent)s%(name)s = %(data)s' % \ + {'indent':' '*2*depth, 'name':name, 'data':dataUtf8} + else: + print '%(indent)s%(name)s' % {'indent':' '*2*depth, 'name':name} + + req = urllib2.urlopen(resp['uri'] + '?view=children') + resp = simplejson.load(req) + + for child in resp.get('children', []): + dump_node(resp['child_uri_template'] + .replace("{child}", urllib2.quote(child)), + depth + 1) + +def zk_dump_tree(url, root): + """Dump the tree starting at the roota + + Arguments: + - `root`: + """ + dump_node(url + '/znodes/v1' + root, 0) + +def usage(): + """Usage + """ + print 'Usage: zk_dump_tree.py [-h|--help -u|--url=url -d|--data -f|--fullpath -r|--root=root]' + print ' where url is the url of the rest server, data is whether to' + print ' to include node data on output, root is the znode root' + print ' fullpath prints the full node path (useful for copy/paste)' + +if __name__ == '__main__': + try: + opts, args = getopt.getopt(sys.argv[1:], + "hu:dfr:", ["help", "url=", "data", "fullpath", "root="]) + except getopt.GetoptError, err: + # print help information and exit: + print str(err) # will print something like "option -a not recognized" + usage() + sys.exit(2) + url ='http://localhost:9998' + root = '/' + for o, a in opts: + if o in ("-d", "--data"): + printdata = True + elif o in ("-h", "--help"): + usage() + sys.exit() + elif o in ("-u", "--url"): + url = a + elif o in ("-r", "--root"): + root = a + elif o in ("-f", "--fullpath"): + fullpath = True + else: + assert False, "unhandled option" + + print 'Accessing REST server at ' + url + zk_dump_tree(url, root) diff --git a/src/contrib/rest/src/python/zkrest.py b/src/contrib/rest/src/python/zkrest.py new file mode 100644 index 0000000..c009d5d --- /dev/null +++ b/src/contrib/rest/src/python/zkrest.py @@ -0,0 +1,218 @@ + +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import urllib2 +import urllib +import simplejson + +from contextlib import contextmanager + +class RequestWithMethod(urllib2.Request): + """ Request class that know how to set the method name """ + def __init__(self, *args, **kwargs): + urllib2.Request.__init__(self, *args, **kwargs) + self._method = None + + def get_method(self): + return self._method or \ + urllib2.Request.get_method(self) + + def set_method(self, method): + self._method = method + +class ZooKeeper(object): + + class Error(Exception): pass + + class NotFound(Error): pass + + class ZNodeExists(Error): pass + + class InvalidSession(Error): pass + + class WrongVersion(Error): pass + + def __init__(self, uri = 'http://localhost:9998'): + self._base = uri + self._session = None + + def start_session(self, expire=5, id=None): + """ Create a session and return the ID """ + if id is None: + url = "%s/sessions/v1/?op=create&expire=%d" % (self._base, expire) + self._session = self._do_post(url)['id'] + else: + self._session = id + return self._session + + def close_session(self): + """ Close the session on the server """ + if self._session is not None: + url = '%s/sessions/v1/%s' % (self._base, self._session) + self._do_delete(url) + self._session = None + + def heartbeat(self): + """ Send a heartbeat request. This is needed in order to keep a session alive """ + if self._session is not None: + url = '%s/sessions/v1/%s' % (self._base, self._session) + self._do_put(url, '') + + @contextmanager + def session(self, *args, **kwargs): + """ Session handling using a context manager """ + yield self.start_session(*args, **kwargs) + self.close_session() + + def get(self, path): + """ Get a node """ + url = "%s/znodes/v1%s" % (self._base, path) + return self._do_get(url) + + def get_children(self, path): + """ Get all the children for a given path. This function creates a generator """ + url = "%s/znodes/v1%s?view=children" % (self._base, path) + resp = self._do_get(url) + for child in resp.get('children', []): + try: + yield self._do_get(resp['child_uri_template']\ + .replace('{child}', urllib2.quote(child))) + except ZooKeeper.NotFound: + continue + + def create(self, path, data=None, sequence=False, ephemeral=False): + """ Create a new node. By default this call creates a persistent znode. + + You can also create an ephemeral or a sequential znode. + """ + ri = path.rindex('/') + head, name = path[:ri+1], path[ri+1:] + if head != '/': head = head[:-1] + + flags = { + 'null': 'true' if data is None else 'false', + 'ephemeral': 'true' if ephemeral else 'false', + 'sequence': 'true' if sequence else 'false' + } + if ephemeral: + if self._session: + flags['session'] = self._session + else: + raise ZooKeeper.Error, 'You need a session '\ + 'to create an ephemeral node' + flags = urllib.urlencode(flags) + + url = "%s/znodes/v1%s?op=create&name=%s&%s" % \ + (self._base, head, name, flags) + + return self._do_post(url, data) + + def set(self, path, data=None, version=-1, null=False): + """ Set the value of node """ + url = "%s/znodes/v1%s?%s" % (self._base, path, \ + urllib.urlencode({ + 'version': version, + 'null': 'true' if null else 'false' + })) + return self._do_put(url, data) + + def delete(self, path, version=-1): + """ Delete a znode """ + if type(path) is list: + map(lambda el: self.delete(el, version), path) + return + + url = '%s/znodes/v1%s?%s' % (self._base, path, \ + urllib.urlencode({ + 'version':version + })) + try: + return self._do_delete(url) + except urllib2.HTTPError, e: + if e.code == 412: + raise ZooKeeper.WrongVersion(path) + elif e.code == 404: + raise ZooKeeper.NotFound(path) + raise + + def exists(self, path): + """ Do a znode exists """ + try: + self.get(path) + return True + except ZooKeeper.NotFound: + return False + + def _do_get(self, uri): + """ Send a GET request and convert errors to exceptions """ + try: + req = urllib2.urlopen(uri) + resp = simplejson.load(req) + + if 'Error' in resp: + raise ZooKeeper.Error(resp['Error']) + + return resp + except urllib2.HTTPError, e: + if e.code == 404: + raise ZooKeeper.NotFound(uri) + raise + + def _do_post(self, uri, data=None): + """ Send a POST request and convert errors to exceptions """ + try: + req = urllib2.Request(uri, {}) + req.add_header('Content-Type', 'application/octet-stream') + if data is not None: + req.add_data(data) + + resp = simplejson.load(urllib2.urlopen(req)) + if 'Error' in resp: + raise ZooKeeper.Error(resp['Error']) + return resp + + except urllib2.HTTPError, e: + if e.code == 201: + return True + elif e.code == 409: + raise ZooKeeper.ZNodeExists(uri) + elif e.code == 401: + raise ZooKeeper.InvalidSession(uri) + raise + + def _do_delete(self, uri): + """ Send a DELETE request """ + req = RequestWithMethod(uri) + req.set_method('DELETE') + req.add_header('Content-Type', 'application/octet-stream') + return urllib2.urlopen(req).read() + + def _do_put(self, uri, data): + """ Send a PUT request """ + try: + req = RequestWithMethod(uri) + req.set_method('PUT') + req.add_header('Content-Type', 'application/octet-stream') + if data is not None: + req.add_data(data) + + return urllib2.urlopen(req).read() + except urllib2.HTTPError, e: + if e.code == 412: # precondition failed + raise ZooKeeper.WrongVersion(uri) + raise + diff --git a/src/contrib/rest/src/test/org/apache/zookeeper/server/jersey/Base.java b/src/contrib/rest/src/test/org/apache/zookeeper/server/jersey/Base.java new file mode 100644 index 0000000..2d5f51a --- /dev/null +++ b/src/contrib/rest/src/test/org/apache/zookeeper/server/jersey/Base.java @@ -0,0 +1,94 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.zookeeper.server.jersey; + +import java.io.ByteArrayInputStream; + +import junit.framework.TestCase; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.apache.zookeeper.CreateMode; +import org.apache.zookeeper.ZooKeeper; +import org.apache.zookeeper.ZooDefs.Ids; +import org.apache.zookeeper.server.jersey.SetTest.MyWatcher; +import org.apache.zookeeper.server.jersey.cfg.RestCfg; +import org.junit.After; +import org.junit.Before; + +import com.sun.jersey.api.client.Client; +import com.sun.jersey.api.client.WebResource; + +/** + * Test stand-alone server. + * + */ +public class Base extends TestCase { + protected static final Logger LOG = LoggerFactory.getLogger(Base.class); + + protected static final String CONTEXT_PATH = "/zk"; + protected static final int GRIZZLY_PORT = 10104; + protected static final String BASEURI = String.format( + "http://localhost:%d%s", GRIZZLY_PORT, CONTEXT_PATH); + protected static final String ZKHOSTPORT = "localhost:22182"; + protected Client client; + protected WebResource znodesr, sessionsr; + + protected ZooKeeper zk; + + private RestMain rest; + + @Before + public void setUp() throws Exception { + super.setUp(); + + RestCfg cfg = new RestCfg(new ByteArrayInputStream(String.format( + "rest.port=%s\n" + + "rest.endpoint.1=%s;%s\n", + GRIZZLY_PORT, CONTEXT_PATH, ZKHOSTPORT).getBytes())); + + rest = new RestMain(cfg); + rest.start(); + + zk = new ZooKeeper(ZKHOSTPORT, 30000, new MyWatcher()); + + client = Client.create(); + znodesr = client.resource(BASEURI).path("znodes/v1"); + sessionsr = client.resource(BASEURI).path("sessions/v1/"); + } + + @After + public void tearDown() throws Exception { + super.tearDown(); + + client.destroy(); + zk.close(); + rest.stop(); + } + + protected static String createBaseZNode() throws Exception { + ZooKeeper zk = new ZooKeeper(ZKHOSTPORT, 30000, new MyWatcher()); + + String baseZnode = zk.create("/test-", null, Ids.OPEN_ACL_UNSAFE, + CreateMode.PERSISTENT_SEQUENTIAL); + zk.close(); + + return baseZnode; + } +} diff --git a/src/contrib/rest/src/test/org/apache/zookeeper/server/jersey/CreateTest.java b/src/contrib/rest/src/test/org/apache/zookeeper/server/jersey/CreateTest.java new file mode 100644 index 0000000..49c3349 --- /dev/null +++ b/src/contrib/rest/src/test/org/apache/zookeeper/server/jersey/CreateTest.java @@ -0,0 +1,163 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.zookeeper.server.jersey; + +import java.util.Arrays; +import java.util.Collection; + +import javax.ws.rs.core.MediaType; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.apache.zookeeper.WatchedEvent; +import org.apache.zookeeper.Watcher; +import org.apache.zookeeper.data.Stat; +import org.apache.zookeeper.server.jersey.jaxb.ZPath; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameters; + +import com.sun.jersey.api.client.ClientResponse; +import com.sun.jersey.api.client.WebResource; +import com.sun.jersey.api.client.WebResource.Builder; + + +/** + * Test stand-alone server. + * + */ +@RunWith(Parameterized.class) +public class CreateTest extends Base { + protected static final Logger LOG = LoggerFactory.getLogger(CreateTest.class); + + private String accept; + private String path; + private String name; + private String encoding; + private ClientResponse.Status expectedStatus; + private ZPath expectedPath; + private byte[] data; + private boolean sequence; + + public static class MyWatcher implements Watcher { + public void process(WatchedEvent event) { + // FIXME ignore for now + } + } + + @Parameters + public static Collection data() throws Exception { + String baseZnode = Base.createBaseZNode(); + + return Arrays.asList(new Object[][] { + {MediaType.APPLICATION_JSON, + baseZnode, "foo bar", "utf8", + ClientResponse.Status.CREATED, + new ZPath(baseZnode + "/foo bar"), null, + false }, + {MediaType.APPLICATION_JSON, baseZnode, "c-t1", "utf8", + ClientResponse.Status.CREATED, new ZPath(baseZnode + "/c-t1"), + null, false }, + {MediaType.APPLICATION_JSON, baseZnode, "c-t1", "utf8", + ClientResponse.Status.CONFLICT, null, null, false }, + {MediaType.APPLICATION_JSON, baseZnode, "c-t2", "utf8", + ClientResponse.Status.CREATED, new ZPath(baseZnode + "/c-t2"), + "".getBytes(), false }, + {MediaType.APPLICATION_JSON, baseZnode, "c-t2", "utf8", + ClientResponse.Status.CONFLICT, null, null, false }, + {MediaType.APPLICATION_JSON, baseZnode, "c-t3", "utf8", + ClientResponse.Status.CREATED, new ZPath(baseZnode + "/c-t3"), + "foo".getBytes(), false }, + {MediaType.APPLICATION_JSON, baseZnode, "c-t3", "utf8", + ClientResponse.Status.CONFLICT, null, null, false }, + {MediaType.APPLICATION_JSON, baseZnode, "c-t4", "base64", + ClientResponse.Status.CREATED, new ZPath(baseZnode + "/c-t4"), + "foo".getBytes(), false }, + {MediaType.APPLICATION_JSON, baseZnode, "c-", "utf8", + ClientResponse.Status.CREATED, new ZPath(baseZnode + "/c-"), null, + true }, + {MediaType.APPLICATION_JSON, baseZnode, "c-", "utf8", + ClientResponse.Status.CREATED, new ZPath(baseZnode + "/c-"), null, + true } + }); + } + + public CreateTest(String accept, String path, String name, String encoding, + ClientResponse.Status status, ZPath expectedPath, byte[] data, + boolean sequence) + { + this.accept = accept; + this.path = path; + this.name = name; + this.encoding = encoding; + this.expectedStatus = status; + this.expectedPath = expectedPath; + this.data = data; + this.sequence = sequence; + } + + @Test + public void testCreate() throws Exception { + LOG.info("STARTING " + getName()); + + WebResource wr = znodesr.path(path).queryParam("dataformat", encoding) + .queryParam("name", name); + if (data == null) { + wr = wr.queryParam("null", "true"); + } + if (sequence) { + wr = wr.queryParam("sequence", "true"); + } + + Builder builder = wr.accept(accept); + + ClientResponse cr; + if (data == null) { + cr = builder.post(ClientResponse.class); + } else { + cr = builder.post(ClientResponse.class, data); + } + assertEquals(expectedStatus, cr.getClientResponseStatus()); + + if (expectedPath == null) { + return; + } + + ZPath zpath = cr.getEntity(ZPath.class); + if (sequence) { + assertTrue(zpath.path.startsWith(expectedPath.path)); + assertTrue(zpath.uri.startsWith(znodesr.path(path).toString())); + } else { + assertEquals(expectedPath, zpath); + assertEquals(znodesr.path(path).toString(), zpath.uri); + } + + // use out-of-band method to verify + byte[] data = zk.getData(zpath.path, false, new Stat()); + if (data == null && this.data == null) { + return; + } else if (data == null || this.data == null) { + assertEquals(data, this.data); + } else { + assertTrue(new String(data) + " == " + new String(this.data), + Arrays.equals(data, this.data)); + } + } +} diff --git a/src/contrib/rest/src/test/org/apache/zookeeper/server/jersey/DeleteTest.java b/src/contrib/rest/src/test/org/apache/zookeeper/server/jersey/DeleteTest.java new file mode 100644 index 0000000..052239d --- /dev/null +++ b/src/contrib/rest/src/test/org/apache/zookeeper/server/jersey/DeleteTest.java @@ -0,0 +1,95 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.zookeeper.server.jersey; + +import java.util.Arrays; +import java.util.Collection; + +import javax.ws.rs.core.MediaType; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.apache.zookeeper.CreateMode; +import org.apache.zookeeper.WatchedEvent; +import org.apache.zookeeper.Watcher; +import org.apache.zookeeper.ZooDefs.Ids; +import org.apache.zookeeper.data.Stat; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameters; + +import com.sun.jersey.api.client.ClientResponse; + + +/** + * Test stand-alone server. + * + */ +@RunWith(Parameterized.class) +public class DeleteTest extends Base { + protected static final Logger LOG = LoggerFactory.getLogger(DeleteTest.class); + + private String zpath; + private ClientResponse.Status expectedStatus; + + public static class MyWatcher implements Watcher { + public void process(WatchedEvent event) { + // FIXME ignore for now + } + } + + @Parameters + public static Collection data() throws Exception { + String baseZnode = Base.createBaseZNode(); + + return Arrays.asList(new Object[][] { + {baseZnode, baseZnode, ClientResponse.Status.NO_CONTENT }, + {baseZnode, baseZnode, ClientResponse.Status.NO_CONTENT } + }); + } + + public DeleteTest(String path, String zpath, ClientResponse.Status status) { + this.zpath = zpath; + this.expectedStatus = status; + } + + public void verify(String type) throws Exception { + if (expectedStatus != ClientResponse.Status.NOT_FOUND) { + zpath = zk.create(zpath, null, Ids.OPEN_ACL_UNSAFE, + CreateMode.PERSISTENT_SEQUENTIAL); + } + + ClientResponse cr = znodesr.path(zpath).accept(type).type(type) + .delete(ClientResponse.class); + assertEquals(expectedStatus, cr.getClientResponseStatus()); + + // use out-of-band method to verify + Stat stat = zk.exists(zpath, false); + assertNull(stat); + } + + @Test + public void testDelete() throws Exception { + LOG.info("STARTING " + getName()); + verify(MediaType.APPLICATION_OCTET_STREAM); + verify(MediaType.APPLICATION_JSON); + verify(MediaType.APPLICATION_XML); + } +} diff --git a/src/contrib/rest/src/test/org/apache/zookeeper/server/jersey/ExistsTest.java b/src/contrib/rest/src/test/org/apache/zookeeper/server/jersey/ExistsTest.java new file mode 100644 index 0000000..696ea95 --- /dev/null +++ b/src/contrib/rest/src/test/org/apache/zookeeper/server/jersey/ExistsTest.java @@ -0,0 +1,80 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.zookeeper.server.jersey; + +import java.util.Arrays; +import java.util.Collection; + +import javax.ws.rs.core.MediaType; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameters; + +import com.sun.jersey.api.client.ClientResponse; + + +/** + * Test stand-alone server. + * + */ +@RunWith(Parameterized.class) +public class ExistsTest extends Base { + protected static final Logger LOG = LoggerFactory.getLogger(ExistsTest.class); + + private String path; + private ClientResponse.Status expectedStatus; + + @Parameters + public static Collection data() throws Exception { + String baseZnode = Base.createBaseZNode(); + + return Arrays.asList(new Object[][] { + {baseZnode, ClientResponse.Status.OK }, + {baseZnode + "dkdk38383", ClientResponse.Status.NOT_FOUND } + }); + } + + public ExistsTest(String path, ClientResponse.Status status) { + this.path = path; + this.expectedStatus = status; + } + + private void verify(String type) { + ClientResponse cr = znodesr.path(path).accept(type).type(type).head(); + if (type.equals(MediaType.APPLICATION_OCTET_STREAM) + && expectedStatus == ClientResponse.Status.OK) { + assertEquals(ClientResponse.Status.NO_CONTENT, + cr.getClientResponseStatus()); + } else { + assertEquals(expectedStatus, cr.getClientResponseStatus()); + } + } + + @Test + public void testExists() throws Exception { + LOG.info("STARTING " + getName()); + verify(MediaType.APPLICATION_OCTET_STREAM); + verify(MediaType.APPLICATION_JSON); + verify(MediaType.APPLICATION_XML); + } +} diff --git a/src/contrib/rest/src/test/org/apache/zookeeper/server/jersey/GetChildrenTest.java b/src/contrib/rest/src/test/org/apache/zookeeper/server/jersey/GetChildrenTest.java new file mode 100644 index 0000000..a046692 --- /dev/null +++ b/src/contrib/rest/src/test/org/apache/zookeeper/server/jersey/GetChildrenTest.java @@ -0,0 +1,139 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.zookeeper.server.jersey; + +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.List; + +import javax.ws.rs.core.MediaType; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.apache.zookeeper.CreateMode; +import org.apache.zookeeper.ZooDefs.Ids; +import org.apache.zookeeper.server.jersey.jaxb.ZChildren; +import org.apache.zookeeper.server.jersey.jaxb.ZChildrenJSON; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameters; + +import com.sun.jersey.api.client.ClientResponse; + + +/** + * Test stand-alone server. + * + */ +@RunWith(Parameterized.class) +public class GetChildrenTest extends Base { + protected static final Logger LOG = LoggerFactory.getLogger(GetChildrenTest.class); + + private String accept; + private String path; + private ClientResponse.Status expectedStatus; + private String expectedPath; + private List expectedChildren; + + @Parameters + public static Collection data() throws Exception { + String baseZnode = Base.createBaseZNode(); + String baseZnode2 = Base.createBaseZNode(); + String baseZnode3 = Base.createBaseZNode(); + String baseZnode4 = Base.createBaseZNode(); + String baseZnode5 = Base.createBaseZNode(); + String baseZnode6 = Base.createBaseZNode(); + + return Arrays.asList(new Object[][] { + {MediaType.APPLICATION_JSON, baseZnode + "abddkdkd", + ClientResponse.Status.NOT_FOUND, null, null }, + {MediaType.APPLICATION_XML, baseZnode + "abddkdkd", + ClientResponse.Status.NOT_FOUND, null, null }, + {MediaType.APPLICATION_JSON, baseZnode, ClientResponse.Status.OK, + baseZnode, Arrays.asList(new String[] {}) }, + {MediaType.APPLICATION_XML, baseZnode, ClientResponse.Status.OK, + baseZnode, Arrays.asList(new String[] {}) }, + {MediaType.APPLICATION_JSON, baseZnode, ClientResponse.Status.OK, + baseZnode, Arrays.asList(new String[] {"c1"}) }, + {MediaType.APPLICATION_XML, baseZnode4, ClientResponse.Status.OK, + baseZnode4, Arrays.asList(new String[] {"c1"}) }, + {MediaType.APPLICATION_JSON, baseZnode2, ClientResponse.Status.OK, + baseZnode2, Arrays.asList(new String[] {"c1", "c2"}) }, + {MediaType.APPLICATION_XML, baseZnode5, ClientResponse.Status.OK, + baseZnode5, Arrays.asList(new String[] {"c1", "c2"}) }, + {MediaType.APPLICATION_JSON, baseZnode3, ClientResponse.Status.OK, + baseZnode3, Arrays.asList(new String[] {"c1", "c2", "c3", "c4"}) }, + {MediaType.APPLICATION_XML, baseZnode6, ClientResponse.Status.OK, + baseZnode6, Arrays.asList(new String[] {"c1", "c2", "c3", "c4"}) } + + }); + } + + public GetChildrenTest(String accept, String path, ClientResponse.Status status, + String expectedPath, List expectedChildren) + { + this.accept = accept; + this.path = path; + this.expectedStatus = status; + this.expectedPath = expectedPath; + this.expectedChildren = expectedChildren; + } + + @Test + public void testGetChildren() throws Exception { + LOG.info("STARTING " + getName()); + + if (expectedChildren != null) { + for(String child : expectedChildren) { + zk.create(expectedPath + "/" + child, null, + Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT); + } + } + + ClientResponse cr = znodesr.path(path).queryParam("view", "children") + .accept(accept).get(ClientResponse.class); + assertEquals(expectedStatus, cr.getClientResponseStatus()); + + if (expectedChildren == null) { + return; + } + + if (accept.equals(MediaType.APPLICATION_JSON)) { + ZChildrenJSON zchildren = cr.getEntity(ZChildrenJSON.class); + Collections.sort(expectedChildren); + Collections.sort(zchildren.children); + assertEquals(expectedChildren, zchildren.children); + assertEquals(znodesr.path(path).toString(), zchildren.uri); + assertEquals(znodesr.path(path).toString() + "/{child}", + zchildren.child_uri_template); + } else if (accept.equals(MediaType.APPLICATION_XML)) { + ZChildren zchildren = cr.getEntity(ZChildren.class); + Collections.sort(expectedChildren); + Collections.sort(zchildren.children); + assertEquals(expectedChildren, zchildren.children); + assertEquals(znodesr.path(path).toString(), zchildren.uri); + assertEquals(znodesr.path(path).toString() + "/{child}", + zchildren.child_uri_template); + } else { + fail("unknown accept type"); + } + } +} diff --git a/src/contrib/rest/src/test/org/apache/zookeeper/server/jersey/GetTest.java b/src/contrib/rest/src/test/org/apache/zookeeper/server/jersey/GetTest.java new file mode 100644 index 0000000..f00946e --- /dev/null +++ b/src/contrib/rest/src/test/org/apache/zookeeper/server/jersey/GetTest.java @@ -0,0 +1,123 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.zookeeper.server.jersey; + +import java.util.Arrays; +import java.util.Collection; + +import javax.ws.rs.core.MediaType; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.apache.zookeeper.server.jersey.jaxb.ZStat; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameters; + +import com.sun.jersey.api.client.ClientResponse; + + +/** + * Test stand-alone server. + * + */ +@RunWith(Parameterized.class) +public class GetTest extends Base { + protected static final Logger LOG = LoggerFactory.getLogger(GetTest.class); + + private String accept; + private String path; + private String encoding; + private ClientResponse.Status expectedStatus; + private ZStat expectedStat; + + @Parameters + public static Collection data() throws Exception { + String baseZnode = Base.createBaseZNode(); + + return Arrays.asList(new Object[][] { + {MediaType.APPLICATION_JSON, baseZnode, "utf8", + ClientResponse.Status.OK, new ZStat(baseZnode, null, null) }, + {MediaType.APPLICATION_JSON, baseZnode, "utf8", + ClientResponse.Status.OK, new ZStat(baseZnode, null, "") }, + {MediaType.APPLICATION_JSON, baseZnode, "utf8", + ClientResponse.Status.OK, new ZStat(baseZnode, null, "foo") }, + {MediaType.APPLICATION_JSON, baseZnode, "base64", + ClientResponse.Status.OK, new ZStat(baseZnode, null, null) }, + {MediaType.APPLICATION_JSON, baseZnode, "base64", + ClientResponse.Status.OK, new ZStat(baseZnode, "".getBytes(), null) }, + {MediaType.APPLICATION_JSON, baseZnode, "base64", + ClientResponse.Status.OK, new ZStat(baseZnode, "".getBytes(), null) }, + {MediaType.APPLICATION_JSON, baseZnode, "base64", + ClientResponse.Status.OK, new ZStat(baseZnode, "foo".getBytes(), null) }, + {MediaType.APPLICATION_JSON, baseZnode + "abaddkdk", "utf8", + ClientResponse.Status.NOT_FOUND, null }, + {MediaType.APPLICATION_JSON, baseZnode + "abaddkdk", "base64", + ClientResponse.Status.NOT_FOUND, null }, + + {MediaType.APPLICATION_XML, baseZnode, "utf8", + ClientResponse.Status.OK, new ZStat(baseZnode, null, "foo") }, + {MediaType.APPLICATION_XML, baseZnode, "base64", + ClientResponse.Status.OK, + new ZStat(baseZnode, "foo".getBytes(), null) }, + {MediaType.APPLICATION_XML, baseZnode + "abaddkdk", "utf8", + ClientResponse.Status.NOT_FOUND, null }, + {MediaType.APPLICATION_XML, baseZnode + "abaddkdk", "base64", + ClientResponse.Status.NOT_FOUND, null } + + }); + } + + public GetTest(String accept, String path, String encoding, + ClientResponse.Status status, ZStat stat) + { + this.accept = accept; + this.path = path; + this.encoding = encoding; + this.expectedStatus = status; + this.expectedStat = stat; + } + + @Test + public void testGet() throws Exception { + LOG.info("STARTING " + getName()); + + if (expectedStat != null) { + if (expectedStat.data64 != null || expectedStat.dataUtf8 == null) { + zk.setData(expectedStat.path, expectedStat.data64, -1); + } else { + zk.setData(expectedStat.path, + expectedStat.dataUtf8.getBytes(), -1); + } + } + + ClientResponse cr = znodesr.path(path).queryParam("dataformat", encoding) + .accept(accept).get(ClientResponse.class); + assertEquals(expectedStatus, cr.getClientResponseStatus()); + + if (expectedStat == null) { + return; + } + + ZStat zstat = cr.getEntity(ZStat.class); + assertEquals(expectedStat, zstat); + assertEquals(znodesr.path(path).toString(), zstat.uri); + } +} diff --git a/src/contrib/rest/src/test/org/apache/zookeeper/server/jersey/RestTestSuite.java b/src/contrib/rest/src/test/org/apache/zookeeper/server/jersey/RestTestSuite.java new file mode 100644 index 0000000..fc69caf --- /dev/null +++ b/src/contrib/rest/src/test/org/apache/zookeeper/server/jersey/RestTestSuite.java @@ -0,0 +1,42 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.zookeeper.server.jersey; + +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + +@RunWith(Suite.class) +@SuiteClasses({WadlTest.class, GetTest.class, GetChildrenTest.class, + CreateTest.class, SetTest.class, ExistsTest.class, DeleteTest.class }) +public class RestTestSuite { + + @BeforeClass + public static void setUp() { + // suite setup + } + + @AfterClass + public static void tearDown() { + // suite setup + } + +} diff --git a/src/contrib/rest/src/test/org/apache/zookeeper/server/jersey/RootTest.java b/src/contrib/rest/src/test/org/apache/zookeeper/server/jersey/RootTest.java new file mode 100644 index 0000000..a4f9b9e --- /dev/null +++ b/src/contrib/rest/src/test/org/apache/zookeeper/server/jersey/RootTest.java @@ -0,0 +1,68 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.zookeeper.server.jersey; + +import java.util.Arrays; + +import javax.ws.rs.core.MediaType; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.apache.zookeeper.data.Stat; +import org.apache.zookeeper.server.jersey.jaxb.ZPath; +import org.junit.Test; + +import com.sun.jersey.api.client.ClientResponse; +import com.sun.jersey.api.client.WebResource; +import com.sun.jersey.api.client.WebResource.Builder; + + +/** + * Test stand-alone server. + * + */ +public class RootTest extends Base { + protected static final Logger LOG = LoggerFactory.getLogger(RootTest.class); + + @Test + public void testCreate() throws Exception { + LOG.info("STARTING " + getName()); + + String path = "/"; + String name = "roottest-create"; + byte[] data = "foo".getBytes(); + + WebResource wr = znodesr.path(path).queryParam("dataformat", "utf8") + .queryParam("name", name); + Builder builder = wr.accept(MediaType.APPLICATION_JSON); + + ClientResponse cr; + cr = builder.post(ClientResponse.class, data); + assertEquals(ClientResponse.Status.CREATED, cr.getClientResponseStatus()); + + ZPath zpath = cr.getEntity(ZPath.class); + assertEquals(new ZPath(path + name), zpath); + assertEquals(znodesr.path(path).toString(), zpath.uri); + + // use out-of-band method to verify + byte[] rdata = zk.getData(zpath.path, false, new Stat()); + assertTrue(new String(rdata) + " == " + new String(data), + Arrays.equals(rdata, data)); + } +} diff --git a/src/contrib/rest/src/test/org/apache/zookeeper/server/jersey/SessionTest.java b/src/contrib/rest/src/test/org/apache/zookeeper/server/jersey/SessionTest.java new file mode 100644 index 0000000..3e165c0 --- /dev/null +++ b/src/contrib/rest/src/test/org/apache/zookeeper/server/jersey/SessionTest.java @@ -0,0 +1,134 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.zookeeper.server.jersey; + +import java.io.IOException; + +import javax.ws.rs.core.MediaType; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.apache.zookeeper.KeeperException; +import org.apache.zookeeper.ZooKeeper; +import org.apache.zookeeper.data.Stat; +import org.apache.zookeeper.server.jersey.jaxb.ZSession; +import org.codehaus.jettison.json.JSONException; +import org.junit.Test; + +import com.sun.jersey.api.client.Client; +import com.sun.jersey.api.client.ClientResponse; +import com.sun.jersey.api.client.WebResource; +import com.sun.jersey.api.client.WebResource.Builder; + +public class SessionTest extends Base { + protected static final Logger LOG = LoggerFactory.getLogger(SessionTest.class); + + private ZSession createSession() { + return createSession("30"); + } + + private ZSession createSession(String expire) { + WebResource wr = sessionsr.queryParam("op", "create") + .queryParam("expire", expire); + Builder b = wr.accept(MediaType.APPLICATION_JSON); + + ClientResponse cr = b.post(ClientResponse.class, null); + assertEquals(ClientResponse.Status.CREATED, cr + .getClientResponseStatus()); + + return cr.getEntity(ZSession.class); + } + + @Test + public void testCreateNewSession() throws JSONException { + ZSession session = createSession(); + assertEquals(session.id.length(), 36); + + // use out-of-band method to verify + assertTrue(ZooKeeperService.isConnected(CONTEXT_PATH, session.id)); + } + + @Test + public void testSessionExpires() throws InterruptedException { + ZSession session = createSession("1"); + + // use out-of-band method to verify + assertTrue(ZooKeeperService.isConnected(CONTEXT_PATH, session.id)); + + // wait for the session to be closed + Thread.sleep(1500); + assertFalse(ZooKeeperService.isConnected(CONTEXT_PATH, session.id)); + } + + @Test + public void testDeleteSession() { + ZSession session = createSession("30"); + + WebResource wr = sessionsr.path(session.id); + Builder b = wr.accept(MediaType.APPLICATION_JSON); + + assertTrue(ZooKeeperService.isConnected(CONTEXT_PATH, session.id)); + ClientResponse cr = b.delete(ClientResponse.class, null); + assertEquals(ClientResponse.Status.NO_CONTENT, + cr.getClientResponseStatus()); + + assertFalse(ZooKeeperService.isConnected(CONTEXT_PATH, session.id)); + } + + @Test + public void testSendHeartbeat() throws InterruptedException { + ZSession session = createSession("2"); + + Thread.sleep(1000); + WebResource wr = sessionsr.path(session.id); + Builder b = wr.accept(MediaType.APPLICATION_JSON); + + ClientResponse cr = b.put(ClientResponse.class, null); + assertEquals(ClientResponse.Status.OK, cr.getClientResponseStatus()); + + Thread.sleep(1500); + assertTrue(ZooKeeperService.isConnected(CONTEXT_PATH, session.id)); + + Thread.sleep(1000); + assertFalse(ZooKeeperService.isConnected(CONTEXT_PATH, session.id)); + } + + @Test + public void testCreateEphemeralZNode() + throws KeeperException, InterruptedException, IOException { + ZSession session = createSession("30"); + + WebResource wr = znodesr.path("/") + .queryParam("op", "create") + .queryParam("name", "ephemeral-test") + .queryParam("ephemeral", "true") + .queryParam("session", session.id) + .queryParam("null", "true"); + + Builder b = wr.accept(MediaType.APPLICATION_JSON); + ClientResponse cr = b.post(ClientResponse.class); + assertEquals(ClientResponse.Status.CREATED, cr.getClientResponseStatus()); + + Stat stat = new Stat(); + zk.getData("/ephemeral-test", false, stat); + + ZooKeeper sessionZK = ZooKeeperService.getClient(CONTEXT_PATH, session.id); + assertEquals(stat.getEphemeralOwner(), sessionZK.getSessionId()); + } +} diff --git a/src/contrib/rest/src/test/org/apache/zookeeper/server/jersey/SetTest.java b/src/contrib/rest/src/test/org/apache/zookeeper/server/jersey/SetTest.java new file mode 100644 index 0000000..cbcfd21 --- /dev/null +++ b/src/contrib/rest/src/test/org/apache/zookeeper/server/jersey/SetTest.java @@ -0,0 +1,155 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.zookeeper.server.jersey; + +import java.util.Arrays; +import java.util.Collection; + +import javax.ws.rs.core.MediaType; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.apache.zookeeper.CreateMode; +import org.apache.zookeeper.WatchedEvent; +import org.apache.zookeeper.Watcher; +import org.apache.zookeeper.ZooDefs.Ids; +import org.apache.zookeeper.data.Stat; +import org.apache.zookeeper.server.jersey.jaxb.ZStat; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameters; + +import com.sun.jersey.api.client.ClientResponse; +import com.sun.jersey.api.client.WebResource; +import com.sun.jersey.api.client.WebResource.Builder; + + +/** + * Test stand-alone server. + * + */ +@RunWith(Parameterized.class) +public class SetTest extends Base { + protected static final Logger LOG = LoggerFactory.getLogger(SetTest.class); + + private String accept; + private String path; + private String encoding; + private ClientResponse.Status expectedStatus; + private ZStat expectedStat; + private byte[] data; + + public static class MyWatcher implements Watcher { + public void process(WatchedEvent event) { + // FIXME ignore for now + } + } + + @Parameters + public static Collection data() throws Exception { + String baseZnode = Base.createBaseZNode(); + + return Arrays.asList(new Object[][] { + {MediaType.APPLICATION_JSON, baseZnode + "/s-t1", "utf8", + ClientResponse.Status.OK, + new ZStat(baseZnode + "/s-t1", null, null), null }, + {MediaType.APPLICATION_JSON, baseZnode + "/s-t2", "utf8", + ClientResponse.Status.OK, + new ZStat(baseZnode + "/s-t2", null, null), new byte[0] }, + {MediaType.APPLICATION_JSON, baseZnode + "/s-t3", "utf8", + ClientResponse.Status.OK, + new ZStat(baseZnode + "/s-t3", null, null), "foobar".getBytes() }, + {MediaType.APPLICATION_JSON, baseZnode + "/s-t4", "base64", + ClientResponse.Status.OK, + new ZStat(baseZnode + "/s-t4", null, null), null }, + {MediaType.APPLICATION_JSON, baseZnode + "/s-t5", "base64", + ClientResponse.Status.OK, + new ZStat(baseZnode + "/s-t5", null, null), new byte[0] }, + {MediaType.APPLICATION_JSON, baseZnode + "/s-t6", "base64", + ClientResponse.Status.OK, + new ZStat(baseZnode + "/s-t6", null, null), + "foobar".getBytes() }, + {MediaType.APPLICATION_JSON, baseZnode + "/dkdkdkd", "utf8", + ClientResponse.Status.NOT_FOUND, null, null }, + {MediaType.APPLICATION_JSON, baseZnode + "/dkdkdkd", "base64", + ClientResponse.Status.NOT_FOUND, null, null }, + }); + } + + public SetTest(String accept, String path, String encoding, + ClientResponse.Status status, ZStat expectedStat, byte[] data) + { + this.accept = accept; + this.path = path; + this.encoding = encoding; + this.expectedStatus = status; + this.expectedStat = expectedStat; + this.data = data; + } + + @Test + public void testSet() throws Exception { + LOG.info("STARTING " + getName()); + + if (expectedStat != null) { + zk.create(expectedStat.path, "initial".getBytes(), Ids.OPEN_ACL_UNSAFE, + CreateMode.PERSISTENT); + } + + WebResource wr = znodesr.path(path).queryParam("dataformat", encoding); + if (data == null) { + wr = wr.queryParam("null", "true"); + } + + Builder builder = wr.accept(accept) + .type(MediaType.APPLICATION_OCTET_STREAM); + + ClientResponse cr; + if (data == null) { + cr = builder.put(ClientResponse.class); + } else { + // this shouldn't be necessary (wrapping data with string) + // but without it there are problems on the server - ie it + // hangs for 30 seconds and doesn't get the data. + // TODO investigate + cr = builder.put(ClientResponse.class, new String(data)); + } + assertEquals(expectedStatus, cr.getClientResponseStatus()); + + if (expectedStat == null) { + return; + } + + ZStat zstat = cr.getEntity(ZStat.class); + assertEquals(expectedStat, zstat); + + // use out-of-band method to verify + byte[] data = zk.getData(zstat.path, false, new Stat()); + if (data == null && this.data == null) { + return; + } else if (data == null || this.data == null) { + fail((data == null ? null : new String(data)) + " == " + + (this.data == null ? null : new String(this.data))); + } else { + assertTrue(new String(data) + " == " + new String(this.data), + Arrays.equals(data, this.data)); + } + } +} diff --git a/src/contrib/rest/src/test/org/apache/zookeeper/server/jersey/WadlTest.java b/src/contrib/rest/src/test/org/apache/zookeeper/server/jersey/WadlTest.java new file mode 100644 index 0000000..4009e6d --- /dev/null +++ b/src/contrib/rest/src/test/org/apache/zookeeper/server/jersey/WadlTest.java @@ -0,0 +1,44 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.zookeeper.server.jersey; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.junit.Test; + +import com.sun.jersey.api.client.WebResource; +import com.sun.jersey.core.header.MediaTypes; + + +/** + * Test stand-alone server. + * + */ +public class WadlTest extends Base { + protected static final Logger LOG = LoggerFactory.getLogger(WadlTest.class); + + @Test + public void testApplicationWadl() { + WebResource r = client.resource(BASEURI); + String serviceWadl = r.path("application.wadl"). + accept(MediaTypes.WADL).get(String.class); + assertTrue("Something wrong. Returned wadl length not > 0.", + serviceWadl.length() > 0); + } +} diff --git a/src/contrib/rest/src/test/zkServer.sh b/src/contrib/rest/src/test/zkServer.sh new file mode 100644 index 0000000..bff85f3 --- /dev/null +++ b/src/contrib/rest/src/test/zkServer.sh @@ -0,0 +1,91 @@ +#!/bin/bash +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +if [ "x$1" == "x" ] +then + echo "USAGE: $0 startClean|start|stop hostPorts" + exit 2 +fi + +if [ "x$1" == "xstartClean" ] +then + if [ "x${base_dir}" == "x" ] + then + rm -rf /tmp/zkdata + else + rm -rf ${base_dir}/build/tmp + fi +fi + +# Make sure nothing is left over from before +if [ -r "/tmp/zk.pid" ] +then +pid=`cat /tmp/zk.pid` +kill -9 $pid +rm -f /tmp/zk.pid +fi + +if [ -r "${base_dir}/build/tmp/zk.pid" ] +then +pid=`cat ${base_dir}/build/tmp/zk.pid` +kill -9 $pid +rm -f ${base_dir}/build/tmp/zk.pid +fi + +if [ "x${base_dir}" == "x" ] +then +zk_base="../../../" +else +zk_base="${base_dir}" +fi + +CLASSPATH="$CLASSPATH:${zk_base}/build/classes" +CLASSPATH="$CLASSPATH:${zk_base}/conf" + +for i in "${zk_base}"/build/lib/*.jar +do + CLASSPATH="$CLASSPATH:$i" +done + +for i in "${zk_base}"/src/java/lib/*.jar +do + CLASSPATH="$CLASSPATH:$i" +done + +case $1 in +start|startClean) + if [ "x${base_dir}" == "x" ] + then + mkdir -p /tmp/zkdata + java -cp $CLASSPATH org.apache.zookeeper.server.ZooKeeperServerMain 22182 /tmp/zkdata &> /tmp/zk.log & + echo $! > /tmp/zk.pid + else + mkdir -p ${base_dir}/build/tmp/zkdata + java -cp $CLASSPATH org.apache.zookeeper.server.ZooKeeperServerMain 22182 ${base_dir}/build/tmp/zkdata &> ${base_dir}/build/tmp/zk.log & + echo $! > ${base_dir}/build/tmp/zk.pid + fi + sleep 5 + ;; +stop) + # Already killed above + ;; +*) + echo "Unknown command " + $1 + exit 2 +esac + diff --git a/src/contrib/zkfuse/Makefile.am b/src/contrib/zkfuse/Makefile.am new file mode 100644 index 0000000..36da1a5 --- /dev/null +++ b/src/contrib/zkfuse/Makefile.am @@ -0,0 +1,4 @@ +## Process this file with automake to produce Makefile.in + +SUBDIRS = src + diff --git a/src/contrib/zkfuse/README.txt b/src/contrib/zkfuse/README.txt new file mode 100644 index 0000000..901d363 --- /dev/null +++ b/src/contrib/zkfuse/README.txt @@ -0,0 +1,63 @@ +Original authors of zkfuse are Swee Lim & Bartlomiej M Niechwiej of Yahoo. +' +ZooKeeper FUSE (File System in Userspace) +========================================= + +Pre-requisites +-------------- +1. Linux system with 2.6.X kernel. +2. Fuse (Filesystem in Userspace) must be installed on the build node. +3. Development build libraries: + a. fuse + b. log4cxx + c. pthread + d. boost + +Build instructions +------------------ +1. cd into this directory +2. autoreconf -if +3. ./configure +4. make +5. zkfuse binary is under the src directory + +Testing Zkfuse +-------------- +1. Depending on permission on /dev/fuse, you may need to sudo -u root. + * If /dev/fuse has permissions 0600, then you have to run Zkfuse as root. + * If /dev/fuse has permissions 0666, then you can run Zkfuse as any user. +2. Create or find a mount point that you have "rwx" permission. + * e.g. mkdir -p /tmp/zkfuse +3. Run Zkfuse as follows: + zkfuse -z -m /tmp/zkfuse -d + -z specifies ZooKeeper address(es) : + -m specifies the mount point + -d specifies the debug mode. + For additional command line options, try "zkfuse -h". + +FAQ +--- +Q. How to fix "warning: macro `AM_PATH_CPPUNIT' not found in library"? +A. * install cppunit (src or pkg) on build machine + +Q. Why can't Zkfuse cannot write to current directory? +A. * If Zkfuse is running as root on a NFS mounted file system, it will not + have root permissions because root user is mapped to another user by + NFS admin. + * If you run Zkfuse as root, it is a good idea to run Zkfuse from a + directory that you have write access to. This will allow core files + to be saved. + +Q. Why Zkfuse cannot mount? +A. * Check that the mount point exists and you have "rwx" permissions. + * Check that previous mounts have been umounted. If Zkfuse does not + exit cleanly, its mount point may have to be umounted manually. + If you cannot umount manually, make sure that there no files is open + within the mount point. + +Q. Why does Zkfuse complain about logging at startup? +A. * Zkfuse uses log4cxx for logging. It is looking for log4cxx.properties + file to obtain its logging configuration. + * There is an example log4cxx.properties file in the Zkfuse source + directory. + diff --git a/src/contrib/zkfuse/build.xml b/src/contrib/zkfuse/build.xml new file mode 100644 index 0000000..f589453 --- /dev/null +++ b/src/contrib/zkfuse/build.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/contrib/zkfuse/configure.ac b/src/contrib/zkfuse/configure.ac new file mode 100644 index 0000000..c86e7cd --- /dev/null +++ b/src/contrib/zkfuse/configure.ac @@ -0,0 +1,72 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +AC_PREREQ(2.59) + +AC_INIT([zkfuse], [2.2.0]) +AM_INIT_AUTOMAKE(foreign) + +AC_CONFIG_SRCDIR([src/zkadapter.h]) +AM_CONFIG_HEADER([config.h]) + +PACKAGE=zkfuse +VERSION=1.0 + +AC_SUBST(PACKAGE) +AC_SUBST(VERSION) + +BUILD_PATH="`pwd`" + +# Checks for programs. +AC_LANG_CPLUSPLUS +AC_PROG_CXX + +# Checks for libraries. +AC_CHECK_LIB([fuse], [main]) +AC_CHECK_LIB([log4cxx], [main], [], [AC_MSG_ERROR("We need log4cxx to build zkfuse")]) +AC_CHECK_LIB([thread], [thr_create]) +AC_CHECK_LIB([pthread], [pthread_create]) +AC_CHECK_LIB([rt], [clock_gettime]) +AC_CHECK_LIB([socket], [socket]) +AC_CHECK_LIB([nsl], [gethostbyname]) +AC_CHECK_LIB([ulockmgr], [ulockmgr_op]) + +ZOOKEEPER_PATH=${BUILD_PATH}/../../c +ZOOKEEPER_BUILD_PATH=${BUILD_PATH}/../../../build/c +AC_CHECK_LIB(zookeeper_mt, main, [ZOOKEEPER_LD="-L${ZOOKEEPER_BUILD_PATH}/.libs -lzookeeper_mt"],,["-L${ZOOKEEPER_BUILD_PATH}/.libs"]) + +AC_SUBST(ZOOKEEPER_PATH) +AC_SUBST(ZOOKEEPER_LD) + +# Checks for header files. +AC_HEADER_DIRENT +AC_HEADER_STDC +AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/time.h unistd.h]) +AC_CHECK_HEADERS([boost/shared_ptr.hpp boost/utility.hpp boost/weak_ptr.hpp],, AC_MSG_ERROR([boost library headers not found. Please install boost library.])) + +# Checks for typedefs, structures, and compiler characteristics. +AC_HEADER_STDBOOL +AC_C_CONST +AC_TYPE_UID_T +AC_C_INLINE +AC_TYPE_INT32_T +AC_TYPE_INT64_T +AC_TYPE_MODE_T +AC_TYPE_OFF_T +AC_TYPE_SIZE_T +AC_CHECK_MEMBERS([struct stat.st_blksize]) +AC_STRUCT_ST_BLOCKS +AC_HEADER_TIME +AC_TYPE_UINT32_T +AC_TYPE_UINT64_T +AC_TYPE_UINT8_T +AC_C_VOLATILE + +# Checks for library functions. +AC_FUNC_UTIME_NULL +AC_CHECK_FUNCS([gettimeofday memset mkdir rmdir strdup strerror strstr strtol strtoul strtoull utime]) + +AC_CONFIG_FILES([Makefile]) +AC_CONFIG_FILES([src/Makefile]) +AC_OUTPUT +AC_C_VOLATILE diff --git a/src/contrib/zkfuse/src/Makefile.am b/src/contrib/zkfuse/src/Makefile.am new file mode 100644 index 0000000..c0d87e3 --- /dev/null +++ b/src/contrib/zkfuse/src/Makefile.am @@ -0,0 +1,7 @@ +AM_CXXFLAGS = -I${ZOOKEEPER_PATH}/include -I${ZOOKEEPER_PATH}/generated \ + -I$(top_srcdir)/include -I/usr/include -D_FILE_OFFSET_BITS=64 -D_REENTRANT + +noinst_PROGRAMS = zkfuse + +zkfuse_SOURCES = zkfuse.cc zkadapter.cc thread.cc log.cc +zkfuse_LDADD = ${ZOOKEEPER_LD} \ No newline at end of file diff --git a/src/contrib/zkfuse/src/blockingqueue.h b/src/contrib/zkfuse/src/blockingqueue.h new file mode 100644 index 0000000..4677290 --- /dev/null +++ b/src/contrib/zkfuse/src/blockingqueue.h @@ -0,0 +1,154 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __BLOCKINGQUEUE_H__ +#define __BLOCKINGQUEUE_H__ + +#include + +#include "mutex.h" + +using namespace std; +USING_ZKFUSE_NAMESPACE + +namespace zk { + +/** + * \brief An unbounded blocking queue of elements of type E. + * + *

    + * This class is thread safe. + */ +template +class BlockingQueue { + public: + + /** + * \brief Adds the specified element to this queue, waiting if necessary + * \brief for space to become available. + * + * @param e the element to be added + */ + void put(E e); + + /** + * \brief Retrieves and removes the head of this queue, waiting if + * \brief no elements are present in this queue. + * + * @param timeout how long to wait until an element becomes availabe, + * in milliseconds; if 0 then wait forever + * @param timedOut if not NULL then set to true whether this function timed out + * @return the element from the queue + */ + E take(int32_t timeout = 0, bool *timedOut = NULL); + + /** + * Returns the current size of this blocking queue. + * + * @return the number of elements in this queue + */ + int size() const; + + /** + * \brief Returns whether this queue is empty or not. + * + * @return true if this queue has no elements; false otherwise + */ + bool empty() const; + + private: + + /** + * The queue of elements. Deque is used to provide O(1) time + * for head elements removal. + */ + deque m_queue; + + /** + * The mutex used for queue synchronization. + */ + mutable zkfuse::Mutex m_mutex; + + /** + * The conditionial variable associated with the mutex above. + */ + mutable Cond m_cond; + +}; + +template +int BlockingQueue::size() const { + int size; + m_mutex.Acquire(); + size = m_queue.size(); + m_mutex.Release(); + return size; +} + +template +bool BlockingQueue::empty() const { + bool isEmpty; + m_mutex.Acquire(); + isEmpty = m_queue.empty(); + m_mutex.Release(); + return isEmpty; +} + +template +void BlockingQueue::put(E e) { + m_mutex.Acquire(); + m_queue.push_back( e ); + m_cond.Signal(); + m_mutex.Release(); +} + +template + E BlockingQueue::take(int32_t timeout, bool *timedOut) { + m_mutex.Acquire(); + bool hasResult = true; + while (m_queue.empty()) { + if (timeout <= 0) { + m_cond.Wait( m_mutex ); + } else { + if (!m_cond.Wait( m_mutex, timeout )) { + hasResult = false; + break; + } + } + } + if (hasResult) { + E e = m_queue.front(); + m_queue.pop_front(); + m_mutex.Release(); + if (timedOut) { + *timedOut = false; + } + return e; + } else { + m_mutex.Release(); + if (timedOut) { + *timedOut = true; + } + return E(); + } +} + +} + +#endif /* __BLOCKINGQUEUE_H__ */ + diff --git a/src/contrib/zkfuse/src/doxygen.cfg b/src/contrib/zkfuse/src/doxygen.cfg new file mode 100644 index 0000000..308b094 --- /dev/null +++ b/src/contrib/zkfuse/src/doxygen.cfg @@ -0,0 +1,1242 @@ +# Doxyfile 1.4.3 + +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project +# +# All text after a hash (#) is considered a comment and will be ignored +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" ") + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. + +PROJECT_NAME = ZkFuse + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = doc + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, +# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese, +# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian, +# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, +# Swedish, and Ukrainian. + +OUTPUT_LANGUAGE = English + +# This tag can be used to specify the encoding used in the generated output. +# The encoding is not always determined by the language that is chosen, +# but also whether or not the output is meant for Windows or non-Windows users. +# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES +# forces the Windows encoding (this is the default for the Windows binary), +# whereas setting the tag to NO uses a Unix-style encoding (the default for +# all platforms other than Windows). + +USE_WINDOWS_ENCODING = NO + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = YES + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like the Qt-style comments (thus requiring an +# explicit @brief command for a brief description. + +JAVADOC_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the DETAILS_AT_TOP tag is set to YES then Doxygen +# will output the detailed description near the top, like JavaDoc. +# If set to NO, the detailed description appears after the member +# documentation. + +DETAILS_AT_TOP = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 8 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources +# only. Doxygen will then generate output that is more tailored for Java. +# For instance, namespaces will be presented as packages, qualified scopes +# will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = YES + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = YES + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = YES + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. + +SHOW_DIRECTORIES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from the +# version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the progam writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be abled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx +# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm + +FILE_PATTERNS = + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = NO + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix filesystem feature) are excluded +# from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. + +EXCLUDE_PATTERNS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# is applied to all files. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES (the default) +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = YES + +# If the REFERENCES_RELATION tag is set to YES (the default) +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = NO + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + +DISABLE_INDEX = NO + +# This tag can be used to set the number of enum values (range [1..20]) +# that doxygen will group on one line in the generated HTML documentation. + +ENUM_VALUES_PER_LINE = 4 + +# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be +# generated containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, +# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are +# probably better off using the HTML help feature. + +GENERATE_TREEVIEW = NO + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = YES + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = a4wide + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = NO + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = NO + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. This is useful +# if you want to understand what is going on. On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = NO + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_PREDEFINED tags. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# in the INCLUDE_PATH (see below) will be search if a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse +# the parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option is superseded by the HAVE_DOT option below. This is only a +# fallback. It is recommended to install and use dot, since it yields more +# powerful graphs. + +CLASS_DIAGRAMS = YES + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = NO + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = YES + +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = NO + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will +# generate a call dependency graph for every global function or class method. +# Note that enabling this option will significantly increase the time of a run. +# So in most cases it will be better to enable call graphs for selected +# functions only using the \callgraph command. + +CALL_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = YES + +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are png, jpg, or gif +# If left blank png will be used. + +DOT_IMAGE_FORMAT = png + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width +# (in pixels) of the graphs generated by dot. If a graph becomes larger than +# this value, doxygen will try to truncate the graph, so that it fits within +# the specified constraint. Beware that most browsers cannot cope with very +# large images. + +MAX_DOT_GRAPH_WIDTH = 1024 + +# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height +# (in pixels) of the graphs generated by dot. If a graph becomes larger than +# this value, doxygen will try to truncate the graph, so that it fits within +# the specified constraint. Beware that most browsers cannot cope with very +# large images. + +MAX_DOT_GRAPH_HEIGHT = 1024 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that a graph may be further truncated if the graph's +# image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH +# and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), +# the graph is not depth-constrained. + +MAX_DOT_GRAPH_DEPTH = 0 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, which results in a white background. +# Warning: Depending on the platform used, enabling this option may lead to +# badly anti-aliased labels on the edges of a graph (i.e. they become hard to +# read). + +DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = NO + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- + +# The SEARCHENGINE tag specifies whether or not a search engine should be +# used. If set to NO the values of all tags below this one will be ignored. + +SEARCHENGINE = NO diff --git a/src/contrib/zkfuse/src/event.cc b/src/contrib/zkfuse/src/event.cc new file mode 100644 index 0000000..541657e --- /dev/null +++ b/src/contrib/zkfuse/src/event.cc @@ -0,0 +1,29 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "event.h" + +#define LOG_LEVEL LOG_FATAL +#define MODULE_NAME "Event" + +using namespace std; + +namespace zkfuse { + +} /* end of 'namespace zkfuse' */ + diff --git a/src/contrib/zkfuse/src/event.h b/src/contrib/zkfuse/src/event.h new file mode 100644 index 0000000..936ecc6 --- /dev/null +++ b/src/contrib/zkfuse/src/event.h @@ -0,0 +1,553 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __EVENT_H__ +#define __EVENT_H__ + +#include +#include +#include +#include +#ifdef GCC4 +# include +using namespace std::tr1; +#else +# include +using namespace boost; +#endif + +#include "log.h" +#include "blockingqueue.h" +#include "mutex.h" +#include "thread.h" + +using namespace std; +using namespace zk; + +namespace zkfuse { + +//forward declaration of EventSource +template +class EventSource; + +/** + * \brief This interface is implemented by an observer + * \brief of a particular {@link EventSource}. + */ +template +class EventListener { + public: + + /** + * \brief This method is invoked whenever an event + * \brief has been received by the event source being observed. + * + * @param source the source the triggered the event + * @param e the actual event being triggered + */ + virtual void eventReceived(const EventSource &source, const E &e) = 0; +}; + +/** + * \brief This class represents a source of events. + * + *

    + * Each source can have many observers (listeners) attached to it + * and in case of an event, this source may propagate the event + * using {@link #fireEvent} method. + */ +template +class EventSource { + public: + + /** + * \brief The type corresponding to the list of registered event listeners. + */ + typedef set *> EventListeners; + + /** + * \brief Registers a new event listener. + * + * @param listener the listener to be added to the set of listeners + */ + void addListener(EventListener *listener) { + m_listeners.insert( listener ); + } + + /** + * \brief Removes an already registered listener. + * + * @param listener the listener to be removed + */ + void removeListener(EventListener *listener) { + m_listeners.erase( listener ); + } + + /** + * \brief Destructor. + */ + virtual ~EventSource() {} + + protected: + + /** + * \brief Fires the given event to all registered listeners. + * + *

    + * This method essentially iterates over all listeners + * and invokes {@link fireEvent(EventListener *listener, const E &event)} + * for each element. All derived classes are free to + * override the method to provide better error handling + * than the default implementation. + * + * @param event the event to be propagated to all listeners + */ + void fireEvent(const E &event); + + /** + * \brief Sends an event to the given listener. + * + * @param listener the listener to whom pass the event + * @param event the event to be handled + */ + virtual void fireEvent(EventListener *listener, const E &event); + + private: + + /** + * The set of registered event listeners. + */ + EventListeners m_listeners; + +}; + +/** + * \brief The interface of a generic event wrapper. + */ +class AbstractEventWrapper { + public: + + /** + * \brief Destructor. + */ + virtual ~AbstractEventWrapper() {} + + /** + * \brief Returns the underlying wrapee's data. + */ + virtual void *getWrapee() = 0; +}; + +/** + * \brief A template based implementation of {@link AbstractEventWrapper}. + */ +template +class EventWrapper : public AbstractEventWrapper { + public: + EventWrapper(const E &e) : m_e(e) { + } + void *getWrapee() { + return &m_e; + } + private: + E m_e; +}; + +/** + * \brief This class represents a generic event. + */ +class GenericEvent { + public: + + /** + * \brief Constructor. + */ + GenericEvent() : m_type(0) {} + + /** + * \brief Constructor. + * + * @param type the type of this event + * @param eventWarpper the wrapper around event's data + */ + GenericEvent(int type, AbstractEventWrapper *eventWrapper) : + m_type(type), m_eventWrapper(eventWrapper) { + } + + /** + * \brief Returns the type of this event. + * + * @return type of this event + */ + int getType() const { return m_type; } + + /** + * \brief Returns the event's data. + * + * @return the event's data + */ + void *getEvent() const { return m_eventWrapper->getWrapee(); } + + private: + + /** + * The event type. + */ + int m_type; + + /** + * The event represented as abstract wrapper. + */ + boost::shared_ptr m_eventWrapper; + +}; + +/** + * \brief This class adapts {@link EventListener} to a generic listener. + * Essentially this class listens on incoming events and fires them + * as {@link GenericEvent}s. + */ +template +class EventListenerAdapter : public virtual EventListener, + public virtual EventSource +{ + public: + + /** + * \brief Constructor. + * + * @param eventSource the source on which register this listener + */ + EventListenerAdapter(EventSource &eventSource) { + eventSource.addListener(this); + } + + void eventReceived(const EventSource &source, const E &e) { + AbstractEventWrapper *wrapper = new EventWrapper(e); + GenericEvent event(type, wrapper); + fireEvent( event ); + } + +}; + +/** + * \brief This class provides an adapter between an asynchronous and synchronous + * \brief event handling. + * + *

    + * This class queues up all received events and exposes them through + * {@link #getNextEvent()} method. + */ +template +class SynchronousEventAdapter : public EventListener { + public: + + void eventReceived(const EventSource &source, const E &e) { + m_queue.put( e ); + } + + /** + * \brief Returns the next available event from the underlying queue, + * \brief possibly blocking, if no data is available. + * + * @return the next available event + */ + E getNextEvent() { + return m_queue.take(); + } + + /** + * \brief Returns whether there are any events in the queue or not. + * + * @return true if there is at least one event and + * the next call to {@link #getNextEvent} won't block + */ + bool hasEvents() const { + return (m_queue.empty() ? false : true); + } + + /** + * \brief Destructor. + */ + virtual ~SynchronousEventAdapter() {} + + private: + + /** + * The blocking queue of all events received so far. + */ + BlockingQueue m_queue; + +}; + +/** + * This typedef defines the type of a timer Id. + */ +typedef int32_t TimerId; + +/** + * This class represents a timer event parametrized by the user's data type. + */ +template +class TimerEvent { + public: + + /** + * \brief Constructor. + * + * @param id the ID of this event + * @param alarmTime when this event is to be triggered + * @param userData the user data associated with this event + */ + TimerEvent(TimerId id, int64_t alarmTime, const T &userData) : + m_id(id), m_alarmTime(alarmTime), m_userData(userData) + {} + + /** + * \brief Constructor. + */ + TimerEvent() : m_id(-1), m_alarmTime(-1) {} + + /** + * \brief Returns the ID. + * + * @return the ID of this event + */ + TimerId getID() const { return m_id; } + + /** + * \brief Returns the alarm time. + * + * @return the alarm time + */ + int64_t getAlarmTime() const { return m_alarmTime; } + + /** + * \brief Returns the user's data. + * + * @return the user's data + */ + T const &getUserData() const { return m_userData; } + + /** + * \brief Returns whether the given alarm time is less than this event's + * \brief time. + */ + bool operator<(const int64_t alarmTime) const { + return m_alarmTime < alarmTime; + } + + private: + + /** + * The ID of ths event. + */ + TimerId m_id; + + /** + * The time at which this event triggers. + */ + int64_t m_alarmTime; + + /** + * The user specific data associated with this event. + */ + T m_userData; + +}; + +template +class Timer : public EventSource > { + public: + + /** + * \brief Constructor. + */ + Timer() : m_currentEventID(0), m_terminating(false) { + m_workerThread.Create( *this, &Timer::sendAlarms ); + } + + /** + * \brief Destructor. + */ + ~Timer() { + m_terminating = true; + m_lock.notify(); + m_workerThread.Join(); + } + + /** + * \brief Schedules the given event timeFromNow milliseconds. + * + * @param timeFromNow time from now, in milliseconds, when the event + * should be triggered + * @param userData the user data associated with the timer event + * + * @return the ID of the newly created timer event + */ + TimerId scheduleAfter(int64_t timeFromNow, const T &userData) { + return scheduleAt( getCurrentTimeMillis() + timeFromNow, userData ); + } + + /** + * \brief Schedules an event at the given time. + * + * @param absTime absolute time, in milliseconds, at which the event + * should be triggered; the time is measured + * from Jan 1st, 1970 + * @param userData the user data associated with the timer event + * + * @return the ID of the newly created timer event + */ + TimerId scheduleAt(int64_t absTime, const T &userData) { + m_lock.lock(); + typename QueueType::iterator pos = + lower_bound( m_queue.begin(), m_queue.end(), absTime ); + TimerId id = m_currentEventID++; + TimerEvent event(id, absTime, userData); + m_queue.insert( pos, event ); + m_lock.notify(); + m_lock.unlock(); + return id; + } + + /** + * \brief Returns the current time since Jan 1, 1970, in milliseconds. + * + * @return the current time in milliseconds + */ + static int64_t getCurrentTimeMillis() { + struct timeval now; + gettimeofday( &now, NULL ); + return now.tv_sec * 1000LL + now.tv_usec / 1000; + } + + /** + * \brief Cancels the given timer event. + * + * + * @param eventID the ID of the event to be canceled + * + * @return whether the event has been canceled + */ + bool cancelAlarm(TimerId eventID) { + bool canceled = false; + m_lock.lock(); + typename QueueType::iterator i; + for (i = m_queue.begin(); i != m_queue.end(); ++i) { + if (eventID == i->getID()) { + m_queue.erase( i ); + canceled = true; + break; + } + } + m_lock.unlock(); + return canceled; + } + + /** + * Executes the main loop of the worker thread. + */ + void sendAlarms() { + //iterate until terminating + while (!m_terminating) { + m_lock.lock(); + //1 step - wait until there is an event in the queue + if (m_queue.empty()) { + //wait up to 100ms to get next event + m_lock.wait( 100 ); + } + bool fire = false; + if (!m_queue.empty()) { + //retrieve the event from the queue and send it + TimerEvent event = m_queue.front(); + //check whether we can send it right away + int64_t timeToWait = + event.getAlarmTime() - getCurrentTimeMillis(); + if (timeToWait <= 0) { + m_queue.pop_front(); + //we fire only if it's still in the queue and alarm + //time has just elapsed (in case the top event + //is canceled) + fire = true; + } else { + m_lock.wait( timeToWait ); + } + m_lock.unlock(); + if (fire) { + fireEvent( event ); + } + } else { + m_lock.unlock(); + } + } + } + + private: + + /** + * The type of timer events queue. + */ + typedef deque > QueueType; + + /** + * The current event ID, auto-incremented each time a new event + * is created. + */ + TimerId m_currentEventID; + + /** + * The queue of timer events sorted by {@link TimerEvent#alarmTime}. + */ + QueueType m_queue; + + /** + * The lock used to guard {@link #m_queue}. + */ + Lock m_lock; + + /** + * The thread that triggers alarms. + */ + CXXThread > m_workerThread; + + /** + * Whether {@link #m_workerThread} is terminating. + */ + volatile bool m_terminating; + +}; + +template +void EventSource::fireEvent(const E &event) { + for (typename EventListeners::iterator i = m_listeners.begin(); + i != m_listeners.end(); + ++i) + { + fireEvent( *i, event ); + } +} + +template +void EventSource::fireEvent(EventListener *listener, const E &event) { + listener->eventReceived( *this, event ); +} + +} /* end of 'namespace zkfuse' */ + +#endif /* __EVENT_H__ */ diff --git a/src/contrib/zkfuse/src/log.cc b/src/contrib/zkfuse/src/log.cc new file mode 100644 index 0000000..e2bfb0d --- /dev/null +++ b/src/contrib/zkfuse/src/log.cc @@ -0,0 +1,36 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +#include "log.h" + +using namespace std; + +/** + * \brief This class encapsulates a log4cxx configuration. + */ +class LogConfiguration { + public: + LogConfiguration(const string &file) { + PropertyConfigurator::configureAndWatch( file, 5000 ); + } +}; + +//enforces the configuration to be initialized +static LogConfiguration logConfig( "log4cxx.properties" ); diff --git a/src/contrib/zkfuse/src/log.h b/src/contrib/zkfuse/src/log.h new file mode 100644 index 0000000..aefce10 --- /dev/null +++ b/src/contrib/zkfuse/src/log.h @@ -0,0 +1,116 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __LOG_H__ +#define __LOG_H__ + +#define ZKFUSE_NAMESPACE zkfuse +#define START_ZKFUSE_NAMESPACE namespace ZKFUSE_NAMESPACE { +#define END_ZKFUSE_NAMESPACE } +#define USING_ZKFUSE_NAMESPACE using namespace ZKFUSE_NAMESPACE; + +#include +#include +#include + +#include +#include +#include +using namespace log4cxx; +using namespace log4cxx::helpers; + +#define PRINTIP(x) ((uint8_t*)&x)[0], ((uint8_t*)&x)[1], \ + ((uint8_t*)&x)[2], ((uint8_t*)&x)[3] + +#define IPFMT "%u.%u.%u.%u" + +#define DECLARE_LOGGER(varName) \ +extern LoggerPtr varName; + +#define DEFINE_LOGGER(varName, logName) \ +static LoggerPtr varName = Logger::getLogger( logName ); + +#define MAX_BUFFER_SIZE 20000 + +#define SPRINTF_LOG_MSG(buffer, fmt, args...) \ + char buffer[MAX_BUFFER_SIZE]; \ + snprintf( buffer, MAX_BUFFER_SIZE, fmt, ##args ); + +// older versions of log4cxx don't support tracing +#ifdef LOG4CXX_TRACE +#define LOG_TRACE(logger, fmt, args...) \ + if (logger->isTraceEnabled()) { \ + SPRINTF_LOG_MSG( __tmp, fmt, ##args ); \ + LOG4CXX_TRACE( logger, __tmp ); \ + } +#else +#define LOG_TRACE(logger, fmt, args...) \ + if (logger->isDebugEnabled()) { \ + SPRINTF_LOG_MSG( __tmp, fmt, ##args ); \ + LOG4CXX_DEBUG( logger, __tmp ); \ + } +#endif + +#define LOG_DEBUG(logger, fmt, args...) \ + if (logger->isDebugEnabled()) { \ + SPRINTF_LOG_MSG( __tmp, fmt, ##args ); \ + LOG4CXX_DEBUG( logger, __tmp ); \ + } + +#define LOG_INFO(logger, fmt, args...) \ + if (logger->isInfoEnabled()) { \ + SPRINTF_LOG_MSG( __tmp, fmt, ##args ); \ + LOG4CXX_INFO( logger, __tmp ); \ + } + +#define LOG_WARN(logger, fmt, args...) \ + if (logger->isWarnEnabled()) { \ + SPRINTF_LOG_MSG( __tmp, fmt, ##args ); \ + LOG4CXX_WARN( logger, __tmp ); \ + } + +#define LOG_ERROR(logger, fmt, args...) \ + if (logger->isErrorEnabled()) { \ + SPRINTF_LOG_MSG( __tmp, fmt, ##args ); \ + LOG4CXX_ERROR( logger, __tmp ); \ + } + +#define LOG_FATAL(logger, fmt, args...) \ + if (logger->isFatalEnabled()) { \ + SPRINTF_LOG_MSG( __tmp, fmt, ##args ); \ + LOG4CXX_FATAL( logger, __tmp ); \ + } + +#ifdef DISABLE_TRACE +# define TRACE(logger, x) +#else +# define TRACE(logger, x) \ +class Trace { \ + public: \ + Trace(const void* p) : _p(p) { \ + LOG_TRACE(logger, "%s %p Enter", __PRETTY_FUNCTION__, p); \ + } \ + ~Trace() { \ + LOG_TRACE(logger, "%s %p Exit", __PRETTY_FUNCTION__, _p); \ + } \ + const void* _p; \ +} traceObj(x); +#endif /* DISABLE_TRACE */ + +#endif /* __LOG_H__ */ + diff --git a/src/contrib/zkfuse/src/log4cxx.properties b/src/contrib/zkfuse/src/log4cxx.properties new file mode 100644 index 0000000..1e373e4 --- /dev/null +++ b/src/contrib/zkfuse/src/log4cxx.properties @@ -0,0 +1,28 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Set root logger level to DEBUG and its only appender to A1. +log4j.rootLogger=TRACE, A1 + +# A1 is set to be a ConsoleAppender. +log4j.appender.A1=org.apache.log4cxx.ConsoleAppender + +# A1 uses PatternLayout. +log4j.appender.A1.layout=org.apache.log4cxx.PatternLayout +log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n + +log4j.category.zkfuse=TRACE + diff --git a/src/contrib/zkfuse/src/mutex.h b/src/contrib/zkfuse/src/mutex.h new file mode 100644 index 0000000..86c4604 --- /dev/null +++ b/src/contrib/zkfuse/src/mutex.h @@ -0,0 +1,169 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __MUTEX_H__ +#define __MUTEX_H__ + +#include +#include +#include + +#include "log.h" + +START_ZKFUSE_NAMESPACE + +class Cond; + +class Mutex { + friend class Cond; + public: + Mutex() { + pthread_mutexattr_init( &m_mutexAttr ); + pthread_mutexattr_settype( &m_mutexAttr, PTHREAD_MUTEX_RECURSIVE_NP ); + pthread_mutex_init( &mutex, &m_mutexAttr ); + } + ~Mutex() { + pthread_mutex_destroy(&mutex); + pthread_mutexattr_destroy( &m_mutexAttr ); + } + void Acquire() { Lock(); } + void Release() { Unlock(); } + void Lock() { + pthread_mutex_lock(&mutex); + } + int TryLock() { + return pthread_mutex_trylock(&mutex); + } + void Unlock() { + pthread_mutex_unlock(&mutex); + } + private: + pthread_mutex_t mutex; + pthread_mutexattr_t m_mutexAttr; +}; + +class AutoLock { + public: + AutoLock(Mutex& mutex) : _mutex(mutex) { + mutex.Lock(); + } + ~AutoLock() { + _mutex.Unlock(); + } + private: + friend class AutoUnlockTemp; + Mutex& _mutex; +}; + +class AutoUnlockTemp { + public: + AutoUnlockTemp(AutoLock & autoLock) : _autoLock(autoLock) { + _autoLock._mutex.Unlock(); + } + ~AutoUnlockTemp() { + _autoLock._mutex.Lock(); + } + private: + AutoLock & _autoLock; +}; + +class Cond { + public: + Cond() { + static pthread_condattr_t attr; + static bool inited = false; + if(!inited) { + inited = true; + pthread_condattr_init(&attr); + } + pthread_cond_init(&_cond, &attr); + } + ~Cond() { + pthread_cond_destroy(&_cond); + } + + void Wait(Mutex& mutex) { + pthread_cond_wait(&_cond, &mutex.mutex); + } + + bool Wait(Mutex& mutex, long long int timeout) { + struct timeval now; + gettimeofday( &now, NULL ); + struct timespec abstime; + int64_t microSecs = now.tv_sec * 1000000LL + now.tv_usec; + microSecs += timeout * 1000; + abstime.tv_sec = microSecs / 1000000LL; + abstime.tv_nsec = (microSecs % 1000000LL) * 1000; + if (pthread_cond_timedwait(&_cond, &mutex.mutex, &abstime) == ETIMEDOUT) { + return false; + } else { + return true; + } + } + + void Signal() { + pthread_cond_signal(&_cond); + } + + private: + pthread_cond_t _cond; +}; + +/** + * A wrapper class for {@link Mutex} and {@link Cond}. + */ +class Lock { + public: + + void lock() { + m_mutex.Lock(); + } + + void unlock() { + m_mutex.Unlock(); + } + + void wait() { + m_cond.Wait( m_mutex ); + } + + bool wait(long long int timeout) { + return m_cond.Wait( m_mutex, timeout ); + } + + void notify() { + m_cond.Signal(); + } + + private: + + /** + * The mutex. + */ + Mutex m_mutex; + + /** + * The condition associated with this lock's mutex. + */ + Cond m_cond; +}; + +END_ZKFUSE_NAMESPACE + +#endif /* __MUTEX_H__ */ + diff --git a/src/contrib/zkfuse/src/thread.cc b/src/contrib/zkfuse/src/thread.cc new file mode 100644 index 0000000..f1ed816 --- /dev/null +++ b/src/contrib/zkfuse/src/thread.cc @@ -0,0 +1,41 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +#include "thread.h" + +DEFINE_LOGGER( LOG, "Thread" ) + +START_ZKFUSE_NAMESPACE + +void Thread::Create(void* ctx, ThreadFunc func) +{ + pthread_attr_t attr; + pthread_attr_init(&attr); + pthread_attr_setstacksize(&attr, _stackSize); + int ret = pthread_create(&mThread, &attr, func, ctx); + if(ret != 0) { + LOG_FATAL( LOG, "pthread_create failed: %s", strerror(errno) ); + } + // pthread_attr_destroy(&attr); + _ctx = ctx; + _func = func; +} + +END_ZKFUSE_NAMESPACE diff --git a/src/contrib/zkfuse/src/thread.h b/src/contrib/zkfuse/src/thread.h new file mode 100644 index 0000000..0ed12d7 --- /dev/null +++ b/src/contrib/zkfuse/src/thread.h @@ -0,0 +1,99 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __THREAD_H__ +#define __THREAD_H__ + +#include +#include +#include +#include + +#include "log.h" + +START_ZKFUSE_NAMESPACE + +class Thread { + public: + static const size_t defaultStackSize = 1024 * 1024; + typedef void* (*ThreadFunc) (void*); + Thread(size_t stackSize = defaultStackSize) + : _stackSize(stackSize), _ctx(NULL), _func(NULL) + { + memset( &mThread, 0, sizeof(mThread) ); + } + ~Thread() { } + + void Create(void* ctx, ThreadFunc func); + void Join() { + //avoid SEGFAULT because of unitialized mThread + //in case Create(...) was never called + if (_func != NULL) { + pthread_join(mThread, 0); + } + } + private: + pthread_t mThread; + void *_ctx; + ThreadFunc _func; + size_t _stackSize; +}; + + +template +struct ThreadContext { + typedef void (T::*FuncPtr) (void); + ThreadContext(T& ctx, FuncPtr func) : _ctx(ctx), _func(func) {} + void run(void) { + (_ctx.*_func)(); + } + T& _ctx; + FuncPtr _func; +}; + +template +void* ThreadExec(void *obj) { + ThreadContext* tc = (ThreadContext*)(obj); + assert(tc != 0); + tc->run(); + return 0; +} + +template +class CXXThread : public Thread { + public: + typedef void (T::*FuncPtr) (void); + CXXThread(size_t stackSize = Thread::defaultStackSize) + : Thread(stackSize), ctx(0) {} + ~CXXThread() { if (ctx) delete ctx; } + + void Create(T& obj, FuncPtr func) { + assert(ctx == 0); + ctx = new ThreadContext(obj, func); + Thread::Create(ctx, ThreadExec); + } + + private: + ThreadContext* ctx; +}; + + +END_ZKFUSE_NAMESPACE + +#endif /* __THREAD_H__ */ + diff --git a/src/contrib/zkfuse/src/zkadapter.cc b/src/contrib/zkfuse/src/zkadapter.cc new file mode 100644 index 0000000..7f02fa3 --- /dev/null +++ b/src/contrib/zkfuse/src/zkadapter.cc @@ -0,0 +1,884 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +#include "blockingqueue.h" +#include "thread.h" +#include "zkadapter.h" + +using namespace std; +using namespace zk; + +DEFINE_LOGGER( LOG, "zookeeper.adapter" ) +DEFINE_LOGGER( ZK_LOG, "zookeeper.core" ) + +/** + * \brief A helper class to initialize ZK logging. + */ +class InitZooKeeperLogging +{ + public: + InitZooKeeperLogging() { + if (ZK_LOG->isDebugEnabled() +#ifdef LOG4CXX_TRACE + || ZK_LOG->isTraceEnabled() +#endif + ) + { + zoo_set_debug_level( ZOO_LOG_LEVEL_DEBUG ); + } else if (ZK_LOG->isInfoEnabled()) { + zoo_set_debug_level( ZOO_LOG_LEVEL_INFO ); + } else if (ZK_LOG->isWarnEnabled()) { + zoo_set_debug_level( ZOO_LOG_LEVEL_WARN ); + } else { + zoo_set_debug_level( ZOO_LOG_LEVEL_ERROR ); + } + } +}; + +using namespace std; + +namespace zk +{ + +/** + * \brief This class provides logic for checking if a request can be retried. + */ +class RetryHandler +{ + public: + RetryHandler(const ZooKeeperConfig &zkConfig) + : m_zkConfig(zkConfig) + { + if (zkConfig.getAutoReconnect()) { + retries = 2; + } else { + retries = 0; + } + } + + /** + * \brief Attempts to fix a side effect of the given RC. + * + * @param rc the ZK error code + * @return whether the error code has been handled and the caller should + * retry an operation the caused this error + */ + bool handleRC(int rc) + { + TRACE( LOG, "handleRC" ); + + //check if the given error code is recoverable + if (!retryOnError(rc)) { + return false; + } + LOG_TRACE( LOG, "RC: %d, retries left: %d", rc, retries ); + if (retries-- > 0) { + return true; + } else { + return false; + } + } + + private: + /** + * The ZK config. + */ + const ZooKeeperConfig &m_zkConfig; + + /** + * The number of outstanding retries. + */ + int retries; + + /** + * Checks whether the given error entitles this adapter + * to retry the previous operation. + * + * @param zkErrorCode one of the ZK error code + */ + static bool retryOnError(int zkErrorCode) + { + return (zkErrorCode == ZCONNECTIONLOSS || + zkErrorCode == ZOPERATIONTIMEOUT); + } +}; + + +//the implementation of the global ZK event watcher +void zkWatcher(zhandle_t *zh, int type, int state, const char *path, + void *watcherCtx) +{ + TRACE( LOG, "zkWatcher" ); + + //a workaround for buggy ZK API + string sPath = + (path == NULL || + state == ZOO_SESSION_EVENT || + state == ZOO_NOTWATCHING_EVENT) + ? "" + : string(path); + LOG_INFO( LOG, + "Received a ZK event - type: %d, state: %d, path: '%s'", + type, state, sPath.c_str() ); + ZooKeeperAdapter *zka = (ZooKeeperAdapter *)zoo_get_context(zh); + if (zka != NULL) { + zka->enqueueEvent( type, state, sPath ); + } else { + LOG_ERROR( LOG, + "Skipping ZK event (type: %d, state: %d, path: '%s'), " + "because ZK passed no context", + type, state, sPath.c_str() ); + } +} + + + +// ======================================================================= + +ZooKeeperAdapter::ZooKeeperAdapter(ZooKeeperConfig config, + ZKEventListener *listener, + bool establishConnection) + throw(ZooKeeperException) + : m_zkConfig(config), + mp_zkHandle(NULL), + m_terminating(false), + m_connected(false), + m_state(AS_DISCONNECTED) +{ + TRACE( LOG, "ZooKeeperAdapter" ); + + resetRemainingConnectTimeout(); + + //enforce setting up appropriate ZK log level + static InitZooKeeperLogging INIT_ZK_LOGGING; + + if (listener != NULL) { + addListener(listener); + } + + //start the event dispatcher thread + m_eventDispatcher.Create( *this, &ZooKeeperAdapter::processEvents ); + + //start the user event dispatcher thread + m_userEventDispatcher.Create( *this, &ZooKeeperAdapter::processUserEvents ); + + //optionally establish the connection + if (establishConnection) { + reconnect(); + } +} + +ZooKeeperAdapter::~ZooKeeperAdapter() +{ + TRACE( LOG, "~ZooKeeperAdapter" ); + + try { + disconnect(); + } catch (std::exception &e) { + LOG_ERROR( LOG, + "An exception while disconnecting from ZK: %s", + e.what() ); + } + m_terminating = true; + m_userEventDispatcher.Join(); + m_eventDispatcher.Join(); +} + +void +ZooKeeperAdapter::validatePath(const string &path) throw(ZooKeeperException) +{ + TRACE( LOG, "validatePath" ); + + if (path.find( "/" ) != 0) { + throw ZooKeeperException( string("Node path must start with '/' but" + "it was '") + + path + + "'" ); + } + if (path.length() > 1) { + if (path.rfind( "/" ) == path.length() - 1) { + throw ZooKeeperException( string("Node path must not end with " + "'/' but it was '") + + path + + "'" ); + } + if (path.find( "//" ) != string::npos) { + throw ZooKeeperException( string("Node path must not contain " + "'//' but it was '") + + path + + "'" ); + } + } +} + +void +ZooKeeperAdapter::disconnect() +{ + TRACE( LOG, "disconnect" ); + LOG_TRACE( LOG, "mp_zkHandle: %p, state %d", mp_zkHandle, m_state ); + + m_stateLock.lock(); + if (mp_zkHandle != NULL) { + zookeeper_close( mp_zkHandle ); + mp_zkHandle = NULL; + setState( AS_DISCONNECTED ); + } + m_stateLock.unlock(); +} + +void +ZooKeeperAdapter::reconnect() throw(ZooKeeperException) +{ + TRACE( LOG, "reconnect" ); + + m_stateLock.lock(); + //clear the connection state + disconnect(); + + //establish a new connection to ZooKeeper + mp_zkHandle = zookeeper_init( m_zkConfig.getHosts().c_str(), + zkWatcher, + m_zkConfig.getLeaseTimeout(), + NULL, this, 0); + resetRemainingConnectTimeout(); + if (mp_zkHandle != NULL) { + setState( AS_CONNECTING ); + m_stateLock.unlock(); + } else { + m_stateLock.unlock(); + throw ZooKeeperException( + string("Unable to connect to ZK running at '") + + m_zkConfig.getHosts() + "'" ); + } + + LOG_DEBUG( LOG, "mp_zkHandle: %p, state %d", mp_zkHandle, m_state ); +} + +void +ZooKeeperAdapter::handleEvent(int type, int state, const string &path) +{ + TRACE( LOG, "handleEvent" ); + LOG_TRACE( LOG, + "type: %d, state %d, path: %s", + type, state, path.c_str() ); + Listener2Context context, context2; + //ignore internal ZK events + if (type != ZOO_SESSION_EVENT && type != ZOO_NOTWATCHING_EVENT) { + m_zkContextsMutex.Acquire(); + //check if the user context is available + if (type == ZOO_CHANGED_EVENT || type == ZOO_DELETED_EVENT) { + //we may have two types of interest here, + //in this case lets try to notify twice + context = findAndRemoveListenerContext( GET_NODE_DATA, path ); + context2 = findAndRemoveListenerContext( NODE_EXISTS, path ); + if (context.empty()) { + //make sure that the 2nd context is NULL and + // assign it to the 1st one + context = context2; + context2.clear(); + } + } else if (type == ZOO_CHILD_EVENT) { + context = findAndRemoveListenerContext( GET_NODE_CHILDREN, path ); + } else if (type == ZOO_CREATED_EVENT) { + context = findAndRemoveListenerContext( NODE_EXISTS, path ); + } + m_zkContextsMutex.Release(); + } + + handleEvent( type, state, path, context ); + if (!context2.empty()) { + handleEvent( type, state, path, context2 ); + } +} + +void +ZooKeeperAdapter::handleEvent(int type, + int state, + const string &path, + const Listener2Context &listeners) +{ + TRACE( LOG, "handleEvents" ); + + if (listeners.empty()) { + //propagate with empty context + ZKWatcherEvent event(type, state, path); + fireEvent( event ); + } else { + for (Listener2Context::const_iterator i = listeners.begin(); + i != listeners.end(); + ++i) { + ZKWatcherEvent event(type, state, path, i->second); + if (i->first != NULL) { + fireEvent( i->first, event ); + } else { + fireEvent( event ); + } + } + } +} + +void +ZooKeeperAdapter::enqueueEvent(int type, int state, const string &path) +{ + TRACE( LOG, "enqueueEvents" ); + + m_events.put( ZKWatcherEvent( type, state, path ) ); +} + +void +ZooKeeperAdapter::processEvents() +{ + TRACE( LOG, "processEvents" ); + + while (!m_terminating) { + bool timedOut = false; + ZKWatcherEvent source = m_events.take( 100, &timedOut ); + if (!timedOut) { + if (source.getType() == ZOO_SESSION_EVENT) { + LOG_INFO( LOG, + "Received SESSION event, state: %d. Adapter state: %d", + source.getState(), m_state ); + m_stateLock.lock(); + if (source.getState() == ZOO_CONNECTED_STATE) { + m_connected = true; + resetRemainingConnectTimeout(); + setState( AS_CONNECTED ); + } else if (source.getState() == ZOO_CONNECTING_STATE) { + m_connected = false; + setState( AS_CONNECTING ); + } else if (source.getState() == ZOO_EXPIRED_SESSION_STATE) { + LOG_INFO( LOG, "Received EXPIRED_SESSION event" ); + setState( AS_SESSION_EXPIRED ); + } + m_stateLock.unlock(); + } + m_userEvents.put( source ); + } + } +} + +void +ZooKeeperAdapter::processUserEvents() +{ + TRACE( LOG, "processUserEvents" ); + + while (!m_terminating) { + bool timedOut = false; + ZKWatcherEvent source = m_userEvents.take( 100, &timedOut ); + if (!timedOut) { + try { + handleEvent( source.getType(), + source.getState(), + source.getPath() ); + } catch (std::exception &e) { + LOG_ERROR( LOG, + "Unable to process event (type: %d, state: %d, " + "path: %s), because of exception: %s", + source.getType(), + source.getState(), + source.getPath().c_str(), + e.what() ); + } + } + } +} + +void +ZooKeeperAdapter::registerContext(WatchableMethod method, + const string &path, + ZKEventListener *listener, + ContextType context) +{ + TRACE( LOG, "registerContext" ); + + m_zkContexts[method][path][listener] = context; +} + +ZooKeeperAdapter::Listener2Context +ZooKeeperAdapter::findAndRemoveListenerContext(WatchableMethod method, + const string &path) +{ + TRACE( LOG, "findAndRemoveListenerContext" ); + + Listener2Context listeners; + Path2Listener2Context::iterator elem = m_zkContexts[method].find( path ); + if (elem != m_zkContexts[method].end()) { + listeners = elem->second; + m_zkContexts[method].erase( elem ); + } + return listeners; +} + +void +ZooKeeperAdapter::setState(AdapterState newState) +{ + TRACE( LOG, "setState" ); + if (newState != m_state) { + LOG_INFO( LOG, "Adapter state transition: %d -> %d", m_state, newState ); + m_state = newState; + m_stateLock.notify(); + } else { + LOG_TRACE( LOG, "New state same as the current: %d", newState ); + } +} + + +//TODO move this code to verifyConnection so reconnect() +//is called from one place only +void +ZooKeeperAdapter::waitUntilConnected() + throw(ZooKeeperException) +{ + TRACE( LOG, "waitUntilConnected" ); + long long int timeout = getRemainingConnectTimeout(); + LOG_INFO( LOG, + "Waiting up to %lld ms until a connection to ZK is established", + timeout ); + bool connected; + if (timeout > 0) { + long long int toWait = timeout; + while (m_state != AS_CONNECTED && toWait > 0) { + //check if session expired and reconnect if so + if (m_state == AS_SESSION_EXPIRED) { + LOG_INFO( LOG, + "Reconnecting because the current session has expired" ); + reconnect(); + } + struct timeval now; + gettimeofday( &now, NULL ); + int64_t milliSecs = -(now.tv_sec * 1000LL + now.tv_usec / 1000); + LOG_TRACE( LOG, "About to wait %lld ms", toWait ); + m_stateLock.wait( toWait ); + gettimeofday( &now, NULL ); + milliSecs += now.tv_sec * 1000LL + now.tv_usec / 1000; + toWait -= milliSecs; + } + waitedForConnect( timeout - toWait ); + LOG_INFO( LOG, "Waited %lld ms", timeout - toWait ); + } + connected = (m_state == AS_CONNECTED); + if (!connected) { + if (timeout > 0) { + LOG_WARN( LOG, "Timed out while waiting for connection to ZK" ); + throw ZooKeeperException("Timed out while waiting for " + "connection to ZK"); + } else { + LOG_ERROR( LOG, "Global timeout expired and still not connected to ZK" ); + throw ZooKeeperException("Global timeout expired and still not " + "connected to ZK"); + } + } + LOG_INFO( LOG, "Connected!" ); +} + +void +ZooKeeperAdapter::verifyConnection() throw(ZooKeeperException) +{ + TRACE( LOG, "verifyConnection" ); + + m_stateLock.lock(); + try { + if (m_state == AS_DISCONNECTED) { + throw ZooKeeperException("Disconnected from ZK. " \ + "Please use reconnect() before attempting to use any ZK API"); + } else if (m_state != AS_CONNECTED) { + LOG_TRACE( LOG, "Checking if need to reconnect..." ); + //we are not connected, so check if connection in progress... + if (m_state != AS_CONNECTING) { + LOG_TRACE( LOG, + "yes. Checking if allowed to auto-reconnect..." ); + //...not in progres, so check if we can reconnect + if (!m_zkConfig.getAutoReconnect()) { + //...too bad, disallowed :( + LOG_TRACE( LOG, "no. Sorry." ); + throw ZooKeeperException("ZK connection is down and " + "auto-reconnect is not allowed"); + } else { + LOG_TRACE( LOG, "...yes. About to reconnect" ); + } + //...we are good to retry the connection + reconnect(); + } else { + LOG_TRACE( LOG, "...no, already in CONNECTING state" ); + } + //wait until the connection is established + waitUntilConnected(); + } + } catch (ZooKeeperException &e) { + m_stateLock.unlock(); + throw; + } + m_stateLock.unlock(); +} + +bool +ZooKeeperAdapter::createNode(const string &path, + const string &value, + int flags, + bool createAncestors, + string &returnPath) + throw(ZooKeeperException) +{ + TRACE( LOG, "createNode (internal)" ); + validatePath( path ); + + const int MAX_PATH_LENGTH = 1024; + char realPath[MAX_PATH_LENGTH]; + realPath[0] = 0; + + int rc; + RetryHandler rh(m_zkConfig); + do { + verifyConnection(); + rc = zoo_create( mp_zkHandle, + path.c_str(), + value.c_str(), + value.length(), + &ZOO_OPEN_ACL_UNSAFE, + flags, + realPath, + MAX_PATH_LENGTH ); + } while (rc != ZOK && rh.handleRC(rc)); + if (rc != ZOK) { + if (rc == ZNODEEXISTS) { + //the node already exists + LOG_WARN( LOG, "Error %d for %s", rc, path.c_str() ); + return false; + } else if (rc == ZNONODE && createAncestors) { + LOG_WARN( LOG, "Error %d for %s", rc, path.c_str() ); + //one of the ancestors doesn't exist so lets start from the root + //and make sure the whole path exists, creating missing nodes if + //necessary + for (string::size_type pos = 1; pos != string::npos; ) { + pos = path.find( "/", pos ); + if (pos != string::npos) { + try { + createNode( path.substr( 0, pos ), "", 0, true ); + } catch (ZooKeeperException &e) { + throw ZooKeeperException( string("Unable to create " + "node ") + + path, + rc ); + } + pos++; + } else { + //no more path components + return createNode( path, value, flags, false, returnPath ); + } + } + } + LOG_ERROR( LOG,"Error %d for %s", rc, path.c_str() ); + throw ZooKeeperException( string("Unable to create node ") + + path, + rc ); + } else { + LOG_INFO( LOG, "%s has been created", realPath ); + returnPath = string( realPath ); + return true; + } +} + +bool +ZooKeeperAdapter::createNode(const string &path, + const string &value, + int flags, + bool createAncestors) + throw(ZooKeeperException) +{ + TRACE( LOG, "createNode" ); + + string createdPath; + return createNode( path, value, flags, createAncestors, createdPath ); +} + +int64_t +ZooKeeperAdapter::createSequence(const string &path, + const string &value, + int flags, + bool createAncestors) + throw(ZooKeeperException) +{ + TRACE( LOG, "createSequence" ); + + string createdPath; + bool result = createNode( path, + value, + flags | ZOO_SEQUENCE, + createAncestors, + createdPath ); + if (!result) { + return -1; + } else { + //extract sequence number from the returned path + if (createdPath.find( path ) != 0) { + throw ZooKeeperException( string("Expecting returned path '") + + createdPath + + "' to start with '" + + path + + "'" ); + } + string seqSuffix = + createdPath.substr( path.length(), + createdPath.length() - path.length() ); + char *ptr = NULL; + int64_t seq = strtol( seqSuffix.c_str(), &ptr, 10 ); + if (ptr != NULL && *ptr != '\0') { + throw ZooKeeperException( string("Expecting a number but got ") + + seqSuffix ); + } + return seq; + } +} + +bool +ZooKeeperAdapter::deleteNode(const string &path, + bool recursive, + int version) + throw(ZooKeeperException) +{ + TRACE( LOG, "deleteNode" ); + + validatePath( path ); + + int rc; + RetryHandler rh(m_zkConfig); + do { + verifyConnection(); + rc = zoo_delete( mp_zkHandle, path.c_str(), version ); + } while (rc != ZOK && rh.handleRC(rc)); + if (rc != ZOK) { + if (rc == ZNONODE) { + LOG_WARN( LOG, "Error %d for %s", rc, path.c_str() ); + return false; + } + if (rc == ZNOTEMPTY && recursive) { + LOG_WARN( LOG, "Error %d for %s", rc, path.c_str() ); + //get all children and delete them recursively... + vector nodeList; + getNodeChildren( nodeList, path, NULL ); + for (vector::const_iterator i = nodeList.begin(); + i != nodeList.end(); + ++i) { + deleteNode( *i, true ); + } + //...and finally attempt to delete the node again + return deleteNode( path, false ); + } + LOG_ERROR( LOG, "Error %d for %s", rc, path.c_str() ); + throw ZooKeeperException( string("Unable to delete node ") + path, + rc ); + } else { + LOG_INFO( LOG, "%s has been deleted", path.c_str() ); + return true; + } +} + +bool +ZooKeeperAdapter::nodeExists(const string &path, + ZKEventListener *listener, + void *context, Stat *stat) + throw(ZooKeeperException) +{ + TRACE( LOG, "nodeExists" ); + + validatePath( path ); + + struct Stat tmpStat; + if (stat == NULL) { + stat = &tmpStat; + } + memset( stat, 0, sizeof(Stat) ); + + int rc; + RetryHandler rh(m_zkConfig); + do { + verifyConnection(); + if (context != NULL) { + m_zkContextsMutex.Acquire(); + rc = zoo_exists( mp_zkHandle, + path.c_str(), + (listener != NULL ? 1 : 0), + stat ); + if (rc == ZOK || rc == ZNONODE) { + registerContext( NODE_EXISTS, path, listener, context ); + } + m_zkContextsMutex.Release(); + } else { + rc = zoo_exists( mp_zkHandle, + path.c_str(), + (listener != NULL ? 1 : 0), + stat ); + } + } while (rc != ZOK && rh.handleRC(rc)); + if (rc != ZOK) { + if (rc == ZNONODE) { + LOG_TRACE( LOG, "Node %s does not exist", path.c_str() ); + return false; + } + LOG_ERROR( LOG, "Error %d for %s", rc, path.c_str() ); + throw ZooKeeperException( + string("Unable to check existence of node ") + path, + rc ); + } else { + return true; + } +} + +void +ZooKeeperAdapter::getNodeChildren(vector &nodeList, + const string &path, + ZKEventListener *listener, + void *context) + throw (ZooKeeperException) +{ + TRACE( LOG, "getNodeChildren" ); + + validatePath( path ); + + String_vector children; + memset( &children, 0, sizeof(children) ); + + int rc; + RetryHandler rh(m_zkConfig); + do { + verifyConnection(); + if (context != NULL) { + m_zkContextsMutex.Acquire(); + rc = zoo_get_children( mp_zkHandle, + path.c_str(), + (listener != NULL ? 1 : 0), + &children ); + if (rc == ZOK) { + registerContext( GET_NODE_CHILDREN, path, listener, context ); + } + m_zkContextsMutex.Release(); + } else { + rc = zoo_get_children( mp_zkHandle, + path.c_str(), + (listener != NULL ? 1 : 0), + &children ); + } + } while (rc != ZOK && rh.handleRC(rc)); + if (rc != ZOK) { + LOG_ERROR( LOG, "Error %d for %s", rc, path.c_str() ); + throw ZooKeeperException( string("Unable to get children of node ") + + path, + rc ); + } else { + for (int i = 0; i < children.count; ++i) { + //convert each child's path from relative to absolute + string absPath(path); + if (path != "/") { + absPath.append( "/" ); + } + absPath.append( children.data[i] ); + nodeList.push_back( absPath ); + } + //make sure the order is always deterministic + sort( nodeList.begin(), nodeList.end() ); + } +} + +string +ZooKeeperAdapter::getNodeData(const string &path, + ZKEventListener *listener, + void *context, Stat *stat) + throw(ZooKeeperException) +{ + TRACE( LOG, "getNodeData" ); + + validatePath( path ); + + const int MAX_DATA_LENGTH = 128 * 1024; + char buffer[MAX_DATA_LENGTH]; + memset( buffer, 0, MAX_DATA_LENGTH ); + struct Stat tmpStat; + if (stat == NULL) { + stat = &tmpStat; + } + memset( stat, 0, sizeof(Stat) ); + + int rc; + int len; + RetryHandler rh(m_zkConfig); + do { + verifyConnection(); + len = MAX_DATA_LENGTH - 1; + if (context != NULL) { + m_zkContextsMutex.Acquire(); + rc = zoo_get( mp_zkHandle, + path.c_str(), + (listener != NULL ? 1 : 0), + buffer, &len, stat ); + if (rc == ZOK) { + registerContext( GET_NODE_DATA, path, listener, context ); + } + m_zkContextsMutex.Release(); + } else { + rc = zoo_get( mp_zkHandle, + path.c_str(), + (listener != NULL ? 1 : 0), + buffer, &len, stat ); + } + } while (rc != ZOK && rh.handleRC(rc)); + if (rc != ZOK) { + LOG_ERROR( LOG, "Error %d for %s", rc, path.c_str() ); + throw ZooKeeperException( + string("Unable to get data of node ") + path, rc + ); + } else { + if (len == -1) { + len = 0; + } + return string( buffer, len ); + } +} + +void +ZooKeeperAdapter::setNodeData(const string &path, + const string &value, + int version) + throw(ZooKeeperException) +{ + TRACE( LOG, "setNodeData" ); + + validatePath( path ); + + int rc; + RetryHandler rh(m_zkConfig); + do { + verifyConnection(); + rc = zoo_set( mp_zkHandle, + path.c_str(), + value.c_str(), + value.length(), + version); + } while (rc != ZOK && rh.handleRC(rc)); + if (rc != ZOK) { + LOG_ERROR( LOG, "Error %d for %s", rc, path.c_str() ); + throw ZooKeeperException( string("Unable to set data for node ") + + path, + rc ); + } +} + +} /* end of 'namespace zk' */ + diff --git a/src/contrib/zkfuse/src/zkadapter.h b/src/contrib/zkfuse/src/zkadapter.h new file mode 100644 index 0000000..8d4d1d5 --- /dev/null +++ b/src/contrib/zkfuse/src/zkadapter.h @@ -0,0 +1,718 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __ZKADAPTER_H__ +#define __ZKADAPTER_H__ + +#include +#include +#include + +extern "C" { +#include "zookeeper.h" +} + +#include "log.h" +#include "mutex.h" +#include "thread.h" +#include "blockingqueue.h" +#include "event.h" + +using namespace std; +using namespace zkfuse; + +namespace zk { + +/** + * \brief A cluster related exception. + */ +class ZooKeeperException : + public std::exception +{ + public: + + /** + * \brief Constructor. + * + * @param msg the detailed message associated with this exception + */ + ZooKeeperException(const string &msg) : + m_message(msg), m_zkErrorCode(0) + {} + + /** + * \brief Constructor. + * + * @param msg the detailed message associated with this exception + * @param errorCode the ZK error code associated with this exception + */ + ZooKeeperException(const string &msg, int errorCode) : + m_zkErrorCode(errorCode) + { + char tmp[100]; + sprintf( tmp, " (ZK error code: %d)", errorCode ); + m_message = msg + tmp; + } + + /** + * \brief Destructor. + */ + ~ZooKeeperException() throw() {} + + /** + * \brief Returns detailed description of the exception. + */ + const char *what() const throw() { + return m_message.c_str(); + } + + /** + * \brief Returns the ZK error code. + */ + int getZKErrorCode() const { + return m_zkErrorCode; + } + + private: + + /** + * The detailed message associated with this exception. + */ + string m_message; + + /** + * The optional error code received from ZK. + */ + int m_zkErrorCode; + +}; + +/** + * \brief This class encapsulates configuration of a ZK client. + */ +class ZooKeeperConfig +{ + public: + + /** + * \brief Constructor. + * + * @param hosts the comma separated list of host and port pairs of ZK nodes + * @param leaseTimeout the lease timeout (heartbeat) + * @param autoReconnect whether to allow for auto-reconnect + * @param connectTimeout the connect timeout, in milliseconds; + */ + ZooKeeperConfig(const string &hosts, + int leaseTimeout, + bool autoReconnect = true, + long long int connectTimeout = 15000) : + m_hosts(hosts), m_leaseTimeout(leaseTimeout), + m_autoReconnect(autoReconnect), m_connectTimeout(connectTimeout) {} + + /** + * \brief Returns the list of ZK hosts to connect to. + */ + string getHosts() const { return m_hosts; } + + /** + * \brief Returns the lease timeout. + */ + int getLeaseTimeout() const { return m_leaseTimeout; } + + /** + * \brief Returns whether {@link ZooKeeperAdapter} should attempt + * \brief to automatically reconnect in case of a connection failure. + */ + bool getAutoReconnect() const { return m_autoReconnect; } + + /** + * \brief Gets the connect timeout. + * + * @return the connect timeout + */ + long long int getConnectTimeout() const { return m_connectTimeout; } + + private: + + /** + * The host addresses of ZK nodes. + */ + const string m_hosts; + + /** + * The ZK lease timeout. + */ + const int m_leaseTimeout; + + /** + * True if this adapater should attempt to autoreconnect in case + * the current session has been dropped. + */ + const bool m_autoReconnect; + + /** + * How long to wait, in milliseconds, before a connection + * is established to ZK. + */ + const long long int m_connectTimeout; + +}; + +/** + * \brief A data value object representing a watcher event received from the ZK. + */ +class ZKWatcherEvent +{ + public: + + /** + * \brief The type representing the user's context. + */ + typedef void *ContextType; + + /** + * \brief Constructor. + * + * @param type the type of this event + * @param state the state of this event + * @param path the corresponding path, may be empty for some event types + * @param context the user specified context; possibly NULL + */ + ZKWatcherEvent() : + m_type(-1), m_state(-1), m_path(""), mp_context(NULL) {} + + /** + * \brief Constructor. + * + * @param type the type of this event + * @param state the state of this event + * @param path the corresponding path, may be empty for some event types + * @param context the user specified context; possibly NULL + */ + ZKWatcherEvent(int type, int state, const string &path, + ContextType context = NULL) : + m_type(type), m_state(state), m_path(path), mp_context(context) {} + + int getType() const { return m_type; } + int getState() const { return m_state; } + string const &getPath() const { return m_path; } + ContextType getContext() const { return mp_context; } + + bool operator==(const ZKWatcherEvent &we) const { + return m_type == we.m_type && m_state == we.m_state + && m_path == we.m_path && mp_context == we.mp_context; + } + + private: + + /** + * The type of this event. It can be either ZOO_CREATED_EVENT, ZOO_DELETED_EVENT, + * ZOO_CHANGED_EVENT, ZOO_CHILD_EVENT, ZOO_SESSION_EVENT or ZOO_NOTWATCHING_EVENT. + * See zookeeper.h for more details. + */ + const int m_type; + + /** + * The state of ZK at the time of sending this event. + * It can be either ZOO_CONNECTING_STATE, ZOO_ASSOCIATING_STATE, + * ZOO_CONNECTED_STATE, ZOO_EXPIRED_SESSION_STATE or AUTH_FAILED_STATE. + * See {@file zookeeper.h} for more details. + */ + const int m_state; + + /** + * The corresponding path of the node in subject. It may be empty + * for some event types. + */ + const string m_path; + + /** + * The pointer to the user specified context, possibly NULL. + */ + ContextType mp_context; + +}; + +/** + * \brief The type definition of ZK event source. + */ +typedef EventSource ZKEventSource; + +/** + * \brief The type definition of ZK event listener. + */ +typedef EventListener ZKEventListener; + +/** + * \brief This is a wrapper around ZK C synchrounous API. + */ +class ZooKeeperAdapter + : public ZKEventSource +{ + public: + /** + * \brief The global function that handles all ZK asynchronous notifications. + */ + friend void zkWatcher(zhandle_t *, int, int, const char *, void *watcherCtx); + + /** + * \brief The type representing the user's context. + */ + typedef void *ContextType; + + /** + * \brief The map type of ZK event listener to user specified context mapping. + */ + typedef map Listener2Context; + + /** + * \brief The map type of ZK path's to listener's contexts. + */ + typedef map Path2Listener2Context; + + /** + * \brief All possible states of this client, in respect to + * \brief connection to the ZK server. + */ + enum AdapterState { + //mp_zkHandle is NULL + AS_DISCONNECTED = 0, + //mp_zkHandle is valid but this client is reconnecting + AS_CONNECTING, + //mp_zkHandle is valid and this client is connected + AS_CONNECTED, + //mp_zkHandle is valid, however no more calls can be made to ZK API + AS_SESSION_EXPIRED + }; + + /** + * \brief Constructor. + * Attempts to create a ZK adapter, optionally connecting + * to the ZK. Note, that if the connection is to be established + * and the given listener is NULL, some events may be lost, + * as they may arrive asynchronously before this method finishes. + * + * @param config the ZK configuration + * @param listener the event listener to be used for listening + * on incoming ZK events; + * if NULL not used + * @param establishConnection whether to establish connection to the ZK + * + * @throw ZooKeeperException if cannot establish connection to the given ZK + */ + ZooKeeperAdapter(ZooKeeperConfig config, + ZKEventListener *listener = NULL, + bool establishConnection = false) + throw(ZooKeeperException); + + /** + * \brief Destructor. + */ + ~ZooKeeperAdapter(); + + /** + * \brief Returns the current config. + */ + const ZooKeeperConfig &getZooKeeperConfig() const { + return m_zkConfig; + } + + /** + * \brief Restablishes connection to the ZK. + * If this adapter is already connected, the current connection + * will be dropped and a new connection will be established. + * + * @throw ZooKeeperException if cannot establish connection to the ZK + */ + void reconnect() throw(ZooKeeperException); + + /** + * \brief Disconnects from the ZK and unregisters {@link #mp_zkHandle}. + */ + void disconnect(); + + /** + * \brief Creates a new node identified by the given path. + * This method will optionally attempt to create all missing ancestors. + * + * @param path the absolute path name of the node to be created + * @param value the initial value to be associated with the node + * @param flags the ZK flags of the node to be created + * @param createAncestors if true and there are some missing ancestor nodes, + * this method will attempt to create them + * + * @return true if the node has been successfully created; false otherwise + * @throw ZooKeeperException if the operation has failed + */ + bool createNode(const string &path, + const string &value = "", + int flags = 0, + bool createAncestors = true) + throw(ZooKeeperException); + + /** + * \brief Creates a new sequence node using the give path as the prefix. + * This method will optionally attempt to create all missing ancestors. + * + * @param path the absolute path name of the node to be created; + * @param value the initial value to be associated with the node + * @param flags the ZK flags of the sequence node to be created + * (in addition to SEQUENCE) + * @param createAncestors if true and there are some missing ancestor + * nodes, this method will attempt to create them + * + * @return the sequence number associate with newly created node, + * or -1 if it couldn't be created + * @throw ZooKeeperException if the operation has failed + */ + int64_t createSequence(const string &path, + const string &value = "", + int flags = 0, + bool createAncestors = true) + throw(ZooKeeperException); + + /** + * \brief Deletes a node identified by the given path. + * + * @param path the absolute path name of the node to be deleted + * @param recursive if true this method will attempt to remove + * all children of the given node if any exist + * @param version the expected version of the node. The function will + * fail if the actual version of the node does not match + * the expected version + * + * @return true if the node has been deleted; false otherwise + * @throw ZooKeeperException if the operation has failed + */ + bool deleteNode(const string &path, bool recursive = false, int version = -1) + throw(ZooKeeperException); + + /** + * \brief Checks whether the given node exists or not. + * + * @param path the absolute path name of the node to be checked + * @param listener the listener for ZK watcher events; + * passing non NULL effectively establishes + * a ZK watch on the given node + * @param context the user specified context that is to be passed + * in a corresponding {@link ZKWatcherEvent} at later time; + * not used if listener is NULL + * @param stat the optional node statistics to be filled in by ZK + * + * @return true if the given node exists; false otherwise + * @throw ZooKeeperException if the operation has failed + */ + bool nodeExists(const string &path, + ZKEventListener *listener = NULL, + void *context = NULL, + Stat *stat = NULL) + throw(ZooKeeperException); + + /** + * \brief Retrieves list of all children of the given node. + * + * @param path the absolute path name of the node for which to get children + * @param listener the listener for ZK watcher events; + * passing non NULL effectively establishes + * a ZK watch on the given node + * @param context the user specified context that is to be passed + * in a corresponding {@link ZKWatcherEvent} at later time; + * not used if listener is NULL + * + * @return the list of absolute paths of child nodes, possibly empty + * @throw ZooKeeperException if the operation has failed + */ + void getNodeChildren(vector &children, + const string &path, + ZKEventListener *listener = NULL, + void *context = NULL) + throw(ZooKeeperException); + + /** + * \brief Gets the given node's data. + * + * @param path the absolute path name of the node to get data from + * @param listener the listener for ZK watcher events; + * passing non NULL effectively establishes + * a ZK watch on the given node + * @param context the user specified context that is to be passed + * in a corresponding {@link ZKWatcherEvent} at later time; + * not used if listener is NULL + * @param stat the optional node statistics to be filled in by ZK + * + * @return the node's data + * @throw ZooKeeperException if the operation has failed + */ + string getNodeData(const string &path, + ZKEventListener *listener = NULL, + void *context = NULL, + Stat *stat = NULL) + throw(ZooKeeperException); + + /** + * \brief Sets the given node's data. + * + * @param path the absolute path name of the node to get data from + * @param value the node's data to be set + * @param version the expected version of the node. The function will + * fail if the actual version of the node does not match + * the expected version + * + * @throw ZooKeeperException if the operation has failed + */ + void setNodeData(const string &path, const string &value, int version = -1) + throw(ZooKeeperException); + + /** + * \brief Validates the given path to a node in ZK. + * + * @param the path to be validated + * + * @throw ZooKeeperException if the given path is not valid + * (for instance it doesn't start with "/") + */ + static void validatePath(const string &path) throw(ZooKeeperException); + + /** + * Returns the current state of this adapter. + * + * @return the current state of this adapter + * @see AdapterState + */ + AdapterState getState() const { + return m_state; + } + + private: + + /** + * This enum defines methods from this class than can trigger an event. + */ + enum WatchableMethod { + NODE_EXISTS = 0, + GET_NODE_CHILDREN, + GET_NODE_DATA + }; + + /** + * \brief Creates a new node identified by the given path. + * This method is used internally to implement {@link createNode(...)} + * and {@link createSequence(...)}. On success, this method will set + * createdPath. + * + * @param path the absolute path name of the node to be created + * @param value the initial value to be associated with the node + * @param flags the ZK flags of the node to be created + * @param createAncestors if true and there are some missing ancestor nodes, + * this method will attempt to create them + * @param createdPath the actual path of the node that has been created; + * useful for sequences + * + * @return true if the node has been successfully created; false otherwise + * @throw ZooKeeperException if the operation has failed + */ + bool createNode(const string &path, + const string &value, + int flags, + bool createAncestors, + string &createdPath) + throw(ZooKeeperException); + + /** + * Handles an asynchronous event received from the ZK. + */ + void handleEvent(int type, int state, const string &path); + + /** + * Handles an asynchronous event received from the ZK. + * This method iterates over all listeners and passes the event + * to each of them. + */ + void handleEvent(int type, int state, const string &path, + const Listener2Context &listeners); + + /** + * \brief Enqueues the given event in {@link #m_events} queue. + */ + void enqueueEvent(int type, int state, const string &path); + + /** + * \brief Processes all ZK adapter events in a loop. + */ + void processEvents(); + + /** + * \brief Processes all user events in a loop. + */ + void processUserEvents(); + + /** + * \brief Registers the given context in the {@link #m_zkContexts} + * \brief contexts map. + * + * @param method the method where the given path is being used + * @param path the path of interest + * @param listener the event listener to call back later on + * @param context the user specified context to be passed back to user + */ + void registerContext(WatchableMethod method, const string &path, + ZKEventListener *listener, ContextType context); + + /** + * \brief Attempts to find a listener to context map in the contexts' + * \brief map, based on the specified criteria. + * If the context is found, it will be removed the udnerlying map. + * + * @param method the method type identify Listener2Context map + * @param path the path to be used to search in the Listener2Context map + * + * @return the context map associated with the given method and path, + * or empty map if not found + */ + Listener2Context findAndRemoveListenerContext(WatchableMethod method, + const string &path); + + /** + * Sets the new state in case it's different then the current one. + * This method assumes that {@link #m_stateLock} has been already locked. + * + * @param newState the new state to be set + */ + void setState(AdapterState newState); + + /** + * Waits until this client gets connected. The total wait time + * is given by {@link getRemainingConnectTimeout()}. + * If a timeout elapses, this method will throw an exception. + * + * @throw ZooKeeperException if unable to connect within the given timeout + */ + void waitUntilConnected() + throw(ZooKeeperException); + + /** + * Verifies whether the connection is established, + * optionally auto reconnecting. + * + * @throw ZooKeeperConnection if this client is disconnected + * and auto-reconnect failed or was not allowed + */ + void verifyConnection() throw(ZooKeeperException); + + /** + * Returns the remaining connect timeout. The timeout resets + * to {@link #m_connectTimeout} on a successfull connection to the ZK. + * + * @return the remaining connect timeout, in milliseconds + */ + long long int getRemainingConnectTimeout() { + return m_remainingConnectTimeout; + } + + /** + * Resets the remaining connect timeout to {@link #m_connectTimeout}. + */ + void resetRemainingConnectTimeout() { + m_remainingConnectTimeout = m_zkConfig.getConnectTimeout(); + } + + /** + * Updates the remaining connect timeout to reflect the given wait time. + * + * @param time the time for how long waited so far on connect to succeed + */ + void waitedForConnect(long long time) { + m_remainingConnectTimeout -= time; + } + + private: + + /** + * The mutex use to protect {@link #m_zkContexts}. + */ + zkfuse::Mutex m_zkContextsMutex; + + /** + * The map of registered ZK paths that are being watched. + * Each entry maps a function type to another map of registered contexts. + * + * @see WatchableMethod + */ + map m_zkContexts; + + /** + * The current ZK configuration. + */ + const ZooKeeperConfig m_zkConfig; + + /** + * The current ZK session. + */ + zhandle_t *mp_zkHandle; + + /** + * The blocking queue of all events waiting to be processed by ZK adapter. + */ + BlockingQueue m_events; + + /** + * The blocking queue of all events waiting to be processed by users + * of ZK adapter. + */ + BlockingQueue m_userEvents; + + /** + * The thread that dispatches all events from {@link #m_events} queue. + */ + CXXThread m_eventDispatcher; + + /** + * The thread that dispatches all events from {@link #m_userEvents} queue. + */ + CXXThread m_userEventDispatcher; + + /** + * Whether {@link #m_eventDispatcher} is terminating. + */ + volatile bool m_terminating; + + /** + * Whether this adapter is connected to the ZK. + */ + volatile bool m_connected; + + /** + * The state of this adapter. + */ + AdapterState m_state; + + /** + * The lock used to synchronize access to {@link #m_state}. + */ + Lock m_stateLock; + + /** + * How much time left for the connect to succeed, in milliseconds. + */ + long long int m_remainingConnectTimeout; + +}; + +} /* end of 'namespace zk' */ + +#endif /* __ZKADAPTER_H__ */ diff --git a/src/contrib/zkfuse/src/zkfuse.cc b/src/contrib/zkfuse/src/zkfuse.cc new file mode 100644 index 0000000..6a82168 --- /dev/null +++ b/src/contrib/zkfuse/src/zkfuse.cc @@ -0,0 +1,4492 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#define FUSE_USE_VERSION 26 + +#ifdef HAVE_CONFIG_H +#include +#endif + +#undef _GNU_SOURCE +#define _GNU_SOURCE + +extern "C" { +#include +#include +} +#include +#include +#include +#include +#include +#include +#include +#ifdef HAVE_SETXATTR +#include +#endif + +#include + +#include +#include +#include +#include +#include +#include + +#include "log.h" +#include "mutex.h" +#include "zkadapter.h" + +#define ZOOKEEPER_ROOT_CHILDREN_WATCH_BUG + +/** + Typedef for ZooKeeperAdapter::Data. +*/ +typedef std::string Data; +/** + Typedef for ZooKeeperAdapter::NodeNames. +*/ +typedef vector NodeNames; + +#define MAX_DATA_SIZE 1024; + +DEFINE_LOGGER(LOG, "zkfuse"); + +inline +uint64_t millisecsToSecs(uint64_t millisecs) +{ + return millisecs / 1000; +} +inline +uint64_t secsToMillisecs(uint64_t secs) +{ + return secs * 1000; +} +inline +uint64_t nanosecsToMillisecs(uint64_t nanosecs) +{ + return nanosecs / 1000000; +} +inline +uint64_t timespecToMillisecs(const struct timespec & ts) +{ + return secsToMillisecs(ts.tv_sec) + nanosecsToMillisecs(ts.tv_nsec); +} + +typedef boost::shared_ptr ZooKeeperAdapterSharedPtr; + +/** + * ZkFuseCommon - holds immutable configuration objects. + * + * No locks are required to access these objects. + * A ZkFuseCommon instance is considered to be a data object and may be copied. + */ +class ZkFuseCommon +{ + private: + /** + References the ZooKeeperAdapter instance to be used. + */ + ZooKeeperAdapterSharedPtr _zkAdapter; + /** + Path to the ZooKeeper root node. + */ + std::string _rootPathName; + /** + Name used to access data "file" when the ZK node has + children. + */ + std::string _dataFileName; + /** + Suffix added to path components to force interpretation of + path components as directory. This is usually only required + for the last component. For example, ZkFuse may consider + a leaf node a regular file, e.g. /a/b/c/leaf. The suffix + can be used to create child under this node, e.g. + mkdir /a/b/c/leaf{forceDirSuffix}/new_leaf. + */ + std::string _forceDirSuffix; + /** + Prefix common to all metadata nodes created by ZkFuse. + */ + std::string _metadataNamePrefix; + /** + Path component name that identifies a directory metadata node. + A directory metadata node is currently empty. It is used by ZkFuse + to create a child when mkdir is used. This prevents ZkFuse + from interpreting the new child as a regular file. + */ + std::string _dirMetadataName; + /** + Path component name that identifies a regular file metadata node. + A regular metadata node holds metadata required to implement + Posix regular file semantics, such as setting mtime. + */ + std::string _regMetadataName; + /** + Number of not-in-use nodes to cache. + */ + unsigned _cacheSize; + /** + Assume this userid owns all nodes. + */ + const uid_t _uid; + /** + Assume this groupid owns all nodes. + */ + const gid_t _gid; + /** + Blocksize used to calculate number of blocks used for stat. + */ + const unsigned _blkSize; + + public: + /** + Constructor. + */ + ZkFuseCommon() + : _zkAdapter(), + _rootPathName("/"), + _dataFileName(), + _forceDirSuffix(), + _metadataNamePrefix(".zkfuse."), + _dirMetadataName(_metadataNamePrefix + "dir"), + _regMetadataName(_metadataNamePrefix + "file"), + _cacheSize(256), + _uid(geteuid()), + _gid(getegid()), + _blkSize(8192) + { + } + /** + Get root path name. Always "/". + \see _rootPathName + */ + const std::string & getRootPathName() const + { + return _rootPathName; + } + /** + Get dataFileName - the name for synthesized files to access + ZooKeeper node data. + \see _dataFileName + */ + const std::string & getDataFileName() const + { + return _dataFileName; + } + /** + Set dataFileName. + \see getDataFileName + \see _dataFileName + */ + void setDataFileName(const std::string & dataFileName) + { + _dataFileName = dataFileName; + } + /** + Get metadataNamePrefix - the common prefix for all ZkFuse created + metadata ZooKeeper nodes. + \see _metadataNamePrefix + */ + const std::string & getMetadataNamePrefix() const + { + return _metadataNamePrefix; + } + /** + Get forceDirSuffix - the suffix added to a path component to force + the path component to be treated like a directory. + \see _forceDirSuffix + */ + const std::string & getForceDirSuffix() const + { + return _forceDirSuffix; + } + /** + Set forceDirSuffix. + \see getForceDirSuffix + \see _forceDirSuffix + */ + void setForceDirSuffix(const std::string & forceDirSuffix) + { + _forceDirSuffix = forceDirSuffix; + } + /** + Get dirMetadataName - path component name of all directory + metadata ZooKeeper nodes. + \see _dirMetadataname + */ + const std::string & getDirMetadataName() const + { + return _dirMetadataName; + } + /** + Get regMetadataName - path component name of all regular file + metadata ZooKeeper nodes. + \see _regMetadataname + */ + const std::string & getRegMetadataName() const + { + return _regMetadataName; + } + /** + Get number of not-in-use ZkFuseFile instances to to cache. + \see _cacheSize + */ + unsigned getCacheSize() const + { + return _cacheSize; + } + /** + Set cache size. + \see getCacheSize + \see _cacheSize + */ + void setCacheSize(unsigned v) + { + _cacheSize = v; + } + /** + Get userid. + \see _uid + */ + uid_t getUid() const + { + return _uid; + } + /** + Get groupid. + \see _gid + */ + gid_t getGid() const + { + return _gid; + } + /** + Get block size. + \see _blkSize + */ + unsigned getBlkSize() const + { + return _blkSize; + } + /** + Get ZooKeeperAdapter. + \see _zkAdapter. + */ + const ZooKeeperAdapterSharedPtr & getZkAdapter() const + { + return _zkAdapter; + } + /** + Set ZooKeeperAdapter. + \see _zkAdaptor + */ + void setZkAdapter(const ZooKeeperAdapterSharedPtr & zkAdapter) + { + _zkAdapter = zkAdapter; + } +}; + +/** + ZkFuseNameType - identifies the type of the ZkFuse path. + */ +enum ZkFuseNameType { + /** + ZkFuse path is not syntheiszed. + ZkFuse should use its default rules to determine the Posix representation + of the path. + */ + ZkFuseNameDefaultType = 0, + /** + ZkFuse path is synthesized and identifies the data part of a + ZooKeeper node, i.e. Posix regular file semantics is expected. + */ + ZkFuseNameRegType = 1, + /** + ZkFuse path is synthesized and identifies the chidlren part of a + ZooKeeper node, i.e. Posix directory semantics is expected. + */ + ZkFuseNameDirType = 2 +}; + +class ZkFuseFile; + +typedef ZkFuseFile * ZkFuseFilePtr; + +class ZkFuseHandleManagerFactory; + +/** + ZkFuseHandleManager - keeps track of all the ZkFuseFile instances + allocated by a ZkFuseHandleManager instance and provides them + with a handle that can be used by FUSE. + + It maps a ZooKeeper path to a handle and a handle to a ZkFuse instance. + It also implements the methods that takes path names as arguments, such + as open, mknod, rmdir, and rename. + + Memory management + - References ZkFuseFile instances using regular pointers + Smart pointer is not used because reference counts are needed to + determine how many time a node is opened as a regular file or + directory. This also avoids circular smart pointer references. + - Each ZkFuseFile instance holds a reference to its ZkFuseHandleManager + using a boost::shared_ptr. This ensures that the ZkFuseHandleManager + instance that has the handle for the ZkFuseFile instance does not + get garbage collected while the ZkFuseFile instance exists. + + Concurrency control + - Except for the immutable ZkFuseCommon, all other member variables + are protected by _mutex. + - A method in this class can hold _mutex when it directly or + indirectly invokes ZkFuseFile methods. A ZkFuseFile method that holds + a ZkFuseFile instance _mutex cannot invoke a ZkFuseHandleManager + method that acquires the ZkFuseHandleManager instance's _mutex. + Otherwise, this may cause a dead lock. + - Methods that with names that begin with "_" do not acquire _mutex. + They are usually called by public methods that acquire and hold _mutex. + */ +class ZkFuseHandleManager : boost::noncopyable +{ + private: + /** + Typedef of handle, which is an int. + */ + typedef int Handle; + /** + Typedef of std::map used to map path to handle. + */ + typedef std::map Map; + /** + Typedef of std::vector used to map handle to ZkFuseFile instances. + */ + typedef std::vector Files; + /** + Typedef of std::vector used to hold unused handles. + */ + typedef std::vector FreeList; + /** + Typedef of boost::weak_ptr to the ZkFuseHandleManager instance. + */ + typedef boost::weak_ptr WeakPtr; + + /* Only ZkFuseHandleManagerFactory can create instances of this class */ + friend class ZkFuseHandleManagerFactory; + + /** + Contains common configuration. + Immutable so that it can be accessed without locks. + */ + const ZkFuseCommon _common; + /** + Maps a path name to a Handle. + */ + Map _map; + /** + Maps a handle to a ZkFuseFile instances. + Also holds pointers to all known ZkFuseFile instances. + An element may point to an allocated ZkFuseFile instance or be NULL. + + An allocated ZkFuseFile instance may be in one of the following states: + - in-use + Currently open, i.e. the ZkFuseFile instance's reference count + greater than 0. + - in-cache + Not currently open, i.e. the ZkFuseFile instances's + reference count is 0. + */ + Files _files; + /** + List of free'ed handles. + */ + FreeList _freeList; + /** + Mutex used to protect this instance. + */ + mutable zkfuse::Mutex _mutex; + /** + Count of number of in-use entries. + It used to calculate number of cached nodes. + Number cached nodes is (_files.size() - _numInUse). + */ + unsigned _numInUse; + /** + WeakPtr to myself. + */ + WeakPtr _thisWeakPtr; + + /** + Obtain a handle for the given path. + - If path is not known, then allocate a new handle and increment + _numInUse, and set newFile to true. The allocated + ZkFuseFile instance's reference count should be 1. + - If path is known, increase the corresponding + ZkFuseFile instance's reference count. + + \return the allocated handle. + \param path the path to lookup. + \param newFile indicates whether a new handle has been allocated. + */ + Handle allocate(const std::string & path, bool & newFile); + + /** + Constructor. + + \param common the immutable common configuration. + \param reserve number of elements to pre-allocate for + _files and _freeList. + */ + ZkFuseHandleManager( + const ZkFuseCommon & common, + const unsigned reserve) + : _common(common), + _files(), + _freeList(), + _mutex(), + _numInUse(0) + { + _files.reserve(reserve); + _files[0] = NULL; /* 0 never allocated */ + _files.resize(1); + _freeList.reserve(reserve); + } + + public: + /** + Typedef for boost::shared_ptr for this ZkFuseHandleManager class. + */ + typedef boost::shared_ptr SharedPtr; + + /** + Destructor. + */ + ~ZkFuseHandleManager() + { + } + /** + Get the ZkFuseFile instance for a handle. + + \return the ZkFuseFile instance identified by the handle. + \param handle get ZkFuseFile instance for this handle. + */ + ZkFuseFilePtr getFile(Handle handle) const + { + AutoLock lock(_mutex); + return _files[handle]; + } + /** + Get the immutable common configuration. + + \return the common configuration instance. + */ + const ZkFuseCommon & getCommon() const + { + return _common; + } + /** + Deallocate a previously allocated handle. + This decrements the reference count of the corresponding + ZkFuseFile instance. If the reference count becomes zero, + decrement _numInUse. It may also cause the ZkFuseFile instance + to be reclaimed if there are too many cached ZkFuseFile instances. + + The ZkFuseFile instance should be reclaimed if the number of + unused ZkFuseFile instances exceeds the configured cache size, i.e. + (_files.size() - _numInUse) > _common.getCacheSize() + and the ZkFuseFile instance has a reference count of zero. + + Reclaiming a ZkFuseFile instance involves removing the ZkFuseFile + instance's path to handle mapping from _map and the handle to the + ZkFuseFile instance mapping from _files, adding the handle to + the _freeList, and finally deleting the ZkFuseFile instance. + + \param handle the handle that should be deallocated. + */ + void deallocate(Handle handle); + /** + Handles ZooKeeper session events. + It invokes the known ZkFuseFile instances to let them know + that their watches will no longer be valid. + */ + void eventReceived(const ZKWatcherEvent & event); + /** + Get data from the specified the ZooKeeper path. + + \return 0 if successful, otherwise return negative errno. + \param path the path of the ZooKeeper node. + \param data return data read. + */ + int getData(const std::string & path, Data & data); + /** + Set data into the specified ZooKeeper path. + + \return 0 if successful, otherwise return negative errno. + \param path the path of the ZooKeeper node. + \param data the data to be written. + \param exists set to true if this path exists. + \param doFlush set to true if new data should be flushed to ZooKeeper. + */ + int setData(const std::string & path, + const Data & data, + bool exists, + bool doFlush); + /** + Create a ZooKeeper node to represent a ZkFuse file or directory. + + \return handle if successful, otherwise return negative errno. + \param path to create. + \param mode should be either S_IFDIR for directory or + S_IFREG for regular file. + \param mayExist if set and the ZooKeeper node already exist, return + valid handle instead of -EEXIST. + \param created returns whether a new ZooKeeper node had been created. + */ + int mknod(const std::string & path, + mode_t mode, + bool mayExist, + bool & created); + /** + Open a ZooKeeper node. + + The justCreated argument is used to differentiate if the _deleted flag + of the ZkFuseFile instance is to be trusted (i.e. the path + does not exist in ZooKeeper.) The _deleted flag is trusted + if the ZkFuseFile instance is known to exist in ZooKeeper after + invoking ZooKeeper with the path. + + If justCreated is true, then the ZkFuseFile instance was just created. + The ZkFuseFile constructor sets the _deleted flag to true because + path is not known to exist and hence should not be accessed. + The justCreated flag will force the ZkFuseFile instance to invoke + ZooKeeper to determine if the path exists. + + \return handle if successful, otherwise return negative errno. + \param path the path to open. + \param justCreated indicates if this is newly created ZkFuseFile instance. + */ + int open(const std::string & path, bool justCreated); + /** + Remove a ZkFuse directory. + + If force is not set, then the ZooKeeper node will be removed only + if it has no data and no child nodes except ZkFuse metadata nodes. + + \return 0 if successful, otherwise return negative errno. + \param path the path to remove. + \param force force removal, i.e. bypass checks. + */ + int rmdir(const char * path, bool force = false); + /** + Make a ZkFuse directory. + + ZkFuse represents a ZooKeeper node with no data and no children + as a regular file. In order to differentiate a newly created + directory from an empty regular file, mkdir will create a directory + metadata node as a child of the directory. + + \return 0 if successful, otherwise return negative errno. + \param path the path of the directory to create. + \param mode create directory with this mode + (mode currently not implemented). + */ + int mkdir(const char * path, mode_t mode); + /** + Remove a ZkFuse regular file. + + A file is the abstraction for the data part of a ZooKeeper node. + - If ZkFuse represents a ZooKeeper node as a directory, the data part + of the node is represented by synthesizing a name for this file. This + synthesized name is visible through readdir if the ZooKeeper node's + data is not empty. Removing such a file is done by truncating + the ZooKeeper node's data to 0 length. + - If ZkFuse represents a ZooKeeper node as a file, then removing the + is done by removing the ZooKeeper node (and its metadata). + + \return 0 if successful, otherwise return negative errno. + \param path the path of the file to remove. + */ + int unlink(const char * path); + /** + Get attributes of a ZkFuse regular file or directory. + + \return 0 if successful, otherwise return negative errno. + \param path get attributes for this path + \param stbuf store attributes here. + */ + int getattr(const char * path, struct stat & stbuf); + /** + Rename a ZkFuse regular file. + + It creates a new ZooKeeper node at toPath, copies data and file + metadata from the ZooKeeper node at fromPath to the new node, + and deletes the current ZooKeeper node. If the current ZooKeeper + node is not deleted if the new ZooKeeper node cannot be created + or the data copy fails. + + It cannot be used to rename a directory. + + \return 0 if successful, otherwise return negative errno. + \param fromPath the current path. + \param toPath rename to this path. + */ + int rename(const char * fromPath, const char * toPath); + /** + Add a child ZooKeeper path to the children information cache + of the ZkFuseFile instance that caches the parent ZooKeeper node. + + This is used to add a child path after a new ZooKeeper node has + been created to the children information cache of the parent + ZooKeeper node. This is needed because waiting for the children + changed event to update the cache may result in inconsistent local + views of the changes. + \see removeChildFromParent + + \parama childPath the path of the child ZooKeeper node. + */ + void addChildToParent(const std::string & childPath) const; + /** + Remove a child ZooKeeper path from the children information cache + of the ZkFuseFile instance that caches the parent ZooKeeper node. + + For example, this should happen whenever a path is deleted. + This child information cache of the parent will eventually be + invalidated by watches. However, the delivery of the children + change event may come after the next access and thus provide + the client with an inconsistent view. One example is that + client deletes the last file in a directory, but the children + changed event is not delivered before the client invokes rmdir. + to remove the parent. In this case, the rmdir fails because + the cached children information of the parent indicates the + "directory" is not empty. + + \param childPath the path of the child ZooKeeper node. + */ + void removeChildFromParent(const std::string & childPath) const; + /** + Return the path for the parent of the specified ZooKeeper path. + + \return the parent path. + \param childPath the child path. + */ + std::string getParentPath(const std::string & childPath) const; + /** + Return the ZooKeeper path from a ZkFuse path. + + The ZkFuse path may be a synthesized path. For example, a synthesized + path is required to access the data part of a ZooKeeper node's + data when ZkFuse represents the ZooKeeper node as directory. + A synthesized path is also required to create a child ZooKeeper node + under a ZooKeeper node that is represented by a regular file. + + \return the ZooKeeper path for path. + \param path the ZkFuse path, which may be a synthesized path. + \param nameType indicate whether the ZkFuse path is synthesized and + whether the synthesized ZkFuse path identifies a + directory or a regular file. + */ + std::string getZkPath(const char * path, ZkFuseNameType & nameType) const; +}; + +/** + ZkFuseHandleManagerFactory - factory for ZkFuseHandleManager. + + This is the only way to create a ZkFuseHandleManager instance. + to make sure that _thisWeakPtr of the instance is intialized + after the instance is created. + */ +class ZkFuseHandleManagerFactory +{ + public: + /** + Create an instance of ZkFuseHandleManager. + + \return the created ZkFuseHandleManager instance. + \param common the common configuration. + \param reserve initially reserve space for this number of handles. + */ + static ZkFuseHandleManager::SharedPtr create( + const ZkFuseCommon & common, + unsigned reserve = 1000) + { + ZkFuseHandleManager::SharedPtr manager + (new ZkFuseHandleManager(common, reserve)); + manager->_thisWeakPtr = manager; + return manager; + } +}; + +/** + ZkFuseAutoHandle - automatically closes handle. + + It holds an opened handle and automatically closes this handle + when it is destroyed. This enables code that open a handle + to be exception safe. + */ +class ZkFuseAutoHandle +{ + private: + /** + Typedef for Handle which is an int. + */ + typedef int Handle; + /** + Holds a reference to the ZkFuseHandlerManager instance that + allocated the handle. + */ + ZkFuseHandleManager::SharedPtr _manager; + /** + The handle that should be closed when this instance is destroyed. + A valid handle has value that is equal or greater than 0. + A negative value indicates an error condition, usually the value + is a negative errno. + */ + Handle _handle; + /** + Caches a reference to the ZkFuseFile instance with this handle. + This is a performance optimization so that _manager.getFile(_handle) + is only called once when the handle is initialized. + */ + ZkFuseFilePtr _file; + + /** + Initialize reference to the ZkFuseFile instance with this handle. + */ + void _initFile() + { + if (_handle >= 0) { + _file = _manager->getFile(_handle); + } else { + _file = NULL; + } + } + + public: + /** + Constructor - takes an previously opened handle. + + \param manager the ZkFuseHandleManager instance who allocated the handle. + \param handle the handle. + */ + ZkFuseAutoHandle( + const ZkFuseHandleManager::SharedPtr & manager, + int handle) + : _manager(manager), + _handle(handle), + _file() + { + _initFile(); + } + /** + Constructor - open path and remember handle. + + \param manager the ZkFuseHandleManager instance who allocated the handle. + \param path open this path and remember its handle in this instance. + */ + ZkFuseAutoHandle( + const ZkFuseHandleManager::SharedPtr & manager, + const std::string & path) + : _manager(manager), + _handle(_manager->open(path, false)), + _file() + { + _initFile(); + } + /** + Constructor - create path and remember handle. + + The creation mode indicates whether the path identifies a regular file + or a directory. + + \param manager the ZkFuseHandleManager instance who allocated the handle. + \param path create this path and remember its handle in this instance. + \param mode the creation mode for the path, should be either + S_IFDIR or S_IFDIR. + \param mayExist, if set and the path already exists, + then the ZkFuseAutoHandle will hold the handle + for the path instead of -EEXIST. + If not set and the path does not exist, then the handle + be -EEXIST. + */ + ZkFuseAutoHandle( + const ZkFuseHandleManager::SharedPtr & manager, + const std::string & path, + mode_t mode, + bool mayExist) + : _manager(manager), + _handle(-1), + _file() + { + bool created; + _handle = _manager->mknod(path, mode, mayExist, created); + _initFile(); + } + /** + Destructor - closes the handle. + */ + ~ZkFuseAutoHandle() + { + reset(); + } + /** + Get the handle. + \see _handle + */ + int get() const + { + return _handle; + } + /** + Get the ZkFuseFile instance of the handle. + \see _file + */ + ZkFuseFilePtr getFile() const + { + return _file; + } + /** + Forget the handle, don't close the handle. + */ + void release() + { + _handle = -1; + _file = NULL; + } + /** + Change the remembered handle. + + It will close the current handle (if valid). + */ + void reset(int handle = -1); +}; + +/** + ZkFuseStat - C++ wrapper for ZooKeeper Stat. + + This wrapper provides ZooKeeper Stat will constructors that + initializes the instance variables of Stat. + */ +class ZkFuseStat : public Stat +{ + public: + /** + Constructor - clear instance variables. + */ + ZkFuseStat() + { + clear(); + } + /** + Destructor - do nothing. + */ + ~ZkFuseStat() + { + } + /** + Clear instance variables. + */ + void clear() + { + czxid = 0; + mzxid = 0; + ctime = 0; + mtime = 0; + version = 0; + cversion = 0; + aversion = 0; + } +}; + +/** + ZkFuseFile - an instance encapsulates the runtime state of an allocated + ZooKeeper node. + + Memory management + - Referenced by the ZkFuseHandleManager that created this instance. + - Uses boost::shared_ptr to reference the ZkFuseHandleManager that + created this instance. This makes sure that this ZkFuseHandleManager + instance cannot be deleted when it has allocated ZkFuseFile instances. + - A ZkFuseHandleManager deletes itself if it can be reclaimed. + It can be reclaimed if it has no watches, its reference count is zero, + and the ZkFuseHandleManager instance would have more than the + configured number of cached ZkFuseFile instances. + - A ZkFuseFile instance cannot be deleted if it has active watches on + its ZooKeeper node. When one of its watches fires, the ZkFuseFile + instance must exist because one of its methods will be invoked + to process the event. If the ZkFuseFile instance has been deleted, + the method will access previously freed memory. + + Concurrency control + - _mutex protects the instance variables of an instance. + - Callers should assume that a public method will acquire _mutex. + - Methods of this class may not hold _mutex while invoking an + ZkFuseHandleManager instance. + - Methods that with names that begin with "_" do not acquire _mutex. + They are usually called by public methods that acquire and hold _mutex. +*/ +class ZkFuseFile : boost::noncopyable +{ + public: + /** + Maximum size for the data part of a ZooKeeper node. + */ + static const unsigned maxDataFileSize = MAX_DATA_SIZE; + + private: + /** + Mode returned by getattr for a ZkFuse directory. + */ + static const mode_t dirMode = (S_IFDIR | 0777); + /** + Mode returned by getattr for a ZkFuse regular file. + */ + static const mode_t regMode = (S_IFREG | 0777); + + /** + References the ZkFuseHandleManager that created this instance. + */ + ZkFuseHandleManager::SharedPtr _manager; + /** + Handle for this instance. + */ + const int _handle; + /** + Path of the ZooKeeper node represented by this instance. + */ + const std::string _path; + /** + Mutex that protects the instance variables of this instance. + */ + mutable zkfuse::Mutex _mutex; + /** + Reference count for this instance, i.e. the number of opens + minus the number of closes. + */ + int _refCount; + /** + Indicates whether the ZooKeeper node exist. + This flag allows caching of deleted ZooKeeper node to avoid + repeated ZooKeeper lookups for a non-existent path, and avoid + using cached information. + + Its value is true if + - it is verified to exist (by calling ZooKeeper), or + - it is existence is unknown because ZooKeeper has not been + invoked to verify its path's existence. + */ + bool _deleted; + /** + Count of current number directory opens minus directory closes. + */ + int _openDirCount; + /** + Indicates whether cached children information is valid. + + It is true if the cached children information is valid. + */ + bool _initializedChildren; + /** + Indicates whether there is an outstanding children watch. + + It is true if it has an outstanding children watch. + */ + bool _hasChildrenListener; + /** + Cached children information. + + The cache is valid if _initializedChildren is true. + */ + NodeNames _children; + + /** + Indicates whether the cached data is valid. + + It is true if the cached data and ZooKeeper Stat are valid. + */ + bool _initializedData; + /** + Indicates whether there is an outstanding data watch. + + It is true if it has an outstanding data watch. + */ + bool _hasDataListener; + /** + Indicates whether the cached data (_activeData) has been modified. + + It is true if the cached data has been modified. + */ + bool _dirtyData; + /** + Currently active data. + + To maintain atomicity of updates and emulate Posix semantics, + when a ZkFuse file remains open, the same data will be accessed + by the file's clients. The data will be flushed to ZooKeeper when + the flush method is called. The flush method may be called + explicitly by a client or implicitly when the ZkFuse file is no + longer currently open. + + _activeData and _activeStat stores the data and ZooKeeper Stat + that will be accessed by the file's clients. + + If there are changes when the ZkFuse file is open, new data is + cached as latest data (by _latestData and _latestStat). + */ + Data _activeData; + /** + Currently active ZooKeeper Stat. + \see _activeData + */ + ZkFuseStat _activeStat; + /** + Latest data. + This is either the same as _activeData or it is newer. It is newer + is it has been updated by event triggered by a data watch. + */ + Data _latestData; + /** + Latest ZooKeeper data. + This is either the same as _activeStat or it is newer. It is newer + is it has been updated by event triggered by a data watch. + */ + ZkFuseStat _latestStat; + + /** + Get userid. + + \return the userid. + */ + uid_t _getUid() const + { + return _manager->getCommon().getUid(); + } + /** + Get groupid. + + \return the groupid. + */ + gid_t _getGid() const + { + return _manager->getCommon().getGid(); + } + /** + Get block size. + + \return the block size. + */ + unsigned _getBlkSize() const + { + return _manager->getCommon().getBlkSize(); + } + /** + Get number of children, include metadata children in the count. + + \return the number of children including metadata children. + */ + unsigned _numChildrenIncludeMeta() const + { + unsigned count = _children.size(); + LOG_DEBUG(LOG, "numChildrenIncludeMeta() returns %u", count); + return count; + } + /** + Get number of children, exclude metadata children in the count. + + \return the number of children excluding metadata children. + */ + unsigned _numChildrenExcludeMeta() const + { + unsigned count = 0; + for (NodeNames::const_iterator it = _children.begin(); + it != _children.end(); + it++) { + if (!_isMeta(*it)) { + count++; + } + } + LOG_DEBUG(LOG, "numChildrenExcludeMeta() returns %u", count); + return count; + } + /** + Whether the ZooKeeper node has children, include metadata + children. + + \return true if it has children including metadata children. + */ + bool _hasChildrenIncludeMeta() const + { + return _numChildrenIncludeMeta() != 0; + } + /** + Return true if the ZooKeeper node has children, include metadata + children. + + \return true if it has children excluding metadata children. + */ + bool _hasChildrenExcludeMeta() const + { + return _numChildrenExcludeMeta() != 0; + } + /** + Whether the ZooKeeper node has data. + + \return true if _activeData is not empty. + */ + bool _hasData() const + { + return _activeData.empty() == false; + } + /** + Whether the ZooKeeper node has child with the specified path. + + \return true if the ZooKeeper node has a child with the specified path. + \param childPath the path of the child. + */ + bool _hasChildPath(const std::string & childPath) const + { + bool hasChild = + std::find(_children.begin(), _children.end(), childPath) + != _children.end(); + LOG_DEBUG(LOG, "hasChild(childPath %s) returns %d", + childPath.c_str(), hasChild); + return hasChild; + } + /** + Whether the given path component is a ZkFuse synthesized path + component. + + A ZkFuse synthesized path component will begin with + the metadataNamePrefix obtained from the common configuration. + \see _metadataNamePrefix + + \return true if the path component is a ZkFuse synthesized path + component. + \param childName the path component to check if it is synthesized by + ZkFuse. + */ + bool _isMeta(const std::string & childName) const + { + bool isMeta; + const std::string & prefix = + _manager->getCommon().getMetadataNamePrefix(); + unsigned offset = + (_path.length() > 1 ? + _path.length() + 1 : + 1 /* special case for root dir */ ); + unsigned minLength = offset + prefix.length(); + if (childName.length() < minLength || + childName.compare(offset, prefix.length(), prefix) != 0) { + isMeta = false; + } else { + isMeta = true; + } + LOG_DEBUG(LOG, "isMeta(childName %s) returns %d", + childName.c_str(), isMeta); + return isMeta; + } + /** + Build a path for a specific child of the ZooKeeper node. + + This is done by appending "/" (unless it is the ZooKeeper node + is the root node) and the name of the child. + + \return the path for the specified child of the ZooKeeper node. + \param name the name of the child. + */ + std::string _getChildPath(const std::string & name) const + { + return buildChildPath(_path, name); + } + /** + Whether the ZooKeeper node has a regular file metadata child node. + + \return true if the ZooKeeper node has a regular file metadata child + node. + */ + bool _hasRegMetadata() const + { + bool res = _hasChildPath( + _getChildPath(_manager->getCommon().getRegMetadataName())); + LOG_DEBUG(LOG, "hasRegMetadata() returns %d", res); + return res; + } + /** + Whether the ZooKeeper node has a directory metadata child node. + + \return true if the ZooKeeper node has a directory metadata child + node. + */ + bool _hasDirMetadata() const + { + bool res = _hasChildPath( + _getChildPath(_manager->getCommon().getDirMetadataName())); + LOG_DEBUG(LOG, "hasDirMetadata() returns %d", res); + return res; + } + /** + Whether ZkFuse should present the ZooKeeper node as a ZkFuse regular + file. + + It should be a ZkFuse regular file it has no children or its + only children is its regular file metadata child node. + + \return true if the Zookeeper node should be presented as a ZkFuse + regular file. + */ + bool _isReg() const + { + unsigned numChildrenIncludeMeta = _numChildrenIncludeMeta(); + bool res = + (numChildrenIncludeMeta == 0) || + (numChildrenIncludeMeta == 1 && _hasRegMetadata() == true); + LOG_DEBUG(LOG, "isReg() returns %d", res); + return res; + } + /** + Whether ZkFuse should present the ZooKeeper node as a ZkFuse directory. + + It should be a ZkFuse directory if it should not be presented as + a ZkFuse regular directory. + \see _isReg + + \return true if the Zookeeper node should be presented as a ZkFuse + directory. + */ + bool _isDir() const + { + return !_isReg(); + } + /** + Whether ZkFuse should present the ZooKeeper node as a ZkFuse regular + file by taking into account the specified ZkFuseNameType. + + The ZkFuseNameType may override the default ZkFuse presentation of + a ZooKeeper node. + + \return true if ZkFuse should present the ZooKeeper node as a ZkFuse + regular file. + \param nameType specifies the ZkFuseNameType. + \param doLock whether _mutex should be acquired, it should be true + if the caller did not acquire _mutex. + */ + bool _isRegNameType(ZkFuseNameType nameType, bool doLock = false) const + { + bool res; + switch (nameType) { + case ZkFuseNameRegType: + res = true; + break; + case ZkFuseNameDirType: + res = false; + break; + case ZkFuseNameDefaultType: + default: + if (doLock) { + AutoLock lock(_mutex); + res = _isReg(); + } else { + res = _isReg(); + } + break; + } + LOG_DEBUG(LOG, "isRegNameType(nameType %d) returns %d", + int(nameType), res); + return res; + } + /** + Whether ZkFuse should present the ZooKeeper node as a ZkFuse + directory by taking into account the specified ZkFuseNameType. + + The ZkFuseNameType may override the default ZkFuse presentation of + a ZooKeeper node. + + \return true if ZkFuse should present the ZooKeeper node as a ZkFuse + directory. + \param nameType specifies the ZkFuseNameType. + \param doLock whether _mutex should be acquired, it should be true + if the caller did not acquire _mutex. + */ + bool _isDirNameType(ZkFuseNameType nameType, bool doLock = false) const + { + bool res; + switch (nameType) { + case ZkFuseNameRegType: + res = false; + break; + case ZkFuseNameDirType: + res = true; + break; + case ZkFuseNameDefaultType: + default: + if (doLock) { + AutoLock lock(_mutex); + res = _isDir(); + } else { + res = _isDir(); + } + break; + } + LOG_DEBUG(LOG, "isDirNameType(nameType %d) returns %d", + int(nameType), res); + return res; + } + /** + ZkFuse regular file metadata. + */ + struct Metadata { + /** + Version of the ZooKeeper node data that this metadata is good for. + */ + uint32_t version; + /** + Acces time in milliseconds. + */ + uint64_t atime; + /** + Modified time in milliseconds. + */ + uint64_t mtime; + + /** + Constructor. + */ + Metadata() + : version(0), + atime(0), + mtime(0) + { + } + }; + /** + Encode Metadata into Data so that it can be stored in a metadata + ZooKeeper node. + + Each Metadata attribute is encoded as ": " on single line + terminated by newline. + + \param meta the input Metadata. + \param data the output Data after encoding. + */ + void _encodeMetadata(const Metadata & meta, Data & data) const + { + LOG_DEBUG(LOG, "encodeMetadata()"); + std::ostringstream oss; + oss << "version: " << meta.version << endl + << "atime: " << meta.atime << endl + << "mtime: " << meta.mtime << endl; + data = oss.str(); + } + /** + Decode Data from a metadata child ZooKeeper node into Metadata. + + Data is a stream of ": " records separated by newline. + + \param data the input Data. + \param meta the output Metadata after decoding. + */ + void _decodeMetadata(const Data & data, Metadata & meta) const + { + LOG_DEBUG(LOG, "decodeMetadata(data %s)", data.c_str()); + std::istringstream iss(data); + char key[128]; + char value[1024]; + while (!iss.eof()) { + key[0] = 0; + value[0] = 0; + iss.get(key, sizeof(key), ' '); + if (iss.eof()) { + break; + } + iss.ignore(32, ' '); + iss.getline(value, sizeof(value)); + LOG_DEBUG(LOG, "key %s value %s", key, value); + if (strcmp(key, "version:") == 0) { + unsigned long long v = strtoull(value, NULL, 0); + LOG_DEBUG(LOG, "version: %llu", v); + meta.version = v; + } + else if (strcmp(key, "atime:") == 0) { + unsigned long long v = strtoull(value, NULL, 0); + LOG_DEBUG(LOG, "atime: %llu", v); + meta.atime = v; + } + else if (strcmp(key, "mtime:") == 0) { + unsigned long long v = strtoull(value, NULL, 0); + LOG_DEBUG(LOG, "mtime: %llu", v); + meta.mtime = v; + } + else { + LOG_WARN(LOG, "decodeMetadata: path %s unknown key %s %s\n", + _path.c_str(), key, value); + } + } + LOG_DEBUG(LOG, "decodeMetadata done"); + } + /** + Flush data to the ZooKeeper node. + + If cached active data has been modified, flush it to the ZooKeeper node. + Returns -EIO if the data cannot be written because the cached active + data is not the expected version, i.e. ZooKeeper returns ZBADVERSION. + -EIO may also indicate a more general failure, such as unable to + communicate with ZooKeeper. + + \return 0 if successful, otherwise negative errno. + */ + int _flush() + { + LOG_DEBUG(LOG, "flush() path %s", _path.c_str()); + + int res = 0; + try { + if (_dirtyData) { + LOG_DEBUG(LOG, "is dirty, active version %d", + _activeStat.version); + _manager->getCommon().getZkAdapter()-> + setNodeData(_path, _activeData, _activeStat.version); + /* assumes version always increments by one if successful */ + _deleted = false; + _activeStat.version++; + _dirtyData = false; + res = 0; + } + else { + LOG_DEBUG(LOG, "not dirty"); + res = 0; + } + } catch (const ZooKeeperException & e) { + if (e.getZKErrorCode() == ZBADVERSION) { + LOG_ERROR(LOG, "flush %s bad version, was %d", + _path.c_str(), _activeStat.version); + res = -EIO; + } + else { + LOG_ERROR(LOG, "flush %s exception %s", + _path.c_str(), e.what()); + res = -EIO; + } + } + + LOG_DEBUG(LOG, "flush returns %d", res); + return res; + } + /** + Truncate or expand the size of the cached active data. + + This method only changes the size of the cached active data. + This change is committed to ZooKeeper when the cached data + is written to the ZooKeeper node by flush(). + + Return -EFBIG is the requested size exceeds the maximum. + + \return 0 if successful, otherwise negative errno. + \param size the requested size. + */ + int _truncate(off_t size) + { + LOG_DEBUG(LOG, "truncate(size %zu) path %s", size, _path.c_str()); + + int res = 0; + + if (!_isInitialized()) { + LOG_DEBUG(LOG, "not initialized"); + res = -EIO; + } + else if (size > _activeData.size()) { + if (size > maxDataFileSize) { + LOG_DEBUG(LOG, "size > maxDataFileSize"); + res = -EFBIG; + } else { + LOG_DEBUG(LOG, "increase to size"); + _activeData.insert(_activeData.begin() + + (size - _activeData.size()), 0); + _dirtyData = true; + res = 0; + } + } + else if (size < _activeData.size()) { + LOG_DEBUG(LOG, "decrease to size"); + _activeData.resize(size); + _dirtyData = true; + res = 0; + } + else { + LOG_DEBUG(LOG, "do nothing, same size"); + } + + LOG_DEBUG(LOG, "truncate returns %d", res); + return res; + } + /** + Remove a ZkFuse directory. + + If force is true, then the ZooKeeper node and its decendants + will be deleted. + + If force is false, then this method implements the semantics + of removing a ZkFuse directory. It will delete the ZooKeeper node + only if the ZooKeeper node have no data and no non-metadata + children. + - Return -ENOTDIR if the ZooKeeper node is not considered + to be a directory (after taking into consideration the specified + ZkFuseNameType). + - Return -ENOTEMPTY if the ZooKeeper node has data or it has + non-metadata children. + - Return -ENOENT if the ZooKeeper cannot be deleted, usually this + is because it does not exist. + + \return 0 if successful, otherwise negative errno. + \param nameType the ZkFuseNameType of the path used to specify the + directory to be removed. It influences whether ZkFuse + considers the ZooKeeper node to be a regular file or + directory. \see ZkFuseNameType + \param force set to true to bypass ZkFuse rmdir semantic check. + */ + int _rmdir(ZkFuseNameType nameType, bool force) + { + LOG_DEBUG(LOG, "rmdir(nameType %d, force %d) path %s", + int(nameType), force, _path.c_str()); + + int res = 0; + try { + if (!force && !_isDirNameType(nameType)) { + LOG_DEBUG(LOG, "failed because not directory"); + res = -ENOTDIR; + } + else if (!force && _hasData()) { + /* rmdir cannot occur if there non-empty "data file" */ + LOG_DEBUG(LOG, "failed because node has data"); + res = -ENOTEMPTY; + } + else if (!force && _hasChildrenExcludeMeta()) { + /* rmdir cannot occur if there are "subdirs" */ + LOG_DEBUG(LOG, "failed because node has children"); + res = -ENOTEMPTY; + } + else { + LOG_DEBUG(LOG, "delete node"); + bool deleted = _manager->getCommon().getZkAdapter()-> + deleteNode(_path, true); + if (deleted) { + _deleted = true; + _clearChildren(); + res = 0; + } else { + /* TODO: differentiate delete error conditions, + * e.g. access permission, not exists, ... ? + */ + LOG_DEBUG(LOG, "delete failed"); + res = -ENOENT; + } + } + } catch (const std::exception & e) { + LOG_ERROR(LOG, "rmdir %s exception %s", _path.c_str(), e.what()); + res = -EIO; + } + + LOG_DEBUG(LOG, "rmdir returns %d", res); + return res; + } + /** + Remove a ZkFuse regular file. + + This method implements the semantics of removing a ZkFuse regular file. + - If the ZkFuse regular file represents the data part of the + ZooKeeper node which is presented as a ZkFuse directory, + the regular file is virtually deleted by truncating the + ZooKeeper node's data. Readdir will not synthesize a regular + file entry for the data part of a ZooKeeper node if + the ZooKeeper node has no data. + - If the ZkFuse regular file represents the data part of the + ZooKeeper node which is presented as a ZkFuse regular file, + the ZooKeeper node and its decendants are deleted. + + Returns -EISDIR if the ZkFuse regular file cannot be deleted + because ZkFuse consider it to be a directory. + + \return 0 if successful, otherwise negative errno. + \param nameType the ZkFuseNameType of the path used to specify the + directory to be removed. It influences whether ZkFuse + considers the ZooKeeper node to be a regular file or + directory. \see ZkFuseNameType + */ + int _unlink(ZkFuseNameType nameType) + { + LOG_DEBUG(LOG, "unlink(nameType %d) path %s", + int(nameType), _path.c_str()); + + int res = 0; + switch (nameType) { + case ZkFuseNameRegType: + if (_isDir()) { + res = _truncate(0); + } else { + res = _rmdir(nameType, true); + } + break; + case ZkFuseNameDirType: + res = -EISDIR; + break; + case ZkFuseNameDefaultType: + default: + if (_isReg()) { + res = _rmdir(nameType, true); + } else { + res = -EISDIR; + } + break; + } + + LOG_DEBUG(LOG, "unlink returns %d", res); + return res; + } + /** + Whether cached children and data are valid. + + \return true if cached children and data are valid. + */ + bool _isInitialized() const + { + return _initializedChildren && _initializedData; + } + /** + Clear and invalidate cached children information. + */ + void _clearChildren() + { + _initializedChildren = false; + _children.clear(); + } + /** + Clear and invalidate cached data. + */ + void _clearData() + { + _initializedData = false; + _dirtyData = false; + _activeData.clear(); + _activeStat.clear(); + _latestData.clear(); + _latestStat.clear(); + } + /** + Whether the ZkFuseFile instance is a zombie. + + It is a zombie if it is not currently open, i.e. its reference count + is 0. + */ + bool _isZombie() const + { + return (_refCount == 0); + } + /** + Whether the ZkFuseFile instance is currently opened as a regular file + only once. + + It is used to determine when the cached data can be replaced with + the latest data. \see _activeData. + + \return true if its currently opened as a regular file only once. + */ + bool _isOnlyRegOpen() const + { + return ((_refCount - _openDirCount) == 1); + } + /** + Get attributes without accessing metadata. + + The atime and mtime returned does not take into consideration + overrides present in a matadata file. + + \return 0 if successful, otherwise negative errno. + \param stbuf return attributes here. + \param nameType specifies the ZkFuseNameType of the ZkFuse path used + to get attributes. It influences whether the directory + or regular file attributes are returned. + */ + int _getattrNoMetaAccess(struct stat & stbuf, ZkFuseNameType nameType) const + { + int res = 0; + if (_deleted) { + LOG_DEBUG(LOG, "deleted"); + res = -ENOENT; + } + else if (!_isInitialized()) { + LOG_DEBUG(LOG, "not initialized"); + res = -EIO; + } + else { + assert(_isInitialized()); + bool isRegular = _isRegNameType(nameType); + if (isRegular) { + LOG_DEBUG(LOG, "regular"); + stbuf.st_mode = regMode; + stbuf.st_nlink = 1; + stbuf.st_size = _activeData.size(); + } else { + LOG_DEBUG(LOG, "directory"); + stbuf.st_mode = dirMode; + stbuf.st_nlink = + _children.size() + (_activeData.empty() ? 0 : 1); + stbuf.st_size = stbuf.st_nlink; + } + stbuf.st_uid = _getUid(); + stbuf.st_gid = _getGid(); + /* IMPORTANT: + * Conversion to secs from millisecs must occur before + * assigning to st_atime, st_mtime, and st_ctime. Otherwise + * truncating from 64-bit to 32-bit will cause lost of + * most significant 32-bits before converting to secs. + */ + stbuf.st_atime = millisecsToSecs(_activeStat.mtime); + stbuf.st_mtime = millisecsToSecs(_activeStat.mtime); + stbuf.st_ctime = millisecsToSecs(_activeStat.ctime); + stbuf.st_blksize = _getBlkSize(); + stbuf.st_blocks = + (stbuf.st_size + stbuf.st_blksize - 1) / stbuf.st_blksize; + res = 0; + } + return res; + } + /** + Get the context that should be registered with the data and + children watches. + + The returned context is a pointer to the ZkFuseFile instance + cast to the desired ContextType. + + \return the context. + */ + ZooKeeperAdapter::ContextType _getZkContext() const + { + return (ZooKeeperAdapter::ContextType) NULL; + } + + /** + DataListener - listener that listens for ZooKeeper data events + and calls dataEventReceived on the ZkFuseFile instance + identified by the event context. + \see dataEventReceived + */ + class DataListener : public ZKEventListener { + public: + /** + Received a data event and invoke ZkFuseFile instance obtained from + event context to handle the event. + */ + virtual void eventReceived(const ZKEventSource & source, + const ZKWatcherEvent & event) + { + assert(event.getContext() != 0); + ZkFuseFile * file = static_cast(event.getContext()); + file->dataEventReceived(event); + } + }; + + /** + DataListener - listener that listens for ZooKeeper children events + and calls childrenEventReceived on the ZkFuseFile instance + identified by the event context. + \see childrenEventReceived + */ + class ChildrenListener : public ZKEventListener { + public: + /** + Received a children event and invoke ZkFuseFile instance obtained from + event context to handle the event. + */ + virtual void eventReceived(const ZKEventSource & source, + const ZKWatcherEvent & event) + { + assert(event.getContext() != 0); + ZkFuseFile * file = static_cast(event.getContext()); + file->childrenEventReceived(event); + } + }; + + /** + Globally shared DataListener. + */ + static DataListener _dataListener; + /** + Globally shared ChildrenListener. + */ + static ChildrenListener _childrenListener; + + public: + /** + Constructor. + + Sets reference count to one, i.e. it has been constructed because + a client is trying to open the path. \see _refCount. + Sets deleted to true. \see _deleted. + Sets number of currently directory opens to zero. \see _openDirCount. + Invalidate cach for children information and data. + + \param manager the ZkFuseHandleManager instance who is creating this + ZkFuseFile instance. + \param handle the handle assigned by the ZkFuseHandleManager instance + for this ZkFuseFile instance. + \param path the ZooKeeper path represented by this ZkFuseFile instance. + */ + ZkFuseFile(const ZkFuseHandleManager::SharedPtr & manager, + const int handle, + const std::string & path) + : _manager(manager), + _handle(handle), + _path(path), + _mutex(), + _refCount(1), + _deleted(true), + /* children stuff */ + _openDirCount(0), + _initializedChildren(false), + _hasChildrenListener(false), + _children(), + /* data stuff */ + _initializedData(false), + _hasDataListener(false), + _dirtyData(false), + _activeData(), + _activeStat(), + _latestData(), + _latestStat() + { + LOG_DEBUG(LOG, "constructor() path %s", _path.c_str()); + } + /** + Destructor. + */ + ~ZkFuseFile() + { + LOG_DEBUG(LOG, "destructor() path %s", _path.c_str()); + + assert(_isZombie()); + _clearChildren(); + _clearData(); + } + /** + Whether the ZooKeeper node represented by this ZkFuseFile instance + has been deleted. + \see _deleted + + \return true if it is deleted. + */ + bool isDeleted() const + { + AutoLock lock(_mutex); + return _deleted; + } + /** + Return the path of the ZooKeeper node represented by this ZkFuseFile + instance. + \see _path. + + \return the ZooKeeper node's path. + */ + const string & getPath() const + { + return _path; + } + /** + Add a childPath to the children information cache. + + \return 0 if successful, otherwise return negative errno. + \param childPath the ZooKeeper path of the child. + */ + int addChild(const std::string & childPath) + { + LOG_DEBUG(LOG, "addChild(childPath %s) path %s", + childPath.c_str(), _path.c_str()); + + int res = 0; + { + AutoLock lock(_mutex); + if (_initializedChildren) { + NodeNames::iterator it = + std::find(_children.begin(), _children.end(), childPath); + if (it == _children.end()) { + LOG_DEBUG(LOG, "child not found, adding child path"); + _children.push_back(childPath); + res = 0; + } + else { + LOG_DEBUG(LOG, "child found"); + res = -EEXIST; + } + } + } + + LOG_DEBUG(LOG, "addChild returns %d", res); + return res; + } + /** + Remove a childPath from the children information cache. + + \return 0 if successful, otherwise return negative errno. + \param childPath the ZooKeeper path of the child. + */ + int removeChild(const std::string & childPath) + { + LOG_DEBUG(LOG, "removeChild(childPath %s) path %s", + childPath.c_str(), _path.c_str()); + + int res = 0; + { + AutoLock lock(_mutex); + if (_initializedChildren) { + NodeNames::iterator it = + std::find(_children.begin(), _children.end(), childPath); + if (it != _children.end()) { + LOG_DEBUG(LOG, "child found"); + _children.erase(it); + res = 0; + } + else { + LOG_DEBUG(LOG, "child not found"); + res = -ENOENT; + } + } + } + + LOG_DEBUG(LOG, "removeChild returns %d", res); + return res; + } + /** + Invalidate the cached children information and cached data. + \see _clearChildren + \see _clearData + + \param clearChildren set to true to invalidate children information cache. + \param clearData set to true to invalidate data cache. + */ + void clear(bool clearChildren = true, bool clearData = true) + { + LOG_DEBUG(LOG, "clear(clearChildren %d, clearData %d) path %s", + clearChildren, clearData, _path.c_str()); + + { + AutoLock lock(_mutex); + if (clearChildren) { + _clearChildren(); + } + if (clearData) { + _clearData(); + } + } + } + /** + Whether reference count is zero. + \see _refCount + + \return true if reference count is zero. + */ + bool isZombie() const + { + AutoLock lock(_mutex); + + return (_refCount == 0); + } + /** + Increment the reference count of the ZkFuseFile instance. + + This method may be called by a ZkFuseFileManager instance while + holding the ZkFuseFileManager's _mutex. To avoid deadlocks, + this methods must never invoke a ZkFuseFileManager instance + directly or indirectly while holding the ZkFuseFile instance's + _mutex. + \see _refCount + + \return the post-increment reference count. + \param count value to increment the reference count by. + */ + int incRefCount(int count = 1) + { + LOG_DEBUG(LOG, "incRefCount(count %d) path %s", count, _path.c_str()); + + int res = 0; + { + AutoLock lock(_mutex); + _refCount += count; + assert(_refCount >= 0); + res = _refCount; + } + + LOG_DEBUG(LOG, "incRefCount returns %d", res); + return res; + } + /** + Decrement the reference count of the ZkFuseFile instance. + + This method may be called by a ZkFuseFileManager instance while + holding the ZkFuseFileManager's _mutex. To avoid deadlocks, + this methods must never invoke a ZkFuseFileManager instance + directly or indirectly while holding the ZkFuseFile instance's + _mutex. + \see _refCount + + \return the post-decrement reference count. + \param count value to decrement the reference count by. + */ + int decRefCount(int count = 1) + { + return incRefCount(-count); + } + /** + Increment the count of number times the ZkFuseFile instance has + been opened as a directory. + + This count is incremented by opendir and decremented by releasedir. + \see _openDirCount. + + \return the post-increment count. + \param count the value to increment the count by. + */ + int incOpenDirCount(int count = 1) + { + LOG_DEBUG(LOG, "incOpenDirCount(count %d) path %s", + count, _path.c_str()); + + int res = 0; + { + AutoLock lock(_mutex); + _openDirCount += count; + assert(_openDirCount >= 0); + res = _openDirCount; + assert(_openDirCount <= _refCount); + } + + LOG_DEBUG(LOG, "incOpenDirCount returns %d", res); + return res; + + } + /** + Decrement the count of number times the ZkFuseFile instance has + been opened as a directory. + + This count is incremented by opendir and decremented by releasedir. + \see _openDirCount. + + \return the post-decrement count. + \param count the value to decrement the count by. + */ + int decOpenDirCount(int count = 1) + { + return incOpenDirCount(-count); + } + /** + Whether ZkFuse should present the ZooKeeper node as a ZkFuse + directory by taking into account the specified ZkFuseNameType. + + The ZkFuseNameType may override the default ZkFuse presentation of + a ZooKeeper node. + \see _isDirNameType + + \return true if ZkFuse should present the ZooKeeper node as a ZkFuse + directory. + \param nameType specifies the ZkFuseNameType. + */ + bool isDirNameType(ZkFuseNameType nameType) const + { + return _isDirNameType(nameType, true); + } + /** + Whether ZkFuse should present the ZooKeeper node as a ZkFuse + regular file by taking into account the specified ZkFuseNameType. + + The ZkFuseNameType may override the default ZkFuse presentation of + a ZooKeeper node. + \see _isRegNameType + + \return true if ZkFuse should present the ZooKeeper node as a ZkFuse + regular file. + \param nameType specifies the ZkFuseNameType. + */ + bool isRegNameType(ZkFuseNameType nameType) const + { + return _isRegNameType(nameType, true); + } + /** + Get the active data. + \see _activeData + + \param data return data here. + */ + void getData(Data & data) const + { + AutoLock lock(_mutex); + + data = _activeData; + } + /** + Set the active data. + \see _activeData + + Return -EFBIG is the data to be written is bigger than the maximum + permitted size (and no data is written). + + \return 0 if successful, otherwise return negative errno. + \param data set to this data. + \param doFlush whether to flush the data to the ZooKeeper node. + */ + int setData(const Data & data, bool doFlush) + { + LOG_DEBUG(LOG, "setData(doFlush %d) path %s", doFlush, _path.c_str()); + int res = 0; + + if (data.size() > maxDataFileSize) { + res = -EFBIG; + } + else { + AutoLock lock(_mutex); + _activeData = data; + _dirtyData = true; + if (doFlush) { + res = _flush(); + } + } + + LOG_DEBUG(LOG, "setData() returns %d", res); + return res; + } + /** + Update the children information and the data caches as needed. + + This method is invoked when a ZkFuse regular file or directory + implemented by this ZkFuseFile instance is opened, e.g. + using open or opendir. It attempts to: + - make sure that the cache has valid children information + - register for watches for changes if no previous watches have + been registered. + + The newFile flag indicates if the ZkFuseFile instance has just + been constructed and that ZooKeeper has not been contacted to + determine if the ZooKeeper path for this file really exist. + When a ZkFuseFile instance is created, the _deleted flag is set to + true because it is safer to assume that the ZooKeeper node does + not exist. The newFile flag causes the _deleted flag to be + ignored and ZooKeeper to be contacted to update the caches. + + If the newFile flag is false, then the ZkFuseFile instance is + currently open and have been opened before. Hence, these previous + opens should have contacted ZooKeeper and would like learned from + ZooKeeper whether the ZooKeeper path exists. Therefore, + the _deleted flag should be trustworthy, i.e. it has accurate + information on whether the ZooKeeper path actually exists. + + \return 0 if successful, otherwise return negative errno. + \param newFile set to true if the ZkFuseFile instance is newly created. + */ + int update(bool newFile) + { + LOG_DEBUG(LOG, "update(newFile %d) path %s", newFile, _path.c_str()); + + int res = 0; + { + AutoLock lock(_mutex); + + /* At this point, cannot be zombie. + */ + assert(!_isZombie()); + if (!newFile && _deleted) { + /* Deleted file, don't bother to update caches */ + LOG_DEBUG(LOG, "deleted, not new file"); + res = -ENOENT; + } + else { + try { + LOG_DEBUG(LOG, "initialized children %d, data %d", + _initializedChildren, _initializedData); + LOG_DEBUG(LOG, "has children watch %d, data watch %d", + _hasChildrenListener, _hasDataListener); + /* + * Children handling starts here. + * If don't have children listener, + * then must establish listener. + * If don't have cached children information, + * then must get children information. + * It just happens, that the same ZooKeeper API + * is used for both. + */ + if (_initializedChildren == false || + _hasChildrenListener == false +#ifdef ZOOKEEPER_ROOT_CHILDREN_WATCH_BUG + /* HACK for root node because changes to children + * on a root node does not cause children watches to + * fire. + */ + || _path.length() == 1 +#endif // ZOOKEEPER_ROOT_CHILDREN_WATCH_BUG + ) { + LOG_DEBUG(LOG, "update children"); + NodeNames children; + _manager->getCommon().getZkAdapter()-> + getNodeChildren( children, _path, + &_childrenListener, _getZkContext()); + _hasChildrenListener = true; + LOG_DEBUG(LOG, "update children done"); + _children.swap(children); + _initializedChildren = true; + /* Since getNodeChildren is successful, the + * path must exist */ + _deleted = false; + } + else { + /* Children information is fresh since + * it is initialized and and have been + * updated by listener. + */ + } + /* + * Data handling starts here. + */ + assert(newFile == false || _isOnlyRegOpen()); + if (!_isOnlyRegOpen()) { + /* If is already currently opened by someone, + * then don't update data with latest from ZooKeeper, + * use current active data (which may be initialized + * or not). + * \see _activeData + */ + LOG_DEBUG(LOG, "node currently in-use, no data update"); + } + else { + /* If not opened/reopened by someone else, + * then perform more comprehensive checks of + * to make data and listener is setup correctly. + * If don't have data listener, + * then must establish listener. + * If don't have cached data, + * then must get data. + * It just happens, that the same ZooKeeper API + * is used for both. + */ + LOG_DEBUG(LOG, "node first use or reuse"); + if (_initializedData == false || + _hasDataListener == false) { + /* Don't have any data for now or need to register + * for callback */ + LOG_DEBUG(LOG, "update data"); + _latestData = + _manager->getCommon().getZkAdapter()-> + getNodeData(_path, &_dataListener, + _getZkContext(), + &_latestStat); + _hasDataListener = true; + LOG_DEBUG(LOG, + "update data done, latest version %d", + _latestStat.version); + /* Since getNodeData is successful, the + * path must exist. */ + _deleted = false; + } + else { + /* Data is fresh since it is initialized and + * and have been updated by listener. + */ + } + /* Update active data to the same as the most + * recently acquire data. + */ + _activeData = _latestData; + _activeStat = _latestStat; + _initializedData = true; + _dirtyData = false; + LOG_DEBUG(LOG, "update set active version %d", + _activeStat.version); + } + res = 0; + } catch (const ZooKeeperException & e) { + /* May have ZNONODE exception if path does exist. */ + if (e.getZKErrorCode() == ZNONODE) { + LOG_DEBUG(LOG, "update %s exception %s", + _path.c_str(), e.what()); + /* Path does not exist, set _deleted, + * clear children information cache + */ + _deleted = true; + _clearChildren(); + res = -ENOENT; + } else { + LOG_ERROR(LOG, "update %s exception %s", + _path.c_str(), e.what()); + res = -EIO; + } + } + } + } + + LOG_DEBUG(LOG, "update returns %d", res); + return res; + } + /** + Process a data event. + + This method may: + - Invalidate the data cache. + - Invoke ZooKeeper to update the data cache and register a new + data watch so that the cache can be kept in-sync with the + ZooKeeper node's data. + + This method does not change the active data. Active data will be + changed to a later version by update() at the appropriate time. + \see update. + */ + void dataEventReceived(const ZKWatcherEvent & event) + { + bool reclaim = false; + int eventType = event.getType(); + int eventState = event.getState(); + + /* + IMPORTANT: + + Do not mark ZkFuseFile instance as deleted when a ZOO_DELETED_EVENT + is received without checking with ZooKeeper. An example of + problematic sequence would be: + + 1. Create node. + 2. Set data and watch. + 3. Delete node. + 4. Create node. + 5. Deleted event received. + + It is a bug to mark the ZkFuseFile instance as deleted after + step 5 because the node exists. + + Therefore, this method should always contact ZooKeeper to keep the + data cache (and deleted status) up-to-date if necessary. + */ + LOG_DEBUG(LOG, "dataEventReceived() path %s, type %d, state %d", + _path.c_str(), eventType, eventState); + { + AutoLock lock(_mutex); + + _hasDataListener = false; + /* If zombie, then invalidate cached data. + * This clears _initializedData and eliminate + * the need to get the latest data from ZooKeeper and + * re-register data watch. + */ + if (_isZombie() && _initializedData) { + LOG_DEBUG(LOG, "invalidate data"); + _clearData(); + } + else if ((_refCount - _openDirCount) > 0) { + /* Don't invalidate cached data because clients of currently + * open files don't expect the data to change from under them. + * If data acted upon by these clients have become stale, + * then the clients will get an error when ZkFuse attempts to + * flush dirty data. The clients will not get error + * notification if they don't modify the stale data. + * + * If data cache is cleared here, then the following code + * to update data cache and re-register data watch will not + * be executed and may result in the cached data being + * out-of-sync with ZooKeeper. + */ + LOG_WARN(LOG, + "%s data has changed while in-use, " + "type %d, state %d, refCount %d", + _path.c_str(), eventType, eventState, _refCount); + } + /* If cache was valid and still connected + * then get the latest data from ZooKeeper + * and re-register data watch. This is required to keep + * the data cache in-sync with ZooKeeper. + */ + if (_initializedData && + eventState == ZOO_CONNECTED_STATE + ) { + try { + LOG_DEBUG(LOG, "register data watcher"); + _latestData = + _manager->getCommon().getZkAdapter()-> + getNodeData(_path, &_dataListener, _getZkContext(), + &_latestStat); + _hasDataListener = true; + LOG_DEBUG(LOG, + "get data done, version %u, cversion %u done", + _latestStat.version, _latestStat.cversion); + _deleted = false; + } catch (const ZooKeeperException & e) { + if (e.getZKErrorCode() == ZNONODE) { + _deleted = true; + _clearChildren(); + } + LOG_ERROR(LOG, "dataEventReceived %s exception %s", + _path.c_str(), e.what()); + } + } + } + LOG_DEBUG(LOG, "dataEventReceived return %d", reclaim); + } + /** + Process a children event. + + This method may: + - Invalidate the children information cache. + - Invoke ZooKeeper to update the children cache and register a new + data watch so that the cache can be kept in-sync with the + ZooKeeper node's children information. + */ + void childrenEventReceived(const ZKWatcherEvent & event) + { + bool reclaim = false; + int eventType = event.getType(); + int eventState = event.getState(); + + LOG_DEBUG(LOG, "childrenEventReceived() path %s, type %d, state %d", + _path.c_str(), eventType, eventState); + { + AutoLock lock(_mutex); + + _hasChildrenListener = false; + /* If zombie or disconnected, then invalidate cached children + * information. This clears _initializedChildren and eliminate + * the need to get the latest children information and + * re-register children watch. + */ + if (_initializedChildren && + (_isZombie() || eventState != ZOO_CONNECTED_STATE)) { + LOG_DEBUG(LOG, "invalidate children"); + _clearChildren(); + } + else if (_initializedChildren) { + /* Keep cached children information so that we have some + * children information if get new children information + * fails. If there is failure, then on next open, + * update() will attempt again to get children information + * again because _hasChildrenListener will be false. + * + * If children information cache is cleared here, then + * the following code to update children information cache + * and re-register children watch will not be executed + * and may result in the cached children information being + * out-of-sync with ZooKeeper. + * + * The children cache will be cleared if unable to + * get children and re-establish watch. + */ + LOG_WARN(LOG, + "%s children has changed while in-use, " + "type %d, state %d, refCount %d", + _path.c_str(), eventType, eventState, _refCount); + } + /* If children cache was valid and still connected, + * then get the latest children information from ZooKeeper + * and re-register children watch. This is required to + * keep the children information cache in-sync with ZooKeeper. + */ + if (_initializedChildren && + eventState == ZOO_CONNECTED_STATE + ) { + /* Should try to keep the cache in-sync, register call + * callback again and get current children. + */ + try { + LOG_DEBUG(LOG, "update children"); + NodeNames children; + _manager->getCommon().getZkAdapter()-> + getNodeChildren(children, _path, + &_childrenListener, _getZkContext()); + _hasChildrenListener = true; + LOG_DEBUG(LOG, "update children done"); + _children.swap(children); + _deleted = false; + } catch (const ZooKeeperException & e) { + if (e.getZKErrorCode() == ZNONODE) { + _deleted = true; + _clearChildren(); + } + LOG_ERROR(LOG, "childrenEventReceived %s exception %s", + _path.c_str(), e.what()); + _children.clear(); + } + } + } + LOG_DEBUG(LOG, "childrenEventReceived returns %d", reclaim); + } + /** + Truncate or expand the size of the cached active data. + + This method only changes the size of the cached active data. + This change is committed to ZooKeeper when the cached data + is written to the ZooKeeper node by flush(). + + Return -EFBIG is the requested size exceeds the maximum. + + \return 0 if successful, otherwise negative errno. + \param size the requested size. + */ + int truncate(off_t size) + { + int res = 0; + + { + AutoLock lock(_mutex); + res = _truncate(size); + } + + return res; + } + /** + Copy range of active data into specified output buffer. + + \return if successful, return number of bytes copied, otherwise + return negative errno. + \param buf address of the output buffer. + \param size size of the output buffer and desired number of bytes to copy. + \param offset offset into active data to start copying from. + */ + int read(char *buf, size_t size, off_t offset) const + { + LOG_DEBUG(LOG, "read(size %zu, off_t %zu) path %s", + size, offset, _path.c_str()); + + int res = 0; + + { + AutoLock lock(_mutex); + if (!_initializedData) { + LOG_DEBUG(LOG, "not initialized"); + res = -EIO; + } + else { + off_t fileSize = _activeData.size(); + if (offset > fileSize) { + LOG_DEBUG(LOG, "offset > fileSize %zu", fileSize); + res = 0; + } + else { + if (offset + size > fileSize) { + size = fileSize - offset; + LOG_DEBUG(LOG, + "reducing read size to %zu for fileSize %zu", + size, fileSize); + } + copy(_activeData.begin() + offset, + _activeData.begin() + offset + size, + buf); + res = size; + } + } + } + + LOG_DEBUG(LOG, "read returns %d", res); + return res; + } + /** + Copy buffer content to active data. + + \return if successful, return number of bytes copied, otherwise + return negative errno. + \param buf address of the buffer. + \param size size of the input buffer and desired number of bytes to copy. + \param offset offset into active data to start copying to. + */ + int write(const char *buf, size_t size, off_t offset) + { + LOG_DEBUG(LOG, "write(size %zu, off_t %zu) path %s", + size, offset, _path.c_str()); + + int res = 0; + + { + AutoLock lock(_mutex); + if (!_initializedData) { + LOG_DEBUG(LOG, "not initialized"); + res = -EIO; + } + else if (offset >= maxDataFileSize) { + LOG_DEBUG(LOG, "offset > maxDataFileSize %u", maxDataFileSize); + res = -ENOSPC; + } + else { + if (offset + size > maxDataFileSize) { + LOG_DEBUG(LOG, + "reducing write size to %zu " + "for maxDataFileSize %u", + size, maxDataFileSize); + size = maxDataFileSize - offset; + } + off_t fileSize = _activeData.size(); + if (offset + size > fileSize) { + LOG_DEBUG(LOG, "resizing to %zu", offset + size); + _activeData.resize(offset + size); + } + copy(buf, buf + size, _activeData.begin() + offset); + memcpy(&_activeData[offset], buf, size); + _dirtyData = true; + res = size; + } + } + + LOG_DEBUG(LOG, "write returns %d", res); + return res; + } + /** + Flush data to the ZooKeeper node. + + If cached active data has been modified, flush it to the ZooKeeper node. + Returns -EIO if the data cannot be written because the cached active + data is not the expected version, i.e. ZooKeeper returns ZBADVERSION. + -EIO may also indicate a more general failure, such as unable to + communicate with ZooKeeper. + + \return 0 if successful, otherwise negative errno. + */ + int flush() + { + int res = 0; + { + AutoLock lock(_mutex); + res = _flush(); + } + return res; + } + /** + Close of the ZkFuse regular file represented by the ZkFuseFile instance. + + This may: + - Flush dirty data to the ZooKeeper node, and return the result of the + flush operation. + - Reclaim the ZkFuseFile instance. + \see ZkFuseHandleManaer::reclaimIfNecessary + + \return result of flush operation - 0 if successful, + otherwise negative errno. + */ + int close() + { + LOG_DEBUG(LOG, "close() path %s", _path.c_str()); + int res = 0; + + bool reclaim = false; + { + AutoLock lock(_mutex); + res = _flush(); + if (_deleted) { + _clearData(); + _clearChildren(); + } + } + _manager->deallocate(_handle); + + LOG_DEBUG(LOG, "close returns %d", res); + return res; + } + /** + Get ZkFuse regular file or directory attributes. + + \return 0 if successful, otherwise negative errno. + \param stbuf return attributes here. + \param nameType specifies the ZkFuseNameType of the ZkFuse path used + to get attributes. It influences whether the directory + or regular file attributes are returned. + */ + int getattr(struct stat & stbuf, ZkFuseNameType nameType) const + { + LOG_DEBUG(LOG, "getattr(nameType %d) path %s", + int(nameType), _path.c_str()); + + int res = 0; + int version = 0; + std::string metaPath; + { + AutoLock lock(_mutex); + + res = _getattrNoMetaAccess(stbuf, nameType); + if (res == 0) { + version = _activeStat.version; + metaPath = _getChildPath( + ((stbuf.st_mode & S_IFMT) == S_IFREG) ? + _manager->getCommon().getRegMetadataName() : + _manager->getCommon().getDirMetadataName()); + if (_hasChildPath(metaPath) == false) { + metaPath.clear(); + } + } + } + if (res == 0 && metaPath.empty() == false) { + Data data; + int metaRes = _manager->getData(metaPath, data); + LOG_DEBUG(LOG, "metaRes %d dataSize %zu", + metaRes, data.size()); + if (metaRes == 0 && data.empty() == false) { + Metadata metadata; + _decodeMetadata(data, metadata); + LOG_DEBUG(LOG, "metadata version %u active version %u", + metadata.version, version); + if (metadata.version == version) { + /* IMPORTANT: + * Must convert from millisecs to secs before setting + * st_atime and st_mtime to avoid truncation error + * due to 64-bit to 32-bit conversion. + */ + stbuf.st_atime = millisecsToSecs(metadata.atime); + stbuf.st_mtime = millisecsToSecs(metadata.mtime); + } + } + } + + LOG_DEBUG(LOG, "getattr returns %d", res); + return res; + } + /** + Read directory entries. + This interface is defined by FUSE. + + \return 0 if successful, otherwise negative errno. + \param buf output buffer to store output directory entries. + \param filler function used to fill the output buffer. + \param offset start filling from a specific offset. + */ + int readdir(void *buf, fuse_fill_dir_t filler, off_t offset) const + { + LOG_DEBUG(LOG, "readdir(offset %zu) path %s", offset, _path.c_str()); + int res = 0; + + int dataFileIndex = -1; + unsigned leftTrim = 0; + typedef std::pair DirEntry; + typedef std::vector DirEntries; + DirEntries dirEntries; + + /* Get directory entries in two phase to avoid invoking + * ZkFuseHandleManager while holding _mutex. + * In first phase, get all the names of child nodes starting + * at offset. Also remember their index for use in second phase. + * The first phase hold _mutex. + */ + { + AutoLock lock(_mutex); + if (!_isInitialized()) { + LOG_DEBUG(LOG, "not initialized"); + res = -EIO; + } + else { + leftTrim = (_path.length() == 1 ? 1 : _path.length() + 1); + unsigned start = offset; + unsigned i; + for (i = start; i < _children.size(); i++) { + const std::string & childName = _children[i]; + if (_isMeta(childName)) { + continue; + } + dirEntries.push_back(DirEntry(childName, i)); + } + if (i == _children.size() && !_activeData.empty()) { + dataFileIndex = i + 1; + } + res = 0; + } + } + + /* Second phase starts here. + * DONOT hold _mutex as this phase invokes ZkFuseHandleManager to + * get attributes for the directory entries. + */ + if (res == 0) { + bool full = false; + for (DirEntries::const_iterator it = dirEntries.begin(); + it != dirEntries.end(); + it++) { + + ZkFuseAutoHandle childAutoHandle(_manager, it->first); + int childRes = childAutoHandle.get(); + if (childRes >= 0) { + struct stat stbuf; + int attrRes = childAutoHandle.getFile()-> + getattr(stbuf, ZkFuseNameDefaultType); + if (attrRes == 0) { + if (filler(buf, it->first.c_str() + leftTrim, + &stbuf, it->second + 1)) { + LOG_DEBUG(LOG, "filler full"); + full = true; + break; + } + } + } + } + if (full == false && dataFileIndex != -1) { + LOG_DEBUG(LOG, "include data file name"); + struct stat stbuf; + int attrRes = getattr(stbuf, ZkFuseNameRegType); + if (attrRes == 0) { + filler(buf, + _manager->getCommon().getDataFileName().c_str(), + &stbuf, dataFileIndex + 1); + } + } + } + + LOG_DEBUG(LOG, "readdir returns %d", res); + return res; + } + /** + Set the access time and modified time. + + Set the access and modifieds times on the ZkFuse regular file + or directory represented by this ZkFuseFile instance. + + Since there is no interface to change these times on a + ZooKeeper node, ZkFuse simulates this by writing to a + metadata node which is a child node of the ZooKeeper node. + ZkFuse writes the current version, the specified access + and modified times to the metadata node. + + When get attributes is invoked, get attributes will check + for the presence of this metadata node and if the version + number matches the current data version, then get attributes + will return the access and modified times stored in the + metadata node. + + \return 0 if successful, otherwise negative errno. + \param atime access time in milliseconds. + \param mtime modified time in milliseconds. + \param nameType specifies the ZkFuseNameType of the ZkFuse path used + to set access and modified times. It influences + whether the directory or regular file access and + modified times are set. + */ + int utime(uint64_t atime, uint64_t mtime, ZkFuseNameType nameType) + { + LOG_DEBUG(LOG, + "utime(atime %llu, mtime %llu, nameType %d) path %s", + (unsigned long long) atime, + (unsigned long long) mtime, + (int) nameType, _path.c_str()); + + int res = 0; + std::string metaPath; + bool exists = false; + Data data; + { + AutoLock lock(_mutex); + + if (!_isInitialized()) { + LOG_DEBUG(LOG, "not initialized"); + res = -EIO; + } + else { + bool isRegular = _isRegNameType(nameType); + Metadata metadata; + metadata.version = _activeStat.version; + metadata.atime = atime; + metadata.mtime = mtime; + metaPath = _getChildPath( + isRegular ? + _manager->getCommon().getRegMetadataName() : + _manager->getCommon().getDirMetadataName()); + exists = _hasChildPath(metaPath); + _encodeMetadata(metadata, data); + res = 0; + } + } + if (res == 0 && metaPath.empty() == false) { + res = _manager->setData(metaPath, data, exists, true); + } + + LOG_DEBUG(LOG, "utime returns %d", res); + return res; + } + /** + Remove a ZkFuse directory. + + If force is true, then the ZooKeeper node and its decendants + will be deleted. + + If force is false, then this method implements the semantics + of removing a ZkFuse directory. It will delete the ZooKeeper node + only if the ZooKeeper node have no data and no non-metadata + children. + - Return -ENOTDIR if the ZooKeeper node is not considered + to be a directory (after taking into consideration the specified + ZkFuseNameType). + - Return -ENOTEMPTY if the ZooKeeper node has data or it has + non-metadata children. + - Return -ENOENT if the ZooKeeper cannot be deleted, usually this + is because it does not exist. + + \return 0 if successful, otherwise negative errno. + \param nameType the ZkFuseNameType of the path used to specify the + directory to be removed. It influences whether ZkFuse + considers the ZooKeeper node to be a regular file or + directory. \see ZkFuseNameType + \param force set to true to bypass ZkFuse rmdir semantic check. + */ + int rmdir(ZkFuseNameType nameType, bool force) + { + int res = 0; + + { + AutoLock lock(_mutex); + res = _rmdir(nameType, force); + } + if (res == 0) { + _manager->removeChildFromParent(_path); + } + return res; + } + /** + Remove a ZkFuse regular file. + + This method implements the semantics of removing a ZkFuse regular file. + - If the ZkFuse regular file represents the data part of the + ZooKeeper node which is presented as a ZkFuse directory, + the regular file is virtually deleted by truncating the + ZooKeeper node's data. Readdir will not synthesize a regular + file entry for the data part of a ZooKeeper node if + the ZooKeeper node has no data. + - If the ZkFuse regular file represents the data part of the + ZooKeeper node which is presented as a ZkFuse regular file, + the ZooKeeper node and its decendants are deleted. + + Returns -EISDIR if the ZkFuse regular file cannot be deleted + because ZkFuse consider it to be a directory. + + \return 0 if successful, otherwise negative errno. + \param nameType the ZkFuseNameType of the path used to specify the + directory to be removed. It influences whether ZkFuse + considers the ZooKeeper node to be a regular file or + directory. \see ZkFuseNameType + */ + int unlink(ZkFuseNameType nameType) + { + int res = 0; + { + AutoLock lock(_mutex); + res = _unlink(nameType); + } + if (res == 0) { + _manager->removeChildFromParent(_path); + } + return res; + } + /** + Utility function to construct a ZooKeeper path for a child + of a ZooKeeper node. + + \return the full path of the child. + \param parent the parent's full path. + \param child the child's parent component. + */ + static std::string buildChildPath(const std::string & parent, + const std::string & child) + { + std::string s; + s.reserve(parent.length() + child.length() + 32); + if (parent.length() > 1) { + // special case for root dir + s += parent; + } + s += "/"; + s += child; + return s; + } +}; + +ZkFuseFile::DataListener ZkFuseFile::_dataListener; +ZkFuseFile::ChildrenListener ZkFuseFile::_childrenListener; + +void ZkFuseAutoHandle::reset(int handle) +{ + int old = _handle; + ZkFuseFilePtr oldFile = _file; + _handle = handle; + _initFile(); + if (old >= 0) { + assert(oldFile != NULL); + oldFile->close(); + } +} + +ZkFuseHandleManager::Handle +ZkFuseHandleManager::allocate(const std::string & path, bool & newFile) +{ + LOG_DEBUG(LOG, "allocate(path %s)", path.c_str()); + + Handle handle; + { + AutoLock lock(_mutex); + Map::iterator it = _map.find(path); + if (it == _map.end()) { + LOG_DEBUG(LOG, "not found"); + if (_freeList.empty()) { + handle = _files.size(); + _files.resize(handle + 1); + LOG_DEBUG(LOG, "free list empty, resize handle %d", handle); + } else { + handle = _freeList.back(); + _freeList.pop_back(); + LOG_DEBUG(LOG, "get from free list, handle %d", handle); + } + assert(_files[handle] == NULL); + _files[handle] = + new ZkFuseFile(SharedPtr(_thisWeakPtr), handle, path); + /* Not really supposed to invoke the new ZkFuseFile instance + * because this method is not supposed to invoke ZkFuseFile + * methods that while holding _mutex. However, it is safe + * to do without casuing deadlock because these methods + * are known not to invoke other methods, especially one + * that invoke this ZkFuseHandleManager instance. + */ + assert(_files[handle]->incRefCount(0) == 1); + _map[path] = handle; + _numInUse++; + LOG_DEBUG(LOG, "numInUse %u", _numInUse); + newFile = true; + } else { + LOG_DEBUG(LOG, "found"); + handle = it->second; + assert(_files[handle] != NULL); + int refCount = _files[handle]->incRefCount(); + if (refCount == 1) { + _numInUse++; + LOG_DEBUG(LOG, "resurrecting zombie, numInUse %u", _numInUse); + } + newFile = false; + } + } + + LOG_DEBUG(LOG, "allocate returns %d, newFile %d", handle, newFile); + return handle; +} + +void ZkFuseHandleManager::deallocate(Handle handle) +{ + LOG_DEBUG(LOG, "deallocate(handle %d)", handle); + + if (handle >= 0) { + bool reclaim = false; + ZkFuseFilePtr file; + { + AutoLock lock(_mutex); + file = _files[handle]; + assert(file != NULL); + int refCount = file->decRefCount(); + const std::string & path = file->getPath(); + LOG_DEBUG(LOG, "path %s ref count %d", path.c_str(), refCount); + if (refCount == 0) { + _numInUse--; + unsigned numCached = _files.size() - _numInUse; + if (numCached > _common.getCacheSize()) { + LOG_TRACE(LOG, + "reclaim path %s, cacheSize %u, filesSize %zu, " + "numInUse %u", + path.c_str(), + _common.getCacheSize(), _files.size(), _numInUse); + _map.erase(path); + _files[handle] = NULL; + _freeList.push_back(handle); + reclaim = true; + } + } + } + if (reclaim) { + delete file; + } + } + else { + LOG_DEBUG(LOG, "handle invalid"); + } + + LOG_DEBUG(LOG, "deallocate done"); +} + +void ZkFuseHandleManager::eventReceived(const ZKWatcherEvent & event) +{ + int eventType = event.getType(); + int eventState = event.getState(); + const std::string & path = event.getPath(); + LOG_DEBUG(LOG, "eventReceived() eventType %d, eventState %d, path %s", + eventType, eventState, path.c_str()); + + if (eventType == ZOO_DELETED_EVENT || + eventType == ZOO_CHANGED_EVENT || + eventType == ZOO_CHILD_EVENT) { + { + AutoLock lock(_mutex); + Map::iterator it = _map.find(path); + if (it != _map.end()) { + LOG_DEBUG(LOG, "path found"); + Handle handle = it->second; + ZkFuseFilePtr file = _files[handle]; + assert(file != NULL); + /* Prevent the ZkFuseFile instance from being + * deleted while handling the event. + */ + int refCount = file->incRefCount(); + if (refCount == 1) { + _numInUse++; + } + /* Pretent to be dir open. + */ + int dirCount = file->incOpenDirCount(); + { + /* _mutex is unlocked in this scope */ + AutoUnlockTemp autoUnlockTemp(lock); + if (eventType == ZOO_CHILD_EVENT) { + file->childrenEventReceived(event); + } + else if (eventType == ZOO_CHANGED_EVENT) { + file->dataEventReceived(event); + } + else { + assert(eventType == ZOO_DELETED_EVENT); + file->dataEventReceived(event); + // file->childrenEventReceived(event); + } + file->decOpenDirCount(); + deallocate(handle); + } + } + else { + LOG_WARN(LOG, + "path %s not found for event type %d, event state %d", + path.c_str(), eventType, eventState); + } + } + } + else if (eventType == ZOO_SESSION_EVENT) { + if (eventState == ZOO_CONNECTING_STATE) { + LOG_TRACE(LOG, "*** CONNECTING ***"); + { + AutoLock lock(_mutex); + for (int handle = 0; handle < _files.size(); handle++) { + ZkFuseFilePtr file = _files[handle]; + if (file != NULL) { + /* prevent the ZkFuseFile instance from being + * deleted while handling the event. + */ + int refCount = file->incRefCount(); + if (refCount == 1) { + _numInUse++; + } + /* Pretent to be dir open. + */ + int dirCount = file->incOpenDirCount(); + { + /* _mutex is unlocked in this scope */ + AutoUnlockTemp autoUnlockTemp(lock); + file->dataEventReceived(event); + file->childrenEventReceived(event); + file->decOpenDirCount(); + deallocate(handle); + } + /* this will eventually call decrement ref count */ + } + } + } + } + else if (eventState == ZOO_CONNECTED_STATE) { + LOG_TRACE(LOG, "*** CONNECTED ***"); + } + } + else { + LOG_WARN(LOG, + "eventReceived ignoring event type %d, event state %d, " + "path %s", eventType, eventState, path.c_str()); + } +} + +int ZkFuseHandleManager::getData(const std::string & path, + Data & data) +{ + LOG_DEBUG(LOG, "getData(path %s)", path.c_str()); + + int res = 0; + data.clear(); + ZkFuseAutoHandle autoHandle(SharedPtr(_thisWeakPtr), path); + res = autoHandle.get(); + if (res >= 0) { + autoHandle.getFile()->getData(data); + res = 0; + } + + LOG_DEBUG(LOG, "getData returns %d", res); + return res; +} + +int ZkFuseHandleManager::setData(const std::string & path, + const Data & data, + bool exists, + bool doFlush) +{ + LOG_DEBUG(LOG, "setData(path %s, exists %d)\n%s", + path.c_str(), exists, data.c_str()); + + int res = 0; + if (exists) { + res = open(path, false); + } else { + bool created; + res = mknod(path, S_IFREG, true, created); + } + if (res >= 0) { + ZkFuseAutoHandle autoHandle(SharedPtr(_thisWeakPtr), res); + res = autoHandle.getFile()->setData(data, doFlush); + } + + LOG_DEBUG(LOG, "setData returns %d", res); + return res; +} + +int ZkFuseHandleManager::mknod(const std::string & path, + mode_t mode, + bool mayExist, + bool & created) +{ + LOG_DEBUG(LOG, "mknod(path %s, mode %o, mayExist %d)", + path.c_str(), mode, mayExist); + + int res = 0; + created = false; + try { + if (S_ISREG(mode) == false && S_ISDIR(mode) == false) { + LOG_DEBUG(LOG, "bad mode %o", mode); + res = -EINVAL; + } + else { + Data data; + LOG_DEBUG(LOG, "create %s", path.c_str()); + created = + _common.getZkAdapter()->createNode(path, data, 0, false); + if (created) { + LOG_DEBUG(LOG, "created"); + if (S_ISDIR(mode)) { + /* is mkdir - create directory marker */ + std::string dirMetaPath = ZkFuseFile::buildChildPath + (path, _common.getDirMetadataName()); + LOG_DEBUG(LOG, "create %s", dirMetaPath.c_str()); + bool created; + int metaRes = mknod(dirMetaPath, S_IFREG, true, created); + if (metaRes >= 0) { + getFile(metaRes)->close(); + } + } + addChildToParent(path); + LOG_DEBUG(LOG, "open after create"); + res = open(path, true); + } else { + LOG_DEBUG(LOG, "create failed"); + int openRes = open(path, false); + if (openRes >= 0) { + if (mayExist == false) { + LOG_DEBUG(LOG, "create failed because already exist"); + getFile(openRes)->close(); + res = -EEXIST; + } else { + res = openRes; + } + } else { + LOG_DEBUG(LOG, "create failed but does not exist"); + res = -ENOENT; + } + } + } + } catch (const ZooKeeperException & e) { + LOG_ERROR(LOG, "mknod %s exception %s", path.c_str(), e.what()); + res = -EIO; + } + + LOG_DEBUG(LOG, "mknod returns %d created %d", res, created); + return res; +} + +int ZkFuseHandleManager::mkdir(const char * path, mode_t mode) +{ + LOG_DEBUG(LOG, "mkdir(path %s, mode %o)", path, mode); + + int res = 0; + try { + ZkFuseNameType nameType; + std::string zkPath = getZkPath(path, nameType); + mode = (mode & ~S_IFMT) | S_IFDIR; + ZkFuseAutoHandle autoHandle + (SharedPtr(_thisWeakPtr), zkPath, mode, false); + res = autoHandle.get(); + if (res >= 0) { + res = 0; + } + } catch (const std::exception & e) { + LOG_ERROR(LOG, "mkdir %s exception %s", path, e.what()); + res = -EIO; + } + + LOG_DEBUG(LOG, "mkdir returns %d", res); + return res; +} + +int ZkFuseHandleManager::open(const std::string & path, bool justCreated) +{ + LOG_DEBUG(LOG, "open(path %s, justCreated %d)", + path.c_str(), justCreated); + + int res = 0; + try { + bool newFile; + Handle handle = allocate(path, newFile); + ZkFuseAutoHandle autoHandle(SharedPtr(_thisWeakPtr), handle); + res = getFile(handle)->update(newFile || justCreated); + if (res == 0) { + res = handle; + autoHandle.release(); + } + } catch (const ZooKeeperException & e) { + LOG_ERROR(LOG, "open %s exception %s", path.c_str(), e.what()); + res = -EIO; + } + + LOG_DEBUG(LOG, "open returns %d", res); + return res; +} + +int ZkFuseHandleManager::rmdir(const char * path, bool force) +{ + LOG_DEBUG(LOG, "rmdir(path %s, force %d)", path, force); + + int res = 0; + + try { + ZkFuseNameType nameType; + std::string zkPath = getZkPath(path, nameType); + ZkFuseAutoHandle autoHandle(SharedPtr(_thisWeakPtr), zkPath); + res = autoHandle.get(); + if (res >= 0) { + res = autoHandle.getFile()->rmdir(nameType, force); + } + } catch (const std::exception & e) { + LOG_ERROR(LOG, "rmdir %s exception %s", path, e.what()); + res = -EIO; + } + + LOG_DEBUG(LOG, "rmdir returns %d", res); + return res; +} + + +int +ZkFuseHandleManager::unlink(const char * path) +{ + LOG_DEBUG(LOG, "unlink(path %s)", path); + + ZkFuseNameType nameType; + std::string zkPath = getZkPath(path, nameType); + ZkFuseAutoHandle autoHandle(SharedPtr(_thisWeakPtr), zkPath); + int res = autoHandle.get(); + if (res >= 0) { + res = autoHandle.getFile()->unlink(nameType); + } + + LOG_DEBUG(LOG, "unlink returns %d", res); + return res; +} + +int ZkFuseHandleManager::getattr(const char *path, struct stat &stbuf) +{ + LOG_DEBUG(LOG, "getattr(path %s)", path); + + int res = 0; + try { + ZkFuseNameType nameType; + std::string zkPath = getZkPath(path, nameType); + ZkFuseAutoHandle autoHandle(SharedPtr(_thisWeakPtr), zkPath); + res = autoHandle.get(); + if (res >= 0) { + res = autoHandle.getFile()->getattr(stbuf, nameType); + } + } catch (const std::exception & e) { + LOG_ERROR(LOG, "getattr %s exception %s", path, e.what()); + res = -EIO; + } + + LOG_DEBUG(LOG, "getattr returns %d", res); + return res; +} + +int +ZkFuseHandleManager::rename(const char * fromPath, const char * toPath) +{ + LOG_DEBUG(LOG, "rename(fromPath %s, toPath %s)", fromPath, toPath); + + ZkFuseNameType fromNameType; + std::string fromZkPath = getZkPath(fromPath, fromNameType); + ZkFuseAutoHandle fromAutoHandle(SharedPtr(_thisWeakPtr), fromZkPath); + int res = fromAutoHandle.get(); + if (res >= 0) { + LOG_DEBUG(LOG, "good fromPath"); + if (fromAutoHandle.getFile()->isDirNameType(fromNameType)) { + LOG_DEBUG(LOG, "fromPath is directory"); + res = -EISDIR; + } + } + if (res >= 0) { + ZkFuseNameType toNameType; + std::string toZkPath = getZkPath(toPath, toNameType); + bool created; + res = mknod(toZkPath.c_str(), S_IFREG, true, created); + if (res >= 0) { + ZkFuseAutoHandle toAutoHandle(SharedPtr(_thisWeakPtr), res); + if (toAutoHandle.getFile()->isDirNameType(toNameType)) { + LOG_DEBUG(LOG, "toPath is directory"); + res = -EISDIR; + } + if (res >= 0) { + LOG_DEBUG(LOG, "copy data"); + Data data; + fromAutoHandle.getFile()->getData(data); + toAutoHandle.getFile()->setData(data, true); + LOG_DEBUG(LOG, "copy metadata"); + struct stat stbuf; + int metaRes = + fromAutoHandle.getFile()->getattr(stbuf, fromNameType); + if (metaRes < 0) { + LOG_DEBUG(LOG, "get metadata failed"); + } + else { + metaRes = toAutoHandle.getFile()-> + utime(secsToMillisecs(stbuf.st_atime), + secsToMillisecs(stbuf.st_mtime), + toNameType); + if (metaRes < 0) { + LOG_DEBUG(LOG, "set metadata failed"); + } + } + } + if (created && res < 0) { + LOG_DEBUG(LOG, "undo create because copy data failed"); + int rmRes = toAutoHandle.getFile()->rmdir(toNameType, true); + } + } + } + if (res >= 0) { + LOG_DEBUG(LOG, "copy successful, unlink fromPath"); + res = fromAutoHandle.getFile()->unlink(fromNameType); + } + + LOG_DEBUG(LOG, "rename returns %d", res); + return res; +} + +void +ZkFuseHandleManager::addChildToParent(const std::string & childPath) const +{ + LOG_DEBUG(LOG, "addChildToParent(childPath %s)", childPath.c_str()); + + std::string parentPath = getParentPath(childPath); + if (!parentPath.empty()) { + AutoLock lock(_mutex); + Map::const_iterator it = _map.find(parentPath); + if (it != _map.end()) { + Handle handle = it->second; + assert(_files[handle] != NULL); + _files[handle]->addChild(childPath); + } + } + + LOG_DEBUG(LOG, "addChildToParent done"); +} + +void +ZkFuseHandleManager::removeChildFromParent(const std::string & childPath) const +{ + LOG_DEBUG(LOG, "removeChildFromParent(childPath %s)", childPath.c_str()); + + std::string parentPath = getParentPath(childPath); + if (!parentPath.empty()) { + AutoLock lock(_mutex); + Map::const_iterator it = _map.find(parentPath); + if (it != _map.end()) { + Handle handle = it->second; + assert(_files[handle] != NULL); + _files[handle]->removeChild(childPath); + } + } + + LOG_DEBUG(LOG, "removeChildFromParent done"); +} + +std::string +ZkFuseHandleManager::getParentPath(const std::string & childPath) const +{ + std::string::size_type lastPos = childPath.rfind('/'); + if (lastPos > 0) { + return std::string(childPath, 0, lastPos); + } + else { + assert(childPath[0] == '/'); + return std::string(); + } +} + +std::string +ZkFuseHandleManager::getZkPath(const char * path, ZkFuseNameType & nameType) + const +{ + LOG_DEBUG(LOG, "getZkPath(path %s)", path); + + std::string res; + unsigned pathLen = strlen(path); + const std::string & dataFileName = _common.getDataFileName(); + unsigned dataSuffixLen = dataFileName.length(); + const char * dataSuffix = dataFileName.c_str(); + unsigned dataSuffixIncludeSlashLen = dataSuffixLen + 1; + const std::string & forceDirSuffix = _common.getForceDirSuffix(); + unsigned forceDirSuffixLen = _common.getForceDirSuffix().length(); + /* Check if path is "/". If so, it is always a directory. + */ + if (pathLen == 1) { + assert(path[0] == '/'); + res = _common.getRootPathName(); + nameType = ZkFuseNameDirType; + } + /* Check if path ends of /{dataSuffix}, e.g. /foo/bar/{dataSuffix}. + * If so remove dataSuffix and nameType is ZkFuseNameRegType. + */ + else if ( + (pathLen >= dataSuffixIncludeSlashLen) && + (path[pathLen - dataSuffixIncludeSlashLen] == '/') && + (strncmp(path + (pathLen - dataSuffixLen), + dataSuffix, dataSuffixLen) == 0) + ) { + if ((pathLen - dataSuffixIncludeSlashLen) == 0) { + res = _common.getRootPathName(); + } else { + res.assign(path, pathLen - dataSuffixIncludeSlashLen); + } + nameType = ZkFuseNameRegType; + } + /* If not ZkFuseNameRegType, then check if path ends of + * {forceDirSuffix}, e.g. /foo/bar{forceDirSuffix}. + * If so remove forceDirSuffix and nameType is ZkFuseNameDirType. + */ + else if (forceDirSuffixLen > 0 && + pathLen >= forceDirSuffixLen && + strncmp(path + (pathLen - forceDirSuffixLen), + forceDirSuffix.c_str(), forceDirSuffixLen) == 0) { + res.assign(path, pathLen - forceDirSuffixLen); + nameType = ZkFuseNameDirType; + } + /* If not ZkFuseNameRegType and not ZkFuseNameDirType, then + * it is ZkFuseNameDefaultType. ZkFuse will infer type from + * ZooKeeper node's content. + */ + else { + res = path; + nameType = ZkFuseNameDefaultType; + } + /* Intermediate components of the path name may have + * forceDirSuffix, e.g. /foo/bar{forceDirSuffix}/baz. + * If so, remove the intermediate {forceDirSuffix}es. + */ + if (forceDirSuffixLen > 0) { + /* pos is an optimization to avoid always scanning from + * beginning of path + */ + unsigned pos = 0; + while ((res.length() - pos) > forceDirSuffixLen + 1) { + const char * found = + strstr(res.c_str() + pos, forceDirSuffix.c_str()); + if (found == NULL) { + break; + } + if (found[forceDirSuffixLen] == '/' || + found[forceDirSuffixLen] == '\0') { + pos = found - res.c_str(); + res.erase(pos, forceDirSuffixLen); + } + else { + pos += forceDirSuffixLen; + } + } + } + + LOG_DEBUG(LOG, "getZkPath returns %s, nameType %d", + res.c_str(), int(nameType)); + return res; +} + +static ZkFuseHandleManager::SharedPtr singletonZkFuseHandleManager; + +inline const ZkFuseHandleManager::SharedPtr & zkFuseHandleManager() +{ + return singletonZkFuseHandleManager; +} + +static +int zkfuse_getattr(const char *path, struct stat *stbuf) +{ + LOG_DEBUG(LOG, "zkfuse_getattr(path %s)", path); + + int res = 0; + try { + res = zkFuseHandleManager()->getattr(path, *stbuf); + } catch (const std::exception & e) { + LOG_ERROR(LOG, "zkfuse_getattr %s exception %s", path, e.what()); + res = -EIO; + } + + LOG_DEBUG(LOG, "zkfuse_getattr returns %d", res); + return res; +} + +static +int zkfuse_fgetattr(const char *path, struct stat *stbuf, + struct fuse_file_info *fi) +{ + LOG_DEBUG(LOG, "zkfuse_fgetattr(path %s)", path); + + int res = 0; + int handle = fi->fh; + try { + if (handle <= 0) { + res = -EINVAL; + } + else { + res = zkFuseHandleManager()->getFile(handle)-> + getattr(*stbuf, ZkFuseNameDefaultType); + } + } catch (const std::exception & e) { + LOG_ERROR(LOG, "zkfuse_fgetattr %s exception %s", path, e.what()); + res = -EIO; + } + + LOG_DEBUG(LOG, "zkfuse_fgetattr returns %d", res); + return res; +} + +static +int zkfuse_access(const char *path, int mask) +{ + /* not implemented */ + return -1; +} + +static +int zkfuse_readlink(const char *path, char *buf, size_t size) +{ + /* not implemented */ + return -1; +} + +static +int zkfuse_opendir(const char *path, struct fuse_file_info *fi) +{ + LOG_DEBUG(LOG, "zkfuse_opendir(path %s)", path); + + int res = 0; + try { + ZkFuseNameType nameType; + std::string zkPath = zkFuseHandleManager()->getZkPath(path, nameType); + if (nameType == ZkFuseNameRegType) { + res = -ENOENT; + } + else { + ZkFuseAutoHandle autoHandle(zkFuseHandleManager(), zkPath); + res = autoHandle.get(); + if (res >= 0) { + autoHandle.getFile()->incOpenDirCount(); + autoHandle.release(); + fi->fh = res; + res = 0; + } + } + } catch (const std::exception & e) { + LOG_ERROR(LOG, "zkfuse_opendir %s exception %s", path, e.what()); + res = -EIO; + } + + LOG_DEBUG(LOG, "zkfuse_opendir returns %d", res); + return res; +} + +static int +zkfuse_readdir(const char *path, void *buf, fuse_fill_dir_t filler, + off_t offset, struct fuse_file_info *fi) +{ + LOG_DEBUG(LOG, "zkfuse_readdir(path %s, offset %zu)", path, offset); + + int res = 0; + int handle = fi->fh; + try { + if (handle <= 0) { + res = -EINVAL; + } + else { + res = zkFuseHandleManager()->getFile(handle)-> + readdir(buf, filler, offset); + } + } catch (const std::exception & e) { + LOG_ERROR(LOG, "zkfuse_readdir %s exception %s", path, e.what()); + res = -EIO; + } + + LOG_DEBUG(LOG, "zkfuse_readdir returns %d", res); + return res; +} + +static +int zkfuse_releasedir(const char *path, struct fuse_file_info *fi) +{ + LOG_DEBUG(LOG, "zkfuse_releasedir(path %s)", path); + + int res = 0; + unsigned handle = fi->fh; + try { + if (handle <= 0) { + res = -EINVAL; + } + else { + zkFuseHandleManager()->getFile(handle)->decOpenDirCount(); + zkFuseHandleManager()->getFile(handle)->close(); + } + } catch (const std::exception & e) { + LOG_ERROR(LOG, "zkfuse_releasedir %s exception %s", path, e.what()); + res = -EIO; + } + + LOG_DEBUG(LOG, "zkfuse_releasedir returns %d", res); + return res; +} + +static +int zkfuse_mknod(const char *path, mode_t mode, dev_t rdev) +{ + LOG_DEBUG(LOG, "zkfuse_mknod(path %s, mode %o)", path, mode); + + int res = 0; + try { + ZkFuseNameType nameType; + std::string zkPath = zkFuseHandleManager()->getZkPath(path, nameType); + ZkFuseAutoHandle autoHandle(zkFuseHandleManager(), zkPath, mode, false); + res = autoHandle.get(); + if (res >= 0) { + res = 0; + } + } catch (const std::exception & e) { + LOG_ERROR(LOG, "zkfuse_mknod %s exception %s", path, e.what()); + res = -EIO; + } + + LOG_DEBUG(LOG, "zkfuse_mknod returns %d", res); + return res; +} + +static int zkfuse_mkdir(const char *path, mode_t mode) +{ + LOG_DEBUG(LOG, "zkfuse_mkdir(path %s, mode %o", path, mode); + + int res = 0; + try { + res = zkFuseHandleManager()->mkdir(path, mode); + } catch (const std::exception & e) { + LOG_ERROR(LOG, "zkfuse_mkdir %s exception %s", path, e.what()); + res = -EIO; + } + + LOG_DEBUG(LOG, "zkfuse_mkdir returns %d", res); + return res; +} + +static int zkfuse_unlink(const char *path) +{ + LOG_DEBUG(LOG, "zkfuse_unlink(path %s)", path); + + int res = 0; + try { + res = zkFuseHandleManager()->unlink(path); + } catch (const std::exception & e) { + LOG_ERROR(LOG, "zkfuse_unlink %s exception %s", path, e.what()); + res = -EIO; + } + + LOG_DEBUG(LOG, "zkfuse_unlink returns %d", res); + return res; +} + +static int zkfuse_rmdir(const char *path) +{ + LOG_DEBUG(LOG, "zkfuse_rmdir(path %s)", path); + + int res = 0; + try { + res = zkFuseHandleManager()->rmdir(path); + } catch (const std::exception & e) { + LOG_ERROR(LOG, "zkfuse_rmdir %s exception %s", path, e.what()); + res = -EIO; + } + + LOG_DEBUG(LOG, "zkfuse_rmdir returns %d", res); + + return res; +} + +static int zkfuse_symlink(const char *from, const char *to) +{ + /* not implemented */ + return -1; +} + +static int zkfuse_rename(const char *from, const char *to) +{ + LOG_DEBUG(LOG, "zkfuse_rename(from %s, to %s)", from, to); + + int res = 0; + try { + res = zkFuseHandleManager()->rename(from, to); + } catch (const std::exception & e) { + LOG_ERROR(LOG, "zkfuse_rename %s %s exception %s", from, to, e.what()); + res = -EIO; + } + + LOG_DEBUG(LOG, "zkfuse_rename returns %d", res); + + return res; +} + +static int zkfuse_link(const char *from, const char *to) +{ + /* not implemented */ + return -1; +} + +static int zkfuse_chmod(const char *path, mode_t mode) +{ + LOG_DEBUG(LOG, "zkfuse_chmod(path %s, mode %o)", path, mode); + int res = 0; + + LOG_DEBUG(LOG, "zkfuse_chmod returns %d", res); + return res; +} + +static int zkfuse_chown(const char *path, uid_t uid, gid_t gid) +{ + LOG_DEBUG(LOG, "zkfuse_chown(path %s, uid %d, gid %d)", path, uid, gid); + + int res = 0; + + if (zkFuseHandleManager()->getCommon().getUid() == uid && + zkFuseHandleManager()->getCommon().getGid() == gid) { + res = 0; + } + else { + res = -EPERM; + } + + LOG_DEBUG(LOG, "zkfuse_chown returns %d", res); + return 0; +} + +static int zkfuse_truncate(const char *path, off_t size) +{ + LOG_DEBUG(LOG, "zkfuse_truncate(path %s, size %zu)", path, size); + + int res = 0; + try { + ZkFuseNameType nameType; + std::string zkPath = zkFuseHandleManager()->getZkPath(path, nameType); + ZkFuseAutoHandle autoHandle(zkFuseHandleManager(), zkPath); + res = autoHandle.get(); + if (res >= 0) { + res = autoHandle.getFile()->truncate(size); + } + } catch (const std::exception & e) { + LOG_ERROR(LOG, "zkfuse_truncate %s exception %s", path, e.what()); + res = -EIO; + } + + LOG_DEBUG(LOG, "zkfuse_truncate returns %d", res); + return res; +} + +static +int zkfuse_ftruncate(const char *path, off_t size, struct fuse_file_info *fi) +{ + LOG_DEBUG(LOG, "zkfuse_ftruncate(path %s, size %zu)", path, size); + + int res = 0; + unsigned handle = fi->fh; + try { + if (handle <= 0) { + res = -EINVAL; + } + else { + res = zkFuseHandleManager()->getFile(handle)->truncate(size); + } + } catch (const std::exception & e) { + LOG_ERROR(LOG, "zkfuse_ftruncate %s exception %s", path, e.what()); + res = -EIO; + } + + LOG_DEBUG(LOG, "zkfuse_ftruncate returns %d", res); + return res; +} + +static +int zkfuse_utimens(const char *path, const struct timespec ts[2]) +{ + LOG_DEBUG(LOG, "zkfuse_utimens(path %s)", path); + + int res = 0; + try { + uint64_t atime = timespecToMillisecs(ts[0]); + uint64_t mtime = timespecToMillisecs(ts[1]); + ZkFuseNameType nameType; + std::string zkPath = zkFuseHandleManager()->getZkPath(path, nameType); + ZkFuseAutoHandle autoHandle(zkFuseHandleManager(), zkPath); + res = autoHandle.get(); + if (res >= 0) { + res = autoHandle.getFile()->utime(atime, mtime, nameType); + } + } catch (const std::exception & e) { + LOG_ERROR(LOG, "zkfuse_utimens %s exception %s", path, e.what()); + res = -EIO; + } + + LOG_DEBUG(LOG, "zkfuse_utimens returns %d", res); + return res; +} + +static +int zkfuse_create(const char *path, mode_t mode, struct fuse_file_info *fi) +{ + int fd; + + fd = open(path, fi->flags, mode); + if (fd == -1) + return -errno; + + fi->fh = fd; + return 0; +} + +static +int zkfuse_open(const char *path, struct fuse_file_info *fi) +{ + LOG_DEBUG(LOG, "zkfuse_open(path %s, flags %o)", path, fi->flags); + + int res = 0; + try { + ZkFuseNameType nameType; + std::string zkPath = zkFuseHandleManager()->getZkPath(path, nameType); + ZkFuseAutoHandle autoHandle(zkFuseHandleManager(), zkPath); + res = autoHandle.get(); + if (res >= 0) { + if (autoHandle.getFile()->isDirNameType(nameType)) { + res = -ENOENT; + } + } + if (res >= 0) { + autoHandle.release(); + fi->fh = res; + res = 0; + } + } catch (const std::exception & e) { + LOG_ERROR(LOG, "zkfuse_open %s exception %s", path, e.what()); + res = -EIO; + } + + LOG_DEBUG(LOG, "zkfuse_open returns %d", res); + return res; +} + +static +int zkfuse_read(const char *path, char *buf, size_t size, off_t offset, + struct fuse_file_info *fi) +{ + LOG_DEBUG(LOG, "zkfuse_read(path %s, size %zu, offset %zu)", + path, size, offset); + + int res = 0; + unsigned handle = fi->fh; + try { + if (handle <= 0) { + res = -EINVAL; + } + else { + res = zkFuseHandleManager()->getFile(handle)-> + read(buf, size, offset); + } + } catch (const std::exception & e) { + LOG_ERROR(LOG, "zkfuse_read %s exception %s", path, e.what()); + res = -EIO; + } + + LOG_DEBUG(LOG, "zkfuse_read returns %d", res); + return res; +} + +static +int zkfuse_write(const char *path, const char *buf, size_t size, + off_t offset, struct fuse_file_info *fi) +{ + LOG_DEBUG(LOG, "zkfuse_write(path %s, size %zu, offset %zu)", + path, size, offset); + + int res = 0; + unsigned handle = fi->fh; + try { + if (handle <= 0) { + res = -EINVAL; + } + else { + res = zkFuseHandleManager()->getFile(handle)-> + write(buf, size, offset); + } + } catch (const std::exception & e) { + LOG_ERROR(LOG, "zkfuse_write %s exception %s", path, e.what()); + res = -EIO; + } + + LOG_DEBUG(LOG, "zkfuse_write returns %d", res); + return res; +} + +static int zkfuse_statfs(const char *path, struct statvfs *stbuf) +{ + /* not implemented */ + return -1; +} + +static +int zkfuse_flush(const char *path, struct fuse_file_info *fi) +{ + /* This is called from every close on an open file, so call the + close on the underlying filesystem. But since flush may be + called multiple times for an open file, this must not really + close the file. This is important if used on a network + filesystem like NFS which flush the data/metadata on close() */ + + LOG_DEBUG(LOG, "zkfuse_flush(path %s)", path); + + int res = 0; + unsigned handle = fi->fh; + try { + if (handle <= 0) { + res = -EINVAL; + } + else { + res = zkFuseHandleManager()->getFile(handle)->flush(); + } + } catch (const std::exception & e) { + LOG_ERROR(LOG, "zkfuse_flush %s exception %s", path, e.what()); + res = -EIO; + } + + LOG_DEBUG(LOG, "zkfuse_flush returns %d", res); + return res; +} + +static +int zkfuse_release(const char *path, struct fuse_file_info *fi) +{ + LOG_DEBUG(LOG, "zkfuse_release(path %s)", path); + + int res = 0; + unsigned handle = fi->fh; + try { + if (handle <= 0) { + res = -EINVAL; + } + else { + zkFuseHandleManager()->getFile(handle)->close(); + } + } catch (const std::exception & e) { + LOG_ERROR(LOG, "zkfuse_release %s exception %s", path, e.what()); + res = -EIO; + } + + LOG_DEBUG(LOG, "zkfuse_release returns %d", res); + return res; +} + +static +int zkfuse_fsync(const char *path, int isdatasync, + struct fuse_file_info *fi) +{ + LOG_DEBUG(LOG, "zkfuse_fsync(path %s, isdatasync %d)", path, isdatasync); + + (void) isdatasync; + int res = zkfuse_flush(path, fi); + + LOG_DEBUG(LOG, "zkfuse_fsync returns %d", res); + return res; +} + +#ifdef HAVE_SETXATTR +/* xattr operations are optional and can safely be left unimplemented */ +static int zkfuse_setxattr(const char *path, const char *name, const char *value, + size_t size, int flags) +{ + int res = lsetxattr(path, name, value, size, flags); + if (res == -1) + return -errno; + return 0; +} + +static int zkfuse_getxattr(const char *path, const char *name, char *value, + size_t size) +{ + int res = lgetxattr(path, name, value, size); + if (res == -1) + return -errno; + return res; +} + +static int zkfuse_listxattr(const char *path, char *list, size_t size) +{ + int res = llistxattr(path, list, size); + if (res == -1) + return -errno; + return res; +} + +static int zkfuse_removexattr(const char *path, const char *name) +{ + int res = lremovexattr(path, name); + if (res == -1) + return -errno; + return 0; +} +#endif /* HAVE_SETXATTR */ + +static +int zkfuse_lock(const char *path, struct fuse_file_info *fi, int cmd, + struct flock *lock) +{ + (void) path; + return ulockmgr_op(fi->fh, cmd, lock, &fi->lock_owner, + sizeof(fi->lock_owner)); +} + + +static +void init_zkfuse_oper(fuse_operations & fo) +{ + memset(&fo, 0, sizeof(fuse_operations)); + fo.getattr = zkfuse_getattr; + fo.fgetattr = zkfuse_fgetattr; + // fo.access = zkfuse_access; + // fo.readlink = zkfuse_readlink; + fo.opendir = zkfuse_opendir; + fo.readdir = zkfuse_readdir; + fo.releasedir = zkfuse_releasedir; + fo.mknod = zkfuse_mknod; + fo.mkdir = zkfuse_mkdir; + // fo.symlink = zkfuse_symlink; + fo.unlink = zkfuse_unlink; + fo.rmdir = zkfuse_rmdir; + fo.rename = zkfuse_rename; + // fo.link = zkfuse_link; + fo.chmod = zkfuse_chmod; + fo.chown = zkfuse_chown; + fo.truncate = zkfuse_truncate; + fo.ftruncate = zkfuse_ftruncate; + fo.utimens = zkfuse_utimens; + // fo.create = zkfuse_create; + fo.open = zkfuse_open; + fo.read = zkfuse_read; + fo.write = zkfuse_write; + fo.statfs = zkfuse_statfs; + fo.flush = zkfuse_flush; + fo.release = zkfuse_release; + fo.fsync = zkfuse_fsync; +#ifdef HAVE_SETXATTR + // fo.setxattr = zkfuse_setxattr; + // fo.getxattr = zkfuse_getxattr; + // fo.listxattr = zkfuse_listxattr; + // fo.removexattr = zkfuse_removexattr; +#endif + fo.lock = zkfuse_lock; +}; + + +/** + * The listener of ZK events. + */ +class SessionEventListener : public ZKEventListener +{ + private: + /** + References the ZkFuseHandleManager instance that should be + invoked to service events. + */ + ZkFuseHandleManager::SharedPtr _manager; + + public: + /** + Sets the ZkFuseHandleManager instance that should be invoked + to service events. + */ + void setManager(const ZkFuseHandleManager::SharedPtr & manager) + { + _manager = manager; + } + /** + Received an event and invoke ZkFuseHandleManager instance to handle + received event. + */ + virtual void eventReceived(const ZKEventSource & source, + const ZKWatcherEvent & event) + { + _manager->eventReceived(event); + } +}; + +void +usage(int argc, char *argv[]) +{ + cout + << argv[0] + << " usage: " + << argv[0] + << " [args-and-values]+" << endl + << "nodepath == a complete path to a ZooKeeper node" << endl + << "\t--cachesize= or -c :" << endl + << " number of ZooKeeper nodes to cache." << endl + << "\t--debug or -d: " << endl + << "\t enable fuse debug mode." << endl + << "\t--help or -h: " << endl + << "\t print this message." << endl + << "\t--mount= or -m : " << endl + << "\t specifies where to mount the zkfuse filesystem." << endl + << "\t--name or -n: " << endl + << "\t name of file for accessing node data." << endl + << "\t--zookeeper= or -z : " << endl + << "\t specifies information needed to connect to zeekeeper." << endl; +} + +int +main(int argc, char *argv[]) +{ + /** + * Initialize log4cxx + */ + const std::string file("log4cxx.properties"); + PropertyConfigurator::configureAndWatch( file, 5000 ); + LOG_INFO(LOG, "Starting zkfuse"); + + /** + * Supported operations. + */ + enum ZkOption { + ZkOptionCacheSize = 1000, + ZkOptionDebug = 1001, + ZkOptionForceDirSuffix = 1002, + ZkOptionHelp = 1003, + ZkOptionMount = 1004, + ZkOptionName = 1005, + ZkOptionZookeeper = 1006, + ZkOptionInvalid = -1 + }; + + static const char *shortOptions = "c:df:hm:n:z:"; + static struct option longOptions[] = { + { "cachesize", 1, 0, ZkOptionCacheSize }, + { "debug", 0, 0, ZkOptionDebug }, + { "forcedirsuffix", 1, 0, ZkOptionForceDirSuffix }, + { "help", 0, 0, ZkOptionHelp }, + { "mount", 1, 0, ZkOptionMount }, + { "name", 1, 0, ZkOptionName }, + { "zookeeper", 1, 0, ZkOptionZookeeper }, + { 0, 0, 0, 0 } + }; + + /** + * Parse arguments + */ + bool debugFlag = false; + std::string mountPoint = "/tmp/zkfuse"; + std::string nameOfFile = "_data_"; + std::string forceDirSuffix = "._dir_"; + std::string zkHost; + unsigned cacheSize = 256; + + while (true) { + int c; + + c = getopt_long(argc, argv, shortOptions, longOptions, 0); + if (c == -1) { + break; + } + + switch (c) { + case ZkOptionInvalid: + cerr + << argv[0] + << ": ERROR: Did not specify legal argument!" + << endl; + return 99; + case 'c': + case ZkOptionCacheSize: + cacheSize = strtoul(optarg, NULL, 0); + break; + case 'd': + case ZkOptionDebug: + debugFlag = true; + break; + case 'f': + case ZkOptionForceDirSuffix: + forceDirSuffix = optarg; + break; + case 'h': + case ZkOptionHelp: + usage(argc, argv); + return 0; + case 'm': + case ZkOptionMount: + mountPoint = optarg; + break; + case 'n': + case ZkOptionName: + nameOfFile = optarg; + break; + case 'z': + case ZkOptionZookeeper: + zkHost = optarg; + break; + } + } + + /** + * Check that zkHost has a value, otherwise abort. + */ + if (zkHost.empty()) { + cerr + << argv[0] + << ": ERROR: " + << "required argument \"--zookeeper \" was not given!" + << endl; + return 99; + } + /** + * Check that zkHost has a value, otherwise abort. + */ + if (forceDirSuffix.empty()) { + cerr + << argv[0] + << ": ERROR: " + << "required argument \"--forcedirsuffix \" " + "not cannot be empty!" + << endl; + return 99; + } + /** + * Check nameOfFile has no forward slash + */ + if (nameOfFile.find_first_of('/') != std::string::npos) { + cerr + << argv[0] + << ": ERROR: " + << "'/' present in name which is not allowed" + << endl; + return 99; + } + + if (debugFlag) { + cout + << "cacheSize = " + << cacheSize + << ", debug = " + << debugFlag + << ", forceDirSuffix = \"" + << forceDirSuffix + << "\", mount = \"" + << mountPoint + << "\", name = \"" + << nameOfFile + << "\", zookeeper = \"" + << zkHost + << "\", optind = " + << optind + << ", argc = " + << argc + << ", current arg = \"" + << (optind >= argc ? "NULL" : argv[optind]) + << "\"" + << endl; + } + + SessionEventListener listener; + SynchronousEventAdapter eventAdapter; + LOG_INFO(LOG, "Create ZK adapter"); + try { + /** + * Create an instance of ZK adapter. + */ + std::string h(zkHost); + ZooKeeperConfig config(h, 1000, true, 10000); + ZkFuseCommon zkFuseCommon; + ZooKeeperAdapterSharedPtr zkPtr( + new ZooKeeperAdapter( + config, + &listener, + false + ) + ); + zkFuseCommon.setZkAdapter(zkPtr); + zkFuseCommon.setDataFileName(nameOfFile); + zkFuseCommon.setForceDirSuffix(forceDirSuffix); + zkFuseCommon.setCacheSize(cacheSize); + singletonZkFuseHandleManager = + ZkFuseHandleManagerFactory::create(zkFuseCommon); + listener.setManager(singletonZkFuseHandleManager); + zkPtr->reconnect(); + + } catch (const ZooKeeperException & e) { + cerr + << argv[0] + << ": ERROR: ZookKeeperException caught: " + << e.what() + << endl; + } catch (std::exception & e) { + cerr + << argv[0] + << ": ERROR: std::exception caught: " + << e.what() + << endl; + } + +#ifdef ZOOKEEPER_ROOT_CHILDREN_WATCH_BUG + cerr << "ZOOKEEPER_ROOT_CHILDREN_WATCH_BUG enabled" << endl; +#endif + /** + * Initialize fuse + */ + LOG_INFO(LOG, "Initialize fuse"); + umask(0); + fuse_operations zkfuse_oper; + init_zkfuse_oper(zkfuse_oper); + int fakeArgc = debugFlag ? 3 : 2; + char * fakeArgv[] = { + argv[0], + strdup(mountPoint.c_str()), + debugFlag ? strdup("-d") : NULL, + NULL + }; + int res = fuse_main(fakeArgc, fakeArgv, &zkfuse_oper, NULL); + for (unsigned i = 1; i <= 2; i++) { + if (fakeArgv[i] != NULL) { + free(fakeArgv[i]); + } + } + + return res; +} diff --git a/src/contrib/zkperl/Changes b/src/contrib/zkperl/Changes new file mode 100644 index 0000000..c31420e --- /dev/null +++ b/src/contrib/zkperl/Changes @@ -0,0 +1,65 @@ +Net::ZooKeeper - Perl extension for Apache ZooKeeper + +Revision history +================ + +0.01 Dec 5, 2008 + - initial version + +0.02 Dec 16, 2008 + - support connection to ZooKeeper and get() method + +0.03 Jan 9, 2009 + - implemented watch mechanism for get() + +0.04 Jan 15, 2009 + - all basic ZooKeeper methods supported + +0.05 Jan 21, 2009 + - converted from T_PTROBJ to T_ZK_HASH with PERL_MAGIC_ext, + allows DESTROY() to be called repeatedly + +0.06 Jan 27, 2009 + - converted from attribute accessor methods to inner and outer hashes + with PERL_MAGIC_tied + +0.07 Jan 29, 2009 + - all tied hash methods completed + +0.08 Jan 30, 2009 + - simple thread safety enforced with CLONE_SKIP + +0.09 Feb 12, 2009 + - ACL constants + +0.10 Feb 18, 2009 + - ACL support + +0.11 Feb 21, 2009 + - ZooKeeper version check + +0.20 Feb 25, 2009 + - refactored watches as subclass + +0.30 Feb 27, 2009 + - refactored stats as subclass + +0.31 Mar 6, 2009 + - test suite completed + +0.32 Mar 25, 2009 + - initial documentation completed, first public release + +0.33 Apr 20, 2009 + - copyright donated to ASF + +0.34 Jul 14, 2009 + - support ZooKeeper 3.2.0 release + +0.35 Jul 15, 2009 + - support multiple include and library locations + +0.36 Mar 27, 2011 + - Fix zookeeper version check, but only warn since we haven't been enforcing it in a while + - Look for zookeeper includes in some sane places by default + diff --git a/src/contrib/zkperl/LICENSE b/src/contrib/zkperl/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/src/contrib/zkperl/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/src/contrib/zkperl/MANIFEST b/src/contrib/zkperl/MANIFEST new file mode 100644 index 0000000..1b57436 --- /dev/null +++ b/src/contrib/zkperl/MANIFEST @@ -0,0 +1,23 @@ +Changes +LICENSE +Makefile.PL +MANIFEST +NOTICE +README +typemap +ZooKeeper.pm +ZooKeeper.xs +build/check_zk_version.c +build/check_zk_version.h +t/10_invalid.t +t/15_thread.t +t/20_tie.t +t/22_stat_tie.t +t/24_watch_tie.t +t/30_connect.t +t/35_log.t +t/40_basic.t +t/45_class.t +t/50_access.t +t/60_watch.t +t/util.pl diff --git a/src/contrib/zkperl/Makefile.PL b/src/contrib/zkperl/Makefile.PL new file mode 100644 index 0000000..9a0996d --- /dev/null +++ b/src/contrib/zkperl/Makefile.PL @@ -0,0 +1,73 @@ +# Net::ZooKeeper - Perl extension for Apache ZooKeeper +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +use 5.008_008; + +use Config; +use ExtUtils::MakeMaker; +use Getopt::Long; + +my $ZOO_MAJOR_VERSION = 3; +my $ZOO_REQUIRED_VERSION = qr{^$ZOO_MAJOR_VERSION\.\d+.\d+$}ismx; + +my @zk_inc_paths; +my @zk_lib_paths; + +GetOptions( + 'zookeeper-include=s' => \@zk_inc_paths, + 'zookeeper-lib=s' => \@zk_lib_paths +); + +my $zk_inc_paths = join(' ', map("-I$_", @zk_inc_paths)); +my $zk_lib_paths = join(' ', map("-L$_", @zk_lib_paths)); + +$zk_inc_paths .= ' ' unless ($zk_inc_paths eq ''); +$zk_lib_paths .= ' ' unless ($zk_lib_paths eq ''); + +my $cc = $Config{'cc'}; +my $check_file = 'build/check_zk_version'; + +my $check_out = qx($cc $zk_inc_paths $zk_lib_paths -I. -o $check_file $check_file.c 2>&1); + +if ($?) { + if ($check_out =~ /zookeeper_version\.h/) { + die("Could not determine ZooKeeper version:\n\n$check_out"); + } + else { + ## keep in sync with build/check_zk_version.h + die("Net::ZooKeeper requires at least ZooKeeper version 3.1.1\n"); + } +} + +chomp(my $zk_ver = qx($check_file)); + +if ($? >> 8 != 0) { + die "Couldn't check zookeeper version: $zk_ver: $r"; +} +elsif ($zk_ver !~ $ZOO_REQUIRED_VERSION) { + warn "Net::ZooKeeper requires ZooKeeper 3.x, found $zk_ver!"; +} + +WriteMakefile( + 'INC' => "$zk_inc_paths-I.", + 'LIBS' => [ "$zk_lib_paths-lzookeeper_mt" ], + 'NAME' => 'Net::ZooKeeper', + 'VERSION_FROM' => 'ZooKeeper.pm', + 'clean' => { 'FILES' => 'build/check_zk_version.o' } +); + diff --git a/src/contrib/zkperl/NOTICE b/src/contrib/zkperl/NOTICE new file mode 100644 index 0000000..b68fdac --- /dev/null +++ b/src/contrib/zkperl/NOTICE @@ -0,0 +1,6 @@ +Net::ZooKeeper - Perl extension for Apache ZooKeeper +Copyright 2009 The Apache Software Foundation + +This product includes software developed at +The Apache Software Foundation (http://www.apache.org/). + diff --git a/src/contrib/zkperl/README b/src/contrib/zkperl/README new file mode 100644 index 0000000..bbe2a0d --- /dev/null +++ b/src/contrib/zkperl/README @@ -0,0 +1,86 @@ +Net::ZooKeeper - Perl extension for Apache ZooKeeper +==================================================== + +Net::ZooKeeper provides a Perl interface to the synchronous C API +of Apache ZooKeeper. ZooKeeper is coordination service for +distributed applications. +For details see the ZooKeeper home page at: + +http://zookeeper.apache.org/ + +INSTALLATION + +To install this module type the following, first install the +zookeeper C client, then: + + perl Makefile.PL + make + ZK_TEST_HOSTS=host:port,... make test + make install + +If the C headers and library are installed in non-standard +locations, specify them as arguments to Makefile.PL: + + perl Makefile.PL \ + --zookeeper-include=/path/to/zookeeper/client/include \ + --zookeeper-lib=/path/to/zookeeper/client/lib + +The path supplied to the --zookeeper-include option should +identify the directory that contains the zookeeper.h and other +ZooKeeper C include files. + +The path supplied to the --zookeeper-lib option should identify +the directory that contains the libzookeeper_mt library. + +When running "make test", if no ZK_TEST_HOSTS environment +variable is set, many tests will be skipped because no connection +to a ZooKeeper server is available. To execute these tests, +the ZK_TEST_HOSTS variable may be assigned a list of one or more +ZooKeeper host:port pairs, e.g., "localhost:7100,otherhost:7200". + +The ZK_TEST_PATH environment variable, if defined, specifies +the ZooKeeper path under which all test nodes should be created. +The tests expect to have full read/write/create/delete/admin +ZooKeeper permissions under this path. If no ZK_TEST_PATH +variable is defined, the root ZooKeeper path ("/") is used. + +DEPENDENCIES + +Version 3.1.1 of ZooKeeper is required at a minimum. + +For version 3.1.1, you may also want to apply some of these +additional patches to the ZooKeeper C API code: + +https://issues.apache.org/jira/browse/ZOOKEEPER-262 +https://issues.apache.org/jira/browse/ZOOKEEPER-318 + +For version 3.1.1, you may also want to apply some of these +additional patches to the ZooKeeper C API code: + +https://issues.apache.org/jira/browse/ZOOKEEPER-262 +https://issues.apache.org/jira/browse/ZOOKEEPER-466 + +This module requires that the multi-threaded version of the +ZooKeeper C API client library be available on your system. + +This in turn implies that the POSIX pthread library is available +as well. + +COPYRIGHT AND LICENCE + +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + diff --git a/src/contrib/zkperl/ZooKeeper.pm b/src/contrib/zkperl/ZooKeeper.pm new file mode 100644 index 0000000..507f029 --- /dev/null +++ b/src/contrib/zkperl/ZooKeeper.pm @@ -0,0 +1,1257 @@ +# Net::ZooKeeper - Perl extension for Apache ZooKeeper +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +use 5.008_008; + +use strict; +use warnings; + +package Net::ZooKeeper; + +require Exporter; +require XSLoader; + +our $VERSION = '0.36'; + +our @ISA = qw(Exporter); + +our %EXPORT_TAGS = ( + 'errors' => [qw( + ZOK + ZSYSTEMERROR + ZRUNTIMEINCONSISTENCY + ZDATAINCONSISTENCY + ZCONNECTIONLOSS + ZMARSHALLINGERROR + ZUNIMPLEMENTED + ZOPERATIONTIMEOUT + ZBADARGUMENTS + ZINVALIDSTATE + ZAPIERROR + ZNONODE + ZNOAUTH + ZBADVERSION + ZNOCHILDRENFOREPHEMERALS + ZNODEEXISTS + ZNOTEMPTY + ZSESSIONEXPIRED + ZINVALIDCALLBACK + ZINVALIDACL + ZAUTHFAILED + ZCLOSING + ZNOTHING + )], + 'node_flags' => [qw( + ZOO_EPHEMERAL + ZOO_SEQUENCE + )], + 'acl_perms' => [qw( + ZOO_PERM_READ + ZOO_PERM_WRITE + ZOO_PERM_CREATE + ZOO_PERM_DELETE + ZOO_PERM_ADMIN + ZOO_PERM_ALL + )], + 'acls' => [qw( + ZOO_OPEN_ACL_UNSAFE + ZOO_READ_ACL_UNSAFE + ZOO_CREATOR_ALL_ACL + )], + 'events' => [qw( + ZOO_CREATED_EVENT + ZOO_DELETED_EVENT + ZOO_CHANGED_EVENT + ZOO_CHILD_EVENT + ZOO_SESSION_EVENT + ZOO_NOTWATCHING_EVENT + )], + 'states' => [qw( + ZOO_EXPIRED_SESSION_STATE + ZOO_AUTH_FAILED_STATE + ZOO_CONNECTING_STATE + ZOO_ASSOCIATING_STATE + ZOO_CONNECTED_STATE + )], + 'log_levels' => [qw( + ZOO_LOG_LEVEL_OFF + ZOO_LOG_LEVEL_ERROR + ZOO_LOG_LEVEL_WARN + ZOO_LOG_LEVEL_INFO + ZOO_LOG_LEVEL_DEBUG + )] +); + +{ + my %tags; + + push @{$EXPORT_TAGS{'all'}}, + grep {!$tags{$_}++} @{$EXPORT_TAGS{$_}} foreach (keys(%EXPORT_TAGS)); +} + +our @EXPORT_OK = ( @{$EXPORT_TAGS{'all'}} ); + +XSLoader::load('Net::ZooKeeper', $VERSION); + +1; + +__END__ + +=head1 NAME + +Net::ZooKeeper - Perl extension for Apache ZooKeeper + +=head1 SYNOPSIS + + use Net::ZooKeeper qw(:node_flags :acls); + + my $zkh = Net::ZooKeeper->new('localhost:7000'); + + $zkh->create('/foo', 'bar', + 'flags' => ZOO_EPHEMERAL, + 'acl' => ZOO_OPEN_ACL_UNSAFE) or + die("unable to create node /foo: " . $zkh->get_error() . "\n"); + + print "node /foo has value: " . $zkh->get('/foo') . "\n"; + + $zkh->set('/foo', 'baz'); + + print "node / has child nodes:\n"; + foreach my $path ($zkh->get_children('/')) { + print " /$path\n"; + } + + my $stat = $zkh->stat(); + if ($zkh->exists('/foo', 'stat' => $stat)) { + print "node /foo has stat info:\n"; + while (my($key,$value) = each(%{$stat})) { + print " $key: $value\n"; + } + } + + foreach my $acl_entry ($zkh->get_acl('/foo')) { + print "node /foo has ACL entry:\n"; + print " perms: $acl_entry->{perms}\n"; + print " scheme: $acl_entry->{scheme}\n"; + print " id: $acl_entry->{id}\n"; + } + + my $watch = $zkh->watch('timeout' => 10000); + $zkh->exists('/foo', 'watch' => $watch); + + if ($watch->wait()) { + print "watch triggered on node /foo:\n"; + print " event: $watch->{event}\n"; + print " state: $watch->{state}\n"; + } + else { + print "watch timed out after 10 seconds\n"; + } + + $zkh->delete('/foo'); + +=head1 DESCRIPTION + +Net::ZooKeeper provides a Perl interface to the synchronous C API +of Apache ZooKeeper. ZooKeeper is coordination service for +distributed applications. + +Each connection to ZooKeeper is represented as a handle object +of the class Net::ZooKeeper, similar to the manner in which database +connections are represented in the DBI module. + +To disconnect from ZooKeeper, simply destroy the Net::ZooKeeper +handle object by undefining it or by explicitly calling the +C method. + +The methods which may be invoked on Net::ZooKeeper handles +correspond to the functions of the synchronous ZooKeeper C API; +e.g., the Net::ZooKeeper method C calls the ZooKeeper +C function C, C calls C, +and so forth. + +The synchronous API functions wait for a response from the ZooKeeper +cluster before returning a result to the caller. Using these +functions permits Net::ZooKeeper to provide an interface similar +to that of a DBI driver module. + +=head2 Internal POSIX Threads + +The use of the synchronous ZooKeeper C API still requires that +the ZooKeeper C client code create several POSIX threads which run +concurrently with the main thread containing the Perl interpreter. + +The synchronous API functions are wrappers of the asynchronous +functions in the ZooKeeper C API. When a request is made by the +caller's thread (i.e., the one with the running Perl interpreter), +it is enqueued for delivery at a later time by the ZooKeeper C client +code's IO thread. The caller's thread then waits for notification +before returning from the synchronous API function. + +The IO thread dequeues the request and sends it to the ZooKeeper +cluster, while also ensuring that a regular "heartbeat" is maintained +with the cluster so that the current session does not time out. +When the IO thread receives a response from +the ZooKeeper cluster, it enqueues the response for delivery to the +client by the second thread of the ZooKeeper client code, the +completion thread. + +If the caller is using the asynchronous API, the completion thread +invokes the appropriate callback function provided by the caller +for the given request. In the case of Net::ZooKeeper, it is not +viable for the completion thread to invoke a Perl callback function +at arbitrary times; this could interfere with the state of the +Perl interpreter. + +For this reason Net::ZooKeeper uses the synchronous API only. After +enqueuing requests the synchronous API functions wait for notification +of the corresponding response. The completion thread delivers these +notifications, at which point the synchronous functions return to +their caller. + +Note that the IO and completion threads are POSIX threads, not +Perl ithreads. Net::ZooKeeper defined a C function so +that if Perl ithreads are spawned while a Net::ZooKeeper connection +is active, the Net::ZooKeeper handle objects inherited by the +spawned ithread contain undefined values so that they can not be used. +Thus each ithread will need to create its own private connections to a +ZooKeeper cluster. + +Note also that before invoking C to spawn a new process, +all Net::ZooKeeper handles should be destroyed so that all +connections to ZooKeeper are closed and all internal POSIX threads +have exited. If a child process needs to communicate with +ZooKeeper it should open its own private connections after it is +created by C. + +=head2 Signals + +The ZooKeeper C API uses TCP connections to communicate with +the ZooKeeper cluster. These connections may generate SIGPIPE +signals when they encounter errors, such as when a connection +is terminated by a ZooKeeper server. Therefore most applications +will want to trap or ignore SIGPIPE signals, e.g.: + + local $SIG{'PIPE'} = 'IGNORE'; + +Ignoring SIGPIPE signals (or providing a signal handler that returns +control to the interrupted program after receiving the signal) +will allow the ZooKeeper C client code to detect the connection error +and report it upon return from the next Net::ZooKeeper method. + +=head2 Error Handling + +Net::ZooKeeper methods return different values in the case of an +error depending on their purpose and context. For example, +C returns true if the node exists and false otherwise, +which may indicate either that the node does not exist or that +an error occurred. + +After any method returns a false, empty, or undefined value which +might indicate an error has occurred, the C method +may be called to examine the specific error code, if any. + +If C returns C, no error has occurred. If the +error code is less than C, it indicates a normal error +condition reported by the ZooKeeper server, such as C +(node does not exist) or C (node already exists). + +If the error code is greater than C, then a connection +error or server error has occurred and the client should probably +close the connection by undefining the Net::ZooKeeper handle object +and, if necessary, attempt to create a new connection to the +ZooKeeper cluster. + +=head2 Access Control + +If the ZooKeeper cluster is not configured with C then +it will respect the access controls set for each node in the +ZooKeeper hierarchy. These access controls are defined using ACLs +(Access Control Lists); see the ZooKeeper documentation for compete +details. + +In Net::ZooKeeper, ACLs are represented as arrays of hashes, where +each hash is an ACL entry that must contain three attributes, +C, C, and C. The C attribute's value +should be composed by combining ACL permission flags using the +bitwise OR operator. See C<:acl_perms> for a list of the +available ACL permission flags. + +The ACL for a node may be read using the C method. A +node's ACL may be set when the node is created by passing an ACL +array as the value of the C<'acl'> option to the C method, +and may be updated by passing an ACL array to the C method. + +When a client connects to a ZooKeeper cluster it is automatically +assigned authentication credentials based on its IP address. +Additional authentication credentials may be added using +the C method. Once a credential has been added for +the current session, there is no way to disable it. + +As an example, digest authentication may be enabled for a session +by calling C as follows: + + $zkh->add_auth('digest', "$username:$password"); + +Note that the username and password are transmitted in cleartext +to the ZooKeeper cluster. + +Such authentication credentials would enable access to a node +whose ACL contained an entry with a C attribute of +C<'digest'> and an C attribute containing a Base64-encoded +SHA1 digest of the string C<"$username:$password">. The +Perl modules Digest and MIME::Base64 may be used to create +such ACL ID values as follows: + + use Digest qw(); + use MIME::Base64 qw(); + + my $ctx = Digest->new('SHA-1')->add("$username:$password"); + my $digest = MIME::Base64::encode($ctx->digest()); + +Note that using the C method of the Digest module +will not result in digest strings with the "=" suffix characters +required by ZooKeeper. + +=head2 Logging + +As of ZooKeeper version 3.1.1, logging in the C client code is +implemented with a single, shared file handle to which all +of the internal POSIX threads write log messages; by default, +this file handle is attached to STDERR. + +Moreover, this file handle is shared by all active ZooKeeper +connections (each of which has its own private IO and completion +threads; see L above). + +Net::ZooKeeper therefore does not provide per-connection handle +attributes related to logging. The global function +C may be used to set the current +log level. See C<:log_levels> for a list of the available log +levels. The default log level is C. + +To capture ZooKeeper log messages to a file instead of STDERR, +redirect STDERR to a new file handle in the normal Perl manner: + + open(OLDERR, '>&', fileno(STDERR)) or + die("unable to dup STDERR: $!"); + open(STDERR, '>', $log_file) or + die("unable to redirect STDERR: $!"); + +=head2 Connection Order + +ZooKeeper clusters are typically made up of an odd number of +ZooKeeper servers. When connecting to such a cluster, the +C method should be passed a comma-separated list of +the hostnames and ports for each of the servers in the cluster, +e.g., C<'host1:7000,host2:7000,host2:7100'>. + +The default behaviour of the ZooKeeper client code is to +reorder this list randomly before making any connections. +A connection is then made to the first server in the reordered +list. If that connection fails, the IO thread will +automatically attempt to reconnect to the cluster, this time +to the next server in the list; when the last server in the list +is reached, the IO thread will continue again with the first +server. + +For certain purposes it may be necessary for ZooKeeper clients +to know the exact order in which the IO thread will attempt to +connect to the servers of a cluster. To do so, call +C. Note, +however, that this will affect all Net::ZooKeeper object +handles created by the current process. + +=head1 ATTRIBUTES + +=head2 Net::ZooKeeper + +The Net::ZooKeeper class provides the main interface to the +ZooKeeper client API. The following attributes are available +for each Net::ZooKeeper handle object and are specific to +that handle and the method calls invoked on it. As with DBI +handle objects, attributes may be read and written through +a hash interface, e.g.: + + print sprintf("Session timeout is %.2f seconds.\n", + $zkh->{session_timeout} / 1000); + + $zkh->{watch_timeout} = 10000; + +=over 4 + +=item hosts + +The comma-separated list of ZooKeeper server hostnames and ports +as passed to the C method. Note that by default the +ZooKeeper C client code will reorder this list before attempting +to connect for the first time; see L for details. + +This attribute is B and may not be modified. + +=item session_timeout + +The session timeout value, in milliseconds, as set by the +ZooKeeper server after connection. This value may not be +exactly the same as what was requested in the C<'session_timeout'> +option of the C method; the server will adjust the +requested timeout value so that it is within a certain range +of the server's C setting. See the ZooKeeper +documentation for details. + +Because the actual connection to the ZooKeeper server is +not made during the C method call but shortly +thereafter by the IO thread, note that this value may not +be initialized to its final value until at least one +other method which requires communication with the server +(such as C) has succeeded. + +This attribute is B and may not be modified. + +=item session_id + +The client's session ID value as set by the ZooKeeper server +after connection. This is a binary data string which may +be passed to subsequent C calls as the value of +the C<'session_id'> option, if the user wishes to attempt to +continue a session after a failure. Note that the server +may not honour such an attempt. + +Because the actual connection to the ZooKeeper server is +not made during the C method call but shortly +thereafter by the IO thread, note that this value may not +be initialized to its final value until at least one +other method which requires communication with the server +(such as C) has succeeded. + +This attribute is B and may not be modified. + +=item data_read_len + +The maximum length of node data that will be returned to +the caller by the C method. If a node's data exceeds +this length, the returned value will be shorter than the +actual node data as stored in the ZooKeeper cluster. + +The default maximum length of the node data returned by +C is 1023 bytes. This may be changed by setting +the C attribute to a different value. + +Passing a value for the C<'data_read_len'> option when calling +the C method will temporarily override the per-handle +maximum. + +=item path_read_len + +The maximum length of a newly created node's path that will +be returned to the caller by the C method. If the path +of the newly created node exceeds this length, the returned +value will be shorter than the actual path of the node as stored +in the ZooKeeper cluster. + +The default maximum length of the node path returned by +C is 1023 bytes. This may be changed by setting +the C attribute to a different value. + +Passing a value for the C<'path_read_len'> option when calling +the C method will temporarily override the current +value of this attribute. + +=item watch_timeout + +The C attribute value, in milliseconds, inherited by +all watch objects (of class Net::ZooKeeper::Watch) created by +calls to the C method. When a watch object's +C method is invoked without a C<'timeout'> option, +it waits for an event notification from the ZooKeeper cluster +for no longer than the timeout period specified by the value of +the watch object's C attribute. + +The default C attribute value for all watch objects +created by the C method is 1 minute (60000 +milliseconds). This may be changed for a particular handle +object by setting this attribute to a different value; afterwards, +the new value will be inherited by any watch objects created +by the handle object's C method. Previously +created watch objects will not be affected. + +Passing a value for the C<'timeout'> option when calling +the C method will temporarily override the current +value of this attribute and cause the newly created watch object +to inherit a different value. + +See also the C method, and the C attribute +and C method of the Net::ZooKeeper::Watch class. + +=item pending_watches + +The number of internal ZooKeeper watches created for this handle +object that are still awaiting an event notification from the +ZooKeeper cluster. + +Note that this number may be different than the number of +extant watch objects created by the handle object's C +method, not only because some event notifications may have +occurred, but also if any watch objects have been reassigned +by reusing them in more than one call to any of the C, +C, or C methods. + +This attribute is B and may not be modified. + +=back + +=head2 Net::ZooKeeper::Stat + +The Net::ZooKeeper::Stat class provides a hash interface to +the individual pieces of information which together compose the +state of a given ZooKeeper node. Net::ZooKeeper::Stat objects +are created by calling the C method on a Net::ZooKeeper +handle object, and may then be passed to any methods which accept +a C<'stat'> option value, such as C. + +Net::ZooKeeper::Stat objects may be reused multiple times. +If the Net::ZooKeeper method to which the stat object is +passed succeeds, then the stat object is updated with the newly +retrieved node state information, and any state information +previously stored in the stat object is overwritten. + +All of the attributes of stat objects are B. + +=over 4 + +=item ctime + +The creation time of the node in milliseconds since the epoch. + +=item mtime + +The time of the last modification of the node's data in +milliseconds since the epoch. + +=item data_len + +The length of the node's data in bytes. + +=item num_children + +The number of child nodes beneath of the current node. + +=item ephemeral_owner + +If the node was created with the C flag, +this attribute holds the session ID of the ZooKeeper client +which created the node. If the node was not created with +the C flag, this attribute is set to zero. + +=item version + +The number of revisions of the node's data. The ZooKeeper +cluster will increment this version number whenever the +node's data is changed. When the node is first created this +version number is initialized to zero. + +=item acl_version + +The number of revisions of the node's ACL. The ZooKeeper +cluster will increment this version number whenever the +node's ACL is changed. When the node is first created this +version number is initialized to zero. + +=item children_version + +The number of revisions of the node's list of child nodes. +The ZooKeeper cluster will increment this version number +whenever the list of child nodes is changed. When the node +is first created this version number is initialized to zero. + +=item czxid + +The ZooKeeper transaction ID (ZXID) of the transaction which +created the node. + +=item mzxid + +The ZooKeeper transaction ID (ZXID) of the transaction which +last modified the node's data. This is initially set to +the same transaction ID as the C attribute by the +C method. + +=item children_zxid + +The ZooKeeper transaction ID (ZXID) of the transaction which +last modified the node's list of child nodes. This is +initially set to the same transaction ID as the C +attribute by the C method. + +=back + +=head2 Net::ZooKeeper::Watch + +The Net::ZooKeeper::Watch class provides a hash interface +to the data returned by event notifications from the ZooKeeper +cluster. Net::ZooKeeper::Watch objects are created by calling +the C method on a Net::ZooKeeper handle object, and +may then be passed to any methods which accept a C<'watch'> +option value, such as C. + +Net::ZooKeeper::Watch objects may be reused multiple times. +Regardless of whether the Net::ZooKeeper method to which the +watch object is passed succeeds, the watch object will be +updated to receive an event notification exclusively for the +node referenced in that method call. In the case of an error, +however, the watch object may never receive any event +notification. + +=over 4 + +=item timeout + +The default timeout value, in milliseconds, for all +invocations of the C method made on the watch object. +When the C method is invoked without a +C<'timeout'> option value, it waits for an +event notification from the ZooKeeper cluster for no longer +than the timeout period specified by this attribute. +This default timeout period may be altered by setting this +attribute to a different value. + +Passing a value for the C<'timeout'> option when calling +the C method will temporarily override the current +value of this attribute and cause the C method to +use a different timeout period. + +When a Net::ZooKeeper handle object's C method is +invoked without a C<'timeout'> option, it returns a newly +created watch object whose C attribute value +is initialized to the current value of the handle object's +C attribute. When the C method is invoked +with a C<'timeout'> option, the new watch object's C +attribute value is initialized to the value specified by +the C<'timeout'> option. + +See also the C method, and the C attribute +and C method of the Net::ZooKeeper class. + +=item event + +The type of event which triggered the notification, such +as C if the node's data was changed. +See C<:events> for a list of the possible event types. +If zero, no event notification has occurred yet. + +Note that the events which will trigger a notification +will depend on the Net::ZooKeeper method to which +the watch object was passed. Watches set through the +C and C methods will report events relating +to the node's data, while watches set through the +C method will report events relating to the +creation or deletion of child nodes of the watched node. + +This attribute is B and may not be modified. + +=item state + +The state of the Net::ZooKeeper connection at the time of +the event notification. See C<:states> for a list of +the possible connection states. If zero, no event +notification has occurred yet. + +This attribute is B and may not be modified. + +=back + +=head1 METHODS + +=head2 Net::ZooKeeper + +The following methods are defined for the Net::ZooKeeper class. + +=over 4 + +=item new() + + $zkh = Net::ZooKeeper->new('host1:7000,host2:7000'); + $zkh = Net::ZooKeeper->new('host1:7000,host2:7000', + 'session_timeout' => $session_timeout, + 'session_id' => $session_id); + +Creates a new Net::ZooKeeper handle object and attempts to +connect to the one of the servers of the given ZooKeeper +cluster. As described in the L and +L sections, the ZooKeeper client code will +create an IO thread which maintains the connection with a +regular "heartbeat" request. In the event of a connection error +the IO thread will also attempt to reconnect to another one of +the servers using the same session ID. In general, these actions +should be invisible to the user, although Net::ZooKeeper methods +may return transient errors while the IO thread +reconnects with another server. + +To disconnect, undefine the Net::ZooKeeper handle object +or call the C method. (After calling C +the handle object can not be reused.) + +The ZooKeeper client code will send a "heartbeat" message +if a third of the session timeout period has elapsed without +any communication with the ZooKeeper server. A specific +session timeout period may be requested when creating a +Net::ZooKeeper handle object by supplying a value, in +milliseconds, for the C<'session_timeout'> option. The +ZooKeeper server adjust the requested timeout value so that +it is within a certain range of the server's C setting; +the actual session timeout value will be available as the +value of the handle's C attribute after at +least one method call has succeeded. See the C +attribute for more information. + +If no C<'session_timeout'> option is provided, the default +value of 10 seconds (10000 milliseconds) will be used in the +initial connection request; again, the actual timeout period to +which the server agrees will be available subsequently as the +value of the C attribute. + +Upon successful connection (i.e., after the success of a method +which requires communication with the server), the C +attribute will hold a short binary string which represents the +client's session ID as set by the server. All ephemeral nodes +created by the session are identified by this ID in the +C attribute of any Net::ZooKeeper::Stat objects +used to query their state. + +The ZooKeeper client code will use this session ID internally +whenever it tries to reconnect to another server in the ZooKeeper +cluster after detecting a failed connection. If it successfully +reconnects with the same session ID, the session will continue +and ephemeral nodes belonging to it will not be deleted. + +However, if the server determines that the session has timed +out (for example because no "heartbeat" requests have been +received within the agreed-upon session timeout period), the +session will be terminated by the cluster and all ephemeral nodes +owned by the current session automatically deleted. + +On occasion the ZooKeeper client code may not be able to quickly +reconnect to a live server and the caller may want to destroy +the existing Net::ZooKeeper handle object and attempt a +fresh connection using the same session ID as before with a +new Net::ZooKeeper object. To do so, save the C +attribute value before undefining the old handle object +and then pass that binary string as the value of the +C<'session_id'> option to the C method when creating the +next handle object. After the successful completion of a +method which requires communication with the server, if the +new handle object's C attribute value matches the +old session ID then the session has been successfully maintained; +otherwise, the old session was expired by the cluster. + +=item get_error() + + $code = $zkh->get_error(); + +Returns the ZooKeeper error code, if any, from the most +recent Net::ZooKeeper method invocation. The returned value +will be zero (equivalent to C) if no error occurred, +otherwise non-zero. Non-zero values may be compared to +the error code names exported by the C<:errors> tagset. + +See L for more details. + +=item add_auth() + + $zkh->add_auth('digest', "$username:$password"); + +The C method may be used to add authentication +credentials to a session. Once a credential has been added for +the current session, there is no way to disable it. + +When using the digest authentication scheme, note that the +username and password are transmitted in cleartext +to the ZooKeeper cluster. + +See L for additional details. + +=item create() + + $path = $zkh->create($req_path, $data); + $path = $zkh->create($req_path, $data, + 'flags' => (ZOO_EPHEMERAL | ZOO_SEQUENCE), + 'acl' => ZOO_OPEN_ACL_UNSAFE, + 'path_read_len' => 100); + +Requests that a node be created in the ZooKeeper cluster's +hierarchy with the given path and data. Upon success, +the returns the node's path, otherwise undef. + +The path returned by a successful C method call +may not be the new node's full path as it appears in the +ZooKeeper hierarchy, depending on the length of the actual +path and the value of the handle object's C +attribute. If the length of the actual path exceeds the +current value of the C attribute, the path +returned by the C method will be truncated; note +that the node's path in the ZooKeeper hierarchy is not +affected by this truncation. + +Specifying a value for the C<'path_read_len'> option will +temporarily override the value of the C +attribute for the duration of the C method. + +The flag values available for use with the C<'flags'> option +are C and C; both are +included in the C<:flags> tagset. The flags should be +combined with the bitwise OR operator if more than one +is required. + +The C flag causes the node to be marked as +ephemeral, meaning it will be automatically deleted if it +still exists when the client's session ends. The +C flag causes a unique integer to be appended +to the node's final path component. See the ZooKeeper +documentation for additional advice on how to use these flags. + +When creating a node it may be important to define an ACL +for it; to do this, pass a reference to an ACL array (as +described in L) using the C<'acl'> option. +See also the C<:acl_perms> and C<:acls> tagsets for lists +of the available ACL permission flags and pre-defined ACLs. + +=item delete() + + $ret = $zkh->delete($path); + $ret = $zkh->delete($path, 'version' => $version); + +Requests that a node be deleted from the ZooKeeper hierarchy. +Returns true upon success, false otherwise. + +If a value for the C<'version'> option is supplied, the node +will only be deleted if its version number matches the given +value. See the C attribute of the Net::ZooKeeper::Stat +class for details on node version numbering. + +=item exists() + + $ret = $zkh->exists($path); + $ret = $zkh->exists($path, 'stat' => $stat, 'watch' => $watch); + +Tests whether a given node exists. Returns true if the node +exists, otherwise false. When the C method is successful +but the node does not exist, it returns false, and C +will return C until another method is called on the +handle object. + +The C<'stat'> option may be used to request that a +Net::ZooKeeper::Stat object be updated with the node's +current state information. The stat object will only be +updated if the node exists and the C method +succeeds. The stat object must first have been created +using the C method. + +The C<'watch'> option may be used to request that a +Net::ZooKeeper::Watch object be assigned to receive +notification of an event which alters the node's data. +The watch object must first have been created using the +C method. If the watch object was previously +assigned to receive notifications for another node, it +will be reassigned even if the C method fails. + +=item get_children() + + @child_names = $zkh->get_children($path); + $num_children = $zkh->get_children($path, 'watch' => $watch); + +Queries the names or number of the child nodes stored beneath +a given node in the ZooKeeper hierarchy. In a list context, +returns a list of the child nodes' names upon success, otherwise +an empty list. When the C method is successful +but there are no child nodes, it returns an empty list, and +C will return C until another method is called +on the handle object. + +In a scalar context, C returns the number +of child nodes upon success, otherwise undef. + +The names of the child nodes are simply the final component +of the nodes' paths, i.e., the portion of their path which +follows the path of the given parent node, excluding the +"/" delimiter. + +The C<'watch'> option may be used to request that a +Net::ZooKeeper::Watch object be assigned to receive +notification of an event which alters the node's list of +child nodes. The watch object must first have been created +using the C method. If the watch object was +previously assigned to receive notifications for another node, +it will be reassigned even if the C method fails. + +=item get() + + $data = $zkh->get($path); + $data = $zkh->get($path, 'data_read_len' => 100, + 'stat' => $stat, 'watch' => $watch); + +Queries the data stored in a given node. Returns the +data as a string upon success, otherwise undef. Note +that the data may contain nulls if the node's data is +not a text string. + +If the length of the node's data exceeds the current value +of the handle object's C attribute, the +string returned by the C method will be truncated; +note that the node's data in the ZooKeeper cluster is not +affected by this truncation. + +Specifying a value for the C<'data_read_len'> option will +temporarily override the value of the C +attribute for the duration of the C method. + +The C<'stat'> option may be used to request that a +Net::ZooKeeper::Stat object be updated with the node's +current state information. The stat object will only be +updated if the C method succeeds. The stat object +must first have been created using the C method. + +The C<'watch'> option may be used to request that a +Net::ZooKeeper::Watch object be assigned to receive +notification of an event which alters the node's data. +The watch object must first have been created using the +C method. If the watch object was previously +assigned to receive notifications for another node, it +will be reassigned even if the C method fails. + +=item set() + + $ret = $zkh->set($path, $data); + $ret = $zkh->set($path, $data, 'version' => $version, + 'stat' => $stat); + +Requests that a node's data be updated in the ZooKeeper +hierarchy. Returns true upon success, false otherwise. + +If a value for the C<'version'> option is supplied, the node's +data will only be updated if its version number matches the +given value. See the C attribute of the +Net::ZooKeeper::Stat class for details on node version numbering. + +The C<'stat'> option may be used to request that a +Net::ZooKeeper::Stat object be updated with the node's +current state information. The stat object will only be +updated if the C method succeeds. The stat object +must first have been created using the C method. + +=item get_acl() + + @acl = $zkh->get_acl($path); + $num_acl_entries = $zkh->get_acl($path, 'stat' => $stat); + +Queries the ACL associated with a node in the ZooKeeper +hierarchy, if any. In a list context, returns an array with +the node's ACL entries upon success, otherwise +an empty list. When the C method is successful +but there are no ACL entries, it returns an empty list, and +C will return C until another method is called +on the handle object. + +The elements of the returned array are hashes, each of which +represents one ACL entry. Each hash contains C, +C, and C elements. See the L +section for additional details, and the +C<:acl_perms> and C<:acls> tagsets for lists of the +available ACL permission flags and pre-defined ACLs. + +In a scalar context, C returns the number +of ACL entries upon success, otherwise undef. + +The C<'stat'> option may be used to request that a +Net::ZooKeeper::Stat object be updated with the node's +current state information. The stat object will only be +updated if the C method succeeds. The stat object +must first have been created using the C method. + +=item set_acl() + + $acl = [{ + 'perms' => (ZOO_PERM_READ | ZOO_PERM_WRITE), + 'scheme' => 'digest', + 'id' => "$username:$digest" + }]; + $ret = $zkh->set_acl($path, $acl); + $ret = $zkh->set_acl($path, ZOO_OPEN_ACL_UNSAFE, + 'version' => $version); + +Requests that a node's ACL be updated in the ZooKeeper +hierarchy. Returns true upon success, false otherwise. + +The ACL should be passed as a reference to an array of +hashes, where each hash represents one ACL entry. Each +hash should contain C, C, and C elements +as described in the L section. +See also the C<:acl_perms> and C<:acls> tagsets for lists +of the available ACL permission flags and pre-defined ACLs. + +If a value for the C<'version'> option is supplied, the node's +ACL will only be updated if its version number matches the +given value. See the C attribute of the +Net::ZooKeeper::Stat class for details on node version numbering. + +=item stat() + + $stat = $zkh->stat(); + +Creates a new Net::ZooKeeper::Stat object which may be used +with the C<'stat'> option of the C, C, +C, and C methods. When the stat object +is passed to any of these methods, upon success its attribute +values are updated to reflect the current state of the +node specified in the method call. The stat object is not +updated if the method call does not succeed. + +=item watch() + + $watch = $zkh->watch(); + $watch = $zkh->watch('timeout' => $timeout); + +Creates a new Net::ZooKeeper::Watch object which may be +used to wait for event notifications from the ZooKeeper +cluster. Each time the watch object is passed to any +of the C, C, or C methods, +its attribute values are immediately reset to zero, and will +later be updated upon receipt of an appropriate event +notification for the node specified in the method call. + +The specific types of events which cause notifications to be +sent by the ZooKeeper cluster depend on the method call used. +After use with the C and C methods, the +watch object will be set to receive an event notification +caused by a modification of the node's data or the node itself +(e.g., deletion of the node). After use with the +C method, the watch object will be set to +receive an event notification caused by a modification +of the node's list of child nodes. + +Watch objects receive at most one event notification after +their assignment to a node by one of the C, +C, or C methods. Note that in the +case of an error, the watch object may never receive any +event notification. However, when the parent Net::ZooKeeper +handle object experiences a connection error, the ZooKeeper +client code will notify all pending watches with an event of +type C. See C for more information +regarding the watch object's attribute values after a +connection error. + +A watch object may be reused with another C, +C, or C method call at any time, +in which case the watch object's attribute values +are reset to zero and the watch object will no longer be updated +by any event notification relevant to the previous method call. + +When the C method is invoked without a C<'timeout'> +option, it returns a newly created watch object whose C +attribute value is initialized to the current value of the +Net::ZooKeeper handle object's C attribute. +Otherwise, when the C method is invoked with a +C<'timeout'> option, the new watch object's C attribute +value is initialized to the value specified by the +C<'timeout'> option. + +See also the C attribute, and the C +attribute and C method of the Net::ZooKeeper::Watch +class. + +=back + +=head2 Net::ZooKeeper::Stat + +No methods are defined for the Net::ZooKeeper::Stat class. + +=head2 Net::ZooKeeper::Watch + +Only one method is defined for the Net::ZooKeeper::Watch class. + +=over 4 + +=item wait() + + $ret = $watch->wait(); + $ret = $watch->wait('timeout' => $timeout); + +Waits for an event notification from the ZooKeeper cluster +for the node most recently associated with the watch object. +Nodes are associated with a watch object by passing the +watch object as the value of a C<'watch'> option to a +Net::ZooKeeper method; methods which accept a C<'watch'> option +are C, C, and C. + +When the C method is invoked with a C<'timeout'> +option, it waits for no more than the number of milliseconds +specified by the C<'timeout'> option. +Otherwise, when the C method is invoked without a +C<'timeout'> option, it waits for no more than the timeout +period specified by the value of the watch object's C +attribute. + +The C method returns true if an event notification +was received, otherwise false. When C returns true, +the C and C attributes of the watch object +will be updated with the event's type and the current +connection state. + +When the parent Net::ZooKeeper handle object experiences a +connection error, the ZooKeeper client code will notify all +pending watches with an event of type C. +In this case, the C attribute will report the current +state of the connection to the ZooKeeper cluster. + +See also the C attribute, and the C method +and C attribute of the Net::ZooKeeper class. + +=back + +=head1 FUNCTIONS + +The following functions have global scope and affect all +Net::ZooKeeper handle objects. + +=over 4 + +=item set_log_level() + + Net::ZooKeeper::set_log_level($level); + +The C function may be called to +alter the number and type of messages written to the current log +file handle (if any). The default value is C +which disables all logging. + +See the L section for more details and C<:log_levels> +for a list of the available log levels. + +=item set_deterministic_conn_order() + + Net::ZooKeeper::set_deterministic_conn_order(1); + +The C function +may be called to indicate whether or not the list of ZooKeeper +servers passed to the C method should be randomly permuted. +If set to a true value, the list of servers will not be altered. +The default false value indicates the list of servers will +be randomly reordered prior to connection. + +See the L section for more details. + +=back + +=head1 EXPORTS + +Nothing is exported by default. Various tagsets exist which +group the tags available for export into different categories: + +=over 4 + +=item :errors + +ZooKeeper error codes. These may be compared to the values +returned by the C method. + +=item :node_flags + +The ZooKeeper node flags C and C, +which may be passed in the C<'flags'> option to the C +method. When more than node flag is required they +should be combined using the bitwise OR operator. + +=item :acl_perms + +The ZooKeeper ACL permission flags which may be used in +the value of the C attribute of an ACL entry hash. +When more than one ACL permission flag is required they +should be combined using the bitwise OR operator. + +The available ACL permission flags are C, +C, C, C, +and C. For convenience, C is +defined as the bitwise OR of all of these flags. + +=item :acls + +Common ZooKeeper ACLs which may be useful. C +specifies a node which is entirely open to all users with no +restrictions at all. C specifies +a node which is readable by all users; permissions for other actions +are not defined in this ACL. C specifies a node +for which all actions require the same authentication credentials as +held by the session which created the node; this implies that a +session should authenticate with an appropriate scheme before +creating a node with this ACL. + +=item :events + +The ZooKeeper event types which are returned in value of +the C attribute a Net::ZooKeeper::Watch object after +an event occurs on a watched node. + +=item :states + +The ZooKeeper connection states which are returned in value of +the C attribute of a Net::ZooKeeper::Watch object after +an event occurs on a watched node. + +=item :log_levels + +The ZooKeeper log levels which may be passed to the +C function. The available +log levels are, from least to most verbose, C +(the default), C, C, +C, and C. + +=item :all + +Everything from all of the above tagsets. + +=back + +=head1 SEE ALSO + +The Apache ZooKeeper project's home page at +L provides a wealth of detail +on how to develop applications using ZooKeeper. + +=head1 AUTHOR + +Chris Darroch, Echrisd@apache.orgE + +=head1 COPYRIGHT AND LICENSE + +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +=cut + diff --git a/src/contrib/zkperl/ZooKeeper.xs b/src/contrib/zkperl/ZooKeeper.xs new file mode 100644 index 0000000..4b6067b --- /dev/null +++ b/src/contrib/zkperl/ZooKeeper.xs @@ -0,0 +1,2664 @@ +/* Net::ZooKeeper - Perl extension for Apache ZooKeeper + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#define PERL_NO_GET_CONTEXT + +#include "EXTERN.h" +#include "perl.h" +#include "XSUB.h" + +#include /* pthread_mutex_lock(), etc. */ +#include /* memset(), etc. */ +#include /* CHAR_BIT */ +#include /* gettimeofday() */ + +#include + +#include "build/check_zk_version.h" + + +#define PACKAGE_NAME "Net::ZooKeeper" +#define PACKAGE_SIGNATURE 19631123 + +#define STAT_PACKAGE_NAME "Net::ZooKeeper::Stat" +#define STAT_PACKAGE_SIGNATURE 19960512 + +#define WATCH_PACKAGE_NAME "Net::ZooKeeper::Watch" +#define WATCH_PACKAGE_SIGNATURE 20050326 + +#define MAX_KEY_NAME_LEN 16 /* "children_version" */ + +#define NUM_ACL_ENTRY_KEYS 3 +#define NUM_KEYS 7 +#define NUM_STAT_KEYS 11 +#define NUM_WATCH_KEYS 3 + +#define DEFAULT_RECV_TIMEOUT_MSEC 10000 + +#define DEFAULT_DATA_BUF_LEN 1023 +#define DEFAULT_PATH_BUF_LEN 1023 +#define DEFAULT_WATCH_TIMEOUT 60000 + +#define ZOO_LOG_LEVEL_OFF 0 + +#ifndef strcaseEQ +#define strcaseEQ(a,b) (!strcasecmp((a),(b))) +#endif + + +typedef struct Stat zk_stat_t; + +typedef HV* Net__ZooKeeper__Stat; + +typedef struct zk_watch_t zk_watch_t; + +struct zk_watch_t { + pthread_mutex_t mutex; + pthread_cond_t cond; + int done; + int ret; + int event_type; + int event_state; + unsigned int timeout; + zk_watch_t *prev; + zk_watch_t *next; + int ref_count; +}; + +typedef HV* Net__ZooKeeper__Watch; + +typedef struct { + zhandle_t *handle; + zk_watch_t *first_watch; + int data_buf_len; + int path_buf_len; + unsigned int watch_timeout; + const char *hosts; + int hosts_len; + int last_ret; + int last_errno; +} zk_t; + +typedef HV* Net__ZooKeeper; + +typedef struct { + I32 signature; + union { + zk_t *zk; + zk_stat_t *stat; + zk_watch_t *watch; + } handle; +} zk_handle_t; + +typedef struct { + const char name[MAX_KEY_NAME_LEN + 1]; + U32 name_len; + size_t offset; + size_t size; + U32 hash; +} zk_key_t; + + +static zk_key_t zk_acl_entry_keys[NUM_ACL_ENTRY_KEYS] = { + {"perms", 0, 0, 0, 0}, + {"scheme", 0, 0, 0, 0}, + {"id", 0, 0, 0, 0} +}; + +static zk_key_t zk_keys[NUM_KEYS] = { + {"data_read_len", 0, 0, 0, 0}, + {"path_read_len", 0, 0, 0, 0}, + {"watch_timeout", 0, 0, 0, 0}, + {"hosts", 0, 0, 0, 0}, + {"session_timeout", 0, 0, 0, 0}, + {"session_id", 0, 0, 0, 0}, + {"pending_watches", 0, 0, 0, 0} +}; + +static zk_key_t zk_stat_keys[NUM_STAT_KEYS] = { + {"czxid", 0, offsetof(struct Stat, czxid), + sizeof(((struct Stat*) 0)->czxid), 0}, + {"mzxid", 0, offsetof(struct Stat, mzxid), + sizeof(((struct Stat*) 0)->mzxid), 0}, + {"ctime", 0, offsetof(struct Stat, ctime), + sizeof(((struct Stat*) 0)->ctime), 0}, + {"mtime", 0, offsetof(struct Stat, mtime), + sizeof(((struct Stat*) 0)->mtime), 0}, + {"version", 0, offsetof(struct Stat, version), + sizeof(((struct Stat*) 0)->version), 0}, + {"children_version", 0, offsetof(struct Stat, cversion), + sizeof(((struct Stat*) 0)->cversion), 0}, + {"acl_version", 0, offsetof(struct Stat, aversion), + sizeof(((struct Stat*) 0)->aversion), 0}, + {"ephemeral_owner", 0, offsetof(struct Stat, ephemeralOwner), + sizeof(((struct Stat*) 0)->ephemeralOwner), 0}, + {"data_len", 0, offsetof(struct Stat, dataLength), + sizeof(((struct Stat*) 0)->dataLength), 0}, + {"num_children", 0, offsetof(struct Stat, numChildren), + sizeof(((struct Stat*) 0)->numChildren), 0}, + {"children_zxid", 0, offsetof(struct Stat, pzxid), + sizeof(((struct Stat*) 0)->pzxid), 0} +}; + +static zk_key_t zk_watch_keys[NUM_WATCH_KEYS] = { + {"timeout", 0, 0, 0, 0}, + {"event", 0, 0, 0, 0}, + {"state", 0, 0, 0, 0} +}; + + +static void _zk_watcher(zhandle_t *handle, int type, int state, + const char *path, void *context) +{ + zk_watch_t *watch_ctx = context; + + pthread_mutex_lock(&watch_ctx->mutex); + + watch_ctx->event_type = type; + watch_ctx->event_state = state; + + watch_ctx->done = 1; + + pthread_cond_signal(&watch_ctx->cond); + pthread_mutex_unlock(&watch_ctx->mutex); + + return; +} + +static void _zk_auth_completion(int ret, const void *data) +{ + zk_watch_t *watch_ctx = (zk_watch_t*) data; + + pthread_mutex_lock(&watch_ctx->mutex); + + watch_ctx->ret = ret; + + watch_ctx->done = 1; + + pthread_cond_signal(&watch_ctx->cond); + pthread_mutex_unlock(&watch_ctx->mutex); + + return; +} + +static zk_watch_t *_zk_create_watch(pTHX) +{ + zk_watch_t *watch; + + Newxz(watch, 1, zk_watch_t); + + if (pthread_mutex_init(&watch->mutex, NULL)) { + int save_errno = errno; + + Safefree(watch); + + errno = save_errno; + return NULL; + } + + if (pthread_cond_init(&watch->cond, NULL)) { + int save_errno = errno; + + pthread_mutex_destroy(&watch->mutex); + Safefree(watch); + + errno = save_errno; + return NULL; + } + + return watch; +} + +static void _zk_destroy_watch(pTHX_ zk_watch_t *watch) +{ + pthread_cond_destroy(&watch->cond); + pthread_mutex_destroy(&watch->mutex); + + Safefree(watch); + + return; +} + +static zk_watch_t *_zk_acquire_watch(pTHX) +{ + zk_watch_t *watch = _zk_create_watch(aTHX); + + if (watch) { + watch->ref_count = 1; + } + + return watch; +} + +static void _zk_release_watch(pTHX_ zk_watch_t *watch, int list) +{ + if (list) { + if (watch->prev) { + watch->prev->next = watch->next; + } + if (watch->next) { + watch->next->prev = watch->prev; + } + watch->prev = NULL; + watch->next = NULL; + } + + if (--watch->ref_count == 0) { + _zk_destroy_watch(aTHX_ watch); + } + + return; +} + +static unsigned int _zk_release_watches(pTHX_ zk_watch_t *first_watch, + int final) +{ + zk_watch_t *watch = first_watch->next; + unsigned int pending_watches = 0; + + while (watch) { + zk_watch_t *next_watch = watch->next; + int done = final; + + if (!final) { + pthread_mutex_lock(&watch->mutex); + done = watch->done; + pthread_mutex_unlock(&watch->mutex); + } + + if (done) { + _zk_release_watch(aTHX_ watch, 1); + } + else { + ++pending_watches; + } + + watch = next_watch; + } + + return pending_watches; +} + +static void _zk_replace_watch(pTHX_ zk_handle_t *handle, + zk_watch_t *first_watch, + zk_watch_t *old_watch, zk_watch_t *new_watch) +{ + zk_watch_t *next_watch; + + new_watch->timeout = old_watch->timeout; + + _zk_release_watch(aTHX_ old_watch, 0); + + /* cleanup any completed watches not tied to a handle */ + _zk_release_watches(aTHX_ first_watch, 0); + + next_watch = first_watch->next; + + new_watch->prev = first_watch; + new_watch->next = next_watch; + + if (next_watch) { + next_watch->prev = new_watch; + } + + first_watch->next = new_watch; + + ++new_watch->ref_count; + + handle->handle.watch = new_watch; + + return; +} + +static void _zk_free_acl(pTHX_ struct ACL_vector *acl) +{ + if (acl->data) { + Safefree(acl->data); + } + + return; +} + +static const char *_zk_fill_acl(pTHX_ AV *acl_arr, struct ACL_vector *acl) +{ + I32 num_acl_entries = av_len(acl_arr) + 1; + int i; + + Zero(acl, 1, struct ACL_vector); + + if (num_acl_entries <= 0) { + return NULL; + } + else if (num_acl_entries > PERL_INT_MAX) { + num_acl_entries = PERL_INT_MAX; + } + + Newx(acl->data, num_acl_entries, struct ACL); + + for (i = 0; i < num_acl_entries; ++i) { + SV **acl_entry_ptr; + HV *acl_entry_hash; + zk_key_t *key; + SV **val_ptr; + struct ACL acl_entry; + + acl_entry_ptr = av_fetch(acl_arr, i, 0); + + if (!acl_entry_ptr) { + continue; + } + + if (!SvROK(*acl_entry_ptr) || + SvTYPE(SvRV(*acl_entry_ptr)) != SVt_PVHV) { + _zk_free_acl(aTHX_ acl); + + return "invalid ACL entry hash reference"; + } + + acl_entry_hash = (HV*) SvRV(*acl_entry_ptr); + + key = &zk_acl_entry_keys[0]; + val_ptr = hv_fetch(acl_entry_hash, key->name, key->name_len, 0); + + if (!val_ptr) { + _zk_free_acl(aTHX_ acl); + + return "no ACL entry perms element"; + } + + acl_entry.perms = SvIV(*val_ptr); + + if (!acl_entry.perms || (acl_entry.perms & ~ZOO_PERM_ALL)) { + _zk_free_acl(aTHX_ acl); + + return "invalid ACL entry perms"; + } + + key = &zk_acl_entry_keys[1]; + val_ptr = hv_fetch(acl_entry_hash, key->name, key->name_len, 0); + + if (!val_ptr) { + _zk_free_acl(aTHX_ acl); + + return "no ACL entry scheme element"; + } + + acl_entry.id.scheme = SvPV_nolen(*val_ptr); + + key = &zk_acl_entry_keys[2]; + val_ptr = hv_fetch(acl_entry_hash, key->name, key->name_len, 0); + + if (!val_ptr) { + _zk_free_acl(aTHX_ acl); + + return "no ACL entry id element"; + } + + acl_entry.id.id = SvPV_nolen(*val_ptr); + + ++acl->count; + acl->data[i] = acl_entry; + } + + return NULL; +} + +static void _zk_fill_acl_entry_hash(pTHX_ struct ACL *acl_entry, + HV *acl_entry_hash) +{ + zk_key_t *key; + SV *val; + + key = &zk_acl_entry_keys[0]; + val = newSViv(acl_entry->perms); + + if (!hv_store(acl_entry_hash, key->name, key->name_len, val, key->hash)) { + SvREFCNT_dec(val); + } + + key = &zk_acl_entry_keys[1]; + val = newSVpv(acl_entry->id.scheme, 0); + + if (!hv_store(acl_entry_hash, key->name, key->name_len, val, key->hash)) { + SvREFCNT_dec(val); + } + + key = &zk_acl_entry_keys[2]; + val = newSVpv(acl_entry->id.id, 0); + + if (!hv_store(acl_entry_hash, key->name, key->name_len, val, key->hash)) { + SvREFCNT_dec(val); + } + + return; +} + +static zk_handle_t *_zk_check_handle_inner(pTHX_ HV *attr_hash, + I32 package_signature) +{ + zk_handle_t *handle = NULL; + + if (SvRMAGICAL(attr_hash)) { + MAGIC *magic = mg_find((SV*) attr_hash, PERL_MAGIC_ext); + + if (magic) { + handle = (zk_handle_t*) magic->mg_ptr; + + if (handle->signature != package_signature) { + handle = NULL; + } + } + } + + return handle; +} + +static zk_handle_t *_zk_check_handle_outer(pTHX_ HV *hash, HV **attr_hash_ptr, + const char *package_name, + I32 package_signature) +{ + zk_handle_t *handle = NULL; + + if (attr_hash_ptr) { + *attr_hash_ptr = NULL; + } + + if (SvRMAGICAL((SV*) hash)) { + MAGIC *magic = mg_find((SV*) hash, PERL_MAGIC_tied); + + if (magic) { + SV *attr = magic->mg_obj; + + if (SvROK(attr) && SvTYPE(SvRV(attr)) == SVt_PVHV && + sv_derived_from(attr, package_name)) { + HV *attr_hash = (HV*) SvRV(attr); + + handle = _zk_check_handle_inner(aTHX_ attr_hash, + package_signature); + + if (handle && attr_hash_ptr) { + *attr_hash_ptr = attr_hash; + } + } + } + } + + return handle; +} + +static zk_t *_zk_get_handle_inner(pTHX_ Net__ZooKeeper attr_hash) +{ + zk_handle_t *handle; + + handle = _zk_check_handle_inner(aTHX_ attr_hash, PACKAGE_SIGNATURE); + + return handle ? handle->handle.zk : NULL; +} + +static zk_t *_zk_get_handle_outer(pTHX_ Net__ZooKeeper zkh) +{ + zk_handle_t *handle; + + handle = _zk_check_handle_outer(aTHX_ zkh, NULL, PACKAGE_NAME, + PACKAGE_SIGNATURE); + + return handle ? handle->handle.zk : NULL; +} + +static zk_stat_t *_zks_get_handle_inner(pTHX_ Net__ZooKeeper__Stat attr_hash) +{ + zk_handle_t *handle; + + handle = _zk_check_handle_inner(aTHX_ attr_hash, STAT_PACKAGE_SIGNATURE); + + return handle ? handle->handle.stat : NULL; +} + +static zk_stat_t *_zks_get_handle_outer(pTHX_ Net__ZooKeeper__Stat zksh) +{ + zk_handle_t *handle; + + handle = _zk_check_handle_outer(aTHX_ zksh, NULL, STAT_PACKAGE_NAME, + STAT_PACKAGE_SIGNATURE); + + return handle ? handle->handle.stat : NULL; +} + +static zk_watch_t *_zkw_get_handle_inner(pTHX_ Net__ZooKeeper__Watch attr_hash) +{ + zk_handle_t *handle; + + handle = _zk_check_handle_inner(aTHX_ attr_hash, WATCH_PACKAGE_SIGNATURE); + + return handle ? handle->handle.watch : NULL; +} + +static zk_watch_t *_zkw_get_handle_outer(pTHX_ Net__ZooKeeper__Watch zkwh, + zk_handle_t **handle_ptr) +{ + zk_handle_t *handle; + + handle = _zk_check_handle_outer(aTHX_ zkwh, NULL, WATCH_PACKAGE_NAME, + WATCH_PACKAGE_SIGNATURE); + + if (handle_ptr) { + *handle_ptr = handle; + } + + return handle ? handle->handle.watch : NULL; +} + + +MODULE = Net::ZooKeeper PACKAGE = Net::ZooKeeper PREFIX = zk_ + +REQUIRE: 1.9508 + +PROTOTYPES: ENABLE + +BOOT: +{ + int i; + + for (i = 0; i < NUM_ACL_ENTRY_KEYS; ++i) { + zk_key_t *key = &zk_acl_entry_keys[i]; + + key->name_len = strlen(key->name); + PERL_HASH(key->hash, key->name, key->name_len); + } + + for (i = 0; i < NUM_KEYS; ++i) { + zk_keys[i].name_len = strlen(zk_keys[i].name); + } + + for (i = 0; i < NUM_STAT_KEYS; ++i) { + zk_stat_keys[i].name_len = strlen(zk_stat_keys[i].name); + } + + for (i = 0; i < NUM_WATCH_KEYS; ++i) { + zk_watch_keys[i].name_len = strlen(zk_watch_keys[i].name); + } + + zoo_set_log_stream(NULL); + zoo_set_debug_level(0); +} + + +I32 +zk_constant(alias=Nullch) + char *alias + ALIAS: + ZOK = ZOK + ZSYSTEMERROR = ZSYSTEMERROR + ZRUNTIMEINCONSISTENCY = ZRUNTIMEINCONSISTENCY + ZDATAINCONSISTENCY = ZDATAINCONSISTENCY + ZCONNECTIONLOSS = ZCONNECTIONLOSS + ZMARSHALLINGERROR = ZMARSHALLINGERROR + ZUNIMPLEMENTED = ZUNIMPLEMENTED + ZOPERATIONTIMEOUT = ZOPERATIONTIMEOUT + ZBADARGUMENTS = ZBADARGUMENTS + ZINVALIDSTATE = ZINVALIDSTATE + ZAPIERROR = ZAPIERROR + ZNONODE = ZNONODE + ZNOAUTH = ZNOAUTH + ZBADVERSION = ZBADVERSION + ZNOCHILDRENFOREPHEMERALS = ZNOCHILDRENFOREPHEMERALS + ZNODEEXISTS = ZNODEEXISTS + ZNOTEMPTY = ZNOTEMPTY + ZSESSIONEXPIRED = ZSESSIONEXPIRED + ZINVALIDCALLBACK = ZINVALIDCALLBACK + ZINVALIDACL = ZINVALIDACL + ZAUTHFAILED = ZAUTHFAILED + ZCLOSING = ZCLOSING + ZNOTHING = ZNOTHING + + ZOO_EPHEMERAL = ZOO_EPHEMERAL + ZOO_SEQUENCE = ZOO_SEQUENCE + + ZOO_PERM_READ = ZOO_PERM_READ + ZOO_PERM_WRITE = ZOO_PERM_WRITE + ZOO_PERM_CREATE = ZOO_PERM_CREATE + ZOO_PERM_DELETE = ZOO_PERM_DELETE + ZOO_PERM_ADMIN = ZOO_PERM_ADMIN + ZOO_PERM_ALL = ZOO_PERM_ALL + + ZOO_CREATED_EVENT = ZOO_CREATED_EVENT + ZOO_DELETED_EVENT = ZOO_DELETED_EVENT + ZOO_CHANGED_EVENT = ZOO_CHANGED_EVENT + ZOO_CHILD_EVENT = ZOO_CHILD_EVENT + ZOO_SESSION_EVENT = ZOO_SESSION_EVENT + ZOO_NOTWATCHING_EVENT = ZOO_NOTWATCHING_EVENT + + ZOO_EXPIRED_SESSION_STATE = ZOO_EXPIRED_SESSION_STATE + ZOO_AUTH_FAILED_STATE = ZOO_AUTH_FAILED_STATE + ZOO_CONNECTING_STATE = ZOO_CONNECTING_STATE + ZOO_ASSOCIATING_STATE = ZOO_ASSOCIATING_STATE + ZOO_CONNECTED_STATE = ZOO_CONNECTED_STATE + + ZOO_LOG_LEVEL_OFF = ZOO_LOG_LEVEL_OFF + ZOO_LOG_LEVEL_ERROR = ZOO_LOG_LEVEL_ERROR + ZOO_LOG_LEVEL_WARN = ZOO_LOG_LEVEL_WARN + ZOO_LOG_LEVEL_INFO = ZOO_LOG_LEVEL_INFO + ZOO_LOG_LEVEL_DEBUG = ZOO_LOG_LEVEL_DEBUG + CODE: + if (!ix) { + if (!alias) { + alias = GvNAME(CvGV(cv)); + } + + if (strEQ(alias, "ZOK")) { + RETVAL = ZOK; + } + else if (strEQ(alias, "ZOO_LOG_LEVEL_OFF")) { + RETVAL = ZOO_LOG_LEVEL_OFF; + } + else { + Perl_croak(aTHX_ "unknown " PACKAGE_NAME " constant: %s", + alias); + } + } + else { + RETVAL = ix; + } + OUTPUT: + RETVAL + + +AV * +zk_acl_constant(alias=Nullch) + char *alias + ALIAS: + ZOO_OPEN_ACL_UNSAFE = 1 + ZOO_READ_ACL_UNSAFE = 2 + ZOO_CREATOR_ALL_ACL = 3 + PREINIT: + struct ACL_vector acl; + AV *acl_arr; + int i; + PPCODE: + if (!ix && !alias) { + alias = GvNAME(CvGV(cv)); + } + + if (ix == 1 || (alias != NULL && strEQ(alias, "ZOO_OPEN_ACL_UNSAFE"))) { + acl = ZOO_OPEN_ACL_UNSAFE; + } + else if (ix == 2 || (alias != NULL && strEQ(alias, "ZOO_READ_ACL_UNSAFE"))) { + acl = ZOO_READ_ACL_UNSAFE; + } + else if (ix == 3 || (alias != NULL && strEQ(alias, "ZOO_CREATOR_ALL_ACL"))) { + acl = ZOO_CREATOR_ALL_ACL; + } + else { + Perl_croak(aTHX_ "unknown " PACKAGE_NAME " constant: %s", alias); + } + + acl_arr = newAV(); + + av_extend(acl_arr, acl.count); + + for (i = 0; i < acl.count; ++i) { + HV *acl_entry_hash = newHV(); + SV *val; + + _zk_fill_acl_entry_hash(aTHX_ &acl.data[i], acl_entry_hash); + + val = newRV_noinc((SV*) acl_entry_hash); + + if (!av_store(acl_arr, i, val)) { + SvREFCNT_dec(val); + } + } + + ST(0) = sv_2mortal(newRV_noinc((SV*) acl_arr)); + + XSRETURN(1); + + +void +zk_set_log_level(level) + int level + PPCODE: + if (level < ZOO_LOG_LEVEL_OFF || level > ZOO_LOG_LEVEL_DEBUG) { + Perl_croak(aTHX_ "invalid log level: %d", level); + } + + zoo_set_debug_level(level); + + XSRETURN_EMPTY; + + +void +zk_set_deterministic_conn_order(flag) + bool flag + PPCODE: + zoo_deterministic_conn_order(!!flag); + + XSRETURN_EMPTY; + + +void +zk_new(package, hosts, ...) + char *package + char *hosts + PREINIT: + int recv_timeout = DEFAULT_RECV_TIMEOUT_MSEC; + const clientid_t *client_id = NULL; + zk_t *zk; + zk_handle_t *handle; + HV *stash, *zk_hash, *attr_hash; + SV *attr; + int i; + PPCODE: + if (items > 2 && items % 2) { + Perl_croak(aTHX_ "invalid number of arguments"); + } + + for (i = 2; i < items; i += 2) { + char *key = SvPV_nolen(ST(i)); + + if (strcaseEQ(key, "session_timeout")) { + recv_timeout = SvIV(ST(i + 1)); + + /* NOTE: would be nice if requirement in zookeeper_interest() + * that recv_timeout*2 be non-negative was documented + */ + if (recv_timeout < 0 || recv_timeout > (PERL_INT_MAX >> 1)) { + Perl_croak(aTHX_ "invalid session timeout: %d", + recv_timeout); + } + } + else if (strcaseEQ(key, "session_id")) { + STRLEN client_id_len; + + client_id = (const clientid_t*) SvPV(ST(i + 1), client_id_len); + + if (client_id_len != sizeof(clientid_t)) { + Perl_croak(aTHX_ "invalid session ID"); + } + } + } + + Newxz(zk, 1, zk_t); + + zk->handle = zookeeper_init(hosts, NULL, recv_timeout, + client_id, NULL, 0); + + if (!zk->handle) { + Safefree(zk); + + XSRETURN_UNDEF; + } + + Newxz(zk->first_watch, 1, zk_watch_t); + + zk->data_buf_len = DEFAULT_DATA_BUF_LEN; + zk->path_buf_len = DEFAULT_PATH_BUF_LEN; + zk->watch_timeout = DEFAULT_WATCH_TIMEOUT; + + zk->hosts_len = strlen(hosts); + zk->hosts = savepvn(hosts, zk->hosts_len); + + Newx(handle, 1, zk_handle_t); + + handle->signature = PACKAGE_SIGNATURE; + handle->handle.zk = zk; + + /* We use several tricks from DBI here. The attr_hash is our + * empty inner hash; we attach extra magic to it in the form of + * our zk_handle_t structure. Then we tie attr_hash to zk_hash, + * our outer hash. This is what is passed around (by reference) by + * callers. + * + * Most methods use _zk_get_handle_outer() which finds our inner + * handle, then returns the zk_t structure from its extra magic + * pointer. + * + * However, the tied hash methods, FETCH(), STORE(), and so forth, + * receive an already-dereferenced inner handle hash. This is + * because we bless both inner and outer handles into this class, + * so when a caller's code references a hash element in our + * outer handle, Perl detects its tied magic, looks up the + * tied object (our inner handle) and invokes the tied hash methods + * in its class on it. Since we blessed it into the same class + * as the outer handle, these methods simply reside in our package. + */ + + stash = gv_stashpv(package, GV_ADDWARN); + + attr_hash = newHV(); + + sv_magic((SV*) attr_hash, Nullsv, PERL_MAGIC_ext, + (const char*) handle, 0); + + attr = sv_bless(newRV_noinc((SV*) attr_hash), stash); + + zk_hash = newHV(); + + sv_magic((SV*) zk_hash, attr, PERL_MAGIC_tied, Nullch, 0); + SvREFCNT_dec(attr); + + ST(0) = sv_bless(sv_2mortal(newRV_noinc((SV*) zk_hash)), stash); + + XSRETURN(1); + + +void +zk_DESTROY(zkh) + Net::ZooKeeper zkh + PREINIT: + zk_handle_t *handle; + HV *attr_hash; + int ret = ZBADARGUMENTS; + PPCODE: + handle = _zk_check_handle_outer(aTHX_ zkh, &attr_hash, + PACKAGE_NAME, PACKAGE_SIGNATURE); + + if (!handle) { + handle = _zk_check_handle_inner(aTHX_ zkh, PACKAGE_SIGNATURE); + + if (handle) { + attr_hash = zkh; + zkh = NULL; + } + } + + if (handle) { + zk_t *zk = handle->handle.zk; + + ret = zookeeper_close(zk->handle); + + /* detach all now-inactive watches still tied to handles */ + _zk_release_watches(aTHX_ zk->first_watch, 1); + + Safefree(zk->first_watch); + Safefree(zk->hosts); + Safefree(zk); + Safefree(handle); + + sv_unmagic((SV*) attr_hash, PERL_MAGIC_ext); + } + + if (zkh && attr_hash) { + sv_unmagic((SV*) zkh, PERL_MAGIC_tied); + } + + if (GIMME_V == G_VOID) { + XSRETURN_EMPTY; + } + else if (ret == ZOK) { + XSRETURN_YES; + } + else { + XSRETURN_NO; + } + + +void +zk_CLONE(package) + char *package + PPCODE: + XSRETURN_EMPTY; + + +void +zk_CLONE_SKIP(package) + char *package + PPCODE: + XSRETURN_YES; + + +void +zk_TIEHASH(package, ...) + char *package + PPCODE: + Perl_croak(aTHX_ "tying hashes of class " + PACKAGE_NAME " not supported"); + + +void +zk_UNTIE(attr_hash, ref_count) + Net::ZooKeeper attr_hash + IV ref_count + PPCODE: + Perl_croak(aTHX_ "untying hashes of class " + PACKAGE_NAME " not supported"); + + +void +zk_FIRSTKEY(attr_hash) + Net::ZooKeeper attr_hash + PREINIT: + zk_t *zk; + PPCODE: + zk = _zk_get_handle_inner(aTHX_ attr_hash); + + if (!zk) { + Perl_croak(aTHX_ "invalid handle"); + } + + ST(0) = sv_2mortal(newSVpvn(zk_keys[0].name, zk_keys[0].name_len)); + + XSRETURN(1); + + +void +zk_NEXTKEY(attr_hash, attr_key) + Net::ZooKeeper attr_hash + SV *attr_key + PREINIT: + zk_t *zk; + char *key; + int i; + PPCODE: + zk = _zk_get_handle_inner(aTHX_ attr_hash); + + if (!zk) { + Perl_croak(aTHX_ "invalid handle"); + } + + key = SvPV_nolen(attr_key); + + for (i = 0; i < NUM_KEYS; ++i) { + if (strcaseEQ(key, zk_keys[i].name)) { + ++i; + + break; + } + } + + if (i < NUM_KEYS) { + ST(0) = sv_2mortal(newSVpvn(zk_keys[i].name, zk_keys[i].name_len)); + + XSRETURN(1); + } + else { + XSRETURN_EMPTY; + } + + +void +zk_SCALAR(attr_hash) + Net::ZooKeeper attr_hash + PPCODE: + XSRETURN_YES; + + +void +zk_FETCH(attr_hash, attr_key) + Net::ZooKeeper attr_hash + SV *attr_key + PREINIT: + zk_t *zk; + char *key; + SV *val = NULL; + PPCODE: + zk = _zk_get_handle_inner(aTHX_ attr_hash); + + if (!zk) { + Perl_croak(aTHX_ "invalid handle"); + } + + key = SvPV_nolen(attr_key); + + if (strcaseEQ(key, "data_read_len")) { + val = newSViv(zk->data_buf_len); + } + else if (strcaseEQ(key, "path_read_len")) { + val = newSViv(zk->path_buf_len); + } + else if (strcaseEQ(key, "watch_timeout")) { + val = newSVuv(zk->watch_timeout); + } + else if (strcaseEQ(key, "hosts")) { + val = newSVpvn(zk->hosts, zk->hosts_len); + } + else if (strcaseEQ(key, "session_timeout")) { + val = newSViv(zoo_recv_timeout(zk->handle)); + } + else if (strcaseEQ(key, "session_id")) { + const clientid_t *client_id; + clientid_t null_client_id; + + client_id = zoo_client_id(zk->handle); + + memset(&null_client_id, 0, sizeof(clientid_t)); + + if (!memcmp(client_id, &null_client_id, sizeof(clientid_t))) { + val = newSVpv("", 0); + } + else { + val = newSVpvn((const char*) client_id, sizeof(clientid_t)); + } + } + else if (strcaseEQ(key, "pending_watches")) { + /* cleanup any completed watches not tied to a handle */ + val = newSVuv(_zk_release_watches(aTHX_ zk->first_watch, 0)); + } + + if (val) { + ST(0) = sv_2mortal(val); + + XSRETURN(1); + } + + Perl_warn(aTHX_ "invalid element: %s", key); + + XSRETURN_UNDEF; + + +void +zk_STORE(attr_hash, attr_key, attr_val) + Net::ZooKeeper attr_hash + SV *attr_key + SV *attr_val + PREINIT: + zk_t *zk; + char *key; + PPCODE: + zk = _zk_get_handle_inner(aTHX_ attr_hash); + + if (!zk) { + Perl_croak(aTHX_ "invalid handle"); + } + + key = SvPV_nolen(attr_key); + + if (strcaseEQ(key, "data_read_len")) { + int val = SvIV(attr_val); + + if (val < 0) { + Perl_croak(aTHX_ "invalid data read length: %d", val); + } + + zk->data_buf_len = val; + } + else if (strcaseEQ(key, "path_read_len")) { + int val = SvIV(attr_val); + + if (val < 0) { + Perl_croak(aTHX_ "invalid path read length: %d", val); + } + + zk->path_buf_len = val; + } + else if (strcaseEQ(key, "watch_timeout")) { + zk->watch_timeout = SvUV(attr_val); + } + else { + int i; + + for (i = 0; i < NUM_KEYS; ++i) { + if (strcaseEQ(key, zk_keys[i].name)) { + Perl_warn(aTHX_ "read-only element: %s", key); + + XSRETURN_EMPTY; + } + } + + Perl_warn(aTHX_ "invalid element: %s", key); + } + + XSRETURN_EMPTY; + + +void +zk_EXISTS(attr_hash, attr_key) + Net::ZooKeeper attr_hash + SV *attr_key + PREINIT: + zk_t *zk; + char *key; + int i; + PPCODE: + zk = _zk_get_handle_inner(aTHX_ attr_hash); + + if (!zk) { + Perl_croak(aTHX_ "invalid handle"); + } + + key = SvPV_nolen(attr_key); + + for (i = 0; i < NUM_KEYS; ++i) { + if (strcaseEQ(key, zk_keys[i].name)) { + XSRETURN_YES; + } + } + + XSRETURN_NO; + + +void +zk_DELETE(attr_hash, attr_key) + Net::ZooKeeper attr_hash + SV *attr_key + PPCODE: + Perl_warn(aTHX_ "deleting elements from hashes of class " + PACKAGE_NAME " not supported"); + + XSRETURN_EMPTY; + + +void +zk_CLEAR(attr_hash) + Net::ZooKeeper attr_hash + PPCODE: + Perl_warn(aTHX_ "clearing hashes of class " + PACKAGE_NAME " not supported"); + + XSRETURN_EMPTY; + + +SV * +zk_get_error(zkh) + Net::ZooKeeper zkh + PREINIT: + zk_t *zk; + CODE: + zk = _zk_get_handle_outer(aTHX_ zkh); + + if (!zk) { + Perl_croak(aTHX_ "invalid handle"); + } + + RETVAL = newSViv(zk->last_ret); + errno = zk->last_errno; + OUTPUT: + RETVAL + + +void +zk_add_auth(zkh, scheme, cert) + Net::ZooKeeper zkh + char *scheme + char *cert; cert = (char *) SvPV($arg, cert_len); + PREINIT: + zk_t *zk; + STRLEN cert_len; + zk_watch_t *watch; + int ret; + PPCODE: + zk = _zk_get_handle_outer(aTHX_ zkh); + + if (!zk) { + Perl_croak(aTHX_ "invalid handle"); + } + + zk->last_ret = ZOK; + zk->last_errno = 0; + + if (cert_len > PERL_INT_MAX) { + Perl_croak(aTHX_ "invalid certificate length: %u", cert_len); + } + + watch = _zk_create_watch(aTHX); + + if (!watch) { + /* errno will be set */ + zk->last_ret = ZSYSTEMERROR; + zk->last_errno = errno; + + XSRETURN_NO; + } + + errno = 0; + ret = zoo_add_auth(zk->handle, scheme, cert, cert_len, + _zk_auth_completion, watch); + + zk->last_ret = ret; + zk->last_errno = errno; + + if (ret == ZOK) { + pthread_mutex_lock(&watch->mutex); + + while (!watch->done) { + pthread_cond_wait(&watch->cond, &watch->mutex); + } + + pthread_mutex_unlock(&watch->mutex); + + if (watch->done) { + ret = watch->ret; + } + else { + ret = ZINVALIDSTATE; + } + + /* errno may be set while we waited */ + zk->last_ret = ret; + zk->last_errno = errno; + } + + _zk_destroy_watch(aTHX_ watch); + + if (ret == ZOK) { + XSRETURN_YES; + } + else { + XSRETURN_NO; + } + + +void +zk_create(zkh, path, buf, ...) + Net::ZooKeeper zkh + char *path + char *buf; buf = (char *) SvPV($arg, buf_len); + PREINIT: + zk_t *zk; + STRLEN buf_len; + int flags = 0; + char *path_buf; + int path_buf_len; + AV *acl_arr = NULL; + struct ACL_vector acl; + int i, ret; + PPCODE: + zk = _zk_get_handle_outer(aTHX_ zkh); + + if (!zk) { + Perl_croak(aTHX_ "invalid handle"); + } + + zk->last_ret = ZOK; + zk->last_errno = 0; + + if (items > 3 && !(items % 2)) { + Perl_croak(aTHX_ "invalid number of arguments"); + } + + if (buf_len > PERL_INT_MAX) { + Perl_croak(aTHX_ "invalid data length: %u", buf_len); + } + + path_buf_len = zk->path_buf_len; + + for (i = 3; i < items; i += 2) { + char *key = SvPV_nolen(ST(i)); + + if (strcaseEQ(key, "path_read_len")) { + path_buf_len = SvIV(ST(i + 1)); + + if (path_buf_len < 2) { + Perl_croak(aTHX_ "invalid path read length: %d", + path_buf_len); + } + } + else if (strcaseEQ(key, "flags")) { + flags = SvIV(ST(i + 1)); + + if (flags & ~(ZOO_SEQUENCE | ZOO_EPHEMERAL)) { + Perl_croak(aTHX_ "invalid create flags: %d", flags); + } + } + else if (strcaseEQ(key, "acl")) { + const char *err; + + if (!SvROK(ST(i + 1)) || SvTYPE(SvRV(ST(i + 1))) != SVt_PVAV) { + Perl_croak(aTHX_ "invalid ACL array reference"); + } + + acl_arr = (AV*) SvRV(ST(i + 1)); + + err = _zk_fill_acl(aTHX_ acl_arr, &acl); + + if (err) { + Perl_croak(aTHX_ err); + } + } + } + + /* NOTE: would be nice to be able to rely on null-terminated string */ + ++path_buf_len; + Newxz(path_buf, path_buf_len, char); + + errno = 0; + ret = zoo_create(zk->handle, path, buf, buf_len, + (acl_arr ? &acl : NULL), flags, + path_buf, path_buf_len); + + zk->last_ret = ret; + zk->last_errno = errno; + + if (acl_arr) { + _zk_free_acl(aTHX_ &acl); + } + + if (ret == ZOK) { + ST(0) = sv_newmortal(); +#ifdef SV_HAS_TRAILING_NUL + sv_usepvn_flags(ST(0), path_buf, strlen(path_buf), + SV_HAS_TRAILING_NUL); +#else + sv_usepvn(ST(0), path_buf, strlen(path_buf)); +#endif + SvCUR_set(ST(0), strlen(path_buf)); + + XSRETURN(1); + } + + Safefree(path_buf); + + XSRETURN_UNDEF; + + +void +zk_delete(zkh, path, ...) + Net::ZooKeeper zkh + char *path + PREINIT: + zk_t *zk; + int version = -1; + int i, ret; + PPCODE: + zk = _zk_get_handle_outer(aTHX_ zkh); + + if (!zk) { + Perl_croak(aTHX_ "invalid handle"); + } + + zk->last_ret = ZOK; + zk->last_errno = 0; + + if (items > 2 && items % 2) { + Perl_croak(aTHX_ "invalid number of arguments"); + } + + for (i = 2; i < items; i += 2) { + char *key = SvPV_nolen(ST(i)); + + if (strcaseEQ(key, "version")) { + version = SvIV(ST(i + 1)); + + if (version < 0) { + Perl_croak(aTHX_ "invalid version requirement: %d", + version); + } + } + } + + errno = 0; + ret = zoo_delete(zk->handle, path, version); + + zk->last_ret = ret; + zk->last_errno = errno; + + if (ret == ZOK) { + XSRETURN_YES; + } + else { + XSRETURN_NO; + } + + +void +zk_exists(zkh, path, ...) + Net::ZooKeeper zkh + char *path + PREINIT: + zk_t *zk; + zk_stat_t *stat = NULL; + zk_watch_t *old_watch = NULL; + zk_handle_t *watch_handle = NULL; + watcher_fn watcher = NULL; + zk_watch_t *new_watch = NULL; + int i, ret; + PPCODE: + zk = _zk_get_handle_outer(aTHX_ zkh); + + if (!zk) { + Perl_croak(aTHX_ "invalid handle"); + } + + zk->last_ret = ZOK; + zk->last_errno = 0; + + if (items > 2 && items % 2) { + Perl_croak(aTHX_ "invalid number of arguments"); + } + + for (i = 2; i < items; i += 2) { + char *key = SvPV_nolen(ST(i)); + + if (strcaseEQ(key, "stat")) { + if (!SvROK(ST(i + 1)) || SvTYPE(SvRV(ST(i + 1))) != SVt_PVHV || + !sv_derived_from(ST(i + 1), STAT_PACKAGE_NAME)) { + Perl_croak(aTHX_ "stat is not a hash reference of " + "type " STAT_PACKAGE_NAME); + } + + stat = _zks_get_handle_outer(aTHX_ (HV*) SvRV(ST(i + 1))); + + if (!stat) { + Perl_croak(aTHX_ "invalid stat handle"); + } + } + else if (strcaseEQ(key, "watch")) { + if (!SvROK(ST(i + 1)) || SvTYPE(SvRV(ST(i + 1))) != SVt_PVHV || + !sv_derived_from(ST(i + 1), WATCH_PACKAGE_NAME)) { + Perl_croak(aTHX_ "watch is not a hash reference of " + "type " WATCH_PACKAGE_NAME); + } + + old_watch = _zkw_get_handle_outer(aTHX_ (HV*) SvRV(ST(i + 1)), + &watch_handle); + + if (!old_watch) { + Perl_croak(aTHX_ "invalid watch handle"); + } + } + } + + if (watch_handle) { + new_watch = _zk_acquire_watch(aTHX); + + if (!new_watch) { + /* errno will be set */ + zk->last_ret = ZSYSTEMERROR; + zk->last_errno = errno; + + XSRETURN_NO; + } + + watcher = _zk_watcher; + } + + errno = 0; + ret = zoo_wexists(zk->handle, path, watcher, new_watch, stat); + + zk->last_ret = ret; + zk->last_errno = errno; + + if (watch_handle) { + _zk_replace_watch(aTHX_ watch_handle, zk->first_watch, + old_watch, new_watch); + } + + if (ret == ZOK) { + XSRETURN_YES; + } + else { + XSRETURN_NO; + } + + +void +zk_get_children(zkh, path, ...) + Net::ZooKeeper zkh + char *path + PREINIT: + zk_t *zk; + zk_watch_t *old_watch = NULL; + zk_handle_t *watch_handle = NULL; + watcher_fn watcher = NULL; + zk_watch_t *new_watch = NULL; + struct String_vector strings; + int i, ret; + PPCODE: + zk = _zk_get_handle_outer(aTHX_ zkh); + + if (!zk) { + Perl_croak(aTHX_ "invalid handle"); + } + + zk->last_ret = ZOK; + zk->last_errno = 0; + + if (items > 2 && items % 2) { + Perl_croak(aTHX_ "invalid number of arguments"); + } + + for (i = 2; i < items; i += 2) { + char *key = SvPV_nolen(ST(i)); + + if (strcaseEQ(key, "watch")) { + if (!SvROK(ST(i + 1)) || SvTYPE(SvRV(ST(i + 1))) != SVt_PVHV || + !sv_derived_from(ST(i + 1), WATCH_PACKAGE_NAME)) { + Perl_croak(aTHX_ "watch is not a hash reference of " + "type " WATCH_PACKAGE_NAME); + } + + old_watch = _zkw_get_handle_outer(aTHX_ (HV*) SvRV(ST(i + 1)), + &watch_handle); + + if (!old_watch) { + Perl_croak(aTHX_ "invalid watch handle"); + } + } + } + + if (watch_handle) { + new_watch = _zk_acquire_watch(aTHX); + + if (!new_watch) { + /* errno will be set */ + zk->last_ret = ZSYSTEMERROR; + zk->last_errno = errno; + + if (GIMME_V == G_ARRAY) { + XSRETURN_EMPTY; + } + else { + XSRETURN_UNDEF; + } + } + + watcher = _zk_watcher; + } + + Zero(&strings, 1, struct String_vector); + + errno = 0; + ret = zoo_wget_children(zk->handle, path, watcher, new_watch, + &strings); + + zk->last_ret = ret; + zk->last_errno = errno; + + if (watch_handle) { + _zk_replace_watch(aTHX_ watch_handle, zk->first_watch, + old_watch, new_watch); + } + + if (ret == ZOK) { + int num_children; + + num_children = + (strings.count > PERL_INT_MAX) ? PERL_INT_MAX : strings.count; + + if (GIMME_V == G_ARRAY && num_children > 0) { + EXTEND(SP, num_children); + + for (i = 0; i < num_children; ++i) { + ST(i) = sv_2mortal(newSVpv(strings.data[i], 0)); + } + } + + /* NOTE: would be nice if this were documented as required */ + deallocate_String_vector(&strings); + + if (GIMME_V == G_ARRAY) { + if (num_children == 0) { + XSRETURN_EMPTY; + } + + XSRETURN(num_children); + } + else { + ST(0) = sv_2mortal(newSViv(num_children)); + + XSRETURN(1); + } + } + else { + if (GIMME_V == G_ARRAY) { + XSRETURN_EMPTY; + } + else { + XSRETURN_UNDEF; + } + } + + +void +zk_get(zkh, path, ...) + Net::ZooKeeper zkh + char *path + PREINIT: + zk_t *zk; + int buf_len; + zk_stat_t *stat = NULL; + zk_watch_t *old_watch = NULL; + zk_handle_t *watch_handle = NULL; + char *buf; + watcher_fn watcher = NULL; + zk_watch_t *new_watch = NULL; + int i, ret; + PPCODE: + zk = _zk_get_handle_outer(aTHX_ zkh); + + if (!zk) { + Perl_croak(aTHX_ "invalid handle"); + } + + zk->last_ret = ZOK; + zk->last_errno = 0; + + if (items > 2 && items % 2) { + Perl_croak(aTHX_ "invalid number of arguments"); + } + + buf_len = zk->data_buf_len; + + for (i = 2; i < items; i += 2) { + char *key = SvPV_nolen(ST(i)); + + if (strcaseEQ(key, "data_read_len")) { + buf_len = SvIV(ST(i + 1)); + + if (buf_len < 0) { + Perl_croak(aTHX_ "invalid data read length: %d", + buf_len); + } + } + else if (strcaseEQ(key, "stat")) { + if (!SvROK(ST(i + 1)) || SvTYPE(SvRV(ST(i + 1))) != SVt_PVHV || + !sv_derived_from(ST(i + 1), STAT_PACKAGE_NAME)) { + Perl_croak(aTHX_ "stat is not a hash reference of " + "type " STAT_PACKAGE_NAME); + } + + stat = _zks_get_handle_outer(aTHX_ (HV*) SvRV(ST(i + 1))); + + if (!stat) { + Perl_croak(aTHX_ "invalid stat handle"); + } + } + else if (strcaseEQ(key, "watch")) { + if (!SvROK(ST(i + 1)) || SvTYPE(SvRV(ST(i + 1))) != SVt_PVHV || + !sv_derived_from(ST(i + 1), WATCH_PACKAGE_NAME)) { + Perl_croak(aTHX_ "watch is not a hash reference of " + "type " WATCH_PACKAGE_NAME); + } + + old_watch = _zkw_get_handle_outer(aTHX_ (HV*) SvRV(ST(i + 1)), + &watch_handle); + + if (!old_watch) { + Perl_croak(aTHX_ "invalid watch handle"); + } + } + } + + if (watch_handle) { + new_watch = _zk_acquire_watch(aTHX); + + if (!new_watch) { + /* errno will be set */ + zk->last_ret = ZSYSTEMERROR; + zk->last_errno = errno; + + XSRETURN_UNDEF; + } + + watcher = _zk_watcher; + } + + Newx(buf, buf_len + 1, char); + + errno = 0; + ret = zoo_wget(zk->handle, path, watcher, new_watch, + buf, &buf_len, stat); + + zk->last_ret = ret; + zk->last_errno = errno; + + if (watch_handle) { + _zk_replace_watch(aTHX_ watch_handle, zk->first_watch, + old_watch, new_watch); + } + + if (ret == ZOK && buf_len != -1) { + ST(0) = sv_newmortal(); +#ifdef SV_HAS_TRAILING_NUL + buf[buf_len] = '\0'; + sv_usepvn_flags(ST(0), buf, buf_len, SV_HAS_TRAILING_NUL); +#else + sv_usepvn(ST(0), buf, buf_len); +#endif + + XSRETURN(1); + } + else { + Safefree(buf); + + XSRETURN_UNDEF; + } + + +void +zk_set(zkh, path, buf, ...) + Net::ZooKeeper zkh + char *path + char *buf; buf = (char *) SvPV($arg, buf_len); + PREINIT: + zk_t *zk; + int version = -1; + zk_stat_t *stat = NULL; + STRLEN buf_len; + int i, ret; + PPCODE: + zk = _zk_get_handle_outer(aTHX_ zkh); + + if (!zk) { + Perl_croak(aTHX_ "invalid handle"); + } + + zk->last_ret = ZOK; + zk->last_errno = 0; + + if (items > 3 && !(items % 2)) { + Perl_croak(aTHX_ "invalid number of arguments"); + } + + if (buf_len > PERL_INT_MAX) { + Perl_croak(aTHX_ "invalid data length: %u", buf_len); + } + + for (i = 3; i < items; i += 2) { + char *key = SvPV_nolen(ST(i)); + + if (strcaseEQ(key, "version")) { + version = SvIV(ST(i + 1)); + + if (version < 0) { + Perl_croak(aTHX_ "invalid version requirement: %d", + version); + } + } + else if (strcaseEQ(key, "stat")) { + if (!SvROK(ST(i + 1)) || SvTYPE(SvRV(ST(i + 1))) != SVt_PVHV || + !sv_derived_from(ST(i + 1), STAT_PACKAGE_NAME)) { + Perl_croak(aTHX_ "stat is not a hash reference of " + "type " STAT_PACKAGE_NAME); + } + + stat = _zks_get_handle_outer(aTHX_ (HV*) SvRV(ST(i + 1))); + + if (!stat) { + Perl_croak(aTHX_ "invalid stat handle"); + } + } + } + + errno = 0; + ret = zoo_set2(zk->handle, path, buf, buf_len, version, stat); + + zk->last_ret = ret; + zk->last_errno = errno; + + if (ret == ZOK) { + XSRETURN_YES; + } + else { + XSRETURN_NO; + } + + +void +zk_get_acl(zkh, path, ...) + Net::ZooKeeper zkh + char *path + PREINIT: + zk_t *zk; + zk_stat_t *stat = NULL; + struct ACL_vector acl; + int i, ret; + PPCODE: + zk = _zk_get_handle_outer(aTHX_ zkh); + + if (!zk) { + Perl_croak(aTHX_ "invalid handle"); + } + + zk->last_ret = ZOK; + zk->last_errno = 0; + + if (items > 2 && items % 2) { + Perl_croak(aTHX_ "invalid number of arguments"); + } + + for (i = 2; i < items; i += 2) { + char *key = SvPV_nolen(ST(i)); + + if (strcaseEQ(key, "stat")) { + if (!SvROK(ST(i + 1)) || SvTYPE(SvRV(ST(i + 1))) != SVt_PVHV || + !sv_derived_from(ST(i + 1), STAT_PACKAGE_NAME)) { + Perl_croak(aTHX_ "stat is not a hash reference of " + "type " STAT_PACKAGE_NAME); + } + + stat = _zks_get_handle_outer(aTHX_ (HV*) SvRV(ST(i + 1))); + + if (!stat) { + Perl_croak(aTHX_ "invalid stat handle"); + } + } + } + + errno = 0; + ret = zoo_get_acl(zk->handle, path, &acl, stat); + + zk->last_ret = ret; + zk->last_errno = errno; + + if (ret == ZOK) { + int num_acl_entries; + + num_acl_entries = + (acl.count > PERL_INT_MAX) ? PERL_INT_MAX : acl.count; + + if (GIMME_V == G_ARRAY && num_acl_entries > 0) { + EXTEND(SP, num_acl_entries); + + for (i = 0; i < num_acl_entries; ++i) { + HV *acl_entry_hash = newHV(); + + _zk_fill_acl_entry_hash(aTHX_ &acl.data[i], + acl_entry_hash); + + ST(i) = sv_2mortal(newRV_noinc((SV*) acl_entry_hash)); + } + } + + /* NOTE: would be nice if this were documented as required */ + deallocate_ACL_vector(&acl); + + if (GIMME_V == G_ARRAY) { + if (num_acl_entries == 0) { + XSRETURN_EMPTY; + } + + XSRETURN(num_acl_entries); + } + else { + ST(0) = sv_2mortal(newSViv(num_acl_entries)); + + XSRETURN(1); + } + } + else { + if (GIMME_V == G_ARRAY) { + XSRETURN_EMPTY; + } + else { + XSRETURN_UNDEF; + } + } + + +void +zk_set_acl(zkh, path, acl_arr, ...) + Net::ZooKeeper zkh + char *path + AV *acl_arr + PREINIT: + zk_t *zk; + const char *err; + int version = -1; + struct ACL_vector acl; + int i, ret; + PPCODE: + zk = _zk_get_handle_outer(aTHX_ zkh); + + if (!zk) { + Perl_croak(aTHX_ "invalid handle"); + } + + zk->last_ret = ZOK; + zk->last_errno = 0; + + if (items > 3 && !(items % 2)) { + Perl_croak(aTHX_ "invalid number of arguments"); + } + + err = _zk_fill_acl(aTHX_ acl_arr, &acl); + + if (err) { + Perl_croak(aTHX_ err); + } + + for (i = 3; i < items; i += 2) { + char *key = SvPV_nolen(ST(i)); + + if (strcaseEQ(key, "version")) { + version = SvIV(ST(i + 1)); + + if (version < 0) { + Perl_croak(aTHX_ "invalid version requirement: %d", + version); + } + } + } + + errno = 0; + ret = zoo_set_acl(zk->handle, path, version, &acl); + + zk->last_ret = ret; + zk->last_errno = errno; + + _zk_free_acl(aTHX_ &acl); + + if (ret == ZOK) { + XSRETURN_YES; + } + else { + XSRETURN_NO; + } + + +void +zk_stat(zkh) + Net::ZooKeeper zkh + PREINIT: + zk_t *zk; + zk_handle_t *handle; + HV *stash, *stat_hash, *attr_hash; + SV *attr; + PPCODE: + zk = _zk_get_handle_outer(aTHX_ zkh); + + if (!zk) { + Perl_croak(aTHX_ "invalid handle"); + } + + zk->last_ret = ZOK; + zk->last_errno = 0; + + Newx(handle, 1, zk_handle_t); + + handle->signature = STAT_PACKAGE_SIGNATURE; + + Newxz(handle->handle.stat, 1, zk_stat_t); + + /* As in zk_new(), we use two levels of magic here. */ + + stash = gv_stashpv(STAT_PACKAGE_NAME, GV_ADDWARN); + + attr_hash = newHV(); + + sv_magic((SV*) attr_hash, Nullsv, PERL_MAGIC_ext, + (const char*) handle, 0); + + attr = sv_bless(newRV_noinc((SV*) attr_hash), stash); + + stat_hash = newHV(); + + sv_magic((SV*) stat_hash, attr, PERL_MAGIC_tied, Nullch, 0); + SvREFCNT_dec(attr); + + ST(0) = sv_bless(sv_2mortal(newRV_noinc((SV*) stat_hash)), stash); + + XSRETURN(1); + + +void +zk_watch(zkh, ...) + Net::ZooKeeper zkh + PREINIT: + zk_t *zk; + unsigned int timeout; + zk_watch_t *watch; + zk_handle_t *handle; + HV *stash, *watch_hash, *attr_hash; + SV *attr; + int i; + PPCODE: + zk = _zk_get_handle_outer(aTHX_ zkh); + + if (!zk) { + Perl_croak(aTHX_ "invalid handle"); + } + + zk->last_ret = ZOK; + zk->last_errno = 0; + + if (items > 1 && !(items % 2)) { + Perl_croak(aTHX_ "invalid number of arguments"); + } + + timeout = zk->watch_timeout; + + for (i = 1; i < items; i += 2) { + char *key = SvPV_nolen(ST(i)); + + if (strcaseEQ(key, "timeout")) { + timeout = SvUV(ST(i + 1)); + } + } + + watch = _zk_acquire_watch(aTHX); + + if (!watch) { + /* errno will be set */ + zk->last_ret = ZSYSTEMERROR; + zk->last_errno = errno; + + XSRETURN_UNDEF; + } + + Newx(handle, 1, zk_handle_t); + + handle->signature = WATCH_PACKAGE_SIGNATURE; + handle->handle.watch = watch; + + /* As in zk_new(), we use two levels of magic here. */ + + stash = gv_stashpv(WATCH_PACKAGE_NAME, GV_ADDWARN); + + attr_hash = newHV(); + + watch->timeout = timeout; + + sv_magic((SV*) attr_hash, Nullsv, PERL_MAGIC_ext, + (const char*) handle, 0); + + attr = sv_bless(newRV_noinc((SV*) attr_hash), stash); + + watch_hash = newHV(); + + sv_magic((SV*) watch_hash, attr, PERL_MAGIC_tied, Nullch, 0); + SvREFCNT_dec(attr); + + ST(0) = sv_bless(sv_2mortal(newRV_noinc((SV*) watch_hash)), stash); + + XSRETURN(1); + + +MODULE = Net::ZooKeeper PACKAGE = Net::ZooKeeper::Stat PREFIX = zks_ + +void +zks_DESTROY(zksh) + Net::ZooKeeper::Stat zksh + PREINIT: + zk_handle_t *handle; + HV *attr_hash; + int ret = ZBADARGUMENTS; + PPCODE: + handle = _zk_check_handle_outer(aTHX_ zksh, &attr_hash, + STAT_PACKAGE_NAME, + STAT_PACKAGE_SIGNATURE); + + if (!handle) { + handle = _zk_check_handle_inner(aTHX_ zksh, + STAT_PACKAGE_SIGNATURE); + + if (handle) { + attr_hash = zksh; + zksh = NULL; + } + } + + if (handle) { + ret = ZOK; + + Safefree(handle->handle.stat); + Safefree(handle); + + sv_unmagic((SV*) attr_hash, PERL_MAGIC_ext); + } + + if (zksh && attr_hash) { + sv_unmagic((SV*) zksh, PERL_MAGIC_tied); + } + + if (GIMME_V == G_VOID) { + XSRETURN_EMPTY; + } + else if (ret == ZOK) { + XSRETURN_YES; + } + else { + XSRETURN_NO; + } + + +void +zks_CLONE(package) + char *package + PPCODE: + XSRETURN_EMPTY; + + +void +zks_CLONE_SKIP(package) + char *package + PPCODE: + XSRETURN_YES; + + +void +zks_TIEHASH(package, ...) + char *package + PPCODE: + Perl_croak(aTHX_ "tying hashes of class " + STAT_PACKAGE_NAME " not supported"); + + +void +zks_UNTIE(attr_hash, ref_count) + Net::ZooKeeper::Stat attr_hash + IV ref_count + PPCODE: + Perl_croak(aTHX_ "untying hashes of class " + STAT_PACKAGE_NAME " not supported"); + + +void +zks_FIRSTKEY(attr_hash) + Net::ZooKeeper::Stat attr_hash + PREINIT: + zk_stat_t *stat; + PPCODE: + stat = _zks_get_handle_inner(aTHX_ attr_hash); + + if (!stat) { + Perl_croak(aTHX_ "invalid handle"); + } + + ST(0) = sv_2mortal(newSVpvn(zk_stat_keys[0].name, + zk_stat_keys[0].name_len)); + + XSRETURN(1); + + +void +zks_NEXTKEY(attr_hash, attr_key) + Net::ZooKeeper::Stat attr_hash + SV *attr_key + PREINIT: + zk_stat_t *stat; + char *key; + int i; + PPCODE: + stat = _zks_get_handle_inner(aTHX_ attr_hash); + + if (!stat) { + Perl_croak(aTHX_ "invalid handle"); + } + + key = SvPV_nolen(attr_key); + + for (i = 0; i < NUM_STAT_KEYS; ++i) { + if (strcaseEQ(key, zk_stat_keys[i].name)) { + ++i; + + break; + } + } + + if (i < NUM_STAT_KEYS) { + ST(0) = sv_2mortal(newSVpvn(zk_stat_keys[i].name, + zk_stat_keys[i].name_len)); + + XSRETURN(1); + } + else { + XSRETURN_EMPTY; + } + + +void +zks_SCALAR(attr_hash) + Net::ZooKeeper::Stat attr_hash + PPCODE: + XSRETURN_YES; + + +void +zks_FETCH(attr_hash, attr_key) + Net::ZooKeeper::Stat attr_hash + SV *attr_key + PREINIT: + zk_stat_t *stat; + char *key; + SV *val = NULL; + int i; + PPCODE: + stat = _zks_get_handle_inner(aTHX_ attr_hash); + + if (!stat) { + Perl_croak(aTHX_ "invalid handle"); + } + + key = SvPV_nolen(attr_key); + + for (i = 0; i < NUM_STAT_KEYS; ++i) { + if (strcaseEQ(key, zk_stat_keys[i].name)) { + if (zk_stat_keys[i].size * CHAR_BIT == 32) { + val = newSViv(*((int32_t*) (((char*) stat) + + zk_stat_keys[i].offset))); + } + else { + /* NOTE: %lld is inconsistent, so cast to a double */ + val = newSVpvf("%.0f", (double) + *((int64_t*) (((char*) stat) + + zk_stat_keys[i].offset))); + } + + break; + } + } + + if (val) { + ST(0) = sv_2mortal(val); + + XSRETURN(1); + } + + Perl_warn(aTHX_ "invalid element: %s", key); + + XSRETURN_UNDEF; + + +void +zks_STORE(attr_hash, attr_key, attr_val) + Net::ZooKeeper::Stat attr_hash + SV *attr_key + SV *attr_val + PREINIT: + zk_stat_t *stat; + char *key; + int i; + PPCODE: + stat = _zks_get_handle_inner(aTHX_ attr_hash); + + if (!stat) { + Perl_croak(aTHX_ "invalid handle"); + } + + key = SvPV_nolen(attr_key); + + for (i = 0; i < NUM_STAT_KEYS; ++i) { + if (strcaseEQ(key, zk_stat_keys[i].name)) { + Perl_warn(aTHX_ "read-only element: %s", key); + + XSRETURN_EMPTY; + } + } + + Perl_warn(aTHX_ "invalid element: %s", key); + + XSRETURN_EMPTY; + + +void +zks_EXISTS(attr_hash, attr_key) + Net::ZooKeeper::Stat attr_hash + SV *attr_key + PREINIT: + zk_stat_t *stat; + char *key; + int i; + PPCODE: + stat = _zks_get_handle_inner(aTHX_ attr_hash); + + if (!stat) { + Perl_croak(aTHX_ "invalid handle"); + } + + key = SvPV_nolen(attr_key); + + for (i = 0; i < NUM_STAT_KEYS; ++i) { + if (strcaseEQ(key, zk_stat_keys[i].name)) { + XSRETURN_YES; + } + } + + XSRETURN_NO; + + +void +zks_DELETE(attr_hash, attr_key) + Net::ZooKeeper::Stat attr_hash + SV *attr_key + PPCODE: + Perl_warn(aTHX_ "deleting elements from hashes of class " + STAT_PACKAGE_NAME " not supported"); + + XSRETURN_EMPTY; + + +void +zks_CLEAR(attr_hash) + Net::ZooKeeper::Stat attr_hash + PPCODE: + Perl_warn(aTHX_ "clearing hashes of class " + STAT_PACKAGE_NAME " not supported"); + + XSRETURN_EMPTY; + + +MODULE = Net::ZooKeeper PACKAGE = Net::ZooKeeper::Watch PREFIX = zkw_ + +void +zkw_DESTROY(zkwh) + Net::ZooKeeper::Watch zkwh + PREINIT: + zk_handle_t *handle; + HV *attr_hash; + int ret = ZBADARGUMENTS; + PPCODE: + handle = _zk_check_handle_outer(aTHX_ zkwh, &attr_hash, + WATCH_PACKAGE_NAME, + WATCH_PACKAGE_SIGNATURE); + + if (!handle) { + handle = _zk_check_handle_inner(aTHX_ zkwh, + WATCH_PACKAGE_SIGNATURE); + + if (handle) { + attr_hash = zkwh; + zkwh = NULL; + } + } + + if (handle) { + ret = ZOK; + + _zk_release_watch(aTHX_ handle->handle.watch, 0); + Safefree(handle); + + sv_unmagic((SV*) attr_hash, PERL_MAGIC_ext); + } + + if (zkwh && attr_hash) { + sv_unmagic((SV*) zkwh, PERL_MAGIC_tied); + } + + if (GIMME_V == G_VOID) { + XSRETURN_EMPTY; + } + else if (ret == ZOK) { + XSRETURN_YES; + } + else { + XSRETURN_NO; + } + + +void +zkw_CLONE(package) + char *package + PPCODE: + XSRETURN_EMPTY; + + +void +zkw_CLONE_SKIP(package) + char *package + PPCODE: + XSRETURN_YES; + + +void +zkw_TIEHASH(package, ...) + char *package + PPCODE: + Perl_croak(aTHX_ "tying hashes of class " + WATCH_PACKAGE_NAME " not supported"); + + +void +zkw_UNTIE(attr_hash, ref_count) + Net::ZooKeeper::Watch attr_hash + IV ref_count + PPCODE: + Perl_croak(aTHX_ "untying hashes of class " + WATCH_PACKAGE_NAME " not supported"); + + +void +zkw_FIRSTKEY(attr_hash) + Net::ZooKeeper::Watch attr_hash + PREINIT: + zk_watch_t *watch; + PPCODE: + watch = _zkw_get_handle_inner(aTHX_ attr_hash); + + if (!watch) { + Perl_croak(aTHX_ "invalid handle"); + } + + ST(0) = sv_2mortal(newSVpvn(zk_watch_keys[0].name, + zk_watch_keys[0].name_len)); + + XSRETURN(1); + + +void +zkw_NEXTKEY(attr_hash, attr_key) + Net::ZooKeeper::Watch attr_hash + SV *attr_key + PREINIT: + zk_watch_t *watch; + char *key; + int i; + PPCODE: + watch = _zkw_get_handle_inner(aTHX_ attr_hash); + + if (!watch) { + Perl_croak(aTHX_ "invalid handle"); + } + + key = SvPV_nolen(attr_key); + + for (i = 0; i < NUM_WATCH_KEYS; ++i) { + if (strcaseEQ(key, zk_watch_keys[i].name)) { + ++i; + + break; + } + } + + if (i < NUM_WATCH_KEYS) { + ST(0) = sv_2mortal(newSVpvn(zk_watch_keys[i].name, + zk_watch_keys[i].name_len)); + + XSRETURN(1); + } + else { + XSRETURN_EMPTY; + } + + +void +zkw_SCALAR(attr_hash) + Net::ZooKeeper::Watch attr_hash + PPCODE: + XSRETURN_YES; + + +void +zkw_FETCH(attr_hash, attr_key) + Net::ZooKeeper::Watch attr_hash + SV *attr_key + PREINIT: + zk_watch_t *watch; + char *key; + SV *val = NULL; + PPCODE: + watch = _zkw_get_handle_inner(aTHX_ attr_hash); + + if (!watch) { + Perl_croak(aTHX_ "invalid handle"); + } + + key = SvPV_nolen(attr_key); + + if (strcaseEQ(key, "timeout")) { + val = newSVuv(watch->timeout); + } + else if (strcaseEQ(key, "event")) { + val = newSViv(watch->event_type); + } + else if (strcaseEQ(key, "state")) { + val = newSViv(watch->event_state); + } + + if (val) { + ST(0) = sv_2mortal(val); + + XSRETURN(1); + } + + Perl_warn(aTHX_ "invalid element: %s", key); + + XSRETURN_UNDEF; + + +void +zkw_STORE(attr_hash, attr_key, attr_val) + Net::ZooKeeper::Watch attr_hash + SV *attr_key + SV *attr_val + PREINIT: + zk_watch_t *watch; + char *key; + PPCODE: + watch = _zkw_get_handle_inner(aTHX_ attr_hash); + + if (!watch) { + Perl_croak(aTHX_ "invalid handle"); + } + + key = SvPV_nolen(attr_key); + + if (strcaseEQ(key, "timeout")) { + watch->timeout = SvUV(attr_val); + } + else { + int i; + + for (i = 0; i < NUM_WATCH_KEYS; ++i) { + if (strcaseEQ(key, zk_watch_keys[i].name)) { + Perl_warn(aTHX_ "read-only element: %s", key); + + XSRETURN_EMPTY; + } + } + + Perl_warn(aTHX_ "invalid element: %s", key); + } + + XSRETURN_EMPTY; + + +void +zkw_EXISTS(attr_hash, attr_key) + Net::ZooKeeper::Watch attr_hash + SV *attr_key + PREINIT: + zk_watch_t *watch; + char *key; + int i; + PPCODE: + watch = _zkw_get_handle_inner(aTHX_ attr_hash); + + if (!watch) { + Perl_croak(aTHX_ "invalid handle"); + } + + key = SvPV_nolen(attr_key); + + for (i = 0; i < NUM_WATCH_KEYS; ++i) { + if (strcaseEQ(key, zk_watch_keys[i].name)) { + XSRETURN_YES; + } + } + + XSRETURN_NO; + + +void +zkw_DELETE(attr_hash, attr_key) + Net::ZooKeeper::Watch attr_hash + SV *attr_key + PPCODE: + Perl_warn(aTHX_ "deleting elements from hashes of class " + WATCH_PACKAGE_NAME " not supported"); + + XSRETURN_EMPTY; + + +void +zkw_CLEAR(attr_hash) + Net::ZooKeeper::Watch attr_hash + PPCODE: + Perl_warn(aTHX_ "clearing hashes of class " + WATCH_PACKAGE_NAME " not supported"); + + XSRETURN_EMPTY; + + +void +zkw_wait(zkwh, ...) + Net::ZooKeeper::Watch zkwh + PREINIT: + zk_watch_t *watch; + unsigned int timeout; + struct timeval end_timeval; + int i, done; + struct timespec wait_timespec; + PPCODE: + watch = _zkw_get_handle_outer(aTHX_ zkwh, NULL); + + if (!watch) { + Perl_croak(aTHX_ "invalid handle"); + } + + if (items > 1 && !(items % 2)) { + Perl_croak(aTHX_ "invalid number of arguments"); + } + + timeout = watch->timeout; + + for (i = 1; i < items; i += 2) { + char *key = SvPV_nolen(ST(i)); + + if (strcaseEQ(key, "timeout")) { + timeout = SvUV(ST(i + 1)); + } + } + + gettimeofday(&end_timeval, NULL); + + end_timeval.tv_sec += timeout / 1000; + end_timeval.tv_usec += (timeout % 1000) * 1000; + + wait_timespec.tv_sec = end_timeval.tv_sec; + wait_timespec.tv_nsec = end_timeval.tv_usec * 1000; + + pthread_mutex_lock(&watch->mutex); + + while (!watch->done) { + struct timeval curr_timeval; + + gettimeofday(&curr_timeval, NULL); + + if (end_timeval.tv_sec < curr_timeval.tv_sec || + (end_timeval.tv_sec == curr_timeval.tv_sec && + end_timeval.tv_usec <= curr_timeval.tv_usec)) { + break; + } + + pthread_cond_timedwait(&watch->cond, &watch->mutex, + &wait_timespec); + } + + done = watch->done; + + pthread_mutex_unlock(&watch->mutex); + + if (done) { + XSRETURN_YES; + } + else { + XSRETURN_NO; + } + diff --git a/src/contrib/zkperl/build.xml b/src/contrib/zkperl/build.xml new file mode 100644 index 0000000..0c7207d --- /dev/null +++ b/src/contrib/zkperl/build.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/contrib/zkperl/t/10_invalid.t b/src/contrib/zkperl/t/10_invalid.t new file mode 100644 index 0000000..5e080b6 --- /dev/null +++ b/src/contrib/zkperl/t/10_invalid.t @@ -0,0 +1,773 @@ +# Net::ZooKeeper - Perl extension for Apache ZooKeeper +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +use File::Spec; +use Test::More tests => 107; + +BEGIN { use_ok('Net::ZooKeeper', qw(:all)) }; + + +my $test_dir; +(undef, $test_dir, undef) = File::Spec->splitpath($0); +require File::Spec->catfile($test_dir, 'util.pl'); + +my($hosts, $root_path, $node_path) = zk_test_setup(1); + + +## new() + +eval { + Net::ZooKeeper->new(); +}; +like($@, qr/Usage: Net::ZooKeeper::new\(package, hosts, \.\.\.\)/, + 'new(): no hostname specified'); + +eval { + Net::ZooKeeper->new($hosts, 'bar'); +}; +like($@, qr/invalid number of arguments/, + 'new(): invalid number of arguments'); + +eval { + Net::ZooKeeper->new($hosts, 'session_timeout' => -3); +}; +like($@, qr/invalid session timeout/, + 'new(): invalid session timeout'); + +eval { + Net::ZooKeeper->new($hosts, 'session_timeout' => 0x4000_0000); +}; +like($@, qr/invalid session timeout/, + 'new(): invalid session timeout'); + +eval { + Net::ZooKeeper->new($hosts, 'session_id' => 'abcdef'); +}; +like($@, qr/invalid session ID/, + 'new(): invalid session ID'); + +my $zkh = Net::ZooKeeper->new($hosts); +isa_ok($zkh, 'Net::ZooKeeper', + 'new(): created handle'); + + +## DESTROY() + +eval { + $zkh->DESTROY('foo'); +}; +like($@, qr/Usage: Net::ZooKeeper::DESTROY\(zkh\)/, + 'DESTROY(): too many arguments'); + +my $bad_zkh = {}; +$bad_zkh = bless($bad_zkh, 'Net::ZooKeeper'); + +my $ret = $bad_zkh->DESTROY(); +ok(!$ret, + 'DESTROY(): no action on invalid handle'); + + +## add_auth() + +eval { + $zkh->add_auth(); +}; +like($@, qr/Usage: Net::ZooKeeper::add_auth\(zkh, scheme, cert\)/, + 'add_auth(): no scheme specified'); + +eval { + $zkh->add_auth('foo'); +}; +like($@, qr/Usage: Net::ZooKeeper::add_auth\(zkh, scheme, cert\)/, + 'add_auth(): no certificate specified'); + +eval { + $zkh->add_auth('foo', 'foo', 'bar'); +}; +like($@, qr/Usage: Net::ZooKeeper::add_auth\(zkh, scheme, cert\)/, + 'add_auth(): too many arguments'); + +eval { + $bad_zkh->add_auth('foo', 'foo'); +}; +like($@, qr/invalid handle/, + 'add_auth(): invalid handle'); + +eval { + Net::ZooKeeper::add_auth(1, 'foo', 'foo'); +}; +like($@, qr/zkh is not a hash reference of type Net::ZooKeeper/, + 'add_auth(): invalid hash reference'); + + +## create() + +eval { + $zkh->create(); +}; +like($@, qr/Usage: Net::ZooKeeper::create\(zkh, path, buf, \.\.\.\)/, + 'create(): no path specified'); + +eval { + $zkh->create($node_path); +}; +like($@, qr/Usage: Net::ZooKeeper::create\(zkh, path, buf, \.\.\.\)/, + 'create(): no data buffer specified'); + +eval { + $zkh->create($node_path, 'foo', 'bar'); +}; +like($@, qr/invalid number of arguments/, + 'create(): invalid number of arguments'); + +eval { + $zkh->create($node_path, 'foo', 'path_read_len' => -3); +}; +like($@, qr/invalid path read length/, + 'create(): invalid path read length'); + +eval { + $zkh->create($node_path, 'foo', 'path_read_len' => 1); +}; +like($@, qr/invalid path read length/, + 'create(): invalid path read length'); + +eval { + $zkh->create($node_path, 'foo', 'flags' => 15); +}; +like($@, qr/invalid create flags/, + 'create(): invalid create flags'); + +eval { + $zkh->create($node_path, 'foo', 'flags' => ZOO_EPHEMERAL, 'acl', 'foo'); +}; +like($@, qr/invalid ACL array reference/, + 'create(): invalid ACL array reference'); + +eval { + $zkh->create($node_path, 'foo', 'acl', {}); +}; +like($@, qr/invalid ACL array reference/, + 'create(): invalid ACL array reference to hash'); + +eval { + my @acl = ('foo', 'bar'); + $zkh->create($node_path, 'foo', 'acl', \@acl); +}; +like($@, qr/invalid ACL entry hash reference/, + 'create(): invalid ACL entry hash reference'); + +eval { + my @acl = ({ 'foo' => 'bar' }); + $zkh->create($node_path, 'foo', 'acl', \@acl); +}; +like($@, qr/no ACL entry perms element/, + 'create(): no ACL entry perms element'); + +eval { + my @acl = ( + { + 'perms' => -1 + } + ); + $zkh->create($node_path, 'foo', 'acl', \@acl); +}; +like($@, qr/invalid ACL entry perms/, + 'create(): invalid ACL entry perms'); + +eval { + my @acl = ( + { + 'perms' => ZOO_PERM_ALL + } + ); + $zkh->create($node_path, 'foo', 'acl', \@acl); +}; +like($@, qr/no ACL entry scheme element/, + 'create(): no ACL entry scheme element'); + +eval { + my @acl = ( + { + 'perms' => ZOO_PERM_ALL, + 'scheme' => 'foo' + } + ); + $zkh->create($node_path, 'foo', 'acl', \@acl); +}; +like($@, qr/no ACL entry id element/, + 'create(): no ACL entry id element'); + +eval { + my @acl = ( + { + 'perms' => ZOO_PERM_ALL, + 'scheme' => 'foo', + 'id' => 'bar' + }, + 'bar' + ); + $zkh->create($node_path, 'foo', 'acl', \@acl); +}; +like($@, qr/invalid ACL entry hash reference/, + 'create(): invalid second ACL entry hash reference'); + +eval { + $bad_zkh->create($node_path, 'foo'); +}; +like($@, qr/invalid handle/, + 'create(): invalid handle'); + +eval { + Net::ZooKeeper::create(1, $node_path, 'foo'); +}; +like($@, qr/zkh is not a hash reference of type Net::ZooKeeper/, + 'create(): invalid hash reference'); + + +## delete() + +eval { + $zkh->delete(); +}; +like($@, qr/Usage: Net::ZooKeeper::delete\(zkh, path, \.\.\.\)/, + 'delete(): no path specified'); + +eval { + $zkh->delete($node_path, 'bar'); +}; +like($@, qr/invalid number of arguments/, + 'delete(): invalid number of arguments'); + +eval { + $zkh->delete($node_path, 'version' => -3); +}; +like($@, qr/invalid version requirement/, + 'delete(): invalid version requirement'); + +eval { + $bad_zkh->delete($node_path); +}; +like($@, qr/invalid handle/, + 'delete(): invalid handle'); + +eval { + Net::ZooKeeper::delete(1, $node_path); +}; +like($@, qr/zkh is not a hash reference of type Net::ZooKeeper/, + 'delete(): invalid hash reference'); + + +## exists() + +eval { + $zkh->exists(); +}; +like($@, qr/Usage: Net::ZooKeeper::exists\(zkh, path, \.\.\.\)/, + 'exists(): no path specified'); + +eval { + $zkh->exists($node_path, 'bar'); +}; +like($@, qr/invalid number of arguments/, + 'exists(): invalid number of arguments'); + +eval { + $zkh->exists($node_path, 'watch', 'bar'); +}; +like($@, qr/watch is not a hash reference of type Net::ZooKeeper::Watch/, + 'exists(): invalid watch hash reference'); + +eval { + $zkh->exists($node_path, 'watch', []); +}; +like($@, qr/watch is not a hash reference of type Net::ZooKeeper::Watch/, + 'exists(): invalid watch hash reference to array'); + +eval { + $zkh->exists($node_path, 'stat', 'bar'); +}; +like($@, qr/stat is not a hash reference of type Net::ZooKeeper::Stat/, + 'exists(): invalid stat hash reference'); + +eval { + $zkh->exists($node_path, 'stat', []); +}; +like($@, qr/stat is not a hash reference of type Net::ZooKeeper::Stat/, + 'exists(): invalid stat hash reference'); + +eval { + $bad_zkh->exists($node_path); +}; +like($@, qr/invalid handle/, + 'exists(): invalid handle'); + +eval { + Net::ZooKeeper::exists(1, $node_path); +}; +like($@, qr/zkh is not a hash reference of type Net::ZooKeeper/, + 'exists(): invalid hash reference'); + + +## get_children() + +eval { + $zkh->get_children(); +}; +like($@, qr/Usage: Net::ZooKeeper::get_children\(zkh, path, \.\.\.\)/, + 'get_children(): no path specified'); + +eval { + $zkh->get_children($node_path, 'bar'); +}; +like($@, qr/invalid number of arguments/, + 'get_children(): invalid number of arguments'); + +eval { + $zkh->get_children($node_path, 'watch', 'bar'); +}; +like($@, qr/watch is not a hash reference of type Net::ZooKeeper::Watch/, + 'get_children(): invalid watch hash reference'); + +eval { + $zkh->get_children($node_path, 'watch', []); +}; +like($@, qr/watch is not a hash reference of type Net::ZooKeeper::Watch/, + 'get_children(): invalid watch ash reference to array'); + +eval { + $bad_zkh->get_children($node_path); +}; +like($@, qr/invalid handle/, + 'get_children(): invalid handle'); + +eval { + Net::ZooKeeper::get_children(1, $node_path); +}; +like($@, qr/zkh is not a hash reference of type Net::ZooKeeper/, + 'get_children(): invalid hash reference'); + + +## get() + +eval { + $zkh->get(); +}; +like($@, qr/Usage: Net::ZooKeeper::get\(zkh, path, \.\.\.\)/, + 'get(): no path specified'); + +eval { + $zkh->get($node_path, 'bar'); +}; +like($@, qr/invalid number of arguments/, + 'get(): invalid number of arguments'); + +eval { + $zkh->get($node_path, 'data_read_len' => -3); +}; +like($@, qr/invalid data read length/, + 'get(): invalid data read length'); + +eval { + $zkh->get($node_path, 'data_read_len' => 10, 'watch', 'bar'); +}; +like($@, qr/watch is not a hash reference of type Net::ZooKeeper::Watch/, + 'get(): invalid watch hash reference'); + +eval { + $zkh->get($node_path, 'watch', []); +}; +like($@, qr/watch is not a hash reference of type Net::ZooKeeper::Watch/, + 'get(): invalid watch hash reference to array'); + +eval { + $zkh->get($node_path, 'stat', 'bar'); +}; +like($@, qr/stat is not a hash reference of type Net::ZooKeeper::Stat/, + 'get(): invalid stat hash reference'); + +eval { + $zkh->get($node_path, 'stat', []); +}; +like($@, qr/stat is not a hash reference of type Net::ZooKeeper::Stat/, + 'get(): invalid stat hash reference'); + +eval { + $bad_zkh->get($node_path); +}; +like($@, qr/invalid handle/, + 'get(): invalid handle'); + +eval { + Net::ZooKeeper::get(1, $node_path); +}; +like($@, qr/zkh is not a hash reference of type Net::ZooKeeper/, + 'get(): invalid hash reference'); + + +## set() + +eval { + $zkh->set(); +}; +like($@, qr/Usage: Net::ZooKeeper::set\(zkh, path, buf, \.\.\.\)/, + 'set(): no path specified'); + +eval { + $zkh->set($node_path); +}; +like($@, qr/Usage: Net::ZooKeeper::set\(zkh, path, buf, \.\.\.\)/, + 'set(): no data buffer specified'); + +eval { + $zkh->set($node_path, 'foo', 'bar'); +}; +like($@, qr/invalid number of arguments/, + 'set(): invalid number of arguments'); + +eval { + $zkh->set($node_path, 'foo', 'version' => -3); +}; +like($@, qr/invalid version requirement/, + 'set(): invalid version requirement'); + +eval { + $zkh->set($node_path, 'foo', 'version', 0, 'stat', 'bar'); +}; +like($@, qr/stat is not a hash reference of type Net::ZooKeeper::Stat/, + 'set(): invalid stat hash reference'); + +eval { + $zkh->set($node_path, 'foo', 'stat', []); +}; +like($@, qr/stat is not a hash reference of type Net::ZooKeeper::Stat/, + 'set(): invalid stat hash reference'); + +eval { + $bad_zkh->set($node_path, 'foo'); +}; +like($@, qr/invalid handle/, + 'set(): invalid handle'); + +eval { + Net::ZooKeeper::set(1, $node_path, 'foo'); +}; +like($@, qr/zkh is not a hash reference of type Net::ZooKeeper/, + 'set(): invalid hash reference'); + + +## get_acl() + +eval { + $zkh->get_acl(); +}; +like($@, qr/Usage: Net::ZooKeeper::get_acl\(zkh, path, \.\.\.\)/, + 'get_acl(): no path specified'); + +eval { + $zkh->get_acl($node_path, 'bar'); +}; +like($@, qr/invalid number of arguments/, + 'get_acl(): invalid number of arguments'); + +eval { + $zkh->get_acl($node_path, 'stat', 'bar'); +}; +like($@, qr/stat is not a hash reference of type Net::ZooKeeper::Stat/, + 'get_acl(): invalid stat hash reference'); + +eval { + $zkh->get_acl($node_path, 'stat', []); +}; +like($@, qr/stat is not a hash reference of type Net::ZooKeeper::Stat/, + 'get_acl(): invalid stat hash reference'); + +eval { + $bad_zkh->get_acl($node_path); +}; +like($@, qr/invalid handle/, + 'get_acl(): invalid handle'); + +eval { + Net::ZooKeeper::get_acl(1, $node_path); +}; +like($@, qr/zkh is not a hash reference of type Net::ZooKeeper/, + 'get_acl(): invalid hash reference'); + + +## set_acl() + +eval { + $zkh->set_acl(); +}; +like($@, qr/Usage: Net::ZooKeeper::set_acl\(zkh, path, acl_arr, \.\.\.\)/, + 'set_acl(): no path specified'); + +eval { + $zkh->set_acl($node_path); +}; +like($@, qr/Usage: Net::ZooKeeper::set_acl\(zkh, path, acl_arr, \.\.\.\)/, + 'set_acl(): no data buffer specified'); + +eval { + $zkh->set_acl($node_path, 'foo'); +}; +like($@, qr/acl_arr is not an array reference/, + 'set_acl(): invalid ACL array reference'); + +eval { + $zkh->set_acl($node_path, {}); +}; +like($@, qr/acl_arr is not an array reference/, + 'set_acl(): invalid ACL array reference to hash'); + +eval { + my @acl = ('foo', 'bar'); + $zkh->set_acl($node_path, \@acl); +}; +like($@, qr/invalid ACL entry hash reference/, + 'set_acl(): invalid ACL entry hash reference'); + +eval { + my @acl = ({ 'foo' => 'bar' }); + $zkh->set_acl($node_path, \@acl); +}; +like($@, qr/no ACL entry perms element/, + 'set_acl(): no ACL entry perms element'); + +eval { + my @acl = ( + { + 'perms' => -1 + } + ); + $zkh->set_acl($node_path, \@acl); +}; +like($@, qr/invalid ACL entry perms/, + 'set_acl(): invalid ACL entry perms'); + +eval { + my @acl = ( + { + 'perms' => ZOO_PERM_ALL + } + ); + $zkh->set_acl($node_path, \@acl); +}; +like($@, qr/no ACL entry scheme element/, + 'set_acl(): no ACL entry scheme element'); + +eval { + my @acl = ( + { + 'perms' => ZOO_PERM_ALL, + 'scheme' => 'foo' + } + ); + $zkh->set_acl($node_path, \@acl); +}; +like($@, qr/no ACL entry id element/, + 'set_acl(): no ACL entry id element'); + +eval { + my @acl = ( + { + 'perms' => ZOO_PERM_ALL, + 'scheme' => 'foo', + 'id' => 'bar' + }, + 'bar' + ); + $zkh->set_acl($node_path, \@acl); +}; +like($@, qr/invalid ACL entry hash reference/, + 'set_acl(): invalid second ACL entry hash reference'); + +eval { + $zkh->set_acl($node_path, [], 'bar'); +}; +like($@, qr/invalid number of arguments/, + 'set_acl(): invalid number of arguments'); + +eval { + $zkh->set_acl($node_path, [], 'version' => -3); +}; +like($@, qr/invalid version requirement/, + 'set_acl(): invalid version requirement'); + +eval { + $bad_zkh->set_acl($node_path, []); +}; +like($@, qr/invalid handle/, + 'set_acl(): invalid handle'); + +eval { + Net::ZooKeeper::set_acl(1, $node_path, []); +}; +like($@, qr/zkh is not a hash reference of type Net::ZooKeeper/, + 'set_acl(): invalid hash reference'); + + +## stat() + +eval { + $zkh->stat('bar'); +}; +like($@, qr/Usage: Net::ZooKeeper::stat\(zkh\)/, + 'stat(): too many arguments'); + +eval { + $bad_zkh->stat(); +}; +like($@, qr/invalid handle/, + 'stat(): invalid handle'); + +eval { + Net::ZooKeeper::stat(1); +}; +like($@, qr/zkh is not a hash reference of type Net::ZooKeeper/, + 'stat(): invalid hash reference'); + +my $stat = $zkh->stat(); +isa_ok($stat, 'Net::ZooKeeper::Stat', + 'stat(): created stat handle'); + + +## stat DESTROY() + +eval { + $stat->DESTROY('foo'); +}; +like($@, qr/Usage: Net::ZooKeeper::Stat::DESTROY\(zksh\)/, + 'stat DESTROY(): too many arguments'); + +my $bad_stat = {}; +$bad_stat = bless($bad_stat, 'Net::ZooKeeper::Stat'); + +$ret = $bad_stat->DESTROY(); +ok(!$ret, + 'stat DESTROY(): no action on invalid handle'); + + +## watch() + +eval { + $zkh->watch('bar'); +}; +like($@, qr/invalid number of arguments/, + 'watch(): invalid number of arguments'); + +eval { + $bad_zkh->watch(); +}; +like($@, qr/invalid handle/, + 'watch(): invalid handle'); + +eval { + Net::ZooKeeper::watch(1); +}; +like($@, qr/zkh is not a hash reference of type Net::ZooKeeper/, + 'watch(): invalid hash reference'); + +my $watch = $zkh->watch(); +isa_ok($watch, 'Net::ZooKeeper::Watch', + 'watch(): created watch handle'); + + +## watch DESTROY() + +eval { + $watch->DESTROY('foo'); +}; +like($@, qr/Usage: Net::ZooKeeper::Watch::DESTROY\(zkwh\)/, + 'watch DESTROY(): too many arguments'); + +my $bad_watch = {}; +$bad_watch = bless($bad_watch, 'Net::ZooKeeper::Watch'); + +$ret = $bad_watch->DESTROY(); +ok(!$ret, + 'watch DESTROY(): no action on invalid handle'); + + +## wait() + +eval { + $watch->wait('bar'); +}; +like($@, qr/invalid number of arguments/, + 'wait(): invalid number of arguments'); + +eval { + $bad_watch->wait(); +}; +like($@, qr/invalid handle/, + 'wait(): invalid watch handle'); + +eval { + Net::ZooKeeper::Watch::wait(1); +}; +like($@, qr/zkwh is not a hash reference of type Net::ZooKeeper::Watch/, + 'wait(): invalid watch hash reference'); + + +## set_log_level() + +eval { + my $f = \&Net::ZooKeeper::set_log_level; + &$f(); +}; +like($@, qr/Usage: Net::ZooKeeper::set_log_level\(level\)/, + 'set_log_level(): no level specified'); + +eval { + my $f = \&Net::ZooKeeper::set_log_level; + &$f(ZOO_LOG_LEVEL_OFF, 'foo'); +}; +like($@, qr/Usage: Net::ZooKeeper::set_log_level\(level\)/, + 'set_log_level(): too many arguments'); + +eval { + Net::ZooKeeper::set_log_level((ZOO_LOG_LEVEL_OFF) - 1); +}; +like($@, qr/invalid log level/, + 'set_log_level(): invalid low log level'); + +eval { + Net::ZooKeeper::set_log_level((ZOO_LOG_LEVEL_DEBUG) + 1); +}; +like($@, qr/invalid log level/, + 'set_log_level(): invalid high log level'); + + +## set_deterministic_conn_order() + +eval { + my $f = \&Net::ZooKeeper::set_deterministic_conn_order; + &$f(); +}; +like($@, qr/Usage: Net::ZooKeeper::set_deterministic_conn_order\(flag\)/, + 'set_deterministic_conn_order(): no flag specified'); + +eval { + my $f = \&Net::ZooKeeper::set_deterministic_conn_order; + &$f(1, 'foo'); +}; +like($@, qr/Usage: Net::ZooKeeper::set_deterministic_conn_order\(flag\)/, + 'set_deterministic_conn_order(): too many arguments'); + diff --git a/src/contrib/zkperl/t/15_thread.t b/src/contrib/zkperl/t/15_thread.t new file mode 100644 index 0000000..1ef56d0 --- /dev/null +++ b/src/contrib/zkperl/t/15_thread.t @@ -0,0 +1,121 @@ +# Net::ZooKeeper - Perl extension for Apache ZooKeeper +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +use Config; +use File::Spec; +use Test::More; + +BEGIN { + if ($Config{'useithreads'}) { + plan tests => 10; + } + else { + plan skip_all => 'no thread support'; + } +} + +use threads; + +BEGIN { use_ok('Net::ZooKeeper', qw(:all)) }; + + +my $test_dir; +(undef, $test_dir, undef) = File::Spec->splitpath($0); +require File::Spec->catfile($test_dir, 'util.pl'); + +my($hosts, $root_path, $node_path) = zk_test_setup(0); + + +my $zkh = Net::ZooKeeper->new($hosts); + +SKIP: { + skip 'no valid handle', 9 unless (defined($zkh)); + + my($thread) = threads->new(\&thread_test, $zkh); + + SKIP: { + skip 'no valid thread', 3 unless (defined($thread)); + + my(@ret) = $thread->join; + + ok((@ret == 3 and $ret[0]), + 'CLONE_SKIP(): handle reference after spawning thread'); + + ok((@ret == 3 and $ret[1]), + 'CLONE_SKIP(): scalar handle reference after spawning thread'); + + ok((@ret == 3 and $ret[2]), + 'CLONE_SKIP(): undef handle reference after spawning thread'); + } + + my $stat = $zkh->stat(); + + ($thread) = threads->new(\&thread_test, $stat); + + SKIP: { + skip 'no valid thread', 3 unless (defined($thread)); + + my(@ret) = $thread->join; + + ok((@ret == 3 and $ret[0]), + 'stat CLONE_SKIP(): stat handle reference after spawning thread'); + + ok((@ret == 3 and $ret[1]), + 'stat CLONE_SKIP(): scalar stat handle reference after ' . + 'spawning thread'); + + ok((@ret == 3 and $ret[2]), + 'stat CLONE_SKIP(): undef stat handle reference after ' . + 'spawning thread'); + } + + my $watch = $zkh->watch(); + + ($thread) = threads->new(\&thread_test, $watch); + + SKIP: { + skip 'no valid thread', 3 unless (defined($thread)); + + my(@ret) = $thread->join; + + ok((@ret == 3 and $ret[0]), + 'watch CLONE_SKIP(): watch handle reference after spawning thread'); + + ok((@ret == 3 and $ret[1]), + 'watch CLONE_SKIP(): scalar watch handle reference after ' . + 'spawning thread'); + + ok((@ret == 3 and $ret[2]), + 'watch CLONE_SKIP(): undef watch handle reference after ' . + 'spawning thread'); + } +} + +sub thread_test +{ + my $zkh = shift; + + my @ret; + + $ret[0] = ref($zkh) ? 1 : 0; + $ret[1] = ($ret[0] and ref($zkh) eq 'SCALAR') ? 1 : 0; + $ret[2] = ($ret[1] and !defined(${$zkh})) ? 1 : 0; + + return @ret; +} + diff --git a/src/contrib/zkperl/t/20_tie.t b/src/contrib/zkperl/t/20_tie.t new file mode 100644 index 0000000..37e9a4f --- /dev/null +++ b/src/contrib/zkperl/t/20_tie.t @@ -0,0 +1,353 @@ +# Net::ZooKeeper - Perl extension for Apache ZooKeeper +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +use File::Spec; +use Test::More tests => 54; + +BEGIN { use_ok('Net::ZooKeeper', qw(:all)) }; + + +my $test_dir; +(undef, $test_dir, undef) = File::Spec->splitpath($0); +require File::Spec->catfile($test_dir, 'util.pl'); + +my($hosts, $root_path, $node_path) = zk_test_setup(0); + + +SKIP: { + my $zkh = Net::ZooKeeper->new($hosts); + + skip 'no valid handle', 4 unless (defined($zkh)); + + + ## DESTROY() + + my $attr = tied(%{$zkh}); + + my $ret = $attr->DESTROY(); + ok($ret, + 'DESTROY(): destroyed inner hash'); + + $ret = $attr->DESTROY(); + ok(!$ret, + 'DESTROY(): no action on destroyed inner hash'); + + $ret = $zkh->DESTROY(); + ok(!$ret, + 'DESTROY(): no action on handle with destroyed inner hash'); + + undef $zkh; + ok(!defined($zkh), + 'undef: released handle with destroyed inner hash'); +} + +SKIP: { + my $zkh = Net::ZooKeeper->new($hosts); + + skip 'no valid handle', 49 unless (defined($zkh)); + + + ## TIEHASH(), UNTIE() + + eval { + tie(%{$zkh}, 'Net::ZooKeeper'); + }; + like($@, qr/tying hashes of class Net::ZooKeeper not supported/, + 'tie(): tying hashes not supported'); + + eval { + Net::ZooKeeper::TIEHASH('Net::ZooKeeper'); + }; + like($@, qr/tying hashes of class Net::ZooKeeper not supported/, + 'TIEHASH(): tying hashes not supported'); + + eval { + untie(%{$zkh}); + }; + like($@, qr/untying hashes of class Net::ZooKeeper not supported/, + 'untie(): untying hashes not supported'); + + my $attr = tied(%{$zkh}); + + eval { + $attr->UNTIE(0); + }; + like($@, qr/untying hashes of class Net::ZooKeeper not supported/, + 'UNTIE(): untying hashes not supported'); + + + ## FIRSTKEY(), NEXTKEY(), SCALAR() + + my $copy_zkh; + { + my %copy_zkh = %{$zkh}; + $copy_zkh = \%copy_zkh; + } + bless($copy_zkh, 'Net::ZooKeeper'); + is(ref($copy_zkh), 'Net::ZooKeeper', + 'FIRSTKEY(), NEXTKEY(): copied dereferenced handle'); + + eval { + my $val = $copy_zkh->FIRSTKEY(); + }; + like($@, qr/invalid handle/, + 'FETCHKEY(): invalid handle'); + + eval { + my $val = $copy_zkh->NEXTKEY('data_read_len'); + }; + like($@, qr/invalid handle/, + 'NEXTKEY(): invalid handle'); + + my @keys = keys(%{$zkh}); + is(scalar(@keys), 7, + 'keys(): count of keys from handle'); + + @keys = keys(%{$copy_zkh}); + is(scalar(@keys), 7, + 'keys(): count of keys from copied dereferenced handle'); + + is($attr->FIRSTKEY(), 'data_read_len', + 'FIRSTKEY(): retrieved first key using inner hash'); + + is($attr->NEXTKEY('session_id'), 'pending_watches', + 'NEXTKEY(): retrieved last key using inner hash'); + + is($attr->NEXTKEY('pending_watches'), undef, + 'NEXTKEY(): undef returned after last key using inner hash'); + + ok(scalar(%{$zkh}), + 'scalar(): true value returned for dereferenced handle'); + + ok($zkh->SCALAR(), + 'SCALAR(): true value returned'); + + + ## FETCH() + + eval { + my $val = $copy_zkh->FETCH('data_read_len'); + }; + like($@, qr/invalid handle/, + 'FETCH(): invalid handle'); + + { + my $msg; + + $SIG{'__WARN__'} = sub { $msg = $_[0]; }; + + my $val = $zkh->{'foo'}; + ok(!defined($val), + 'FETCH(): undef returned for invalid element'); + + like($msg, qr/invalid element/, + 'FETCH(): invalid element'); + } + + is($zkh->{'data_read_len'}, 1023, + 'FETCH(): default data read length'); + + is($zkh->{'path_read_len'}, 1023, + 'FETCH(): default path read length'); + + is($zkh->{'hosts'}, $hosts, + 'FETCH(): server hosts'); + + is($zkh->{'session_timeout'}, 10000, + 'FETCH(): default session timeout'); + + ok(defined($zkh->{'session_id'}), + 'FETCH(): session ID'); + + SKIP: { + my $zkh = Net::ZooKeeper->new('0.0.0.0:0'); + + skip 'no valid handle with invalid host', 1 unless (defined($zkh)); + + is($zkh->{'session_id'}, '', + 'FETCH(): empty session ID with invalid host'); + } + + is($zkh->{'pending_watches'}, 0, + 'FETCH(): default pending watch list length'); + + is($attr->FETCH('data_read_len'), 1023, + 'FETCH(): default data read length using inner hash'); + + + ## STORE() + + eval { + my $val = $copy_zkh->STORE('data_read_len', 'foo'); + }; + like($@, qr/invalid handle/, + 'STORE(): invalid handle'); + + { + my $msg; + + $SIG{'__WARN__'} = sub { $msg = $_[0]; }; + + $zkh->{'foo'} = 'foo'; + like($msg, qr/invalid element/, + 'STORE(): invalid element'); + } + + eval { + $zkh->{'data_read_len'} = -3; + }; + like($@, qr/invalid data read length/, + 'STORE(): invalid data read length'); + + eval { + $zkh->{'path_read_len'} = -3; + }; + like($@, qr/invalid path read length/, + 'STORE(): invalid path read length'); + + { + my $msg; + + $SIG{'__WARN__'} = sub { $msg = $_[0]; }; + + $zkh->{'hosts'} = 'foo'; + like($msg, qr/read-only element: hosts/, + 'STORE(): read-only server hosts element'); + } + + { + my $msg; + + $SIG{'__WARN__'} = sub { $msg = $_[0]; }; + + $zkh->{'session_timeout'} = 0; + like($msg, qr/read-only element: session_timeout/, + 'STORE(): read-only session timeout element'); + } + + { + my $msg; + + $SIG{'__WARN__'} = sub { $msg = $_[0]; }; + + $zkh->{'session_id'} = 'foo'; + like($msg, qr/read-only element: session_id/, + 'STORE(): read-only session ID element'); + } + + { + my $msg; + + $SIG{'__WARN__'} = sub { $msg = $_[0]; }; + + $zkh->{'pending_watches'} = 0; + like($msg, qr/read-only element: pending_watches/, + 'STORE(): read-only pending watch list length element'); + } + + $zkh->{'data_read_len'} = 200; + is($zkh->{'data_read_len'}, 200, + 'STORE(): updated data read length'); + + $zkh->{'path_read_len'} = 100; + is($zkh->{'path_read_len'}, 100, + 'STORE(): updated path read length'); + + $attr->STORE('data_read_len', 100); + is($zkh->{'data_read_len'}, 100, + 'STORE(): updated data read length using inner hash'); + + + ## EXISTS() + + eval { + my $val = $copy_zkh->EXISTS('data_read_len'); + }; + like($@, qr/invalid handle/, + 'EXISTS(): invalid handle'); + + ok(!exists($zkh->{'foo'}), + 'exists(): invalid element of handle'); + + ok(exists($zkh->{'data_read_len'}), + 'exists(): data read length'); + + ok(exists($zkh->{'path_read_len'}), + 'exists(): path read length'); + + ok(exists($zkh->{'hosts'}), + 'exists(): server hosts'); + + ok(exists($zkh->{'session_timeout'}), + 'exists(): session timeout'); + + ok(exists($zkh->{'session_id'}), + 'exists(): session ID'); + + ok(exists($zkh->{'pending_watches'}), + 'exists(): pending watch list length'); + + ok($attr->EXISTS('data_read_len'), + 'EXISTS(): data read length using inner hash'); + + + ## DELETE(), CLEAR() + + { + my $msg; + + $SIG{'__WARN__'} = sub { $msg = $_[0]; }; + + delete($zkh->{'data_read_len'}); + like($msg, + qr/deleting elements from hashes of class Net::ZooKeeper not supported/, + 'delete(): deleting hash elements not supported'); + } + + { + my $msg; + + $SIG{'__WARN__'} = sub { $msg = $_[0]; }; + + $zkh->DELETE({'data_read_len'}); + like($msg, + qr/deleting elements from hashes of class Net::ZooKeeper not supported/, + 'DELETE(): deleting hash elements not supported'); + } + + { + my $msg; + + $SIG{'__WARN__'} = sub { $msg = $_[0]; }; + + %{$zkh} = (); + like($msg, qr/clearing hashes of class Net::ZooKeeper not supported/, + 'assign: clearing hashes not supported'); + } + + { + my $msg; + + $SIG{'__WARN__'} = sub { $msg = $_[0]; }; + + $zkh->CLEAR(); + like($msg, qr/clearing hashes of class Net::ZooKeeper not supported/, + 'CLEAR(): clearing hashes not supported'); + } +} + diff --git a/src/contrib/zkperl/t/22_stat_tie.t b/src/contrib/zkperl/t/22_stat_tie.t new file mode 100644 index 0000000..02e7913 --- /dev/null +++ b/src/contrib/zkperl/t/22_stat_tie.t @@ -0,0 +1,438 @@ +# Net::ZooKeeper - Perl extension for Apache ZooKeeper +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +use File::Spec; +use Test::More tests => 66; + +BEGIN { use_ok('Net::ZooKeeper', qw(:all)) }; + + +my $test_dir; +(undef, $test_dir, undef) = File::Spec->splitpath($0); +require File::Spec->catfile($test_dir, 'util.pl'); + +my($hosts, $root_path, $node_path) = zk_test_setup(0); + + +SKIP: { + my $zkh = Net::ZooKeeper->new($hosts); + my $stat = $zkh->stat() if (defined($zkh)); + + skip 'no valid stat handle', 4 unless (defined($stat)); + + + ## DESTROY() + + my $attr = tied(%{$stat}); + + my $ret = $attr->DESTROY(); + ok($ret, + 'stat DESTROY(): destroyed inner stat hash'); + + $ret = $attr->DESTROY(); + ok(!$ret, + 'stat DESTROY(): no action on destroyed inner stat hash'); + + $ret = $stat->DESTROY(); + ok(!$ret, + 'stat DESTROY(): no action on stat handle with destroyed inner hash'); + + undef $stat; + ok(!defined($stat), + 'undef: released stat handle with destroyed inner hash'); +} + +SKIP: { + my $zkh = Net::ZooKeeper->new($hosts); + my $stat = $zkh->stat() if (defined($zkh)); + + skip 'no valid stat handle', 61 unless (defined($stat)); + + + ## TIEHASH(), UNTIE() + + eval { + tie(%{$stat}, 'Net::ZooKeeper::Stat'); + }; + like($@, qr/tying hashes of class Net::ZooKeeper::Stat not supported/, + 'tie(): tying stat hashes not supported'); + + eval { + Net::ZooKeeper::Stat::TIEHASH('Net::ZooKeeper::Stat'); + }; + like($@, qr/tying hashes of class Net::ZooKeeper::Stat not supported/, + 'stat TIEHASH(): tying stat hashes not supported'); + + eval { + untie(%{$stat}); + }; + like($@, qr/untying hashes of class Net::ZooKeeper::Stat not supported/, + 'untie(): untying stat hashes not supported'); + + my $attr = tied(%{$stat}); + + eval { + $attr->UNTIE(0); + }; + like($@, qr/untying hashes of class Net::ZooKeeper::Stat not supported/, + 'stat UNTIE(): untying stat hashes not supported'); + + + ## FIRSTKEY(), NEXTKEY(), SCALAR() + + my $copy_stat; + { + my %copy_stat = %{$stat}; + $copy_stat = \%copy_stat; + } + bless($copy_stat, 'Net::ZooKeeper::Stat'); + is(ref($copy_stat), 'Net::ZooKeeper::Stat', + 'stat FIRSTKEY(), NEXTKEY(): copied dereferenced stat handle'); + + eval { + my $val = $copy_stat->FIRSTKEY(); + }; + like($@, qr/invalid handle/, + 'stat FETCHKEY(): invalid stat handle'); + + eval { + my $val = $copy_stat->NEXTKEY('czxid'); + }; + like($@, qr/invalid handle/, + 'stat NEXTKEY(): invalid stat handle'); + + my @keys = keys(%{$stat}); + is(scalar(@keys), 11, + 'keys(): count of keys from stat handle'); + + @keys = keys(%{$copy_stat}); + is(scalar(@keys), 11, + 'keys(): count of keys from copied dereferenced stat handle'); + + is($attr->FIRSTKEY(), 'czxid', + 'stat FIRSTKEY(): retrieved first key using inner stat hash'); + + is($attr->NEXTKEY('num_children'), 'children_zxid', + 'stat NEXTKEY(): retrieved last key using inner stat hash'); + + is($attr->NEXTKEY('children_zxid'), undef, + 'NEXTKEY(): undef returned after last key using inner stat hash'); + + ok(scalar(%{$stat}), + 'scalar(): true value returned for dereferenced stat handle'); + + ok($stat->SCALAR(), + 'stat SCALAR(): true value returned'); + + + ## FETCH() + + eval { + my $val = $copy_stat->FETCH('version'); + }; + like($@, qr/invalid handle/, + 'stat FETCH(): invalid stat handle'); + + { + my $msg; + + $SIG{'__WARN__'} = sub { $msg = $_[0]; }; + + my $val = $stat->{'foo'}; + ok(!defined($val), + 'stat FETCH(): undef returned for invalid element'); + + like($msg, qr/invalid element/, + 'stat FETCH(): invalid element'); + } + + is($stat->{'czxid'}, 0, + 'stat FETCH(): default node creation ZooKeeper transaction ID'); + + is($stat->{'mzxid'}, 0, + 'stat FETCH(): default data last-modified ZooKeeper transaction ID'); + + is($stat->{'ctime'}, 0, + 'stat FETCH(): default node creation time'); + + is($stat->{'mtime'}, 0, + 'stat FETCH(): default data last-modified time'); + + is($stat->{'version'}, 0, + 'stat FETCH(): default data version'); + + is($stat->{'children_version'}, 0, + 'stat FETCH(): default child node list version'); + + is($stat->{'acl_version'}, 0, + 'stat FETCH(): default ACL version'); + + is($stat->{'ephemeral_owner'}, 0, + 'stat FETCH(): ephemeral node owner session ID'); + + is($stat->{'data_len'}, 0, + 'stat FETCH(): default data length'); + + is($stat->{'num_children'}, 0, + 'stat FETCH(): default child node list length'); + + is($stat->{'children_zxid'}, 0, + 'stat FETCH(): default child node list last-modified ' . + 'ZooKeeper transaction ID'); + + is($attr->FETCH('version'), 0, + 'stat FETCH(): default data version using inner stat hash'); + + + ## STORE() + + eval { + my $val = $copy_stat->STORE('version', 'foo'); + }; + like($@, qr/invalid handle/, + 'stat STORE(): invalid stat handle'); + + { + my $msg; + + $SIG{'__WARN__'} = sub { $msg = $_[0]; }; + + $stat->{'foo'} = 'foo'; + like($msg, qr/invalid element/, + 'stat STORE(): invalid element'); + } + + { + my $msg; + + $SIG{'__WARN__'} = sub { $msg = $_[0]; }; + + $stat->{'czxid'} = 'foo'; + like($msg, qr/read-only element: czxid/, + 'stat STORE(): read-only node creation ' . + 'ZooKeeper transaction ID element'); + } + + { + my $msg; + + $SIG{'__WARN__'} = sub { $msg = $_[0]; }; + + $stat->{'mzxid'} = 'foo'; + like($msg, qr/read-only element: mzxid/, + 'stat STORE(): read-only data last-modified ' . + 'ZooKeeper transaction ID element'); + } + + { + my $msg; + + $SIG{'__WARN__'} = sub { $msg = $_[0]; }; + + $stat->{'ctime'} = 'foo'; + like($msg, qr/read-only element: ctime/, + 'stat STORE(): read-only node creation time element'); + } + + { + my $msg; + + $SIG{'__WARN__'} = sub { $msg = $_[0]; }; + + $stat->{'mtime'} = 'foo'; + like($msg, qr/read-only element: mtime/, + 'stat STORE(): read-only data last-modified time element'); + } + + { + my $msg; + + $SIG{'__WARN__'} = sub { $msg = $_[0]; }; + + $stat->{'version'} = 'foo'; + like($msg, qr/read-only element: version/, + 'stat STORE(): read-only data version element'); + } + + { + my $msg; + + $SIG{'__WARN__'} = sub { $msg = $_[0]; }; + + $stat->{'children_version'} = 'foo'; + like($msg, qr/read-only element: children_version/, + 'stat STORE(): read-only child node list version element'); + } + + { + my $msg; + + $SIG{'__WARN__'} = sub { $msg = $_[0]; }; + + $stat->{'acl_version'} = 'foo'; + like($msg, qr/read-only element: acl_version/, + 'stat STORE(): read-only ACL version element'); + } + + { + my $msg; + + $SIG{'__WARN__'} = sub { $msg = $_[0]; }; + + $stat->{'ephemeral_owner'} = 'foo'; + like($msg, qr/read-only element: ephemeral_owner/, + 'stat STORE(): read-only ephemeral node owner ' . + 'session ID element'); + } + + { + my $msg; + + $SIG{'__WARN__'} = sub { $msg = $_[0]; }; + + $stat->{'data_len'} = 'foo'; + like($msg, qr/read-only element: data_len/, + 'stat STORE(): read-only data length element'); + } + + { + my $msg; + + $SIG{'__WARN__'} = sub { $msg = $_[0]; }; + + $stat->{'num_children'} = 'foo'; + like($msg, qr/read-only element: num_children/, + 'stat STORE(): read-only child node list length element'); + } + + { + my $msg; + + $SIG{'__WARN__'} = sub { $msg = $_[0]; }; + + $stat->{'children_zxid'} = 'foo'; + like($msg, qr/read-only element: children_zxid/, + 'stat STORE(): read-only child node list last-modified ' . + 'ZooKeeper transaction ID element'); + } + + { + my $msg; + + $SIG{'__WARN__'} = sub { $msg = $_[0]; }; + + $attr->STORE('version', 'foo'); + like($msg, qr/read-only element: version/, + 'stat STORE(): read-only data version element using ' . + 'inner stat hash'); + } + + + ## EXISTS() + + eval { + my $val = $copy_stat->EXISTS('version'); + }; + like($@, qr/invalid handle/, + 'stat EXISTS(): invalid stat handle'); + + ok(!exists($stat->{'foo'}), + 'exists(): invalid element of stat handle'); + + ok(exists($stat->{'czxid'}), + 'exists(): node creation ZooKeeper transaction ID'); + + ok(exists($stat->{'mzxid'}), + 'exists(): data last-modified ZooKeeper transaction ID'); + + ok(exists($stat->{'ctime'}), + 'exists(): node creation time'); + + ok(exists($stat->{'mtime'}), + 'exists(): data last-modified time'); + + ok(exists($stat->{'version'}), + 'exists(): data version'); + + ok(exists($stat->{'children_version'}), + 'exists(): child node list version'); + + ok(exists($stat->{'acl_version'}), + 'exists(): ACL version'); + + ok(exists($stat->{'ephemeral_owner'}), + 'exists(): ephemeral node owner session ID'); + + ok(exists($stat->{'data_len'}), + 'exists(): data length'); + + ok(exists($stat->{'num_children'}), + 'exists(): child node list length'); + + ok(exists($stat->{'children_zxid'}), + 'exists(): child node list last-modified ZooKeeper transaction ID'); + + ok($attr->EXISTS('version'), + 'stat EXISTS(): data version using inner stat hash'); + + + ## DELETE(), CLEAR() + + { + my $msg; + + $SIG{'__WARN__'} = sub { $msg = $_[0]; }; + + delete($stat->{'version'}); + like($msg, + qr/deleting elements from hashes of class Net::ZooKeeper::Stat not supported/, + 'delete(): deleting stat hash elements not supported'); + } + + { + my $msg; + + $SIG{'__WARN__'} = sub { $msg = $_[0]; }; + + $stat->DELETE({'version'}); + like($msg, + qr/deleting elements from hashes of class Net::ZooKeeper::Stat not supported/, + 'stat DELETE(): deleting stat hash elements not supported'); + } + + { + my $msg; + + $SIG{'__WARN__'} = sub { $msg = $_[0]; }; + + %{$stat} = (); + like($msg, qr/clearing hashes of class Net::ZooKeeper::Stat not supported/, + 'assign: clearing stat hashes not supported'); + } + + { + my $msg; + + $SIG{'__WARN__'} = sub { $msg = $_[0]; }; + + $stat->CLEAR(); + like($msg, qr/clearing hashes of class Net::ZooKeeper::Stat not supported/, + 'stat CLEAR(): clearing stat hashes not supported'); + } +} + diff --git a/src/contrib/zkperl/t/24_watch_tie.t b/src/contrib/zkperl/t/24_watch_tie.t new file mode 100644 index 0000000..e77879e --- /dev/null +++ b/src/contrib/zkperl/t/24_watch_tie.t @@ -0,0 +1,292 @@ +# Net::ZooKeeper - Perl extension for Apache ZooKeeper +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +use File::Spec; +use Test::More tests => 42; + +BEGIN { use_ok('Net::ZooKeeper', qw(:all)) }; + + +my $test_dir; +(undef, $test_dir, undef) = File::Spec->splitpath($0); +require File::Spec->catfile($test_dir, 'util.pl'); + +my($hosts, $root_path, $node_path) = zk_test_setup(0); + + +SKIP: { + my $zkh = Net::ZooKeeper->new($hosts); + my $watch = $zkh->watch() if (defined($zkh)); + + skip 'no valid watch handle', 4 unless (defined($watch)); + + + ## DESTROY() + + my $attr = tied(%{$watch}); + + my $ret = $attr->DESTROY(); + ok($ret, + 'watch DESTROY(): destroyed inner watch hash'); + + $ret = $attr->DESTROY(); + ok(!$ret, + 'watch DESTROY(): no action on destroyed inner watch hash'); + + $ret = $watch->DESTROY(); + ok(!$ret, + 'watch DESTROY(): no action on watch handle with destroyed inner hash'); + + undef $watch; + ok(!defined($watch), + 'undef: released watch handle with destroyed inner hash'); +} + +SKIP: { + my $zkh = Net::ZooKeeper->new($hosts); + my $watch = $zkh->watch() if (defined($zkh)); + + skip 'no valid watch handle', 37 unless (defined($watch)); + + + ## TIEHASH(), UNTIE() + + eval { + tie(%{$watch}, 'Net::ZooKeeper::Watch'); + }; + like($@, qr/tying hashes of class Net::ZooKeeper::Watch not supported/, + 'tie(): tying watch hashes not supported'); + + eval { + Net::ZooKeeper::Watch::TIEHASH('Net::ZooKeeper::Watch'); + }; + like($@, qr/tying hashes of class Net::ZooKeeper::Watch not supported/, + 'watch TIEHASH(): tying watch hashes not supported'); + + eval { + untie(%{$watch}); + }; + like($@, qr/untying hashes of class Net::ZooKeeper::Watch not supported/, + 'untie(): untying watch hashes not supported'); + + my $attr = tied(%{$watch}); + + eval { + $attr->UNTIE(0); + }; + like($@, qr/untying hashes of class Net::ZooKeeper::Watch not supported/, + 'watch UNTIE(): untying watch hashes not supported'); + + + ## FIRSTKEY(), NEXTKEY(), SCALAR() + + my $copy_watch; + { + my %copy_watch = %{$watch}; + $copy_watch = \%copy_watch; + } + bless($copy_watch, 'Net::ZooKeeper::Watch'); + is(ref($copy_watch), 'Net::ZooKeeper::Watch', + 'watch FIRSTKEY(), NEXTKEY(): copied dereferenced watch handle'); + + eval { + my $val = $copy_watch->FIRSTKEY(); + }; + like($@, qr/invalid handle/, + 'watch FETCHKEY(): invalid watch handle'); + + eval { + my $val = $copy_watch->NEXTKEY('czxid'); + }; + like($@, qr/invalid handle/, + 'watch NEXTKEY(): invalid watch handle'); + + my @keys = keys(%{$watch}); + is(scalar(@keys), 3, + 'keys(): count of keys from watch handle'); + + @keys = keys(%{$copy_watch}); + is(scalar(@keys), 3, + 'keys(): count of keys from copied dereferenced watch handle'); + + is($attr->FIRSTKEY(), 'timeout', + 'watch FIRSTKEY(): retrieved first key using inner watch hash'); + + is($attr->NEXTKEY('event'), 'state', + 'watch NEXTKEY(): retrieved last key using inner watch hash'); + + is($attr->NEXTKEY('state'), undef, + 'NEXTKEY(): undef returned after last key using inner watch hash'); + + ok(scalar(%{$watch}), + 'scalar(): true value returned for dereferenced watch handle'); + + ok($watch->SCALAR(), + 'watch SCALAR(): true value returned'); + + + ## FETCH() + + eval { + my $val = $copy_watch->FETCH('version'); + }; + like($@, qr/invalid handle/, + 'watch FETCH(): invalid watch handle'); + + { + my $msg; + + $SIG{'__WARN__'} = sub { $msg = $_[0]; }; + + my $val = $watch->{'foo'}; + ok(!defined($val), + 'watch FETCH(): undef returned for invalid element'); + + like($msg, qr/invalid element/, + 'watch FETCH(): invalid element'); + } + + is($watch->{'timeout'}, 60000, + 'watch FETCH(): default timeout'); + + is($watch->{'event'}, 0, + 'watch FETCH(): default event'); + + is($watch->{'state'}, 0, + 'watch FETCH(): default state'); + + is($attr->FETCH('timeout'), 60000, + 'watch FETCH(): default timeout using inner watch hash'); + + + ## STORE() + + eval { + my $val = $copy_watch->STORE('version', 'foo'); + }; + like($@, qr/invalid handle/, + 'watch STORE(): invalid watch handle'); + + { + my $msg; + + $SIG{'__WARN__'} = sub { $msg = $_[0]; }; + + $watch->{'foo'} = 'foo'; + like($msg, qr/invalid element/, + 'watch STORE(): invalid element'); + } + + { + my $msg; + + $SIG{'__WARN__'} = sub { $msg = $_[0]; }; + + $watch->{'event'} = 'foo'; + like($msg, qr/read-only element: event/, + 'watch STORE(): read-only event element'); + } + + { + my $msg; + + $SIG{'__WARN__'} = sub { $msg = $_[0]; }; + + $watch->{'state'} = 'foo'; + like($msg, qr/read-only element: state/, + 'watch STORE(): read-only state element'); + } + + $watch->{'timeout'} = 100; + is($watch->{'timeout'}, 100, + 'watch STORE(): updated timeout'); + + $attr->STORE('timeout', 200); + is($watch->{'timeout'}, 200, + 'watch STORE(): updated timeout using inner hash'); + + + ## EXISTS() + + eval { + my $val = $copy_watch->EXISTS('version'); + }; + like($@, qr/invalid handle/, + 'watch EXISTS(): invalid watch handle'); + + ok(!exists($watch->{'foo'}), + 'exists(): invalid element of watch handle'); + + ok(exists($watch->{'timeout'}), + 'exists(): timeout'); + + ok(exists($watch->{'event'}), + 'exists(): event'); + + ok(exists($watch->{'state'}), + 'exists(): state'); + + ok($attr->EXISTS('timeout'), + 'watch EXISTS(): timeout using inner watch hash'); + + + ## DELETE(), CLEAR() + + { + my $msg; + + $SIG{'__WARN__'} = sub { $msg = $_[0]; }; + + delete($watch->{'version'}); + like($msg, + qr/deleting elements from hashes of class Net::ZooKeeper::Watch not supported/, + 'delete(): deleting watch hash elements not supported'); + } + + { + my $msg; + + $SIG{'__WARN__'} = sub { $msg = $_[0]; }; + + $watch->DELETE({'version'}); + like($msg, + qr/deleting elements from hashes of class Net::ZooKeeper::Watch not supported/, + 'watch DELETE(): deleting watch hash elements not supported'); + } + + { + my $msg; + + $SIG{'__WARN__'} = sub { $msg = $_[0]; }; + + %{$watch} = (); + like($msg, qr/clearing hashes of class Net::ZooKeeper::Watch not supported/, + 'assign: clearing watch hashes not supported'); + } + + { + my $msg; + + $SIG{'__WARN__'} = sub { $msg = $_[0]; }; + + $watch->CLEAR(); + like($msg, qr/clearing hashes of class Net::ZooKeeper::Watch not supported/, + 'watch CLEAR(): clearing watch hashes not supported'); + } +} + diff --git a/src/contrib/zkperl/t/30_connect.t b/src/contrib/zkperl/t/30_connect.t new file mode 100644 index 0000000..c2b68bb --- /dev/null +++ b/src/contrib/zkperl/t/30_connect.t @@ -0,0 +1,202 @@ +# Net::ZooKeeper - Perl extension for Apache ZooKeeper +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +use File::Spec; +use Test::More tests => 29; + +BEGIN { use_ok('Net::ZooKeeper', qw(:all)) }; + + +my $test_dir; +(undef, $test_dir, undef) = File::Spec->splitpath($0); +require File::Spec->catfile($test_dir, 'util.pl'); + +my($hosts, $root_path, $node_path) = zk_test_setup(0); + + +## new(), DESTROY() + +Net::ZooKeeper::set_deterministic_conn_order(1); + +my $zkh = Net::ZooKeeper->new($hosts); +isa_ok($zkh, 'Net::ZooKeeper', + 'new(): created handle'); + +SKIP: { + skip 'no valid handle', 3 unless (defined($zkh)); + + my $ret = $zkh->DESTROY(); + ok($ret, + 'DESTROY(): destroyed handle'); + + $ret = $zkh->DESTROY(); + ok(!$ret, + 'DESTROY(): no action on destroyed handle'); + + undef $zkh; + ok(!defined($zkh), + 'undef: released handle'); +} + +Net::ZooKeeper::set_deterministic_conn_order(0); + +SKIP: { + my $zkh = Net::ZooKeeper->new($hosts); + + skip 'no valid handle', 10 unless (defined($zkh)); + + my $copy_zkh = $zkh; + isa_ok($copy_zkh, 'Net::ZooKeeper', + 'assign: copied handle'); + + my $ret = $zkh->exists($root_path); + ok(defined($ret), + 'exists(): no error from original handle'); + + undef $zkh; + ok(!defined($zkh), + 'undef: released original handle'); + + $ret = $copy_zkh->exists($root_path); + ok(defined($ret), + 'exists(): no error from first copy of handle'); + + $zkh = $copy_zkh; + isa_ok($zkh, 'Net::ZooKeeper', + 'assign: re-copied handle'); + + $ret = $copy_zkh->DESTROY(); + ok($ret, + 'DESTROY(): destroyed first copy of handle'); + + eval { + $zkh->exists($root_path); + }; + like($@, qr/invalid handle/, + 'exists(): invalid second copy of handle'); + + undef $copy_zkh; + ok(!defined($copy_zkh), + 'undef: released first copy of handle'); + + $ret = $zkh->DESTROY(); + ok(!$ret, + 'DESTROY(): no action on second copy of destroyed handle'); + + undef $zkh; + ok(!defined($zkh), + 'undef: released second copy of handle'); +} + +SKIP: { + my $zkh = Net::ZooKeeper->new($hosts); + + skip 'no valid handle', 6 unless (defined($zkh)); + + my $copy_zkh; + { + my %copy_zkh = %{$zkh}; + $copy_zkh = \%copy_zkh; + } + bless($copy_zkh, 'Net::ZooKeeper'); + isa_ok($copy_zkh, 'Net::ZooKeeper', + 'FIRSTKEY(), NEXTKEY(): copied dereferenced handle'); + + eval { + $copy_zkh->exists($root_path); + }; + like($@, qr/invalid handle/, + 'exists(): invalid copy of dereferenced handle'); + + $ret = $copy_zkh->DESTROY(); + ok(!$ret, + 'DESTROY(): no action on copy of dereferenced handle'); + + undef $copy_zkh; + ok(!defined($copy_zkh), + 'undef: released copy of dereferenced handle'); + + my $ret = $zkh->exists($root_path); + ok(defined($ret), + 'exists(): no error from original handle'); + + undef $zkh; + ok(!defined($zkh), + 'undef: released original handle'); +} + +Net::ZooKeeper::set_deterministic_conn_order(1); + +my $zkh1 = Net::ZooKeeper->new($hosts, 'session_timeout' => 0x3FFF_FFFF); +isa_ok($zkh1, 'Net::ZooKeeper', + 'new(): created handle with maximum session timeout'); + +SKIP: { + my $ret = $zkh1->exists($root_path) if (defined($zkh1)); + + skip 'no connection to ZooKeeper', 7 unless + (defined($ret) and $ret); + + + ## FETCH() of read-only attributes + + ok(($zkh1->{'session_timeout'} > 0 and + $zkh1->{'session_timeout'} <= 0x3FFF_FFFF), + 'FETCH(): session timeout reset after connection'); + + my $session_id1 = $zkh1->{'session_id'}; + ok((length($session_id1) > 0), + 'FETCH(): non-empty session ID after connection'); + + SKIP: { + skip 'no session ID after connection', 1 unless + (length($session_id1) > 0); + + my @nonzero_bytes = grep($_ != 0, unpack('c' x length($session_id1), + $session_id1)); + ok((@nonzero_bytes > 0), + 'FETCH(): non-zero session ID after connection'); + } + + ## NOTE: to test re-connections with saved session IDs we create a second + ## connection with the same ID while the first is still active; + ## this is bad practice in normal usage + + my $zkh2 = Net::ZooKeeper->new($hosts, + 'session_id' => $session_id1, + 'session_timeout' => 20000); + isa_ok($zkh2, 'Net::ZooKeeper', + 'new(): created handle with session ID and valid session timeout'); + + $ret = $zkh2->exists($root_path); + ok($ret, + 'new(): reconnection with session ID'); + + SKIP: { + skip 'no connection to ZooKeeper', 2 unless ($ret); + + is($zkh2->{'session_timeout'}, 20000, + 'FETCH(): session timeout unchanged after connection'); + + my $session_id2 = $zkh2->{'session_id'}; + ok((length($session_id2) == length($session_id1) + and $session_id2 eq $session_id1), + 'FETCH(): reconnect with session ID'); + } +} + diff --git a/src/contrib/zkperl/t/35_log.t b/src/contrib/zkperl/t/35_log.t new file mode 100644 index 0000000..92821af --- /dev/null +++ b/src/contrib/zkperl/t/35_log.t @@ -0,0 +1,88 @@ +# Net::ZooKeeper - Perl extension for Apache ZooKeeper +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +use File::Spec; +use Test::More tests => 3; + +BEGIN { use_ok('Net::ZooKeeper', qw(:all)) }; + + +my $test_dir; +(undef, $test_dir, undef) = File::Spec->splitpath($0); +require File::Spec->catfile($test_dir, 'util.pl'); + +my($hosts, $root_path, $node_path) = zk_test_setup(0); + + +my $zkh = Net::ZooKeeper->new($hosts); + +Net::ZooKeeper::set_log_level(ZOO_LOG_LEVEL_INFO); + +SKIP: { + skip 'no valid handle', 2 unless (defined($zkh)); + + SKIP: { + my $dup = 0; + + if (open(OLDERR, '>&', fileno(STDERR))) { + if (close(STDERR) and open(STDERR, '+>', undef)) { + $dup = 1; + + my $old_select = select(STDERR); + $| = 1; + select($old_select); + } + else { + open(STDERR, '>&', fileno(OLDERR)); + close(OLDERR); + } + } + + skip 'no duplicated stderr', 2 unless ($dup); + + SKIP: { + $zkh->exists($root_path); + + sleep(1); + + skip 'no seek on stderr', 1 unless (seek(STDERR, 0, 0)); + + my $log = ; + like($log, qr/ZOO_/, + 'exists(): generated log message'); + } + + SKIP: { + $zkh->DESTROY(); + + sleep(1); + + skip 'no seek on stderr', 1 unless (seek(STDERR, 0, 0)); + + my $log = ; + like($log, qr/ZOO_/, + 'DESTROY(): generated log message'); + } + + open(STDERR, '>&', fileno(OLDERR)); + close(OLDERR); + } +} + +Net::ZooKeeper::set_log_level(ZOO_LOG_LEVEL_OFF); + diff --git a/src/contrib/zkperl/t/40_basic.t b/src/contrib/zkperl/t/40_basic.t new file mode 100644 index 0000000..38a8a21 --- /dev/null +++ b/src/contrib/zkperl/t/40_basic.t @@ -0,0 +1,277 @@ +# Net::ZooKeeper - Perl extension for Apache ZooKeeper +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +use File::Spec; +use Test::More tests => 35; + +BEGIN { use_ok('Net::ZooKeeper', qw(:all)) }; + + +my $test_dir; +(undef, $test_dir, undef) = File::Spec->splitpath($0); +require File::Spec->catfile($test_dir, 'util.pl'); + +my($hosts, $root_path, $node_path) = zk_test_setup(0); + + +my $zkh = Net::ZooKeeper->new($hosts); +my $path; + +SKIP: { + my $ret = $zkh->exists($root_path) if (defined($zkh)); + + skip 'no connection to ZooKeeper', 1 unless + (defined($ret) and $ret); + + $path = $zkh->create($node_path, 'foo', 'acl' => ZOO_OPEN_ACL_UNSAFE); + is($path, $node_path, + 'create(): created node'); +} + +SKIP: { + skip 'no connection to ZooKeeper', 21 unless + (defined($path) and $path eq $node_path); + + + ## exists() + + my $ret = $zkh->exists($node_path); + ok($ret, + 'exists(): checked node existence'); + + $ret = $zkh->exists($node_path . '/NONE'); + ok((!$ret and $zkh->get_error() == ZNONODE and $! eq ''), + 'exists(): checked node non-existence'); + + my $stat = $zkh->stat(); + + $ret = $zkh->exists($node_path, 'stat' => $stat); + ok(($ret and $stat->{'data_len'} == 3), + 'exists(): checked node existence with stat handle'); + + + ## get() + + my $node = $zkh->get($node_path); + is($node, 'foo', + 'get(): retrieved node value'); + + $node = $zkh->get($node_path . '/NONE'); + ok((!defined($node) and $zkh->get_error() == ZNONODE and $! eq ''), + 'get(): undef returned for non-extant node'); + + $node = $zkh->get($node_path, 'data_read_len', 2); + is($node, 'fo', + 'get(): retrieved truncated node value'); + + $node = $zkh->get($node_path, 'data_read_len' => 0); + is($node, '', + 'get(): retrieved zero-length node value'); + + $node = $zkh->get($node_path, 'stat' => $stat); + ok(($node eq 'foo' and $stat->{'data_len'} == 3), + 'get(): retrieved node value with stat handle'); + + + ## set() + + $ret = $zkh->set($node_path, 'foo'); + ok($ret, + 'set(): set node value'); + + SKIP: { + my $ret = $zkh->exists($node_path, 'stat' => $stat); + + skip 'invalid node data', 2 unless + ($ret and $stat->{'version'} == 1); + + $ret = $zkh->set($node_path, 'foo', 'version' => $stat->{'version'}); + ok($ret, + 'set(): set node value with matching version'); + + $ret = $zkh->set($node_path, 'foo', 'version' => $stat->{'version'}); + ok((!$ret and $zkh->get_error() == ZBADVERSION and $! eq ''), + 'set(): node value unchanged if non-matching version'); + } + + $ret = $zkh->set($node_path, 'foobaz', 'stat' => $stat); + ok(($ret and $stat->{'data_len'} == 6), + 'set(): retrieved node value with stat handle'); + + + ## create(), delete() + + $path = $zkh->create($node_path, 'foo', 'acl' => ZOO_OPEN_ACL_UNSAFE); + ok((!defined($path) and $zkh->get_error() == ZNODEEXISTS and $! eq ''), + 'create(): undef when attempting to create extant node'); + + $ret = $zkh->delete($node_path . '/NONE'); + ok((!$ret and $zkh->get_error() == ZNONODE and $! eq ''), + 'delete(): no deletion of non-extant node'); + + $ret = $zkh->delete($node_path); + ok($ret, + 'delete(): deleted node'); + + my $path_read_len = length($node_path) - 2; + + $path = $zkh->create($node_path, 'foo', + 'path_read_len' => $path_read_len, + 'acl' => ZOO_OPEN_ACL_UNSAFE); + is($path, substr($node_path, 0, -2), + 'create(): created node with small return path buffer'); + + $path = $zkh->create("$node_path/s", 'foo', + 'flags' => ZOO_SEQUENCE, + 'acl' => ZOO_OPEN_ACL_UNSAFE); + like($path, qr/^$node_path\/s[0-9]+$/, + 'create(): created sequential node'); + + SKIP: { + my $ret = $zkh->exists($path, 'stat' => $stat); + + unless ($ret and $stat->{'version'} == 0) { + my $ret = $zkh->delete($path); + diag(sprintf('unable to delete node %s: %d, %s', + $path, $zkh->get_error(), $!)) unless ($ret); + + skip 'invalid node data', 2; + } + + $ret = $zkh->delete($path, 'version' => ($stat->{'version'} + 1)); + ok((!$ret and $zkh->get_error() == ZBADVERSION and $! eq ''), + 'delete(): node not deleted if non-matching version'); + + $ret = $zkh->delete($path, 'version' => $stat->{'version'}); + ok($ret, + 'delete(): deleted sequential node with matching version'); + } + + $path = $zkh->create("$node_path/e", 'foo', + 'flags' => ZOO_EPHEMERAL, + 'acl' => ZOO_OPEN_ACL_UNSAFE); + is($path, "$node_path/e", + 'create(): created ephemeral node'); + + $path = $zkh->create("$node_path/es", 'foo', + 'flags' => (ZOO_SEQUENCE | ZOO_EPHEMERAL), + 'acl' => ZOO_OPEN_ACL_UNSAFE); + like($path, qr/^$node_path\/es[0-9]+$/, + 'create(): created ephemeral sequential node'); + + undef $zkh; +} + +$zkh = Net::ZooKeeper->new($hosts); + +SKIP: { + my $ret = $zkh->exists($node_path) if (defined($zkh)); + + skip 'no connection to ZooKeeper', 12 unless + (defined($ret) and $ret); + + $ret = $zkh->exists("$node_path/e"); + ok((!$ret and $zkh->get_error() == ZNONODE and $! eq ''), + 'exists(): checked ephemeral node non-extant after reconnection'); + + $ret = $zkh->exists($path); + ok((!$ret and $zkh->get_error() == ZNONODE and $! eq ''), + 'exists(): checked ephemeral sequential node non-extant ' . + 'after reconnection'); + + + ## get_children() + + my @child_paths = ('abc'); + @child_paths = $zkh->get_children($node_path); + ok((@child_paths == 0 and $zkh->get_error() == ZOK), + 'get_children(): retrieved empty list of child nodes'); + + my $num_children = $zkh->get_children($node_path); + ok((defined($num_children) and $num_children == 0), + 'get_children(): retrieved zero count of child nodes'); + + @child_paths = $zkh->get_children($node_path . '/NONE'); + ok((@child_paths == 0 and $zkh->get_error() == ZNONODE and $! eq ''), + 'get_children(): empty list returned for non-extant node'); + + $num_children = $zkh->get_children($node_path . '/NONE'); + ok((!defined($num_children) and $zkh->get_error() == ZNONODE and $! eq ''), + 'get_children(): undef returned for non-extant node'); + + SKIP: { + my $path = $zkh->create("$node_path/c1", 'foo', + 'acl' => ZOO_OPEN_ACL_UNSAFE); + + skip 'no connection to ZooKeeper', 6 unless + (defined($path) and $path eq "$node_path/c1"); + + my @child_paths = ('abc'); + @child_paths = $zkh->get_children($node_path); + ok((@child_paths == 1 and $child_paths[0] eq 'c1'), + 'get_children(): retrieved list of single child node'); + + my $num_children = $zkh->get_children($node_path); + ok((defined($num_children) and $num_children == 1), + 'get_children(): retrieved count of single child node'); + + SKIP: { + my $path = $zkh->create("$node_path/c2", 'foo', + 'acl' => ZOO_OPEN_ACL_UNSAFE); + + skip 'no connection to ZooKeeper', 2 unless + (defined($path) and $path eq "$node_path/c2"); + + my @child_paths = ('abc'); + @child_paths = $zkh->get_children($node_path); + ok((@child_paths == 2 and $child_paths[0] eq 'c1' and + $child_paths[1] eq 'c2'), + 'get_children(): retrieved list of two child nodes'); + + my $num_children = $zkh->get_children($node_path); + ok((defined($num_children) and $num_children == 2), + 'get_children(): retrieved count of two child nodes'); + + my $ret = $zkh->delete("$node_path/c2"); + diag(sprintf('unable to delete node %s: %d, %s', + "$node_path/c2", $zkh->get_error(), $!)) unless + ($ret); + } + + @child_paths = ('abc'); + @child_paths = $zkh->get_children($node_path); + ok((@child_paths == 1 and $child_paths[0] eq 'c1'), + 'get_children(): retrieved list of single child node'); + + $num_children = $zkh->get_children($node_path); + ok((defined($num_children) and $num_children == 1), + 'get_children(): retrieved count of single child node'); + + my $ret = $zkh->delete("$node_path/c1"); + diag(sprintf('unable to delete node %s: %d, %s', + "$node_path/c1", $zkh->get_error(), $!)) unless ($ret); + } + + + ## cleanup + + $ret = $zkh->delete($node_path); + diag(sprintf('unable to delete node %s: %d, %s', + $node_path, $zkh->get_error(), $!)) unless ($ret); +} + diff --git a/src/contrib/zkperl/t/45_class.t b/src/contrib/zkperl/t/45_class.t new file mode 100644 index 0000000..4aa1a57 --- /dev/null +++ b/src/contrib/zkperl/t/45_class.t @@ -0,0 +1,408 @@ +# Net::ZooKeeper - Perl extension for Apache ZooKeeper +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +use File::Spec; +use Test::More tests => 47; + +BEGIN { use_ok('Net::ZooKeeper', qw(:all)) }; + + +my $test_dir; +(undef, $test_dir, undef) = File::Spec->splitpath($0); +require File::Spec->catfile($test_dir, 'util.pl'); + +my($hosts, $root_path, $node_path) = zk_test_setup(0); + + +SKIP: { + my $zkh = Net::ZooKeeper->new($hosts); + + skip 'no valid handle', 15 unless (defined($zkh)); + + my $stat = $zkh->stat(); + my $watch = $zkh->watch(); + + + ## DESTROY() on reblessed handle + + bless($zkh, 'My::ZooKeeper'); + is(ref($zkh), 'My::ZooKeeper', + 'bless(): reblessed handle'); + + eval { + $zkh->EXISTS(); + }; + like($@, qr/Can't locate object method "EXISTS" via package "My::ZooKeeper"/, + 'EXISTS(): not defined on reblessed handle'); + + my $attr = tied(%{$zkh}); + + my $ret = $attr->DESTROY(); + ok($ret, + 'DESTROY(): destroyed inner hash of reblessed handle'); + + $ret = $attr->DESTROY(); + ok(!$ret, + 'DESTROY(): no action on destroyed inner hash of reblessed handle'); + + undef $zkh; + ok(!defined($zkh), + 'undef: released reblessed handle'); + + + ## DESTROY() on reblessed stat handle + + bless($stat, 'My::ZooKeeper::Stat'); + is(ref($stat), 'My::ZooKeeper::Stat', + 'bless(): reblessed stat handle'); + + eval { + $stat->EXISTS(1); + }; + like($@, qr/Can't locate object method "EXISTS" via package "My::ZooKeeper::Stat"/, + 'stat EXISTS(): not defined on reblessed stat handle'); + + $attr = tied(%{$stat}); + + $ret = $attr->DESTROY(); + ok($ret, + 'stat DESTROY(): destroyed inner hash of reblessed stat handle'); + + $ret = $attr->DESTROY(); + ok(!$ret, + 'stat DESTROY(): no action on destroyed inner hash of ' . + 'reblessed stat handle'); + + undef $stat; + ok(!defined($stat), + 'undef: released reblessed stat handle'); + + + ## DESTROY() on reblessed watch handle + + bless($watch, 'My::ZooKeeper::Watch'); + is(ref($watch), 'My::ZooKeeper::Watch', + 'bless(): reblessed watch handle'); + + eval { + $watch->EXISTS(1); + }; + like($@, qr/Can't locate object method "EXISTS" via package "My::ZooKeeper::Watch"/, + 'watch EXISTS(): not defined on reblessed watch handle'); + + $attr = tied(%{$watch}); + + $ret = $attr->DESTROY(); + ok($ret, + 'watch DESTROY(): destroyed inner hash of reblessed watch handle'); + + $ret = $attr->DESTROY(); + ok(!$ret, + 'watch DESTROY(): no action on destroyed inner hash of ' . + 'reblessed watch handle'); + + undef $watch; + ok(!defined($watch), + 'undef: released reblessed watch handle'); +} + +SKIP: { + my $zkh = Net::ZooKeeper->new($hosts); + + skip 'no valid handle', 9 unless (defined($zkh)); + + my $stat = $zkh->stat(); + my $watch = $zkh->watch(); + + + ## UNTIE() on reblessed handle + + bless($zkh, 'My::ZooKeeper'); + is(ref($zkh), 'My::ZooKeeper', + 'bless(): reblessed handle'); + + eval { + untie(%{$zkh}); + }; + like($@, qr/untying hashes of class Net::ZooKeeper not supported/, + 'untie(): untying hashes from reblessed handle not supported'); + + my $attr = tied(%{$zkh}); + + eval { + $attr->UNTIE(0); + }; + like($@, qr/untying hashes of class Net::ZooKeeper not supported/, + 'UNTIE(): untying hashes from reblessed handle not supported'); + + + ## UNTIE() on reblessed stat handle + + bless($stat, 'My::ZooKeeper::Stat'); + is(ref($stat), 'My::ZooKeeper::Stat', + 'bless(): reblessed stat handle'); + + eval { + untie(%{$stat}); + }; + like($@, qr/untying hashes of class Net::ZooKeeper::Stat not supported/, + 'untie(): untying hashes from reblessed stat handle not supported'); + + $attr = tied(%{$stat}); + + eval { + $attr->UNTIE(0); + }; + like($@, qr/untying hashes of class Net::ZooKeeper::Stat not supported/, + 'stat UNTIE(): untying hashes from reblessed stat handle ' . + 'not supported'); + + + ## UNTIE() on reblessed watch handle + + bless($watch, 'My::ZooKeeper::Watch'); + is(ref($watch), 'My::ZooKeeper::Watch', + 'bless(): reblessed watch handle'); + + eval { + untie(%{$watch}); + }; + like($@, qr/untying hashes of class Net::ZooKeeper::Watch not supported/, + 'untie(): untying hashes from reblessed watch handle not supported'); + + $attr = tied(%{$watch}); + + eval { + $attr->UNTIE(0); + }; + like($@, qr/untying hashes of class Net::ZooKeeper::Watch not supported/, + 'watch UNTIE(): untying hashes from reblessed watch handle ' . + 'not supported'); +} + + +package Net::ZooKeeper::Test; + +use Net::ZooKeeper qw(:acls); + +our @ISA = qw(Net::ZooKeeper); + +sub create +{ + my($self, $path, $buf) = @_; + + return $self->SUPER::create($path, $buf, + 'path_read_len' => length($path), + 'acl' => ZOO_OPEN_ACL_UNSAFE); +} + +sub get_first_child +{ + my($self, $path) = @_; + + my @child_paths = $self->get_children($path); + + if (@child_paths > 0) { + return $path . (($path =~ /\/$/) ? '' : '/') . $child_paths[0]; + } + + return undef; +} + +sub stat +{ + my $self = shift; + + my $stat = $self->SUPER::stat(); + + return bless($stat, 'Net::ZooKeeper::Test::Stat'); +} + + +sub watch +{ + my $self = shift; + + my $watch = $self->SUPER::watch(); + + return bless($watch, 'Net::ZooKeeper::Test::Watch'); +} + + +package Net::ZooKeeper::Test::Stat; + +our @ISA = qw(Net::ZooKeeper::Stat); + +sub get_ctime +{ + my $self = shift; + + return $self->{'ctime'}; +} + + +package Net::ZooKeeper::Test::Watch; + +our @ISA = qw(Net::ZooKeeper::Watch); + +sub get_timeout +{ + my $self = shift; + + return $self->{'timeout'}; +} + + +package main; + +my $sub_zkh = Net::ZooKeeper::Test->new($hosts); +isa_ok($sub_zkh, 'Net::ZooKeeper::Test', + 'new(): created subclassed handle'); + +SKIP: { + skip 'no valid subclassed handle', 21 unless (defined($sub_zkh)); + + is($sub_zkh->{'data_read_len'}, 1023, + 'FETCH(): default data read length using subclassed handle'); + + my $path; + + SKIP: { + my $ret = $sub_zkh->exists($root_path); + + skip 'no connection to ZooKeeper', 1 unless + (defined($ret) and $ret); + + $path = $sub_zkh->create($node_path, 'foo', + 'acl' => ZOO_OPEN_ACL_UNSAFE); + is($path, $node_path, + 'create(): created node with subclassed handle'); + } + + SKIP: { + skip 'no connection to ZooKeeper', 1 unless + (defined($path) and $path eq $node_path); + + my $child_path = $sub_zkh->get_first_child($root_path); + is($child_path, $node_path, + 'get_first_child(): retrieved first child with subclassed handle'); + } + + my $sub_stat = $sub_zkh->stat(); + isa_ok($sub_stat, 'Net::ZooKeeper::Test::Stat', + 'stat(): created subclassed stat handle'); + + SKIP: { + skip 'no valid subclassed stat handle', 6 unless + (defined($sub_stat)); + + is($sub_stat->{'ctime'}, 0, + 'stat FETCH(): default ctime using subclassed stat handle'); + + SKIP: { + my $ret = $sub_zkh->exists($node_path, 'stat' => $sub_stat) if + (defined($path) and $path eq $node_path); + + skip 'no connection to ZooKeeper', 2 unless + (defined($ret) and $ret); + + my $ctime = $sub_stat->get_ctime(); + ok($ctime > 0, + 'get_ctime(): retrieved ctime with subclassed stat handle'); + + is($sub_stat->{'ctime'}, $ctime, + 'stat FETCH(): ctime using subclassed stat handle'); + } + + my $ret = $sub_stat->DESTROY(); + ok($ret, + 'stat DESTROY(): destroyed subclassed stat handle'); + + $ret = $sub_stat->DESTROY(); + ok(!$ret, + 'stat DESTROY(): no action on destroyed subclassed stat handle'); + + undef $sub_stat; + ok(!defined($sub_stat), + 'undef: released subclassed stat handle'); + } + + my $sub_watch = $sub_zkh->watch(); + isa_ok($sub_watch, 'Net::ZooKeeper::Test::Watch', + 'watch(): created subclassed watch handle'); + + SKIP: { + skip 'no valid subclassed watch handle', 6 unless + (defined($sub_watch)); + + SKIP: { + my $ret = $sub_zkh->exists($root_path, 'watch' => $sub_watch); + + skip 'no connection to ZooKeeper', 3 unless + (defined($ret) and $ret); + + $sub_watch->{'timeout'} = 50; + + is($sub_watch->get_timeout(), 50, + 'get_timeout(): retrieved timeout with subclassed ' . + 'watch handle'); + + is($sub_watch->{'timeout'}, 50, + 'watch FETCH(): timeout using subclassed stat handle'); + + $ret = $sub_watch->wait(); + ok(!$ret, + 'wait(): watch after checking node existence timed out with ' . + 'subclassed watch handle'); + } + + my $ret = $sub_watch->DESTROY(); + ok($ret, + 'watch DESTROY(): destroyed subclassed watch handle'); + + $ret = $sub_watch->DESTROY(); + ok(!$ret, + 'watch DESTROY(): no action on destroyed subclassed watch handle'); + + undef $sub_watch; + ok(!defined($sub_watch), + 'undef: released subclassed watch handle'); + } + + SKIP: { + skip 'no connection to ZooKeeper', 1 unless + (defined($path) and $path eq $node_path); + + my $ret = $sub_zkh->delete($node_path); + ok($ret, + 'delete(): deleted node with subclassed handle'); + } + + my $ret = $sub_zkh->DESTROY(); + ok($ret, + 'DESTROY(): destroyed subclassed handle'); + + $ret = $sub_zkh->DESTROY(); + ok(!$ret, + 'DESTROY(): no action on destroyed subclassed handle'); + + undef $sub_zkh; + ok(!defined($sub_zkh), + 'undef: released subclassed handle'); +} + diff --git a/src/contrib/zkperl/t/50_access.t b/src/contrib/zkperl/t/50_access.t new file mode 100644 index 0000000..ef61ed6 --- /dev/null +++ b/src/contrib/zkperl/t/50_access.t @@ -0,0 +1,356 @@ +# Net::ZooKeeper - Perl extension for Apache ZooKeeper +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +use File::Spec; +use Test::More tests => 40; + +BEGIN { use_ok('Net::ZooKeeper', qw(:all)) }; + + +my $test_dir; +(undef, $test_dir, undef) = File::Spec->splitpath($0); +require File::Spec->catfile($test_dir, 'util.pl'); + +my($hosts, $root_path, $node_path) = zk_test_setup(0); + +my($username, $password, $digest) = zk_acl_test_setup(); + + +SKIP: { + my $zkh = Net::ZooKeeper->new($hosts); + + my $path = $zkh->create($node_path, 'foo', + 'acl' => ZOO_OPEN_ACL_UNSAFE) if (defined($zkh)); + + skip 'no connection to ZooKeeper', 36 unless + (defined($path) and $path eq $node_path); + + + ## _zk_acl_constant() + + my $no_read_acl = ZOO_OPEN_ACL_UNSAFE; + ok((ref($no_read_acl) eq 'ARRAY' and + @{$no_read_acl} == 1 and + ref($no_read_acl->[0]) eq 'HASH' and + keys(%{$no_read_acl->[0]}) == 3 and + $no_read_acl->[0]->{'perms'} == ZOO_PERM_ALL), + '_zk_acl_constant(): returned default ACL'); + + my $zoo_read_acl_unsafe = ZOO_READ_ACL_UNSAFE; + ok((ref($zoo_read_acl_unsafe) eq 'ARRAY' and + @{$zoo_read_acl_unsafe} == 1 and + ref($zoo_read_acl_unsafe->[0]) eq 'HASH' and + keys(%{$zoo_read_acl_unsafe->[0]}) == 3 and + $zoo_read_acl_unsafe->[0]->{'perms'} == ZOO_PERM_READ), + '_zk_acl_constant(): returned good ACL'); + + my $zoo_creator_all_acl = ZOO_CREATOR_ALL_ACL; + ok((ref($zoo_creator_all_acl) eq 'ARRAY' and + @{$zoo_creator_all_acl} == 1 and + ref($zoo_creator_all_acl->[0]) eq 'HASH' and + keys(%{$zoo_creator_all_acl->[0]}) == 3 and + $zoo_creator_all_acl->[0]->{'perms'} == ZOO_PERM_ALL), + '_zk_acl_constant(): returned good ACL'); + + $no_read_acl->[0]->{'perms'} &= ~ZOO_PERM_READ; + is($no_read_acl->[0]->{'perms'}, ((ZOO_PERM_ALL) & ~ZOO_PERM_READ), + 'assign: altered default ACL'); + + is(ZOO_OPEN_ACL_UNSAFE->[0]->{'perms'}, ZOO_PERM_ALL, + '_zk_acl_constant(): returned unaltered default ACL'); + + my $copy_no_read_acl = $no_read_acl; + is_deeply($copy_no_read_acl, $no_read_acl, + 'assign: copied default ACL'); + + undef $no_read_acl; + ok(!defined($no_read_acl), + 'undef: released original default ACL'); + + is($copy_no_read_acl->[0]->{'perms'}, ((ZOO_PERM_ALL) & ~ZOO_PERM_READ), + 'undef: no change to copied default ACL'); + + $no_read_acl = $copy_no_read_acl; + is_deeply($no_read_acl, $copy_no_read_acl, + 'assign: re-copied default ACL'); + + + ## create() + + my $acl_node_path = "$node_path/a1"; + + $path = $zkh->create($acl_node_path, 'foo', 'acl' => $no_read_acl); + is($path, $acl_node_path, + 'create(): created node with no-read ACL'); + + my $node = $zkh->get($acl_node_path); + + my $skip_acl; + if (defined($node) and $node eq 'foo') { + $skip_acl = 1; + } + elsif(!defined($node) and $zkh->get_error() == ZNOAUTH) { + $skip_acl = 0; + } + else { + $skip_acl = -1; + diag(sprintf('unable to get node with no-read ACL %s: %d, %s', + $acl_node_path, $zkh->get_error(), $!)); + } + + my $ret = $zkh->delete($acl_node_path); + diag(sprintf('unable to delete node with no-read ACL %s: %d, %s', + $acl_node_path, $zkh->get_error(), $!)) unless ($ret); + + my $digest_acl = [ + { + 'perms' => ZOO_PERM_READ, + 'scheme' => 'world', + 'id' => 'anyone' + }, + { + 'perms' => (ZOO_PERM_WRITE | ZOO_PERM_ADMIN), + 'scheme' => 'digest', + 'id' => "$username:$digest" + } + ]; + + $path = $zkh->create($acl_node_path, 'foo', 'acl' => $digest_acl); + is($path, $acl_node_path, + 'create(): created node with digest auth ACL'); + + SKIP: { + skip 'ZooKeeper skipping ACLs', 1 unless (!$skip_acl); + + my $acl_node_path = "$node_path/a2"; + + my $path = $zkh->create($acl_node_path, 'foo', 'acl' => [ + { + 'perms' => ZOO_PERM_WRITE, + 'scheme' => 'foo', + 'id' => 'bar' + } + ]); + ok((!defined($path) and $zkh->get_error() == ZINVALIDACL and $! eq ''), + 'create(): undef when attempting to create node with invalid ACL'); + } + + + ## get_acl() + + my @acl = ('abc'); + @acl = $zkh->get_acl($node_path . '/NONE'); + ok((@acl == 0 and $zkh->get_error() == ZNONODE and $! eq ''), + 'get_acl(): empty list returned for non-extant node'); + + $num_acl_entries = $zkh->get_acl($node_path . '/NONE'); + ok((!defined($num_acl_entries) and $zkh->get_error() == ZNONODE and + $! eq ''), + 'get_acl(): undef returned for non-extant node'); + + @acl = ('abc'); + @acl = $zkh->get_acl($acl_node_path); + is_deeply(\@acl, $digest_acl, + 'get_acl(): retrieved digest ACL'); + + my $stat = $zkh->stat(); + + @acl = ('abc'); + @acl = $zkh->get_acl($node_path, 'stat' => $stat); + is_deeply(\@acl, ZOO_OPEN_ACL_UNSAFE, + 'get_acl(): retrieved ACL'); + + is($stat->{'data_len'}, 3, + 'get_acl(): retrieved ACL with stat handle'); + + SKIP: { + skip 'ZooKeeper not skipping ACLs', 3 unless ($skip_acl > 0); + + my $acl_node_path = "$node_path/a2"; + + my $path = $zkh->create($acl_node_path, 'foo', 'acl' => []); + is($path, $acl_node_path, + 'create(): created node with empty ACL'); + + my @acl = ('abc'); + @acl = $zkh->get_acl($acl_node_path); + ok((@acl == 0 and $zkh->get_error() == ZOK), + 'get_acl(): retrieved empty ACL'); + + my $num_acl_entries = $zkh->get_acl($acl_node_path); + ok((defined($num_acl_entries) and $num_acl_entries == 0), + 'get_acl(): retrieved zero count of ACL entries'); + + my $ret = $zkh->delete($acl_node_path); + diag(sprintf('unable to delete node with empty ACL %s: %d, %s', + $acl_node_path, $zkh->get_error(), $!)) unless ($ret); + } + + + ## set_acl() + + SKIP: { + skip 'ZooKeeper skipping ACLs', 2 unless (!$skip_acl); + + my $ret = $zkh->set_acl($acl_node_path, [ + { + 'perms' => ZOO_PERM_CREATE, + 'scheme' => 'foo', + 'id' => 'bar' + } + ]); + ok((!$ret and $zkh->get_error() == ZINVALIDACL and $! eq ''), + 'set_acl(): invalid ACL'); + + push @{$digest_acl}, { + 'perms' => (ZOO_PERM_CREATE | ZOO_PERM_DELETE), + 'scheme' => 'ip', + 'id' => '0.0.0.0' + }; + + $ret = $zkh->set_acl($acl_node_path, $digest_acl); + ok((!$ret and $zkh->get_error() == ZNOAUTH and $! eq ''), + 'set_acl(): ACL unchanged if no auth'); + } + + + ## add_auth(), set_acl() + + $ret = $zkh->add_auth('digest', ''); + ok($ret, + 'add_auth(): empty digest cert'); + + SKIP: { + skip 'ZooKeeper skipping ACLs', 1 unless (!$skip_acl); + + my $ret = $zkh->set($acl_node_path, 'foo'); + ok((!$ret and $zkh->get_error() == ZNOAUTH and $! eq ''), + 'set(): node value unchanged if no auth'); + } + + $ret = $zkh->add_auth('digest', "$username:$password"); + ok($ret, + 'add_auth(): valid digest cert'); + + SKIP: { + skip 'ZooKeeper skipping ACLs', 13 unless (!$skip_acl); + + my $ret = $zkh->set($acl_node_path, 'baz'); + ok($ret, + 'set(): set node value with auth'); + + my $node = $zkh->get($acl_node_path); + is($node, 'baz', + 'get(): retrieved node value with auth'); + + $ret = $zkh->set_acl($acl_node_path, $digest_acl); + ok($ret, + 'set_acl(): set digest ACL with auth'); + + my $stat = $zkh->stat(); + + my @acl = ('abc'); + @acl = $zkh->get_acl($acl_node_path, 'stat' => $stat); + is_deeply(\@acl, $digest_acl, + 'get_acl(): retrieved digest ACL with auth'); + + is($stat->{'data_len'}, 3, + 'get_acl(): retrieved digest ACL with stat handle and auth'); + + SKIP: { + skip 'invalid node data', 2 unless ($stat->{'version'} == 1); + + my $ret = $zkh->set_acl($acl_node_path, $digest_acl, + 'version' => $stat->{'version'}); + ok($ret, + 'set_acl(): set digest ACL with matching version with auth'); + + $ret = $zkh->set_acl($acl_node_path, $digest_acl, + 'version' => $stat->{'version'}); + ok((!$ret and $zkh->get_error() == ZBADVERSION and $! eq ''), + 'set_acl(): ACL unchanged if non-matching version'); + } + + my $child_node_path = "$acl_node_path/c1"; + + my $path = $zkh->create($child_node_path, 'foo', + 'acl' => ZOO_OPEN_ACL_UNSAFE); + ok((!defined($path) and $zkh->get_error() == ZNOAUTH and $! eq ''), + 'create(): undef when attempting to create node if no auth'); + + $digest_acl->[1]->{'perms'} |= ZOO_PERM_CREATE; + $digest_acl->[2]->{'perms'} &= ~ZOO_PERM_CREATE; + + $ret = $zkh->set_acl($acl_node_path, $digest_acl); + ok($ret, + 'set_acl(): set changed digest ACL with auth'); + + $path = $zkh->create($child_node_path, 'foo', + 'acl' => ZOO_OPEN_ACL_UNSAFE); + is($path, $child_node_path, + 'create(): created node with auth'); + + $ret = $zkh->delete($child_node_path); + ok((!$ret and $zkh->get_error() == ZNOAUTH and $! eq ''), + 'delete(): no deletion of node if no auth'); + + $digest_acl->[1]->{'perms'} |= ZOO_PERM_DELETE; + pop @{$digest_acl}; + + $ret = $zkh->set_acl($acl_node_path, $digest_acl); + ok($ret, + 'set_acl(): set reduced digest ACL with auth'); + + $ret = $zkh->delete($child_node_path); + ok($ret, + 'delete(): deleted node with auth'); + } + + + ## cleanup + + $ret = $zkh->delete($acl_node_path); + diag(sprintf('unable to delete node with digest auth ACL %s: %d, %s', + $acl_node_path, $zkh->get_error(), $!)) unless ($ret); + + $ret = $zkh->delete($node_path); + diag(sprintf('unable to delete node %s: %d, %s', + $node_path, $zkh->get_error(), $!)) unless ($ret); +} + +SKIP: { + my $zkh = Net::ZooKeeper->new($hosts); + + my $ret = $zkh->exists($root_path) if (defined($zkh)); + + skip 'no connection to ZooKeeper', 1 unless + (defined($ret) and $ret); + + + ## add_auth() + + $ret = $zkh->add_auth('foo', 'bar'); + my $err = $zkh->get_error(); + ok((!$ret and + ($err == ZAUTHFAILED or + $err == ZCONNECTIONLOSS or + $err == ZSESSIONEXPIRED) + and $! eq ''), + 'set_acl(): invalid scheme'); +} + diff --git a/src/contrib/zkperl/t/60_watch.t b/src/contrib/zkperl/t/60_watch.t new file mode 100644 index 0000000..7d30602 --- /dev/null +++ b/src/contrib/zkperl/t/60_watch.t @@ -0,0 +1,304 @@ +# Net::ZooKeeper - Perl extension for Apache ZooKeeper +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +use File::Spec; +use Test::More tests => 30; + +BEGIN { use_ok('Net::ZooKeeper', qw(:all)) }; + + +my $test_dir; +(undef, $test_dir, undef) = File::Spec->splitpath($0); +require File::Spec->catfile($test_dir, 'util.pl'); + +my($hosts, $root_path, $node_path) = zk_test_setup(0); + + +SKIP: { + my $zkh = Net::ZooKeeper->new($hosts); + + my $path = $zkh->create($node_path, 'foo', + 'acl' => ZOO_OPEN_ACL_UNSAFE) if (defined($zkh)); + + skip 'no connection to ZooKeeper', 20 unless + (defined($path) and $path eq $node_path); + + + ## exists() + + $zkh->{'watch_timeout'} = 100; + + my $watch = $zkh->watch(); + + my $ret = $zkh->exists($node_path, 'watch' => $watch); + ok($ret, + 'exists(): checked node existence with watch handle'); + + $ret = $watch->wait(); + ok(!$ret, + 'wait(): watch after checking node existence timed out'); + + $ret = $zkh->exists($node_path, 'watch' => $watch); + ok($ret, + 'exists(): checked node existence with renewed watch handle'); + + $ret = $watch->wait(); + ok(!$ret, + 'wait(): watch after checking node existence timed out with ' . + 'renewed watch handle'); + + undef $watch; + ok(!defined($watch), + 'undef: released watch handle'); + + my $pending_watches = $zkh->{'pending_watches'}; + is($pending_watches, 2, + '_zk_release_watches(): report pending watches'); + + + ## get_children() + + $watch = $zkh->watch('timeout' => 50); + + my $num_children = $zkh->get_children($node_path, 'watch' => $watch); + ok((defined($num_children) and $num_children == 0), + 'get_children(): retrieved zero count of child nodes with ' . + 'watch handle'); + + $ret = $watch->wait(); + ok(!$ret, + 'wait(): watch after retrieving child nodes timed out with ' . + 'watch handle'); + + $watch->{'timeout'} = 100; + + my @child_paths = $zkh->get_children($node_path, 'watch' => $watch); + ok((@child_paths == 0), + 'get_children(): retrieved empty list of child nodes with ' . + 'renewed watch handle'); + + $ret = $watch->wait(); + ok(!$ret, + 'wait(): watch after retrieving child nodes timed out with ' . + 'renewed watch handle'); + + $pending_watches = $zkh->{'pending_watches'}; + is($pending_watches, 4, + '_zk_release_watches(): report pending watches'); + + + ## get() + + $watch = $zkh->watch(); + + my $node = $zkh->get($node_path, 'watch' => $watch); + is($node, 'foo', + 'get(): retrieved node value with watch handle'); + + $ret = $watch->wait('timeout' => 0); + ok(!$ret, + 'wait(): watch after retrieving node value timed out with ' . + 'watch handle'); + + $node = $zkh->get($node_path, 'watch' => $watch); + is($node, 'foo', + 'get(): retrieved node value with renewed watch handle'); + + $ret = $watch->wait(); + ok(!$ret, + 'wait(): watch after retrieving node value timed out with ' . + 'renewed watch handle'); + + $pending_watches = $zkh->{'pending_watches'}; + is($pending_watches, 6, + '_zk_release_watches(): all watches pending'); + + + ## _zk_release_watches() + + $ret = $zkh->DESTROY(); + ok($ret, + 'DESTROY(): destroyed handle with pending watches'); + + my $event = $watch->{'event'}; + is($event, 0, + '_zk_release_watches(): watch not destroyed when tied to watch handle'); + + $zkh = Net::ZooKeeper->new($hosts); + + SKIP: { + my $ret = $zkh->exists($node_path, 'watch' => $watch); + + skip 'no connection to ZooKeeper', 2 unless + (defined($ret) and $ret); + + ok($ret, + 'exists(): checked node existence with renewed watch handle ' . + 'from prior connection'); + + $ret = $watch->wait(); + ok(!$ret, + 'wait(): watch after checking node existence timed out with ' . + 'renewed watch handle from prior connection'); + + + } +} + +my $pid = fork(); + +SKIP: { + skip 'unable to fork', 4 unless (defined($pid)); + + my $zkh = Net::ZooKeeper->new($hosts); + + my $ret = $zkh->exists($node_path) if (defined($zkh)); + + if ($pid == 0) { + ## child process + + my $code = 0; + + if (defined($ret) and $ret) { + sleep(1); + + my $ret = $zkh->set($node_path, 'foo'); + + diag(sprintf('set(): failed in child process: %d, %s', + $zkh->get_error(), $!)) unless ($ret); + + $code = !$ret; + + sleep(1); + + my $path = $zkh->create("$node_path/c", 'foo', + 'acl' => ZOO_OPEN_ACL_UNSAFE); + + diag(sprintf('create(): failed in child process: %d, %s', + $zkh->get_error(), $!)) unless + (defined($path) and $path eq "$node_path/c"); + + $code &= !$ret; + + sleep(1); + + $ret = $zkh->delete("$node_path/c"); + + diag(sprintf('delete(): failed in child process: %d, %s', + $zkh->get_error(), $!)) unless ($ret); + + $code &= !$ret; + + sleep(1); + + $ret = $zkh->set($node_path, 'foo'); + + diag(sprintf('set(): failed in child process: %d, %s', + $zkh->get_error(), $!)) unless ($ret); + + $code &= !$ret; + } + + exit($code); + } + else { + ## parent process + + SKIP: { + skip 'no connection to ZooKeeper', 9 unless + (defined($ret) and $ret); + + my $watch = $zkh->watch('timeout' => 5000); + + + ## wait() + + my $ret = $zkh->exists($node_path, 'watch' => $watch); + ok($ret, + 'exists(): checked node existence with watch handle ' . + 'in parent'); + + $ret = $watch->wait(); + ok(($ret and $watch->{'event'} == ZOO_CHANGED_EVENT and + $watch->{'state'} == ZOO_CONNECTED_STATE), + 'wait(): waited for event after checking node existence'); + + my $num_children = $zkh->get_children($node_path, + 'watch' => $watch); + ok((defined($num_children) and $num_children == 0), + 'get_children(): retrieved zero count of child nodes with ' . + 'watch handle in parent'); + + $ret = $watch->wait(); + ok(($ret and $watch->{'event'} == ZOO_CHILD_EVENT and + $watch->{'state'} == ZOO_CONNECTED_STATE), + 'wait(): waited for create child event after ' . + 'retrieving child nodes'); + + my @child_paths = $zkh->get_children($node_path, + 'watch' => $watch); + ok((@child_paths == 1 and $child_paths[0] eq 'c'), + 'get_children(): retrieved list of child nodes with ' . + 'watch handle in parent'); + + $ret = $watch->wait(); + ok(($ret and $watch->{'event'} == ZOO_CHILD_EVENT and + $watch->{'state'} == ZOO_CONNECTED_STATE), + 'wait(): waited for delete child event after ' . + 'retrieving child nodes'); + + my $node = $zkh->get($node_path, 'watch' => $watch); + is($node, 'foo', + 'get(): retrieved node value with watch handle in parent'); + + $ret = $watch->wait(); + ok(($ret and $watch->{'event'} == ZOO_CHANGED_EVENT and + $watch->{'state'} == ZOO_CONNECTED_STATE), + 'wait(): waited for event after retrieving node value'); + + undef $watch; + + my $pending_watches = $zkh->{'pending_watches'}; + is($pending_watches, 0, + '_zk_release_watches(): no watches pending'); + } + + my $reap = waitpid($pid, 0); + + diag(sprintf('child process failed: exit %d, signal %d%s', + ($? >> 8), ($? & 127), + (($? & 128) ? ', core dump' : ''))) if + ($reap == $pid and $? != 0); + } +} + + +## cleanup + +{ + my $zkh = Net::ZooKeeper->new($hosts); + + my $ret = $zkh->exists($node_path) if (defined($zkh)); + + if (defined($ret) and $ret) { + $ret = $zkh->delete($node_path); + diag(sprintf('unable to delete node %s: %d, %s', + $node_path, $zkh->get_error(), $!)) unless ($ret); + } +} + diff --git a/src/contrib/zkperl/t/util.pl b/src/contrib/zkperl/t/util.pl new file mode 100644 index 0000000..1ca738d --- /dev/null +++ b/src/contrib/zkperl/t/util.pl @@ -0,0 +1,62 @@ +# Net::ZooKeeper - Perl extension for Apache ZooKeeper +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +sub zk_test_setup +{ + my $verbose = shift; + + $SIG{'PIPE'} = 'IGNORE'; + + my $hosts = $ENV{'ZK_TEST_HOSTS'}; + unless (defined($hosts) and $hosts =~ /\S/) { + $hosts = 'localhost:0'; + diag('no ZooKeeper hostnames specified in ZK_TEST_HOSTS env var, ' . + "using $hosts") if ($verbose); + } + + my $root_path = $ENV{'ZK_TEST_PATH'}; + if (defined($root_path) and $root_path =~ /^\//) { + $root_path =~ s/\/+/\//g; + $root_path =~ s/\/$//; + } + else { + $root_path = '/'; + diag('no ZooKeeper path specified in ZK_TEST_PATH env var, ' . + 'using root path') if ($verbose); + } + + my $node_path = $root_path . (($root_path =~ /\/$/) ? '' : '/') . + '_net_zookeeper_test'; + + return ($hosts, $root_path, $node_path); +} + +sub zk_acl_test_setup +{ + my $username = '_net_zookeeper_test'; + + my $password = 'test'; + + ## digest is Base64-encoded SHA1 digest of username:password + my $digest = '2qi7Erp2cXYLGcQbXADiwUFaOGo='; + + return ($username, $password, $digest); +} + +1; + diff --git a/src/contrib/zkperl/typemap b/src/contrib/zkperl/typemap new file mode 100644 index 0000000..84636fd --- /dev/null +++ b/src/contrib/zkperl/typemap @@ -0,0 +1,38 @@ +# Net::ZooKeeper - Perl extension for Apache ZooKeeper +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +TYPEMAP +Net::ZooKeeper T_ZK_HANDLE +Net::ZooKeeper::Stat T_ZK_HANDLE +Net::ZooKeeper::Watch T_ZK_HANDLE + +INPUT +T_ZK_HANDLE + if (SvROK($arg) && SvTYPE(SvRV($arg)) == SVt_PVHV && + sv_derived_from($arg, \"${ntype}\")) { + $var = (HV*) SvRV($arg); + } + else { + Perl_croak(aTHX_ + \"$var is not a hash reference of type ${ntype}\"); + } + +OUTPUT +T_ZK_HANDLE + NOT_IMPLEMENTED + diff --git a/src/contrib/zkpython/README b/src/contrib/zkpython/README new file mode 100644 index 0000000..89d9998 --- /dev/null +++ b/src/contrib/zkpython/README @@ -0,0 +1,109 @@ +Early version of ZooKeeper bindings for Python. All functions are imported as methods into the zookeeper module. + +Please do not rely on APIs staying constant in the short term. The handling of exceptions and failure modes is one area that is subject to change. + +DEPENDENCIES: +------------- + +This has only been tested against SVN (i.e. 3.2.0 in development) but should work against 3.1.1. + +You will need the Python development headers installed to build the module - on many package-management systems, these can be found in python-devel. + +Python >= 2.6 is required. We have tested against 2.6. We have not tested against 3.x. + +BUILD AND INSTALL: +------------------- + +To install, make sure that the C client has been built and that the libraries are installed in /usr/local/lib (or change this directory in setup.py). Then run: + +ant install + +from zookeeper/src/contrib/zkpython/. + +To test, run ant test from the same directory. + +You can compile the module without installing by running + +ant compile + +In order to use the module, zookeeper.so must be in your PYTHONPATH or in one of the directories referenced by sys.path. Running ant install should make sure that this is the case, but if you only run ant compile you probably need to add build/contrib/zkpython/* to PYTHONPATH to find the module. The C client libraries must be in a system library path, or LD_LIBRARY_PATH or DYLD_LIBRARY_PATH (Mac OS) for the module to work correctly, otherwise you will see a library not found error when trying to import the module. + +NAMING CONVENTIONS: +-------------------- + +All methods that in the C library are zoo_fn_name have been implemented as zookeeper.fn_name. The exception is any function that has a watch function argument is named without the 'w' prefix (for example, zoo_wexists becomes zookeeper.exists). The variants of these functions without the watch argument (i.e. zoo_exists) have not been implemented on the understanding that they are superseded by the zoo_w* API. + +Enums and integer constants that begin ZOO_int_name are named as zookeeper.int_name. + +PARAMETER CHANGES: +------------------ + +Zookeeper handles are represented as integers to avoid marshalling the entire structure for every call. Therefore they are opaque from Python. + +Any parameter that is used to provide arguments to callback methods is not exposed in the API. Python provides better mechanisms for providing a closure to be called in the future. + +Every callback gets passed the handle of the ZooKeeper instance used to register the callback. + +DATA TYPES: +----------- + +ACL_vectors are lists of dictionaries. Stat structures are dictionaries. String_vectors are lists of strings. + +EXCEPTIONS AND ERROR HANDLING: +------------------------------ + +Currently synchronous calls indicate failure by throwing an exception (note that this includes the synchronous calls to set up asynchronous completion callbacks!). Success is returned as an integer. + +Callbacks signify failure by having the integer response code passed in. + +WHAT'S NEW IN 0.4: +------------------ + +More test coverage. + +Better reference counting, fixing at least two serious bugs. + +Out-of-range zhandles are now checked, fixing a potential security hole. + +Docstrings! Editing and cleanup required, but most of the text is there. + +zookeeper.set_watcher is now implemented correctly. + +zookeeper.client_id is now implemented correctly. zookeeper.init now respects the client_id parameter. + +get_context and set_context have been removed from the API. The context mechanism is used by PyZK to store the callables that are dispatched by C-side watchers. Messing with this from Python-side causes bugs very quickly. You should wrap all desired context up in a callable and then use zookeeper.set_watcher to attach it to the global watcher. + +Many methods now have optional parameters (usually if you can specify a watch, it's optional). The only time where genuinely optional parameters are still mandatory is when a required parameters comes after it. Currently we still respect the ZK C client parameter ordering. For example, you can simply connect with zookeeper.init("host:port") and ignore the other three parameters. + + +WHAT'S NEW IN 0.3: +------------------ + +Some tests in zkpython/test. More to follow! + +A variety of bugfixes. + +Changed the way methods return results - all responses are integers now, for the client to convert to a string if it needs. + +WHAT'S NEW IN 0.2: +------------------ + +The asynchronous API is now implemented (see zookeeper.a*). + +Most enums defined in zookeeper.h are now added as constants to the module. + +_set2 and a few other edge API calls have been implemented. The module is now nearly 100% feature complete! + +A reference count error was tracked down and killed. More probably lurk in there! + +WHAT'S NOT DONE / KNOWN ISSUES / FUTURE WORK: +--------------------------------------------- + +1. There may well be more memory leaks / reference count issues; however I am more confident that common paths are relatively safe. +2. There probably needs to be a more Pythonic Python-side wrapper for these functions (e.g. a zookeeper object, the ability to iterate through a tree of zk nodes) +3. Docstrings need a cleanup. +4. The way exceptions and error codes are returned needs looking at. Currently synchronous calls throw exceptions on everything but ZOK return, but asynchronous completions are simply passed the error code. Async. functions should never throw an exception on the C-side as they are practically impossible to catch. For the sync. functions, exceptions seem more reasonable, but some cases are certainly not exceptional. + +Bug reports / comments very welcome! + +Henry Robinson henry@cloudera.com diff --git a/src/contrib/zkpython/build.xml b/src/contrib/zkpython/build.xml new file mode 100644 index 0000000..029d4f2 --- /dev/null +++ b/src/contrib/zkpython/build.xml @@ -0,0 +1,198 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/contrib/zkpython/ivy.xml b/src/contrib/zkpython/ivy.xml new file mode 100644 index 0000000..6931f46 --- /dev/null +++ b/src/contrib/zkpython/ivy.xml @@ -0,0 +1,43 @@ + + + + + + + + ZKPython + + + + + + + + + + + + + + + + + + diff --git a/src/contrib/zkpython/src/c/pyzk_docstrings.h b/src/contrib/zkpython/src/c/pyzk_docstrings.h new file mode 100644 index 0000000..1f38d53 --- /dev/null +++ b/src/contrib/zkpython/src/c/pyzk_docstrings.h @@ -0,0 +1,594 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef PYZK_DOCSTRINGS_H +#define PYZK_DOCSTRINGS_H + +const char pyzk_acreate_doc[] = +"Create a node asynchronously.\n" +"\n" +"This method will create a node in ZooKeeper. A node can only be created if\n" +"it does not already exists. The Create Flags affect the creation of nodes.\n" +"If EPHEMERAL flag is set, the node will automatically get removed if the\n" +"client session goes away. If the SEQUENCE flag is set, a unique\n" +"monotonically increasing sequence number is appended to the path name.\n" +"\n" +" zh: the zookeeper handle obtained by a call to zookeeper.init\n" +" path: The name of the node. Expressed as a file name with slashes \n" +"separating ancestors of the node.\n" +" value: The data to be stored in the node.\n" +" acl: The initial ACL of the node. If None, the ACL of the parent will be\n" +" used.\n" +"\n" +" (Subsequent parameters are optional)\n" +" flags: this parameter can be set to 0 for normal create or an OR\n" +" of the Create Flags\n" +" completion: the routine to invoke when the request completes. The completion\n" +"will be triggered with one of the following codes passed in as the rc argument:\n" +"OK operation completed successfully\n" +"NONODE the parent node does not exist.\n" +"NODEEXISTS the node already exists\n" +"NOAUTH the client does not have permission.\n" +"NOCHILDRENFOREPHEMERALS cannot create children of ephemeral nodes.\n" +"\n" +"RETURNS:\n" +"Returns OK on success or throws of the following errcodes on failure:\n" +"EXCEPTIONS:\n" +"BADARGUMENTS - invalid input parameters\n" +"INVALIDSTATE - zhandle state is either SESSION_EXPIRED_STATE or AUTH_FAILED_STATE\n" +"MARSHALLINGERROR - failed to marshall a request; possibly, out of memory"; + +static const char pyzk_client_id_doc[] = +"Return the client session id, only valid if the connections\n" +" is currently connected (ie. last watcher state is CONNECTED_STATE)"; + +static const char pyzk_state_doc[] = +"Get the state of the zookeeper connection.\n" + "The return value will be one of the State Consts."; + +static const char pyzk_adelete_doc[] = +" Delete a node in zookeeper.\n" +"\n" +" zh: the zookeeper handle obtained by a call to zookeeper.init\n" +" path: the name of the node. Expressed as a file name with slashes \n" +"separating ancestors of the node.\n" +"\n" +"(Subsequent parameters are optional)\n" +" version: the expected version of the node. The function will fail if the\n" +" actual version of the node does not match the expected version.\n" +" If -1 is used the version check will not take place. \n" +" completion: the routine to invoke when the request completes. The completion\n" +"will be triggered with one of the following codes passed in as the rc argument:\n" +"OK operation completed successfully\n" +"NONODE the node does not exist.\n" +"NOAUTH the client does not have permission.\n" +"BADVERSION expected version does not match actual version.\n" +"NOTEMPTY children are present; node cannot be deleted.\n" +"Returns OK on success or one of the following errcodes on failure:\n" +"BADARGUMENTS - invalid input parameters\n" +"INVALIDSTATE - zhandle state is either SESSION_EXPIRED_STATE or AUTH_FAILED_STATE\n" + "MARSHALLINGERROR - failed to marshall a request; possibly, out of memory"; + +static const char pyzk_aexists_doc[] = +" checks the existence of a node in zookeeper.\n" +"\n" +" zh the zookeeper handle obtained by a call to zookeeper.init\n" +" path the name of the node. Expressed as a file name with slashes \n" +"separating ancestors of the node.\n" +"\n" +"(Subsequent parameters are optional)\n" +" watch: if not None, a watch will be set at the server to notify the \n" +"client if the node changes. The watch will be set even if the node does not \n" +"exist. This allows clients to watch for nodes to appear.\n" +"\n" +" completion: the routine to invoke when the request completes. The completion\n" +"will be triggered with one of the following codes passed in as the rc argument:\n" +" OK operation completed successfully\n" +" NONODE the node does not exist.\n" +" NOAUTH the client does not have permission.\n" +" data the data that will be passed to the completion routine when the \n" +"function completes.\n" +" OK on success or one of the following errcodes on failure:\n" +" BADARGUMENTS - invalid input parameters\n" +" INVALIDSTATE - zhandle state is either SESSION_EXPIRED_STATE or AUTH_FAILED_STATE\n" +" MARSHALLINGERROR - failed to marshall a request; possibly, out of memory"; + +static const char pyzk_aget_doc[] = +"Gets the data associated with a node.\n" +"\n" +" zh the zookeeper handle obtained by a call to zookeeper.init\n" +" path the name of the node. Expressed as a file name with slashes \n" +"separating ancestors of the node.\n" +"\n" +"(Subsequent parameters are optional)\n" +" watcher if not None, a watch will be set at the server to notify \n" +"the client if the node changes.\n" +" completion: the routine to invoke when the request completes. The completion\n" +"will be triggered with one of the following codes passed in as the rc argument:\n" +" OK operation completed successfully\n" +" NONODE the node does not exist.\n" +" NOAUTH the client does not have permission.\n" +" data the data that will be passed to the completion routine when \n" +"the function completes.\n" +"Returns OK on success or one of the following errcodes on failure:\n" +" BADARGUMENTS - invalid input parameters\n" +" INVALIDSTATE - zhandle state is either in SESSION_EXPIRED_STATE or AUTH_FAILED_STATE\n" + " MARSHALLINGERROR - failed to marshall a request; possibly, out of memory"; + +static const char pyzk_aset_doc[] = +" Sets the data associated with a node.\n" +"\n" +" zh the zookeeper handle obtained by a call to zookeeper.init\n" +" path the name of the node. Expressed as a file name with slashes \n" +"separating ancestors of the node.\n" +" buffer the buffer holding data to be written to the node.\n" +" buflen the number of bytes from buffer to write.\n" +"\n" +"(Subsequent parameters are optional)\n" +" version the expected version of the node. The function will fail if \n" +"the actual version of the node does not match the expected version. If -1 is \n" +"used the version check will not take place.\n" +"completion: If None, \n" +"the function will execute synchronously. Otherwise, the function will return \n" +"immediately and invoke the completion routine when the request completes.\n" +" completion the routine to invoke when the request completes. The completion\n" +"will be triggered with one of the following codes passed in as the rc argument:\n" +"OK operation completed successfully\n" +"NONODE the node does not exist.\n" +"NOAUTH the client does not have permission.\n" +"BADVERSION expected version does not match actual version.\n" +" data the data that will be passed to the completion routine when \n" +"the function completes.\n" +"Returns OK on success or one of the following errcodes on failure:\n" +"BADARGUMENTS - invalid input parameters\n" +"INVALIDSTATE - zhandle state is either SESSION_EXPIRED_STATE or AUTH_FAILED_STATE\n" +"MARSHALLINGERROR - failed to marshall a request; possibly, out of memory"; + +static const char pyzk_aget_children_doc[] = +" Lists the children of a node.\n" +"\n" +"This function is similar to zoo_aget_children except it allows one specify \n" +"a watcher object rather than a boolean watch flag.\n" +" \n" +" zh the zookeeper handle obtained by a call to zookeeper.init\n" +" path the name of the node. Expressed as a file name with slashes \n" +"separating ancestors of the node.\n" +"\n" +"(Subsequent parameters are optional)\n" +" watcher if non-null, a watch will be set at the server to notify \n" +"the client if the node changes.\n" +"\n" +" completion the routine to invoke when the request completes. The completion\n" +"will be triggered with one of the following codes passed in as the rc argument:\n" +"OK operation completed successfully\n" +"NONODE the node does not exist.\n" +"NOAUTH the client does not have permission.\n" +"\n" +"Returns OK on success or one of the following errcodes on failure:\n" +"BADARGUMENTS - invalid input parameters\n" +"INVALIDSTATE - zhandle state is either SESSION_EXPIRED_STATE or AUTH_FAILED_STATE\n" +"MARSHALLINGERROR - failed to marshall a request; possibly, out of memory"; + +static const char pyzk_async_doc[] = +" Flush leader channel.\n" +"\n" +" zh the zookeeper handle obtained by a call to zookeeper.init\n" +" path the name of the node. Expressed as a file name with slashes\n" +"separating ancestors of the node.\n" +" completion the routine to invoke when the request completes. The completion\n" +"will be triggered with one of the following codes passed in as the rc argument:\n" +"OK operation completed successfully\n" +"NONODE the node does not exist.\n" +"NOAUTH the client does not have permission.\n" +"\n" +"Returns OK on success or one of the following errcodes on failure:\n" +"BADARGUMENTS - invalid input parameters\n" +"INVALIDSTATE - zhandle state is either SESSION_EXPIRED_STATE or AUTH_FAILED_STATE\n" + "MARSHALLINGERROR - failed to marshall a request; possibly, out of memory"; + +const static char pyzk_aget_acl_doc[] = +" Gets the acl associated with a node.\n" +"\n" +" zh: the zookeeper handle obtained by a call to zookeeper.init\n" +" path: the name of the node. Expressed as a file name with slashes \n" +"separating ancestors of the node.\n" +"\n" +"(Subsequent parameters are optional)\n" +" completion: the routine to invoke when the request completes. The completion\n" +"will be triggered with one of the following codes passed in as the rc argument:\n" +"OK operation completed successfully\n" +"NONODE the node does not exist.\n" +"NOAUTH the client does not have permission.\n" +"\n" +"Returns:\n" +" OK on success or one of the following errcodes on failure:\n" +" BADARGUMENTS - invalid input parameters\n" +" INVALIDSTATE - zhandle state is either SESSION_EXPIRED_STATE or AUTH_FAILED_STATE\n" +" MARSHALLINGERROR - failed to marshall a request; possibly, out of memory"; + +const char pyzk_aset_acl_doc[] = +" Sets the acl associated with a node.\n" +"\n" +"PARAMETERS:\n" +" zh: the zookeeper handle obtained by a call to zookeeper.init\n" +" path: the name of the node. Expressed as a file name with slashes \n" +"separating ancestors of the node.\n" +" buffer: the buffer holding the acls to be written to the node.\n" +" completion: the routine to invoke when the request completes. The completion\n" +"will be triggered with one of the following codes passed in as the rc argument:\n" +"OK operation completed successfully\n" +"NONODE the node does not exist.\n" +"NOAUTH the client does not have permission.\n" +"INVALIDACL invalid ACL specified\n" +"BADVERSION expected version does not match actual version.\n" +"" +" Returns OK on success or one of the following errcodes on failure:\n" +" BADARGUMENTS - invalid input parameters\n" +" INVALIDSTATE - zhandle state is either SESSION_EXPIRED_STATE or AUTH_FAILED_STATE\n" +" MARSHALLINGERROR - failed to marshall a request; possibly, out of memory"; + +const char pyzk_zerror_doc[] = +"Returns an error string corresponding to an integer error code.\n" +"\n" +"PARAMETERS:\n" +" err: Error code\n" +"RETURNS:\n" + " string corresponding to the return code\n"; + +const char pyzk_add_auth_doc[] = +" specify application credentials.\n" +"\n" +"The application calls this function to specify its credentials for purposes\n" +"of authentication. The server will use the security provider specified by \n" +"the scheme parameter to authenticate the client connection. If the \n" +"authentication request has failed:\n" +"- the server connection is dropped\n" +"- the watcher is called with the AUTH_FAILED_STATE value as the state \n" +"parameter.\n" +"\n" +"PARAMETERS:\n" +" zh: the zookeeper handle obtained by a call to zookeeper.init\n" +" scheme the id of authentication scheme. Natively supported:\n" +"'digest' password-based authentication\n" +" cert: application credentials. The actual value depends on the scheme.\n" +" completion: the routine to invoke when the request completes. One of \n" +"the following result codes may be passed into the completion callback:\n" +"OK operation completed successfully\n" +"AUTHFAILED authentication failed \n" +"\n" +"RETURNS:\n" +"OK on success or one of the following errcodes on failure:\n" +"BADARGUMENTS - invalid input parameters\n" +"INVALIDSTATE - zhandle state is either SESSION_EXPIRED_STATE or AUTH_FAILED_STATE\n" +"MARSHALLINGERROR - failed to marshall a request; possibly, out of memory\n" + "SYSTEMERROR - a system error occurred\n"; + +const char pyzk_is_unrecoverable_doc[] = +" checks if the current zookeeper connection state can't be recovered.\n" +"\n" +" The application must close the zhandle and try to reconnect.\n" +"\n" +"PARAMETERS:\n" +" zh the zookeeper handle (see zookeeper.init)\n" +"\n" +"RETURNS:\n" + "True if connection is unrecoverable, otherwise False\n"; + +const char pyzk_set_debug_level_doc[] = +"\brief sets the debugging level for the library \n" +"\n" +"PARAMETERS:\n" +" logLevel: One of LOG_LEVEL_ERROR, LOG_LEVEL_WARN, LOG_LEVEL_INFO or LOG_LEVEL_DEBUG\n" +"\n" +"RETURNS:\n" + " None\n"; + +static const char pyzk_set_log_stream_doc[] = +" sets the stream to be used by the library for logging \n" +"\n" +"The zookeeper library uses stderr as its default log stream. Applications\n" +"must make sure the stream is writable. Passing in NULL resets the stream \n" + "to its default value (stderr).\n" +"\n" +"PARAMETERS:\n" +" logStream: a writable file object\n" +"RETURNS:\n" +" None\n"; + +static const char pyzk_deterministic_conn_order_doc[] = +" enable/disable quorum endpoint order randomization\n" +"\n" +"If passed a non-zero value, will make the client connect to quorum peers\n" +"in the order as specified in the zookeeper.init() call.\n" +"A zero value causes zookeeper.init() to permute the peer endpoints\n" +"which is good for more even client connection distribution among the \n" +"quorum peers.\n" +"PARAMETERS:\n" +" yesOrNo\n" +"\n" +"RETURNS:\n" + " None\n"; + +static const char pyzk_create_doc[] = +" create a node synchronously.\n" +"\n" +"This method will create a node in ZooKeeper. A node can only be created if\n" +"it does not already exists. The Create Flags affect the creation of nodes.\n" +"If the EPHEMERAL flag is set, the node will automatically get removed if the\n" +"client session goes away. If the SEQUENCE flag is set, a unique\n" +"monotonically increasing sequence number is appended to the path name.\n" +"\n" +"PARAMETERS:\n" +" zh: the zookeeper handle obtained by a call to zookeeper.init\n" +" path: The name of the node. Expressed as a file name with slashes \n" +"separating ancestors of the node.\n" +" value: The data to be stored in the node.\n" +" acl: The initial ACL of the node. If null, the ACL of the parent will be\n" +" used.\n" +" flags: this parameter can be set to 0 for normal create or an OR\n" +" of the Create Flags\n" +" realpath: the real path that is created (this might be different than the\n" +" path to create because of the SEQUENCE flag.\n" +" the maximum length of real path you would want.\n" +"\n" +"RETURNS:\n" +" The actual znode path that was created (may be different from path due to use of SEQUENTIAL\n" +" flag).\n" +"EXCEPTIONS:\n" +" NONODE the parent node does not exist.\n" +" NODEEXISTS the node already exists\n" +" NOAUTH the client does not have permission.\n" +" NOCHILDRENFOREPHEMERALS cannot create children of ephemeral nodes.\n" +" BADARGUMENTS - invalid input parameters\n" +" INVALIDSTATE - zhandle state is either SESSION_EXPIRED_STATE or AUTH_FAILED_STATE\n" + " MARSHALLINGERROR - failed to marshall a request; possibly, out of memory\n"; + +static const char pyzk_delete_doc[] = +" delete a node in zookeeper synchronously.\n" +"\n" +"PARAMETERS:\n" +" zh the zookeeper handle obtained by a call to zookeeper.init\n" +" path the name of the node. Expressed as a file name with slashes \n" +"separating ancestors of the node.\n" +"\n" +"(Subsequent parameters are optional)\n" +" version: the expected version of the node. The function will fail if the\n" +" actual version of the node does not match the expected version.\n" +" If -1 (the default) is used the version check will not take place. \n" +"\n" +"RETURNS:\n" +"One of the following values is returned.\n" +"OK operation completed successfully\n" +"NONODE the node does not exist.\n" +"NOAUTH the client does not have permission.\n" +"BADVERSION expected version does not match actual version.\n" +"NOTEMPTY children are present; node cannot be deleted.\n" +"BADARGUMENTS - invalid input parameters\n" +"INVALIDSTATE - zhandle state is either SESSION_EXPIRED_STATE or AUTH_FAILED_STATE\n" + "MARSHALLINGERROR - failed to marshall a request; possibly, out of memory\n"; + +static const char pyzk_exists_doc[] = +" checks the existence of a node in zookeeper synchronously.\n" +"\n" +"PARAMETERS:\n" +" zh: the zookeeper handle obtained by a call to zookeeper.init\n" +" path: the name of the node. Expressed as a file name with slashes \n" +"separating ancestors of the node.\n" +"\n" +"(Subsequent parameters are optional)\n" +" watch: if nonzero, a watch will be set at the server to notify the \n" +"client if the node changes. The watch will be set even if the node does not \n" +"exist. This allows clients to watch for nodes to appear.\n" +"\n" +"RETURNS:\n" +" the return stat value of the node.\n" +"EXCEPTIONS:\n" +"OK operation completed successfully\n" +"NONODE the node does not exist.\n" +"NOAUTH the client does not have permission.\n" +"BADARGUMENTS - invalid input parameters\n" +"INVALIDSTATE - zhandle state is either SESSION_EXPIRED_STATE or AUTH_FAILED_STATE\n" + "MARSHALLINGERROR - failed to marshall a request; possibly, out of memory\n"; + + +static const char pyzk_get_children_doc[] = +" lists the children of a node synchronously.\n" +"\n" +"PARAMETERS:\n" +" zh: the zookeeper handle obtained by a call to zookeeper.init\n" +" path: the name of the node. Expressed as a file name with slashes \n" +"separating ancestors of the node.\n" +"\n" +"(subsequent parameters are optional)\n" +" watcher: if non-null, a watch will be set at the server to notify \n" +"the client if the node changes.\n" +"\n" +"RETURNS:\n" +" A list of znode names\n" +"EXCEPTIONS:\n" +"NONODE the node does not exist.\n" +"NOAUTH the client does not have permission.\n" +"BADARGUMENTS - invalid input parameters\n" +"INVALIDSTATE - zhandle state is either SESSION_EXPIRED_STATE or AUTH_FAILED_STATE\n" + "MARSHALLINGERROR - failed to marshall a request; possibly, out of memory\n"; + +static const char pyzk_set_doc[] = +"\n" +" sets the data associated with a node. See set2 function if\n" +"you require access to the stat information associated with the znode.\n" +"\n" +"PARAMETERS:\n" +" zh: the zookeeper handle obtained by a call to zookeeper.init\n" +" path: the name of the node. Expressed as a file name with slashes \n" +"separating ancestors of the node.\n" +" buffer: the buffer holding data to be written to the node.\n" +"\n" +"(subsequent parameters are optional)\n" +" version: the expected version of the node. The function will fail if \n" +"the actual version of the node does not match the expected version. If -1 is \n" +"used the version check will not take place. \n" +"\n" +"RETURNS:\n" +" the return code for the function call.\n" +"OK operation completed successfully\n" +"EXCEPTIONS:\n" +"NONODE the node does not exist.\n" +"NOAUTH the client does not have permission.\n" +"BADVERSION expected version does not match actual version.\n" +"BADARGUMENTS - invalid input parameters\n" +"INVALIDSTATE - zhandle state is either SESSION_EXPIRED_STATE or AUTH_FAILED_STATE\n" + "MARSHALLINGERROR - failed to marshall a request; possibly, out of memory\n"; + +static const char pyzk_get_acl_doc[] = +" gets the acl associated with a node synchronously.\n" +"\n" +"PARAMETERS:\n" +" zh: the zookeeper handle obtained by a call to zookeeper.init\n" +" path: the name of the node. Expressed as a file name with slashes \n" +"separating ancestors of the node.\n" +" acl: the return value of acls on the path.\n" +"RETURNS:" +" returns the stat of the path specified.\n" +"EXCEPTIONS:" +"NONODE the node does not exist.\n" +"NOAUTH the client does not have permission.\n" +"BADARGUMENTS - invalid input parameters\n" +"INVALIDSTATE - zhandle state is either SESSION_EXPIRED_STATE or AUTH_FAILED_STATE\n" + "MARSHALLINGERROR - failed to marshall a request; possibly, out of memory\n"; + + +static const char pyzk_set_acl_doc[] = +" sets the acl associated with a node synchronously.\n" +"\n" +"PARAMETERS:\n" +" zh: the zookeeper handle obtained by a call to zookeeper.init\n" +" path: the name of the node. Expressed as a file name with slashes \n" +"separating ancestors of the node.\n" +" version: the expected version of the path.\n" +" acl: the acl to be set on the path. \n" +"\n" +"RETURNS:\n" +"OK operation completed successfully\n" +"EXCEPTIONS:\n" +"NONODE the node does not exist.\n" +"NOAUTH the client does not have permission.\n" +"INVALIDACL invalid ACL specified\n" +"BADVERSION expected version does not match actual version.\n" +"BADARGUMENTS - invalid input parameters\n" +"INVALIDSTATE - zhandle state is either SESSION_EXPIRED_STATE or AUTH_FAILED_STATE\n" + "MARSHALLINGERROR - failed to marshall a request; possibly, out of memory\n"; + +static const char pyzk_close_doc[] = +" close the zookeeper handle and free up any resources.\n" +"\n" +"After this call, the client session will no longer be valid. The function\n" +"will flush any outstanding send requests before return. As a result it may \n" +"block.\n" +"\n" +"This method should only be called only once on a zookeeper handle. Calling\n" +"twice will cause undefined (and probably undesirable behavior).\n" +"\n" +"PARAMETERS:\n" +" zh: the zookeeper handle obtained by a call to zookeeper.init\n" +"RETURNS:\n" +"Regardless of the error code returned, the zhandle \n" +"will be destroyed and all resources freed. \n" +"OK - success\n" +"EXCEPTIONS:\n" +"BADARGUMENTS - invalid input parameters\n" +"MARSHALLINGERROR - failed to marshall a request; possibly, out of memory\n" +"OPERATIONTIMEOUT - failed to flush the buffers within the specified timeout.\n" +"CONNECTIONLOSS - a network error occurred while attempting to send request to server\n" + "SYSTEMERROR -- a system (OS) error occurred; it's worth checking errno to get details\n"; + +static const char pyzk_set2_doc[] = +"\n" +" sets the data associated with a node, and returns the associated stat structure.\n" +"\n" +"PARAMETERS:\n" +" zh: the zookeeper handle obtained by a call to zookeeper.init\n" +" path: the name of the node. Expressed as a file name with slashes \n" +"separating ancestors of the node.\n" +" buffer: the buffer holding data to be written to the node.\n" +"\n" +"(subsequent parameters are optional)\n" +" version: the expected version of the node. The function will fail if \n" +"the actual version of the node does not match the expected version. If -1 is \n" +"used the version check will not take place. \n" +"\n" +"RETURNS:\n" +" the stat structure for the target znode\n" +"OK operation completed successfully\n" +"EXCEPTIONS:\n" +"NONODE the node does not exist.\n" +"NOAUTH the client does not have permission.\n" +"BADVERSION expected version does not match actual version.\n" +"BADARGUMENTS - invalid input parameters\n" +"INVALIDSTATE - zhandle state is either SESSION_EXPIRED_STATE or AUTH_FAILED_STATE\n" + "MARSHALLINGERROR - failed to marshall a request; possibly, out of memory\n"; + +static const char pyzk_init_doc[] = +"This method creates a new handle and a zookeeper session that corresponds\n" +"to that handle. Session establishment is asynchronous, meaning that the\n" +"session should not be considered established until (and unless) an\n" +"event of state CONNECTED_STATE is received.\n" +"PARAMETERS:\n" +" host: comma separated host:port pairs, each corresponding to a zk\n" +" server. e.g. '127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002'\n" +"\n" +"(subsequent parameters are optional)\n" +" fn: the global watcher callback function. When notifications are\n" +" triggered this function will be invoked.\n" +" recv_timeout: \n" +" (clientid, passwd)\n" +" clientid the id of a previously established session that this\n" +" client will be reconnecting to. Clients can access the session id of an established, valid,\n" +" connection by calling zoo_client_id. If\n" +" the specified clientid has expired, or if the clientid is invalid for \n" +" any reason, the returned zhandle_t will be invalid -- the zhandle_t \n" +" state will indicate the reason for failure (typically\n" +" EXPIRED_SESSION_STATE).\n" +"\n" +"RETURNS:\n" +" an integer handle. If it fails to create \n" +" a new zhandle the function throws an exception.\n"; + +static const char pyzk_get_doc[] = +" gets the data associated with a node synchronously.\n" +"\n" +"\n" +"PARAMETERS:\n" +" zh the zookeeper handle obtained by a call to zookeeper.init\n" +" path the name of the node. Expressed as a file name with slashes \n" +"separating ancestors of the node.\n" +"\n" +"(subsequent parameters are optional)\n" +" watcher if not None, a watch will be set at the server to notify \n" +" the client if the node changes.\n" +" bufferlen: This value defaults to 1024*1024 - 1Mb. This method returns \n" +" the minimum of bufferlen and the true length of the znode's data. \n" +"RETURNS:\n" +" the data associated with the node\n" +"OK operation completed successfully\n" +"NONODE the node does not exist.\n" +"NOAUTH the client does not have permission.\n" +"BADARGUMENTS - invalid input parameters\n" +"INVALIDSTATE - zhandle state is either in SESSION_EXPIRED_STATE or AUTH_FAILED_STATE\n" + "MARSHALLINGERROR - failed to marshall a request; possibly, out of memory\n"; + +#endif diff --git a/src/contrib/zkpython/src/c/zookeeper.c b/src/contrib/zkpython/src/c/zookeeper.c new file mode 100644 index 0000000..4474661 --- /dev/null +++ b/src/contrib/zkpython/src/c/zookeeper.c @@ -0,0 +1,1664 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include + +////////////////////////////////////////////// +// EXCEPTIONS +PyObject *ZooKeeperException = NULL; +PyObject *SystemErrorException; +PyObject *RuntimeInconsistencyException; +PyObject *DataInconsistencyException; +PyObject *ConnectionLossException; +PyObject *MarshallingErrorException; +PyObject *UnimplementedException; +PyObject *OperationTimeoutException; +PyObject *BadArgumentsException; +PyObject *InvalidStateException; + +PyObject *ApiErrorException; +PyObject *NoNodeException; +PyObject *NoAuthException; +PyObject *NodeExistsException; +PyObject *BadVersionException; +PyObject *NoChildrenForEphemeralsException; +PyObject *NotEmptyException; +PyObject *SessionExpiredException; +PyObject *SessionMovedException; +PyObject *InvalidCallbackException; +PyObject *InvalidACLException; +PyObject *AuthFailedException; +PyObject *ClosingException; +PyObject *NothingException; + +PyObject *err_to_exception(int errcode) { + switch (errcode) { + case ZSYSTEMERROR: + return SystemErrorException; + case ZINVALIDSTATE: + return InvalidStateException; + case ZRUNTIMEINCONSISTENCY: + return RuntimeInconsistencyException; + case ZDATAINCONSISTENCY: + return DataInconsistencyException; + case ZCONNECTIONLOSS: + return ConnectionLossException; + case ZMARSHALLINGERROR: + return MarshallingErrorException; + case ZUNIMPLEMENTED: + return UnimplementedException; + case ZOPERATIONTIMEOUT: + return OperationTimeoutException; + case ZBADARGUMENTS: + return BadArgumentsException; + case ZAPIERROR: + return ApiErrorException; + case ZNONODE: + return NoNodeException; + case ZNOAUTH: + return NoAuthException; + case ZBADVERSION: + return BadVersionException; + case ZNOCHILDRENFOREPHEMERALS: + return NoChildrenForEphemeralsException; + case ZNODEEXISTS: + return NodeExistsException; + case ZINVALIDACL: + return InvalidACLException; + case ZAUTHFAILED: + return AuthFailedException; + case ZNOTEMPTY: + return NotEmptyException; + case ZSESSIONEXPIRED: + return SessionExpiredException; + case ZINVALIDCALLBACK: + return InvalidCallbackException; + case ZSESSIONMOVED: + return SessionMovedException; + case ZCLOSING: + return ClosingException; + case ZNOTHING: + return NothingException; + case ZOK: + default: + return NULL; + } +} + + +#define CHECK_ZHANDLE(z) if ( (z) < 0 || (z) >= num_zhandles) { \ + PyErr_SetString( ZooKeeperException, "zhandle out of range" ); \ +return NULL; \ +} else if ( zhandles[(z)] == NULL ) { \ + PyErr_SetString(ZooKeeperException, "zhandle already freed"); \ + return NULL; \ + } + +/* Contains all the state required for a watcher callback - these are + passed to the *dispatch functions as void*, cast to pywatcher_t and + then their callback member is invoked if not NULL */ +typedef struct { + int zhandle; + PyObject *callback; + int permanent; +}pywatcher_t; + +/* This array exists because we need to ref. count the global watchers + for each connection - but they're inaccessible without pulling in + zk_adaptor.h, which I'm trying to avoid. */ +static pywatcher_t **watchers; + +/* We keep an array of zhandles available for use. When a zhandle is + correctly closed, the C client frees the memory so we set the + zhandles[i] entry to NULL. This entry can then be re-used. */ +static zhandle_t** zhandles = NULL; +static int num_zhandles = 0; +static int max_zhandles = 0; +#define REAL_MAX_ZHANDLES 32768 + +/* -------------------------------------------------------------------------- */ +/* zhandles - unique connection ids - tracking */ +/* -------------------------------------------------------------------------- */ + + +/* Allocates an initial zhandle and watcher array */ +int init_zhandles(int num) { + zhandles = malloc(sizeof(zhandle_t*)*num); + watchers = malloc(sizeof(pywatcher_t*)*num); + if (zhandles == NULL || watchers == NULL) { + return 0; + } + max_zhandles = num; + num_zhandles = 0; + memset(zhandles, 0, sizeof(zhandle_t*)*max_zhandles); + return 1; +} + +/* Note that the following zhandle functions are not thread-safe. The + C-Python runtime does not seem to pre-empt a thread that is in a C + module, so there's no need for synchronisation. */ + +/* Doubles the size of the zhandle / watcher array Returns 0 if the + new array would be >= REAL_MAX_ZHANDLES in size. Called when zhandles + is full. Returns 0 if allocation failed or if max num zhandles + exceeded. */ +int resize_zhandles(void) { + zhandle_t **tmp = zhandles; + pywatcher_t ** wtmp = watchers; + if (max_zhandles >= REAL_MAX_ZHANDLES >> 1) { + return 0; + } + max_zhandles *= 2; + zhandles = malloc(sizeof(zhandle_t*)*max_zhandles); + if (zhandles == NULL) { + PyErr_SetString(PyExc_MemoryError, "malloc for new zhandles failed"); + return 0; + } + memset(zhandles, 0, sizeof(zhandle_t*)*max_zhandles); + memcpy(zhandles, tmp, sizeof(zhandle_t*)*max_zhandles/2); + + watchers = malloc(sizeof(pywatcher_t*)*max_zhandles); + if (watchers == NULL) { + PyErr_SetString(PyExc_MemoryError, "malloc for new watchers failed"); + return 0; + } + memset(watchers, 0, sizeof(pywatcher_t*)*max_zhandles); + memcpy(watchers, wtmp, sizeof(pywatcher_t*)*max_zhandles/2); + + free(wtmp); + free(tmp); + return 1; +} + +/* Find a free zhandle - this iterates through the list of open + zhandles, but we expect it to be infrequently called. There are + optimisations that can be made if this turns out to be problematic. + Returns -1 if no free handle is found - resize_handles() can be + called in that case. */ +unsigned int next_zhandle(void) { + int i = 0; + for (i=0;izhandle = zh; ret->callback = cb; ret->permanent = permanent; + return ret; +} + +/* Releases the reference taken in create_pywatcher to the callback, + then frees the allocated pywatcher_t* */ +void free_pywatcher(pywatcher_t *pw) +{ + if (pw == NULL) { + return; + } + Py_DECREF(pw->callback); + + free(pw); +} + +/* Constructs a new stat object. Returns Py_None if stat == NULL or a + dictionary containing all the stat information otherwise. In either + case, takes a reference to the returned object. */ +PyObject *build_stat( const struct Stat *stat ) +{ + if (stat == NULL) { + Py_INCREF(Py_None); + return Py_None; + } + return Py_BuildValue( "{s:K, s:K, s:K, s:K," + "s:i, s:i, s:i, s:K," + "s:i, s:i, s:K}", + "czxid", stat->czxid, + "mzxid", stat->mzxid, + "ctime", stat->ctime, + "mtime", stat->mtime, + "version", stat->version, + "cversion", stat->cversion, + "aversion", stat->aversion, + "ephemeralOwner", stat->ephemeralOwner, + "dataLength", stat->dataLength, + "numChildren", stat->numChildren, + "pzxid", stat->pzxid ); +} + +/* Creates a new list of strings from a String_vector. Returns the + empty list if the String_vector is NULL. Takes a reference to the + returned PyObject and gives that reference to the caller. */ +PyObject *build_string_vector(const struct String_vector *sv) +{ + PyObject *ret; + if (!sv) { + return PyList_New(0); + } + + ret = PyList_New(sv->count); + if (ret) { + int i; + for (i=0;icount;++i) { +#if PY_MAJOR_VERSION >= 3 + PyObject *s = PyUnicode_FromString(sv->data[i]); +#else + PyObject *s = PyString_FromString(sv->data[i]); +#endif + if (!s) { + if (ret != Py_None) { + Py_DECREF(ret); + } + ret = NULL; + break; + } + PyList_SetItem(ret, i, s); + } + } + return ret; +} + +/* Returns 1 if the PyObject is a valid representation of an ACL, and + 0 otherwise. */ +int check_is_acl(PyObject *o) { + int i; + PyObject *entry; + if (o == NULL) { + return 0; + } + if (!PyList_Check(o)) { + return 0; + } + for (i=0;icount); + int i; + for (i=0;icount;++i) { + PyObject *acl = Py_BuildValue( "{s:i, s:s, s:s}", + "perms", acls->data[i].perms, + "scheme", acls->data[i].id.scheme, + "id", acls->data[i].id.id ); + PyList_SetItem(ret, i, acl); + } + return ret; +} + +/* Parse the Python representation of an ACL list into an ACL_vector + (which needs subsequent freeing) */ +int parse_acls(struct ACL_vector *acls, PyObject *pyacls) +{ + PyObject *a; + int i; + if (acls == NULL || pyacls == NULL) { + PyErr_SetString(PyExc_ValueError, "acls or pyacls NULL in parse_acls"); + return 0; + } + + acls->count = PyList_Size( pyacls ); + + // Is this a list? If not, we can't do anything + if (PyList_Check(pyacls) == 0) { + PyErr_SetString(InvalidACLException, "List of ACLs required in parse_acls"); + return 0; + } + + acls->data = (struct ACL *)calloc(acls->count, sizeof(struct ACL)); + if (acls->data == NULL) { + PyErr_SetString(PyExc_MemoryError, "calloc failed in parse_acls"); + return 0; + } + + for (i=0;icount;++i) { + a = PyList_GetItem(pyacls, i); + // a is now a dictionary + PyObject *perms = PyDict_GetItemString( a, "perms" ); +#if PY_MAJOR_VERSION >= 3 + acls->data[i].perms = (int32_t)(PyLong_AsLong(perms)); + acls->data[i].id.id = strdup( PyUnicode_AsUnicode( PyDict_GetItemString( a, "id" ) ) ); + acls->data[i].id.scheme = strdup( PyUnicode_AsUnicode( PyDict_GetItemString( a, "scheme" ) ) ); +#else + acls->data[i].perms = (int32_t)(PyInt_AsLong(perms)); + acls->data[i].id.id = strdup( PyString_AsString( PyDict_GetItemString( a, "id" ) ) ); + acls->data[i].id.scheme = strdup( PyString_AsString( PyDict_GetItemString( a, "scheme" ) ) ); +#endif + } + return 1; +} + +/* Deallocates the memory allocated inside an ACL_vector, but not the + ACL_vector itself */ +void free_acls( struct ACL_vector *acls ) +{ + if (acls == NULL) { + return; + } + int i; + for (i=0;icount;++i) { + free(acls->data[i].id.id); + free(acls->data[i].id.scheme); + } + free(acls->data); +} + +/* -------------------------------------------------------------------------- */ +/* Watcher and callback implementation */ +/* -------------------------------------------------------------------------- */ + +/* Every watcher invocation goes through this dispatch point, which + a) acquires the global interpreter lock + + b) unpacks the PyObject to call from the passed context pointer, + which handily includes the index of the relevant zookeeper handle + to pass back to Python. + + c) Makes the call into Python, checking for error conditions which + we are responsible for detecting and doing something about (we just + print the error and plough right on) + + d) releases the lock after freeing up the context object, which is + only used for one watch invocation (watches are one-shot, unless + 'permanent' != 0) +*/ +void watcher_dispatch(zhandle_t *zzh, int type, int state, + const char *path, void *context) +{ + PyGILState_STATE gstate; + pywatcher_t *pyw = (pywatcher_t*)context; + PyObject *callback = pyw->callback; + if (callback == NULL) { + // This is unexpected + char msg[256]; + sprintf(msg, "pywatcher: %d %p %d", pyw->zhandle, pyw->callback, pyw->permanent); + PyErr_SetString(PyExc_ValueError, msg); + return; + } + + gstate = PyGILState_Ensure(); + PyObject *arglist = Py_BuildValue("(i,i,i,s)", pyw->zhandle,type, state, path); + if (PyObject_CallObject((PyObject*)callback, arglist) == NULL) { + PyErr_Print(); + } + Py_DECREF(arglist); + if (pyw->permanent == 0 && (type != ZOO_SESSION_EVENT || state < 0)) { + free_pywatcher(pyw); + } + PyGILState_Release(gstate); +} + +/* The completion callbacks (from asynchronous calls) are implemented similarly */ + +/* Called when an asynchronous call that returns void completes and + dispatches user provided callback */ +void void_completion_dispatch(int rc, const void *data) +{ + PyGILState_STATE gstate; + pywatcher_t *pyw = (pywatcher_t*)data; + if (pyw == NULL) + return; + PyObject *callback = pyw->callback; + gstate = PyGILState_Ensure(); + PyObject *arglist = Py_BuildValue("(i,i)", pyw->zhandle, rc); + if (PyObject_CallObject((PyObject*)callback, arglist) == NULL) + PyErr_Print(); + Py_DECREF(arglist); + free_pywatcher(pyw); + PyGILState_Release(gstate); +} + +/* Called when an asynchronous call that returns a stat structure + completes and dispatches user provided callback */ +void stat_completion_dispatch(int rc, const struct Stat *stat, const void *data) +{ + PyGILState_STATE gstate; + pywatcher_t *pyw = (pywatcher_t*)data; + if (pyw == NULL) + return; + PyObject *callback = pyw->callback; + gstate = PyGILState_Ensure(); + PyObject *pystat = build_stat(stat); + PyObject *arglist = Py_BuildValue("(i,i,O)", pyw->zhandle,rc, pystat); + Py_DECREF(pystat); + if (PyObject_CallObject((PyObject*)callback, arglist) == NULL) + PyErr_Print(); + Py_DECREF(arglist); + free_pywatcher(pyw); + PyGILState_Release(gstate); +} + +/* Called when an asynchronous call that returns a stat structure and + some untyped data completes and dispatches user provided + callback (used by aget) */ +void data_completion_dispatch(int rc, const char *value, int value_len, const struct Stat *stat, const void *data) +{ + PyGILState_STATE gstate; + pywatcher_t *pyw = (pywatcher_t*)data; + if (pyw == NULL) + return; + PyObject *callback = pyw->callback; + gstate = PyGILState_Ensure(); + PyObject *pystat = build_stat(stat); + PyObject *arglist = Py_BuildValue("(i,i,s#,O)", pyw->zhandle,rc, value,value_len, pystat); + Py_DECREF(pystat); + + if (PyObject_CallObject((PyObject*)callback, arglist) == NULL) + PyErr_Print(); + Py_DECREF(arglist); + free_pywatcher(pyw); + PyGILState_Release(gstate); +} + +/* Called when an asynchronous call that returns a list of strings + completes and dispatches user provided callback */ +void strings_completion_dispatch(int rc, const struct String_vector *strings, const void *data) +{ + PyGILState_STATE gstate; + pywatcher_t *pyw = (pywatcher_t*)data; + if (pyw == NULL) + return; + PyObject *callback = pyw->callback; + gstate = PyGILState_Ensure(); + PyObject *pystrings = build_string_vector(strings); + if (pystrings) + { + PyObject *arglist = Py_BuildValue("(i,i,O)", pyw->zhandle, rc, pystrings); + if (arglist == NULL || PyObject_CallObject((PyObject*)callback, arglist) == NULL) + PyErr_Print(); + Py_DECREF(arglist); + } + else + PyErr_Print(); + Py_DECREF(pystrings); + free_pywatcher(pyw); + PyGILState_Release(gstate); +} + +/* Called when an asynchronous call that returns a single string + completes and dispatches user provided callback */ +void string_completion_dispatch(int rc, const char *value, const void *data) +{ + PyGILState_STATE gstate; + pywatcher_t *pyw = (pywatcher_t*)data; + if (pyw == NULL) { + return; + } + PyObject *callback = pyw->callback; + gstate = PyGILState_Ensure(); + PyObject *arglist = Py_BuildValue("(i,i,s)", pyw->zhandle,rc, value); + if (PyObject_CallObject((PyObject*)callback, arglist) == NULL) + PyErr_Print(); + Py_DECREF(arglist); + free_pywatcher(pyw); + PyGILState_Release(gstate); +} + +/* Called when an asynchronous call that returns a list of ACLs + completes and dispatches user provided callback */ +void acl_completion_dispatch(int rc, struct ACL_vector *acl, struct Stat *stat, const void *data) +{ + PyGILState_STATE gstate; + pywatcher_t *pyw = (pywatcher_t*)data; + if (pyw == NULL) { + return; + } + PyObject *callback = pyw->callback; + gstate = PyGILState_Ensure(); + PyObject *pystat = build_stat(stat); + PyObject *pyacls = build_acls(acl); + PyObject *arglist = Py_BuildValue("(i,i,O,O)", pyw->zhandle,rc, pyacls, pystat); + + Py_DECREF(pystat); + Py_DECREF(pyacls); + + if (PyObject_CallObject((PyObject*)callback, arglist) == NULL) { + PyErr_Print(); + } + Py_DECREF(arglist); + free_pywatcher(pyw); + PyGILState_Release(gstate); +} + +/* -------------------------------------------------------------------------- */ +/* ZOOKEEPER API IMPLEMENTATION */ +/* -------------------------------------------------------------------------- */ + +static PyObject *pyzookeeper_init(PyObject *self, PyObject *args) +{ + const char *host; + PyObject *watcherfn = Py_None; + int recv_timeout = 10000; + // int clientid = -1; + clientid_t cid; + cid.client_id = -1; + const char *passwd; + int handle = next_zhandle(); + if (handle == -1) { + if (resize_zhandles() == 0) { + return NULL; + } + handle = next_zhandle(); + } + + if (handle == -1) { + PyErr_SetString(ZooKeeperException,"Couldn't find a free zhandle, something is very wrong"); + return NULL; + } + + if (!PyArg_ParseTuple(args, "s|Oi(Ls)", &host, &watcherfn, &recv_timeout, &cid.client_id, &passwd)) + return NULL; + + if (cid.client_id != -1) { + strncpy(cid.passwd, passwd, 16*sizeof(char)); + } + pywatcher_t *pyw = NULL; + if (watcherfn != Py_None) { + pyw = create_pywatcher(handle, watcherfn,1); + if (pyw == NULL) { + return NULL; + } + } + watchers[handle] = pyw; + zhandle_t *zh = zookeeper_init( host, watcherfn != Py_None ? watcher_dispatch : NULL, + recv_timeout, cid.client_id == -1 ? 0 : &cid, + pyw, + 0 ); + + if (zh == NULL) + { + PyErr_SetString( ZooKeeperException, "Could not internally obtain zookeeper handle" ); + return NULL; + } + + zhandles[handle] = zh; + return Py_BuildValue( "i", handle); +} + + +/* -------------------------------------------------------------------------- */ +/* Asynchronous API implementation */ +/* -------------------------------------------------------------------------- */ + +/* Asynchronous node creation, returns integer error code */ +PyObject *pyzoo_acreate(PyObject *self, PyObject *args) +{ + int zkhid; char *path; char *value; int valuelen; + struct ACL_vector acl; int flags = 0; + PyObject *completion_callback = Py_None; + PyObject *pyacls = Py_None; + if (!PyArg_ParseTuple(args, "iss#O|iO", &zkhid, &path, + &value, &valuelen, &pyacls, &flags, + &completion_callback)) { + return NULL; + } + CHECK_ZHANDLE(zkhid); + CHECK_ACLS(pyacls); + if (parse_acls(&acl, pyacls) == 0) { + return NULL; + } + void *pyw = NULL; + if (completion_callback != Py_None) { + pyw = create_pywatcher(zkhid, completion_callback, 0); + if (pyw == NULL) { + return NULL; + } + } + int err = zoo_acreate( zhandles[zkhid], + path, + value, + valuelen, + pyacls == Py_None ? NULL : &acl, + flags, + string_completion_dispatch, + pyw); + free_acls(&acl); + if (err != ZOK) + { + PyErr_SetString(err_to_exception(err), zerror(err)); + return NULL; + } + return Py_BuildValue("i", err); +} + +/* Asynchronous node deletion, returns integer error code */ +PyObject *pyzoo_adelete(PyObject *self, PyObject *args) +{ + int zkhid; char *path; int version = -1; + PyObject *completion_callback = Py_None; + if (!PyArg_ParseTuple(args, "is|iO", &zkhid, &path, &version, &completion_callback)) + return NULL; + CHECK_ZHANDLE(zkhid); + + void *pyw = NULL; + if (completion_callback != Py_None) { + pyw = create_pywatcher(zkhid, completion_callback, 0); + if (pyw == NULL) { + return NULL; + } + } + + int err = zoo_adelete( zhandles[zkhid], + path, + version, + void_completion_dispatch, + pyw); + + if (err != ZOK) { + PyErr_SetString(err_to_exception(err), zerror(err)); + return NULL; + } + return Py_BuildValue("i", err); +} + +/* Asynchronous node existence check, returns integer error code */ +PyObject *pyzoo_aexists(PyObject *self, PyObject *args) +{ + int zkhid; char *path; + PyObject *completion_callback = Py_None; + PyObject *exists_watch = Py_None; + if (!PyArg_ParseTuple(args, "is|OO", &zkhid, &path, + &exists_watch, &completion_callback)) + return NULL; + CHECK_ZHANDLE(zkhid); + void *comp_pyw = NULL; + if (completion_callback != Py_None) { + comp_pyw = create_pywatcher(zkhid, completion_callback, 0); + if (comp_pyw == NULL) { + return NULL; + } + } + void *exist_pyw = NULL; + if (exists_watch != Py_None) { + exist_pyw = create_pywatcher(zkhid, exists_watch, 0); + if (exist_pyw == NULL) { + return NULL; + } + } + + int err = zoo_awexists( zhandles[zkhid], + path, + exists_watch != Py_None ? watcher_dispatch : NULL, + exist_pyw, + stat_completion_dispatch, + comp_pyw); + + if (err != ZOK) + { + PyErr_SetString(err_to_exception(err), zerror(err)); + return NULL; + } + return Py_BuildValue("i", err);; +} + +/* Asynchronous node data retrieval, returns integer error code */ +PyObject *pyzoo_aget(PyObject *self, PyObject *args) +{ + int zkhid; char *path; + PyObject *completion_callback = Py_None; + PyObject *get_watch = Py_None; + void *comp_pw = NULL; + void *watch_pw = NULL; + + if (!PyArg_ParseTuple(args, "is|OO", &zkhid, &path, + &get_watch, &completion_callback)) { + return NULL; + } + + CHECK_ZHANDLE(zkhid); + + if (get_watch != Py_None) { + if ((watch_pw = create_pywatcher(zkhid, get_watch, 0)) == NULL) { + return NULL; + } + } + + if (completion_callback != Py_None) { + if ((comp_pw = create_pywatcher(zkhid, completion_callback, 0)) == NULL) { + return NULL; + } + } + + int err = zoo_awget( zhandles[zkhid], + path, + get_watch != Py_None ? watcher_dispatch : NULL, + watch_pw, + data_completion_dispatch, + comp_pw); + + if (err != ZOK) { + PyErr_SetString(err_to_exception(err), zerror(err)); + return NULL; + } + return Py_BuildValue("i", err); +} + +/* Asynchronous node contents update, returns integer error code */ +PyObject *pyzoo_aset(PyObject *self, PyObject *args) +{ + int zkhid; char *path; char *buffer; int buflen; int version=-1; + PyObject *completion_callback = Py_None; + if (!PyArg_ParseTuple(args, "iss#|iO", &zkhid, &path, &buffer, &buflen, &version, &completion_callback)) + return NULL; + CHECK_ZHANDLE(zkhid); + void *pyw = NULL; + if (completion_callback != Py_None) { + pyw = create_pywatcher(zkhid, completion_callback, 0); + if (pyw == NULL) { + return NULL; + } + } + int err = zoo_aset( zhandles[zkhid], + path, + buffer, + buflen, + version, + stat_completion_dispatch, + pyw); + + if (err != ZOK) { + PyErr_SetString(err_to_exception(err), zerror(err)); + return NULL; + } + return Py_BuildValue("i", err); +} + +/* Asynchronous node child retrieval, returns integer error code */ +PyObject *pyzoo_aget_children(PyObject *self, PyObject *args) +{ + int zkhid; char *path; + PyObject *completion_callback = Py_None; + PyObject *get_watch; + if (!PyArg_ParseTuple(args, "is|OO", &zkhid, &path, + &get_watch, &completion_callback)) + return NULL; + CHECK_ZHANDLE(zkhid); + + void *get_pyw = NULL; + if (get_watch != Py_None) { + get_pyw = create_pywatcher(zkhid, get_watch, 0); + if (get_pyw == NULL) { + return NULL; + } + } + + void *pyw = NULL; + if (completion_callback != Py_None) { + pyw = create_pywatcher(zkhid, completion_callback, 0); + if (pyw == NULL) { + return NULL; + } + } + + int err = zoo_awget_children( zhandles[zkhid], + path, + get_watch != Py_None ? watcher_dispatch : NULL, + get_pyw, + strings_completion_dispatch, + pyw); + if (err != ZOK) { + PyErr_SetString(err_to_exception(err), zerror(err)); + return NULL; + } + return Py_BuildValue("i", err);; +} + +/* Asynchronous sync, returns integer error code */ +PyObject *pyzoo_async(PyObject *self, PyObject *args) +{ + int zkhid; char *path; + PyObject *completion_callback = Py_None; + if (!PyArg_ParseTuple(args, "is|O", &zkhid, &path, + &completion_callback)) { + return NULL; + } + CHECK_ZHANDLE(zkhid); + + void *pyw = NULL; + if (completion_callback != Py_None) { + pyw = create_pywatcher(zkhid, completion_callback, 0); + if (pyw == NULL) { + return NULL; + } + } + + int err = zoo_async( zhandles[zkhid], + path, + string_completion_dispatch, + pyw); + + if (err != ZOK) { + PyErr_SetString(err_to_exception(err), zerror(err)); + return NULL; + } + return Py_BuildValue("i", err);; +} + +/* Asynchronous node ACL retrieval, returns integer error code */ +PyObject *pyzoo_aget_acl(PyObject *self, PyObject *args) +{ + int zkhid; char *path; + PyObject *completion_callback = Py_None; + if (!PyArg_ParseTuple(args, "is|O", &zkhid, &path, + &completion_callback)) { + return NULL; + } + CHECK_ZHANDLE(zkhid); + + void *pyw = NULL; + if (completion_callback != Py_None) { + pyw = create_pywatcher(zkhid, completion_callback, 0); + if (pyw == NULL) { + return NULL; + } + } + + int err = zoo_aget_acl( zhandles[zkhid], + path, + acl_completion_dispatch, + pyw); + if (err != ZOK) { + PyErr_SetString(err_to_exception(err), zerror(err)); + return NULL; + } + return Py_BuildValue("i", err);; +} + +/* Asynchronous node ACL update, returns integer error code */ +PyObject *pyzoo_aset_acl(PyObject *self, PyObject *args) +{ + int zkhid; char *path; int version; + PyObject *completion_callback = Py_None, *pyacl; + struct ACL_vector aclv; + if (!PyArg_ParseTuple(args, "isiO|O", &zkhid, &path, &version, + &pyacl, &completion_callback)) { + return NULL; + } + CHECK_ZHANDLE(zkhid); + CHECK_ACLS(pyacl); + if (parse_acls(&aclv, pyacl) == 0) { + return NULL; + } + + void *pyw = NULL; + if (completion_callback != Py_None) { + pyw = create_pywatcher(zkhid, completion_callback, 0); + if (pyw == NULL) { + return NULL; + } + } + + int err = zoo_aset_acl( zhandles[zkhid], + path, + version, + &aclv, + void_completion_dispatch, + pyw); + free_acls(&aclv); + if (err != ZOK) { + PyErr_SetString(err_to_exception(err), zerror(err)); + return NULL; + } + return Py_BuildValue("i", err);; +} + +/* Asynchronous authorization addition, returns integer error code */ +PyObject *pyzoo_add_auth(PyObject *self, PyObject *args) +{ + int zkhid; + char *scheme, *cert; + int certLen; + PyObject *completion_callback; + + if (!PyArg_ParseTuple(args, "iss#O", &zkhid, &scheme, &cert, &certLen, + &completion_callback)) { + return NULL; + } + CHECK_ZHANDLE(zkhid); + + void *pyw = NULL; + if (completion_callback != Py_None) { + pyw = create_pywatcher(zkhid, completion_callback, 0); + if (pyw == NULL) { + return NULL; + } + } + + int err = zoo_add_auth( zhandles[zkhid], + scheme, + cert, + certLen, + void_completion_dispatch, + pyw); + if (err != ZOK) { + PyErr_SetString(err_to_exception(err), zerror(err)); + return NULL; + } + return Py_BuildValue("i", err); +} + +/* -------------------------------------------------------------------------- */ +/* Synchronous API implementation */ +/* -------------------------------------------------------------------------- */ + +/* Synchronous node creation, returns node path string */ +static PyObject *pyzoo_create(PyObject *self, PyObject *args) +{ + char *path; + int zkhid; + char* values; + int valuelen; + PyObject *acl = NULL; + int flags = 0; + char realbuf[256]; + const int maxbuf_len = 256; + if (!PyArg_ParseTuple(args, "iss#O|i",&zkhid, &path, &values, &valuelen,&acl,&flags)) + return NULL; + CHECK_ZHANDLE(zkhid); + struct ACL_vector aclv; + CHECK_ACLS(acl); + if (parse_acls(&aclv,acl) == 0) { + return NULL; + } + zhandle_t *zh = zhandles[zkhid]; + int err = zoo_create(zh, path, values, valuelen, &aclv, flags, realbuf, maxbuf_len); + free_acls(&aclv); + if (err != ZOK) { + PyErr_SetString(err_to_exception(err), zerror(err)); + return NULL; + } + + return Py_BuildValue("s", realbuf); +} + +/* Synchronous node deletion, returns integer error code */ +static PyObject *pyzoo_delete(PyObject *self, PyObject *args) +{ + int zkhid; + char *path; + int version = -1; + if (!PyArg_ParseTuple(args, "is|i",&zkhid,&path,&version)) + return NULL; + CHECK_ZHANDLE(zkhid); + zhandle_t *zh = zhandles[zkhid]; + int err = zoo_delete(zh, path, version); + if (err != ZOK) { + PyErr_SetString(err_to_exception(err), zerror(err)); + return NULL; + } + return Py_BuildValue("i", err); +} + +/* Synchronous node existence check, returns stat if exists, None if + absent */ +static PyObject *pyzoo_exists(PyObject *self, PyObject *args) +{ + int zkhid; char *path; PyObject *watcherfn = Py_None; + struct Stat stat; + if (!PyArg_ParseTuple(args, "is|O", &zkhid, &path, &watcherfn)) { + return NULL; + } + CHECK_ZHANDLE(zkhid); + zhandle_t *zh = zhandles[zkhid]; + pywatcher_t *pw = NULL; + void *callback = NULL; + if (watcherfn != Py_None) { + pw = create_pywatcher(zkhid, watcherfn,0); + callback = watcher_dispatch; + if (pw == NULL) { + return NULL; + } + } + int err = zoo_wexists(zh, path, callback, pw, &stat); + if (err != ZOK && err != ZNONODE) { + PyErr_SetString(err_to_exception(err), zerror(err)); + free_pywatcher(pw); + return NULL; + } + if (err == ZNONODE) { + Py_INCREF(Py_None); + return Py_None; // This isn't exceptional + } + return build_stat(&stat); +} + +/* Synchronous node child retrieval, returns list of children's path + as strings */ +static PyObject *pyzoo_get_children(PyObject *self, PyObject *args) +{ + int zkhid; + char *path; + PyObject *watcherfn = Py_None; + struct String_vector strings; + if (!PyArg_ParseTuple(args, "is|O", &zkhid, &path, &watcherfn)) { + return NULL; + } + CHECK_ZHANDLE(zkhid); + pywatcher_t *pw = NULL; + void *callback = NULL; + if (watcherfn != Py_None) { + pw = create_pywatcher( zkhid, watcherfn, 0 ); + callback = watcher_dispatch; + if (pw == NULL) { + return NULL; + } + } + int err = zoo_wget_children(zhandles[zkhid], path, + callback, + pw, &strings ); + + if (err != ZOK) { + PyErr_SetString(err_to_exception(err), zerror(err)); + free_pywatcher(pw); + return NULL; + } + + PyObject *ret = build_string_vector(&strings); + deallocate_String_vector(&strings); + return ret; +} + +/* Synchronous node data update, returns integer error code */ +static PyObject *pyzoo_set(PyObject *self, PyObject *args) +{ + int zkhid; + char *path; + char *buffer; + int buflen; + int version = -1; + if (!PyArg_ParseTuple(args, "iss#|i", &zkhid, &path, &buffer, &buflen, + &version)) { + return NULL; + } + CHECK_ZHANDLE(zkhid); + + int err = zoo_set(zhandles[zkhid], path, buffer, buflen, version); + if (err != ZOK) { + PyErr_SetString(err_to_exception(err), zerror(err)); + return NULL; + } + + return Py_BuildValue("i", err); +} + +/* Synchronous node data update, returns node's stat data structure */ +static PyObject *pyzoo_set2(PyObject *self, PyObject *args) +{ + int zkhid; + char *path; + char *buffer; + int buflen; + int version = -1; + if (!PyArg_ParseTuple(args, "iss#|i", &zkhid, &path, &buffer, &buflen, + &version)) { + return NULL; + } + CHECK_ZHANDLE(zkhid); + struct Stat stat; + int err = zoo_set2(zhandles[zkhid], path, buffer, buflen, version, &stat); + if (err != ZOK) { + PyErr_SetString(err_to_exception(err), zerror(err)); + return NULL; + } + + return build_stat(&stat); +} + +/* As per ZK documentation, datanodes are limited to 1Mb. Why not do a + stat followed by a get, to determine how big the buffer should be? + Because the znode may get updated between calls, so we can't + guarantee a complete get anyhow. */ +#define GET_BUFFER_SIZE 1024*1024 + +/* pyzoo_get has an extra parameter over the java/C equivalents. If + you set the fourth integer parameter buffer_len, we return + min(buffer_len, datalength) bytes. This is set by default to + GET_BUFFER_SIZE */ +static PyObject *pyzoo_get(PyObject *self, PyObject *args) +{ + int zkhid; + char *path; + char *buffer; + int buffer_len=GET_BUFFER_SIZE; + struct Stat stat; + PyObject *watcherfn = Py_None; + pywatcher_t *pw = NULL; + if (!PyArg_ParseTuple(args, "is|Oi", &zkhid, &path, &watcherfn, &buffer_len)) { + return NULL; + } + CHECK_ZHANDLE(zkhid); + if (watcherfn != Py_None) { + pw = create_pywatcher( zkhid, watcherfn,0 ); + if (pw == NULL) { + return NULL; + } + } + buffer = malloc(sizeof(char)*buffer_len); + if (buffer == NULL) { + free_pywatcher(pw); + PyErr_SetString(PyExc_MemoryError, "buffer could not be allocated in pyzoo_get"); + return NULL; + } + + int err = zoo_wget(zhandles[zkhid], path, + watcherfn != Py_None ? watcher_dispatch : NULL, + pw, buffer, + &buffer_len, &stat); + + if (err != ZOK) { + PyErr_SetString(err_to_exception(err), zerror(err)); + free_pywatcher(pw); + free(buffer); + return NULL; + } + + PyObject *stat_dict = build_stat( &stat ); + PyObject *ret = Py_BuildValue( "(s#,N)", buffer,buffer_len < 0 ? 0 : buffer_len, stat_dict ); + free(buffer); + + return ret; +} + +/* Synchronous node ACL retrieval, returns list of ACLs */ +PyObject *pyzoo_get_acl(PyObject *self, PyObject *args) +{ + int zkhid; + char *path; + struct ACL_vector acl; + struct Stat stat; + if (!PyArg_ParseTuple(args, "is", &zkhid, &path)) + return NULL; + CHECK_ZHANDLE(zkhid); + int err = zoo_get_acl( zhandles[zkhid], path, &acl, &stat ); + if (err != ZOK) { + PyErr_SetString(err_to_exception(err), zerror(err)); + return NULL; + } + PyObject *pystat = build_stat( &stat ); + PyObject *acls = build_acls( &acl ); + PyObject *ret = Py_BuildValue( "(O,O)", pystat, acls ); + Py_DECREF(pystat); + Py_DECREF(acls); + return ret; +} + +/* Synchronous node ACL update, returns integer error code */ +PyObject *pyzoo_set_acl(PyObject *self, PyObject *args) +{ + int zkhid; + char *path; + int version; + PyObject *pyacls; + struct ACL_vector acl; + if (!PyArg_ParseTuple(args, "isiO", &zkhid, &path, &version, &pyacls)) { + return NULL; + } + CHECK_ZHANDLE(zkhid); + if (parse_acls(&acl, pyacls) == 0) { + return NULL; + } + int err = zoo_set_acl(zhandles[zkhid], path, version, &acl ); + free_acls(&acl); + if (err != ZOK) { + PyErr_SetString(err_to_exception(err), zerror(err)); + return NULL; + } + return Py_BuildValue("i", err);; +} + +/* -------------------------------------------------------------------------- */ +/* Session and context methods */ +/* -------------------------------------------------------------------------- */ + +/* Closes a connection, returns integer error code */ +PyObject *pyzoo_close(PyObject *self, PyObject *args) +{ + int zkhid, ret; + if (!PyArg_ParseTuple(args, "i", &zkhid)) { + return NULL; + } + CHECK_ZHANDLE(zkhid); + zhandle_t *handle = zhandles[zkhid]; + Py_BEGIN_ALLOW_THREADS + ret = zookeeper_close(handle); + Py_END_ALLOW_THREADS + zhandles[zkhid] = NULL; // The zk C client frees the zhandle + return Py_BuildValue("i", ret); +} + +/* Returns the ID of current client as a tuple (client_id, passwd) */ +PyObject *pyzoo_client_id(PyObject *self, PyObject *args) +{ + int zkhid; + if (!PyArg_ParseTuple(args, "i", &zkhid)) { + return NULL; + } + CHECK_ZHANDLE(zkhid); + const clientid_t *cid = zoo_client_id(zhandles[zkhid]); + return Py_BuildValue("(L,s)", cid->client_id, cid->passwd); +} + +/* DO NOT USE - context is used internally. This method is not exposed + in the Python module */ +PyObject *pyzoo_get_context(PyObject *self, PyObject *args) +{ + int zkhid; + if (!PyArg_ParseTuple(args, "i", &zkhid)) + return NULL; + CHECK_ZHANDLE(zkhid); + PyObject *context = NULL; + context = (PyObject*)zoo_get_context(zhandles[zkhid]); + if (context) return context; + Py_INCREF(Py_None); + return Py_None; +} + +/* DO NOT USE - context is used internally. This method is not exposed + in the Python module */ +PyObject *pyzoo_set_context(PyObject *self, PyObject *args) +{ + int zkhid; + PyObject *context; + if (!PyArg_ParseTuple(args, "iO", &zkhid, &context)) { + return NULL; + } + CHECK_ZHANDLE(zkhid); + PyObject *py_context = (PyObject*)zoo_get_context(zhandles[zkhid]); + if (py_context != NULL && py_context != Py_None) { + Py_DECREF(py_context); + } + Py_INCREF(context); + zoo_set_context(zhandles[zkhid], (void*)context); + Py_INCREF(Py_None); + return Py_None; +} + + +/* -------------------------------------------------------------------------- */ +/* Miscellaneous methods */ +/* -------------------------------------------------------------------------- */ + +/* Sets the global watcher. Returns None */ +PyObject *pyzoo_set_watcher(PyObject *self, PyObject *args) +{ + int zkhid; + PyObject *watcherfn; + if (!PyArg_ParseTuple(args, "iO", &zkhid, &watcherfn)) { + return NULL; + } + CHECK_ZHANDLE(zkhid); + pywatcher_t *pyw = watchers[zkhid]; + if (pyw != NULL) { + free_pywatcher( pyw ); + } + + // Create a *permanent* watcher object, not deallocated when called + pyw = create_pywatcher(zkhid, watcherfn,1); + if (pyw == NULL) { + return NULL; + } + watchers[zkhid] = pyw; + zoo_set_watcher(zhandles[zkhid], watcher_dispatch); + zoo_set_context(zhandles[zkhid], pyw); + Py_INCREF(Py_None); + return Py_None; +} + +/* Returns an integer code representing the current connection + state */ +PyObject *pyzoo_state(PyObject *self, PyObject *args) +{ + int zkhid; + if (!PyArg_ParseTuple(args,"i",&zkhid)) { + return NULL; + } + CHECK_ZHANDLE(zkhid); + int state = zoo_state(zhandles[zkhid]); + return Py_BuildValue("i",state); +} + + +/* Convert an integer error code into a string */ +PyObject *pyzerror(PyObject *self, PyObject *args) +{ + int rc; + if (!PyArg_ParseTuple(args,"i", &rc)) + return NULL; + return Py_BuildValue("s", zerror(rc)); +} + +/* Returns the integer receive timeout for a connection */ +PyObject *pyzoo_recv_timeout(PyObject *self, PyObject *args) +{ + int zkhid; + if (!PyArg_ParseTuple(args,"i",&zkhid)) + return NULL; + CHECK_ZHANDLE(zkhid); + int recv_timeout = zoo_recv_timeout(zhandles[zkhid]); + return Py_BuildValue("i",recv_timeout); +} + +/* Returns True if connection is unrecoverable, False otherwise */ +PyObject *pyis_unrecoverable(PyObject *self, PyObject *args) +{ + int zkhid; + if (!PyArg_ParseTuple(args,"i",&zkhid)) + return NULL; + CHECK_ZHANDLE(zkhid); + int ret = is_unrecoverable(zhandles[zkhid]); + if (ret == ZINVALIDSTATE) + Py_RETURN_TRUE; + Py_RETURN_FALSE; +} + +/* Set the debug level for logging, returns None */ +PyObject *pyzoo_set_debug_level(PyObject *self, PyObject *args) +{ + int loglevel; + if (!PyArg_ParseTuple(args, "i", &loglevel)) + return NULL; + zoo_set_debug_level((ZooLogLevel)loglevel); + Py_INCREF(Py_None); + return Py_None; +} + +static PyObject *log_stream = NULL; + +/* Set the output file-like object for logging output. Returns Py_None */ +PyObject *pyzoo_set_log_stream(PyObject *self, PyObject *args) +{ + PyObject *pystream = NULL; + if (!PyArg_ParseTuple(args,"O",&pystream)) { + PyErr_SetString(PyExc_ValueError, "Must supply a Python object to set_log_stream"); + return NULL; + } + +#if PY_MAJOR_VERSION >= 3 + extern PyTypeObject PyIOBase_Type; + if (!PyObject_IsInstance(pystream, (PyObject *)&PyIOBase_Type)) { +#else + if(!PyFile_Check(pystream)) { +#endif + + PyErr_SetString(PyExc_ValueError, "Must supply a file object to set_log_stream"); + return NULL; + } + /* Release the previous reference to log_stream that we took */ + if (log_stream != NULL) { + Py_DECREF(log_stream); + } + + log_stream = pystream; + Py_INCREF(log_stream); + +#if PY_MAJOR_VERSION >= 3 + int fd = PyObject_AsFileDescriptor(log_stream); + FILE *fp = fdopen(fd, "w"); +#else + FILE *fp = PyFile_AsFile(log_stream); +#endif + zoo_set_log_stream(fp); + + Py_INCREF(Py_None); + return Py_None; +} + +/* Set the connection order - randomized or in-order. Returns None. */ +PyObject *pyzoo_deterministic_conn_order(PyObject *self, PyObject *args) +{ + int yesOrNo; + if (!PyArg_ParseTuple(args, "i",&yesOrNo)) + return NULL; + zoo_deterministic_conn_order( yesOrNo ); + Py_INCREF(Py_None); + return Py_None; +} + +/* -------------------------------------------------------------------------- */ +/* Module setup */ +/* -------------------------------------------------------------------------- */ + +#include "pyzk_docstrings.h" + +static PyMethodDef ZooKeeperMethods[] = { + {"init", pyzookeeper_init, METH_VARARGS, pyzk_init_doc }, + {"create",pyzoo_create, METH_VARARGS, pyzk_create_doc }, + {"delete",pyzoo_delete, METH_VARARGS, pyzk_delete_doc }, + {"get_children", pyzoo_get_children, METH_VARARGS, pyzk_get_children_doc }, + {"set", pyzoo_set, METH_VARARGS, pyzk_set_doc }, + {"set2", pyzoo_set2, METH_VARARGS, pyzk_set2_doc }, + {"get",pyzoo_get, METH_VARARGS, pyzk_get_doc }, + {"exists",pyzoo_exists, METH_VARARGS, pyzk_exists_doc }, + {"get_acl", pyzoo_get_acl, METH_VARARGS, pyzk_get_acl_doc }, + {"set_acl", pyzoo_set_acl, METH_VARARGS, pyzk_set_acl_doc }, + {"close", pyzoo_close, METH_VARARGS, pyzk_close_doc }, + {"client_id", pyzoo_client_id, METH_VARARGS, pyzk_client_id_doc }, + {"set_watcher", pyzoo_set_watcher, METH_VARARGS }, + {"state", pyzoo_state, METH_VARARGS, pyzk_state_doc }, + {"recv_timeout",pyzoo_recv_timeout, METH_VARARGS }, + {"is_unrecoverable",pyis_unrecoverable, METH_VARARGS, pyzk_is_unrecoverable_doc }, + {"set_debug_level",pyzoo_set_debug_level, METH_VARARGS, pyzk_set_debug_level_doc }, + {"set_log_stream",pyzoo_set_log_stream, METH_VARARGS, pyzk_set_log_stream_doc }, + {"deterministic_conn_order",pyzoo_deterministic_conn_order, METH_VARARGS, pyzk_deterministic_conn_order_doc }, + {"acreate", pyzoo_acreate, METH_VARARGS, pyzk_acreate_doc }, + {"adelete", pyzoo_adelete, METH_VARARGS,pyzk_adelete_doc }, + {"aexists", pyzoo_aexists, METH_VARARGS,pyzk_aexists_doc }, + {"aget", pyzoo_aget, METH_VARARGS, pyzk_aget_doc }, + {"aset", pyzoo_aset, METH_VARARGS, pyzk_aset_doc }, + {"aget_children", pyzoo_aget_children, METH_VARARGS, pyzk_aget_children_doc }, + {"async", pyzoo_async, METH_VARARGS, pyzk_async_doc }, + {"aget_acl", pyzoo_aget_acl, METH_VARARGS, pyzk_aget_acl_doc }, + {"aset_acl", pyzoo_aset_acl, METH_VARARGS, pyzk_aset_acl_doc }, + {"zerror", pyzerror, METH_VARARGS, pyzk_zerror_doc }, + {"add_auth", pyzoo_add_auth, METH_VARARGS, pyzk_add_auth_doc }, + /* DO NOT USE get / set_context. Context is used internally to pass + the python watcher to a dispatch function. If you want context, set + it through set_watcher. */ + // {"get_context", pyzoo_get_context, METH_VARARGS, "" }, + // {"set_context", pyzoo_set_context, METH_VARARGS, "" }, + {NULL, NULL} +}; + +#if PY_MAJOR_VERSION >= 3 +static struct PyModuleDef zookeeper_moddef = { + PyModuleDef_HEAD_INIT, + "zookeeper", + NULL, + 0, + ZooKeeperMethods, + 0, + 0, + 0, + 0 +}; +#endif + +#define ADD_INTCONSTANT(x) PyModule_AddIntConstant(module, #x, ZOO_##x) +#define ADD_INTCONSTANTZ(x) PyModule_AddIntConstant(module, #x, Z##x) + +#define ADD_EXCEPTION(x) x = PyErr_NewException("zookeeper."#x, ZooKeeperException, NULL); \ + Py_INCREF(x); \ + PyModule_AddObject(module, #x, x); + +#if PY_MAJOR_VERSION >= 3 +PyMODINIT_FUNC PyInit_zookeeper(void) { +#else +PyMODINIT_FUNC initzookeeper(void) { +#endif + PyEval_InitThreads(); + +#if PY_MAJOR_VERSION >= 3 + PyObject *module = PyModule_Create(&zookeeper_moddef); +#else + PyObject *module = Py_InitModule("zookeeper", ZooKeeperMethods); +#endif + if (init_zhandles(32) == 0) { + return; // TODO: Is there any way to raise an exception here? + } + + ZooKeeperException = PyErr_NewException("zookeeper.ZooKeeperException", + PyExc_Exception, + NULL); + + PyModule_AddObject(module, "ZooKeeperException", ZooKeeperException); + Py_INCREF(ZooKeeperException); + + int size = 10; + char version_str[size]; + snprintf(version_str, size, "%i.%i.%i", ZOO_MAJOR_VERSION, ZOO_MINOR_VERSION, ZOO_PATCH_VERSION); + + PyModule_AddStringConstant(module, "__version__", version_str); + + ADD_INTCONSTANT(PERM_READ); + ADD_INTCONSTANT(PERM_WRITE); + ADD_INTCONSTANT(PERM_CREATE); + ADD_INTCONSTANT(PERM_DELETE); + ADD_INTCONSTANT(PERM_ALL); + ADD_INTCONSTANT(PERM_ADMIN); + + ADD_INTCONSTANT(EPHEMERAL); + ADD_INTCONSTANT(SEQUENCE); + + ADD_INTCONSTANT(EXPIRED_SESSION_STATE); + ADD_INTCONSTANT(AUTH_FAILED_STATE); + ADD_INTCONSTANT(CONNECTING_STATE); + ADD_INTCONSTANT(ASSOCIATING_STATE); + ADD_INTCONSTANT(CONNECTED_STATE); + + ADD_INTCONSTANT(CREATED_EVENT); + ADD_INTCONSTANT(DELETED_EVENT); + ADD_INTCONSTANT(CHANGED_EVENT); + ADD_INTCONSTANT(CHILD_EVENT); + ADD_INTCONSTANT(SESSION_EVENT); + ADD_INTCONSTANT(NOTWATCHING_EVENT); + + ADD_INTCONSTANT(LOG_LEVEL_ERROR); + ADD_INTCONSTANT(LOG_LEVEL_WARN); + ADD_INTCONSTANT(LOG_LEVEL_INFO); + ADD_INTCONSTANT(LOG_LEVEL_DEBUG); + + ADD_INTCONSTANTZ(SYSTEMERROR); + ADD_INTCONSTANTZ(RUNTIMEINCONSISTENCY); + ADD_INTCONSTANTZ(DATAINCONSISTENCY); + ADD_INTCONSTANTZ(CONNECTIONLOSS); + ADD_INTCONSTANTZ(MARSHALLINGERROR); + ADD_INTCONSTANTZ(UNIMPLEMENTED); + ADD_INTCONSTANTZ(OPERATIONTIMEOUT); + ADD_INTCONSTANTZ(BADARGUMENTS); + ADD_INTCONSTANTZ(INVALIDSTATE); + + ADD_EXCEPTION(SystemErrorException); + ADD_EXCEPTION(RuntimeInconsistencyException); + ADD_EXCEPTION(DataInconsistencyException); + ADD_EXCEPTION(ConnectionLossException); + ADD_EXCEPTION(MarshallingErrorException); + ADD_EXCEPTION(UnimplementedException); + ADD_EXCEPTION(OperationTimeoutException); + ADD_EXCEPTION(BadArgumentsException); + ADD_EXCEPTION(InvalidStateException); + + ADD_INTCONSTANTZ(OK); + ADD_INTCONSTANTZ(APIERROR); + ADD_INTCONSTANTZ(NONODE); + ADD_INTCONSTANTZ(NOAUTH); + ADD_INTCONSTANTZ(BADVERSION); + ADD_INTCONSTANTZ(NOCHILDRENFOREPHEMERALS); + ADD_INTCONSTANTZ(NODEEXISTS); + ADD_INTCONSTANTZ(NOTEMPTY); + ADD_INTCONSTANTZ(SESSIONEXPIRED); + ADD_INTCONSTANTZ(INVALIDCALLBACK); + ADD_INTCONSTANTZ(INVALIDACL); + ADD_INTCONSTANTZ(AUTHFAILED); + ADD_INTCONSTANTZ(CLOSING); + ADD_INTCONSTANTZ(NOTHING); + ADD_INTCONSTANTZ(SESSIONMOVED); + + ADD_EXCEPTION(ApiErrorException); + ADD_EXCEPTION(NoNodeException); + ADD_EXCEPTION(NoAuthException); + ADD_EXCEPTION(BadVersionException); + ADD_EXCEPTION(NoChildrenForEphemeralsException); + ADD_EXCEPTION(NodeExistsException); + ADD_EXCEPTION(NotEmptyException); + ADD_EXCEPTION(SessionExpiredException); + ADD_EXCEPTION(InvalidCallbackException); + ADD_EXCEPTION(InvalidACLException); + ADD_EXCEPTION(AuthFailedException); + ADD_EXCEPTION(ClosingException); + ADD_EXCEPTION(NothingException); + ADD_EXCEPTION(SessionMovedException); + +#if PY_MAJOR_VERSION >= 3 + return module; +#endif +} diff --git a/src/contrib/zkpython/src/examples/README b/src/contrib/zkpython/src/examples/README new file mode 100644 index 0000000..3c53454 --- /dev/null +++ b/src/contrib/zkpython/src/examples/README @@ -0,0 +1,8 @@ + +This folder contains sample showing how you can use ZooKeeper from Python. + +You should also check the following projects: + +* http://github.com/phunt/zk-smoketest +* http://github.com/henryr/pyzk-recipes + diff --git a/src/contrib/zkpython/src/examples/watch_znode_for_changes.py b/src/contrib/zkpython/src/examples/watch_znode_for_changes.py new file mode 100644 index 0000000..07100f0 --- /dev/null +++ b/src/contrib/zkpython/src/examples/watch_znode_for_changes.py @@ -0,0 +1,202 @@ +#!/usr/bin/env python2.6 +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" ZNode Change Watcher Skeleton Script + +This script shows you how to write a python program that watches a specific +znode for changes and reacts to them. + +Steps to understand how this script works: + +1. start a standalone ZooKeeper server (by default it listens on localhost:2181) + +Did you know you can deploy "local clusters" by using zkconf[1]? +[1] http://github.com/phunt/zkconf + +2. enter the command line console + +3. create the test node: + [zk: (CONNECTED) 1] create /watch-test dummy-data + Created /watch-test + +4. in another shell start this script in verbose mode + $ python watch_znode_for_changes.py -v + + # you should see a lot of log messages. have a look over them because + # you can easily understand how zookeeper works + +5. update the node data: + + [zk: (CONNECTED) 2] set /watch-test new-data + cZxid = 0xa0000001a + ctime = Fri Jul 09 19:14:45 EEST 2010 + mZxid = 0xa0000001e + mtime = Fri Jul 09 19:18:18 EEST 2010 + pZxid = 0xa0000001a + cversion = 0 + dataVersion = 1 + aclVersion = 0 + ephemeralOwner = 0x0 + dataLength = 8 + numChildren = 0 + + ... and you should see similar log messages: + + 2010-07-09 19:18:18,537:11542(0xb6ea5b70):ZOO_DEBUG@process_completions@1765: Calling a watcher for node [/watch-test], type = -1 event=ZOO_CHANGED_EVENT + 2010-07-09 19:18:18,537 watch_znode_for_changes.py:83 - Running watcher: zh=0 event=3 state=3 path=/watch-test + 2010-07-09 19:18:18,537:11542(0xb6ea5b70):ZOO_DEBUG@zoo_awget@2400: Sending request xid=0x4c374b33 for path [/watch-test] to 127.0.0.1:2181 + 2010-07-09 19:18:18,545:11542(0xb76a6b70):ZOO_DEBUG@zookeeper_process@1980: Queueing asynchronous response + 2010-07-09 19:18:18,545:11542(0xb6ea5b70):ZOO_DEBUG@process_completions@1772: Calling COMPLETION_DATA for xid=0x4c374b33 rc=0 + 2010-07-09 19:18:18,545 watch_znode_for_changes.py:54 - This is where your application does work. + + You can repeat this step multiple times. + +6. that's all. in the end you can delete the node and you should see a ZOO_DELETED_EVENT + +""" + +import logging +import logging.handlers +import signal +import sys +import time +import threading +import zookeeper + +from optparse import OptionParser + +logger = logging.getLogger() + +class MyClass(threading.Thread): + znode = '/watch-test' + + def __init__(self, options, args): + threading.Thread.__init__(self) + + logger.debug('Initializing MyClass thread.') + if options.verbose: + zookeeper.set_debug_level(zookeeper.LOG_LEVEL_DEBUG) + + self.zh = zookeeper.init(options.servers) + if zookeeper.OK != zookeeper.aget(self.zh, self.znode, + self.watcher, self.handler): + logger.critical('Unable to get znode! Exiting.') + sys.exit(1) + + def __del__(self): + zookeeper.close(self.zh) + + def aget(self): + return zookeeper.aget(self.zh, self.znode, self.watcher, self.handler) + + def handler(self, zh, rc, data, stat): + """Handle zookeeper.aget() responses. + + This code handles the zookeeper.aget callback. It does not handle watches. + + Numeric arguments map to constants. See ``DATA`` in ``help(zookeeper)`` + for more information. + + Args: + zh Zookeeper handle that made this request. + rc Return code. + data Data stored in the znode. + + Does not provide a return value. + """ + if zookeeper.OK == rc: + logger.debug('This is where your application does work.') + else: + if zookeeper.NONODE == rc: + # avoid sending too many requests if the node does not yet exists + logger.info('Node not found. Trying again to set the watch.') + time.sleep(1) + + if zookeeper.OK != self.aget(): + logger.critical('Unable to get znode! Exiting.') + sys.exit(1) + + def watcher(self, zh, event, state, path): + """Handle zookeeper.aget() watches. + + This code is called when a znode changes and triggers a data watch. + It is not called to handle the zookeeper.aget call itself. + + Numeric arguments map to constants. See ``DATA`` in ``help(zookeeper)`` + for more information. + + Args: + zh Zookeeper handle that set this watch. + event Event that caused the watch (often called ``type`` elsewhere). + state Connection state. + path Znode that triggered this watch. + + Does not provide a return value. + """ + out = ['Running watcher:', + 'zh=%d' % zh, + 'event=%d' % event, + 'state=%d' % state, + 'path=%s' % path] + logger.debug(' '.join(out)) + if event == zookeeper.CHANGED_EVENT and \ + state == zookeeper.CONNECTED_STATE and \ + self.znode == path: + if zookeeper.OK != self.aget(): + logger.critical('Unable to get znode! Exiting.') + sys.exit(1) + + def run(self): + while True: + time.sleep(86400) + + +def main(argv=None): + # Allow Ctrl-C + signal.signal(signal.SIGINT, signal.SIG_DFL) + + parser = OptionParser() + parser.add_option('-v', '--verbose', + dest='verbose', + default=False, + action='store_true', + help='Verbose logging. (default: %default)') + parser.add_option('-s', '--servers', + dest='servers', + default='localhost:2181', + help='Comma-separated list of host:port pairs. (default: %default)') + + (options, args) = parser.parse_args() + + if options.verbose: + logger.setLevel(logging.DEBUG) + else: + logger.setLevel(logging.INFO) + + formatter = logging.Formatter("%(asctime)s %(filename)s:%(lineno)d - %(message)s") + stream_handler = logging.StreamHandler() + stream_handler.setFormatter(formatter) + logger.addHandler(stream_handler) + + logger.info('Starting Zookeeper python example: %s' % ' '.join(sys.argv)) + + mc = MyClass(options, args) + mc.start() + mc.join() + + +if __name__ == '__main__': + main() diff --git a/src/contrib/zkpython/src/packages/deb/zkpython.control/control b/src/contrib/zkpython/src/packages/deb/zkpython.control/control new file mode 100644 index 0000000..6ec76d0 --- /dev/null +++ b/src/contrib/zkpython/src/packages/deb/zkpython.control/control @@ -0,0 +1,23 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +Package: zkpython +Version: @version@ +Section: misc +Priority: optional +Architecture: all +Depends: python +Maintainer: Apache Software Foundation +Description: ZooKeeper python binding library +Distribution: development diff --git a/src/contrib/zkpython/src/packages/rpm/spec/zkpython.spec b/src/contrib/zkpython/src/packages/rpm/spec/zkpython.spec new file mode 100644 index 0000000..d1f9814 --- /dev/null +++ b/src/contrib/zkpython/src/packages/rpm/spec/zkpython.spec @@ -0,0 +1,81 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# +# RPM Spec file for ZooKeeper version @version@ +# + +%define name zkpython +%define version @version@ +%define release @package.release@ + +# Installation Locations +%define _prefix @package.prefix@ + +# Build time settings +%define _build_dir @package.build.dir@ +%define _final_name @final.name@ +%define _python_lib @python.lib@ +%define debug_package %{nil} + +# Disable brp-java-repack-jars for aspect J +%define __os_install_post \ + /usr/lib/rpm/redhat/brp-compress \ + %{!?__debug_package:/usr/lib/rpm/redhat/brp-strip %{__strip}} \ + /usr/lib/rpm/redhat/brp-strip-static-archive %{__strip} \ + /usr/lib/rpm/redhat/brp-strip-comment-note %{__strip} %{__objdump} \ + /usr/lib/rpm/brp-python-bytecompile %{nil} + +# RPM searches perl files for dependancies and this breaks for non packaged perl lib +# like thrift so disable this +%define _use_internal_dependency_generator 0 + +Summary: ZooKeeper python binding library +Group: Development/Libraries +License: Apache License, Version 2.0 +URL: http://zookeeper.apache.org/ +Vendor: Apache Software Foundation +Name: %{name} +Version: %{version} +Release: %{release} +Source0: %{_python_lib} +Prefix: %{_prefix} +Requires: zookeeper-lib == %{version} +AutoReqProv: no +Provides: zkpython + +%description +ZooKeeper python binding library + +%prep +tar fxz %{_python_lib} -C %{_build_dir} + +%build + +######################### +#### INSTALL SECTION #### +######################### +%install + +%pre + +%post + +%preun + +%files +%defattr(-,root,root) +%{_prefix} + diff --git a/src/contrib/zkpython/src/python/setup.py b/src/contrib/zkpython/src/python/setup.py new file mode 100644 index 0000000..c6a1cee --- /dev/null +++ b/src/contrib/zkpython/src/python/setup.py @@ -0,0 +1,36 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from distutils.core import setup, Extension + +zookeeper_basedir = "../../../" + +zookeepermodule = Extension("zookeeper", + sources=["src/c/zookeeper.c"], + include_dirs=[zookeeper_basedir + "/src/c/include", + zookeeper_basedir + "/build/c", + zookeeper_basedir + "/src/c/generated"], + libraries=["zookeeper_mt"], + library_dirs=[zookeeper_basedir + "/src/c/.libs/", + zookeeper_basedir + "/build/c/.libs/", + zookeeper_basedir + "/build/test/test-cppunit/.libs", + "/usr/local/lib" + ]) + +setup( name="ZooKeeper", + version = "0.4", + description = "ZooKeeper Python bindings", + ext_modules=[zookeepermodule] ) diff --git a/src/contrib/zkpython/src/python/zk.py b/src/contrib/zkpython/src/python/zk.py new file mode 100644 index 0000000..24986e3 --- /dev/null +++ b/src/contrib/zkpython/src/python/zk.py @@ -0,0 +1,76 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import zookeeper, time, threading + +f = open("out.log","w") +zookeeper.set_log_stream(f) + +connected = False +conn_cv = threading.Condition( ) + +def my_connection_watcher(handle,type,state,path): + global connected, conn_cv + print("Connected, handle is ", handle) + conn_cv.acquire() + connected = True + conn_cv.notifyAll() + conn_cv.release() + +conn_cv.acquire() +print("Connecting to localhost:2181 -- ") +handle = zookeeper.init("localhost:2181", my_connection_watcher, 10000, 0) +while not connected: + conn_cv.wait() +conn_cv.release() + +def my_getc_watch( handle, type, state, path ): + print("Watch fired -- ") + print(type, state, path) + +ZOO_OPEN_ACL_UNSAFE = {"perms":0x1f, "scheme":"world", "id" :"anyone"}; + +try: + zookeeper.create(handle, "/zk-python", "data", [ZOO_OPEN_ACL_UNSAFE], 0) + zookeeper.get_children(handle, "/zk-python", my_getc_watch) + for i in xrange(5): + print("Creating sequence node ", i, " ", zookeeper.create(handle, "/zk-python/sequencenode", "data", [ZOO_OPEN_ACL_UNSAFE], zookeeper.SEQUENCE )) +except: + pass + +def pp_zk(handle,root, indent = 0): + """Pretty print(a zookeeper tree, starting at root)""" + def make_path(child): + if root == "/": + return "/" + child + return root + "/" + child + children = zookeeper.get_children(handle, root, None) + out = "" + for i in xrange(indent): + out += "\t" + out += "|---"+root + " :: " + zookeeper.get(handle, root, None)[0] + print(out) + for child in children: + pp_zk(handle,make_path(child),indent+1) + +print("ZNode tree -- ") +pp_zk(handle,"/") + +print("Getting ACL / Stat for /zk-python --") +(stat, acl) = zookeeper.get_acl(handle, "/zk-python") +print("Stat:: ", stat) +print("Acl:: ", acl) + diff --git a/src/contrib/zkpython/src/test/acl_test.py b/src/contrib/zkpython/src/test/acl_test.py new file mode 100644 index 0000000..1289c8a --- /dev/null +++ b/src/contrib/zkpython/src/test/acl_test.py @@ -0,0 +1,109 @@ +#!/usr/bin/python +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import zookeeper, zktestbase, unittest, threading + +ZOO_OPEN_ACL_UNSAFE = {"perms":zookeeper.PERM_ALL, "scheme":"world", "id" :"anyone"} +ZOO_ACL_READ = {"perms":zookeeper.PERM_READ, "scheme": "world", + "id":"anyone"} +class ACLTest(zktestbase.TestBase): + """Test whether basic ACL setting and getting work correctly""" + # to do: startup and teardown via scripts? + def setUp(self): + zktestbase.TestBase.setUp(self) + try: + zookeeper.delete(self.handle, "/zk-python-acltest") + zookeeper.delete(self.handle, "/zk-python-aacltest") + except: + pass + + def test_sync_acl(self): + self.assertEqual(self.connected, True) + ret = zookeeper.create(self.handle, "/zk-python-acltest", "nodecontents", [ZOO_OPEN_ACL_UNSAFE], zookeeper.EPHEMERAL) + acls = zookeeper.get_acl(self.handle, "/zk-python-acltest") + self.assertEqual(acls[1], [ZOO_OPEN_ACL_UNSAFE]) + self.assertRaises(zookeeper.InvalidACLException,zookeeper.set_acl,self.handle, "/zk-python-acltest", -1, ZOO_ACL_READ) + zookeeper.set_acl(self.handle, "/zk-python-acltest", -1, [ZOO_ACL_READ]) + acls = zookeeper.get_acl(self.handle, "/zk-python-acltest") + self.assertEqual(acls[1], [ZOO_ACL_READ]) + + + def test_async_acl(self): + self.cv = threading.Condition() + self.cv = threading.Condition() + def aget_callback(handle, rc, acl, stat): + self.cv.acquire() + self.callback_flag = True + self.rc = rc + self.acl = acl + self.stat = stat + self.cv.notify() + self.cv.release() + + def aset_callback(handle, rc): + self.cv.acquire() + self.callback_flag = True + self.rc = rc + self.cv.notify() + self.cv.release() + + self.assertEqual(self.connected, True, "Not connected!") + ret = zookeeper.create(self.handle, "/zk-python-aacltest", "nodecontents", [ZOO_OPEN_ACL_UNSAFE], zookeeper.EPHEMERAL) + + self.cv.acquire() + zookeeper.aget_acl(self.handle, "/zk-python-aacltest", aget_callback) + self.cv.wait(15) + self.cv.release() + + self.assertEqual(self.callback_flag, True, "aget_acl timed out") + self.assertEqual(self.rc, zookeeper.OK, "aget failed") + self.assertEqual(self.acl, [ZOO_OPEN_ACL_UNSAFE], "Wrong ACL returned from aget") + + self.cv.acquire() + self.callback_flag = False + zookeeper.aset_acl(self.handle, "/zk-python-aacltest", -1, [ZOO_ACL_READ], aset_callback) + self.cv.wait(15) + self.cv.release() + + self.assertEqual(self.callback_flag, True, "aset_acl timed out") + self.assertEqual(self.rc, zookeeper.OK, "aset failed") + acls = zookeeper.get_acl(self.handle, "/zk-python-aacltest") + self.assertEqual(acls[1], [ZOO_ACL_READ], "Wrong ACL returned from get when aset") + + def test_invalid_acl(self): + self.assertRaises(zookeeper.InvalidACLException, + zookeeper.create, + self.handle, + "/zk-python-aclverifytest", + "", + None, + zookeeper.EPHEMERAL) + + def test_invalid_acl2(self): + """Verify all required keys are present in the ACL.""" + invalid_acl = [{"schema": "digest", "id": "zebra"}] + self.assertRaises(zookeeper.InvalidACLException, + zookeeper.create, + self.handle, + "/zk-python-aclverifytest", + "", + invalid_acl, + zookeeper.EPHEMERAL) + +if __name__ == '__main__': + unittest.main() diff --git a/src/contrib/zkpython/src/test/async_test.py b/src/contrib/zkpython/src/test/async_test.py new file mode 100644 index 0000000..e813435 --- /dev/null +++ b/src/contrib/zkpython/src/test/async_test.py @@ -0,0 +1,33 @@ +#!/usr/bin/python +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import zookeeper, zktestbase, unittest, threading + +class AsyncTest(zktestbase.TestBase): + """Test whether async works""" + # to do: startup and teardown via scripts? + def setUp( self ): + zktestbase.TestBase.setUp(self) + + def test_async(self): + self.assertEqual(self.connected, True) + ret = zookeeper.async(self.handle, "/") + self.assertEqual(ret, zookeeper.OK, "async failed") + +if __name__ == '__main__': + unittest.main() diff --git a/src/contrib/zkpython/src/test/callback_test.py b/src/contrib/zkpython/src/test/callback_test.py new file mode 100644 index 0000000..55d7fe1 --- /dev/null +++ b/src/contrib/zkpython/src/test/callback_test.py @@ -0,0 +1,155 @@ +#!/usr/bin/python +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import zookeeper, zktestbase, unittest, threading, gc + +ZOO_OPEN_ACL_UNSAFE = {"perms":0x1f, "scheme":"world", "id" :"anyone"} + +class CallbackTest(zktestbase.TestBase): + """ + Test whether callbacks (watchers/completions) are correctly invoked + """ + # to do: startup and teardown via scripts? + def setUp(self): + zktestbase.TestBase.setUp(self) + self.cv = threading.Condition() + + def create_callback(self, callback): + """ + Returns a callable which signals cv and then calls callback + """ + def wrapper(*args, **kwargs): + self.cv.acquire() + callback(*args, **kwargs) + self.cv.notify() + self.cv.release() + return wrapper + + def test_none_callback(self): + """ + Test that no errors are raised when None is passed as a callback. + """ + self.ensureCreated("/zk-python-none-callback-test","test") + # To do this we need to issue two operations, waiting on the second + # to ensure that the first completes + zookeeper.get(self.handle, "/zk-python-none-callback-test", None) + (d,s) = zookeeper.get(self.handle, "/zk-python-none-callback-test") + self.assertEqual(d, "test") + + def callback_harness(self, trigger, test): + self.callback_flag = False + self.cv.acquire() + trigger() + self.cv.wait(15) + test() + + def test_dispatch_types(self): + """ + Test all the various dispatch mechanisms internal to the module. + """ + def dispatch_callback(*args, **kwargs): + self.callback_flag = True + self.ensureCreated("/zk-python-dispatch-test") + self.callback_harness( lambda: zookeeper.adelete(self.handle, + "/zk-python-dispatch-test", + -1, + self.create_callback(dispatch_callback)), + lambda: self.assertEqual(True, self.callback_flag, "Void dispatch not fired")) + + + self.ensureCreated("/zk-python-dispatch-test") + self.callback_harness( lambda: zookeeper.aexists(self.handle, + "/zk-python-dispatch-test", + None, + self.create_callback(dispatch_callback)), + lambda: self.assertEqual(True, self.callback_flag, "Stat dispatch not fired")) + + self.callback_harness( lambda: zookeeper.aget(self.handle, + "/zk-python-dispatch-test", + None, + self.create_callback(dispatch_callback)), + lambda: self.assertEqual(True, self.callback_flag, "Data dispatch not fired")) + + self.callback_harness( lambda: zookeeper.aget_children(self.handle, + "/", + None, + self.create_callback( dispatch_callback )), + lambda: self.assertEqual(True, self.callback_flag, "Strings dispatch not fired")) + + self.callback_harness( lambda: zookeeper.async(self.handle, + "/", + self.create_callback( dispatch_callback )), + lambda: self.assertEqual(True, self.callback_flag, "String dispatch not fired")) + + self.callback_harness( lambda: zookeeper.aget_acl(self.handle, + "/", + self.create_callback( dispatch_callback )), + lambda: self.assertEqual(True, self.callback_flag, "ACL dispatch not fired")) + + def test_multiple_watchers(self): + """ + Test whether multiple watchers are correctly called + """ + cv1, cv2 = threading.Condition(), threading.Condition() + def watcher1(*args, **kwargs): + cv1.acquire() + self.watcher1 = True + cv1.notify() + cv1.release() + + def watcher2(*args, **kwargs): + cv2.acquire() + self.watcher2 = True + cv2.notify() + cv2.release() + + nodename = "/zk-python-multiple-watcher-test" + self.ensureCreated(nodename, "test") + cv1.acquire() + cv2.acquire() + zookeeper.get(self.handle, nodename, watcher1) + zookeeper.get(self.handle, nodename, watcher2) + zookeeper.set(self.handle, nodename, "test") + cv1.wait(15) + cv2.wait(15) + self.assertTrue(self.watcher1 and self.watcher2, "One or more watchers failed to fire") + + def test_lose_scope(self): + """ + The idea is to test that the reference counting doesn't + fail when we retain no references outside of the module + """ + self.ensureDeleted("/zk-python-lose-scope-test") + self.ensureCreated("/zk-python-lose-scope-test") + def set_watcher(): + def fn(): self.callback_flag = True + self.callback_flag = False + zookeeper.exists(self.handle, "/zk-python-lose-scope-test", + self.create_callback( lambda handle, type, state, path: fn() ) + ) + + set_watcher() + gc.collect() + self.cv.acquire() + zookeeper.set(self.handle, "/zk-python-lose-scope-test", "test") + self.cv.wait(15) + self.assertEqual(self.callback_flag, True) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/contrib/zkpython/src/test/clientid_test.py b/src/contrib/zkpython/src/test/clientid_test.py new file mode 100644 index 0000000..90c8f0a --- /dev/null +++ b/src/contrib/zkpython/src/test/clientid_test.py @@ -0,0 +1,48 @@ +#!/usr/bin/python +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import unittest, threading + +import zookeeper, zktestbase + +class ClientidTest(zktestbase.TestBase): + """Test whether clientids work""" + def setUp(self): + pass + + def testclientid(self): + cv = threading.Condition() + self.connected = False + def connection_watcher(handle, type, state, path): + cv.acquire() + self.connected = True + cv.notify() + cv.release() + + cv.acquire() + self.handle = zookeeper.init(self.host, connection_watcher,10000,(123456,"mypassword")) + self.assertEqual(self.handle, zookeeper.OK) + cv.wait(15.0) + cv.release() + self.assertEqual(self.connected, True, "Connection timed out to " + self.host) + (cid,passwd) = zookeeper.client_id(self.handle) + self.assertEqual(cid,123456) + self.assertEqual(passwd,"mypassword") + +if __name__ == '__main__': + unittest.main() diff --git a/src/contrib/zkpython/src/test/close_deadlock_test.py b/src/contrib/zkpython/src/test/close_deadlock_test.py new file mode 100644 index 0000000..921d2cc --- /dev/null +++ b/src/contrib/zkpython/src/test/close_deadlock_test.py @@ -0,0 +1,50 @@ +#!/usr/bin/python +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import zookeeper, zktestbase, unittest, threading +import time + + +class CloseDeadlockTest(zktestbase.TestBase): + """ + This tests for the issue found in + https://issues.apache.org/jira/browse/ZOOKEEPER-763 + + zookeeper.close blocks on waiting for all completions to + finish. Previously it was doing so while holding teh GIL, stopping + any completions from actually continuing. + + This test is a failure if it does not exit within a few seconds. + """ + def deadlock(): + cv = threading.Condition() + + def callback(*args): + cv.acquire() + cv.notifyAll() + cv.release() + time.sleep(1) + + cv.acquire() + zookeeper.aget(handle, "/", None, callback) + cv.wait() + zookeeper.close(handle) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/contrib/zkpython/src/test/connection_test.py b/src/contrib/zkpython/src/test/connection_test.py new file mode 100644 index 0000000..3913fe3 --- /dev/null +++ b/src/contrib/zkpython/src/test/connection_test.py @@ -0,0 +1,131 @@ +#!/usr/bin/python +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import unittest, threading, re, sys +if sys.version_info < (3,): + range = xrange + +import zookeeper, zktestbase +ZOO_OPEN_ACL_UNSAFE = {"perms":0x1f, "scheme":"world", "id" :"anyone"} + +class ConnectionTest(zktestbase.TestBase): + """Test whether we can make a connection""" + def setUp(self): + pass + + def testconnection(self): + cv = threading.Condition() + self.connected = False + def connection_watcher(handle, type, state, path): + cv.acquire() + self.connected = True + self.assertEqual(zookeeper.CONNECTED_STATE, state) + self.handle = handle + cv.notify() + cv.release() + + cv.acquire() + ret = zookeeper.init(self.host, connection_watcher) + cv.wait(15.0) + cv.release() + self.assertEqual(self.connected, True, "Connection timed out to " + self.host) + self.assertEqual(zookeeper.CONNECTED_STATE, zookeeper.state(self.handle)) + + self.assertEqual(zookeeper.close(self.handle), zookeeper.OK) + # Trying to close the same handle twice is an error, and the C library will segfault on it + # so make sure this is caught at the Python module layer + self.assertRaises(zookeeper.ZooKeeperException, + zookeeper.close, + self.handle) + + self.assertRaises(zookeeper.ZooKeeperException, + zookeeper.get, + self.handle, + "/") + + def testhandlereuse(self): + """ + Test a) multiple concurrent connections b) reuse of closed handles + """ + cv = threading.Condition() + self.connected = False + def connection_watcher(handle, type, state, path): + cv.acquire() + self.connected = True + self.assertEqual(zookeeper.CONNECTED_STATE, state) + self.handle = handle + cv.notify() + cv.release() + + cv.acquire() + handles = [ zookeeper.init(self.host) for i in range(10) ] + ret = zookeeper.init(self.host, connection_watcher) + cv.wait(15.0) + cv.release() + self.assertEqual(self.connected, True, "Connection timed out to " + self.host) + self.assertEqual(True, self.all( [ zookeeper.state(handle) == zookeeper.CONNECTED_STATE for handle in handles ] ), + "Not all connections succeeded") + oldhandle = handles[3] + zookeeper.close(oldhandle) + newhandle = zookeeper.init(self.host) + + # This assertion tests *internal* behaviour; i.e. that the module + # correctly reuses closed handles. This is therefore implementation + # dependent. + self.assertEqual(newhandle, oldhandle, "Didn't get reused handle") + + def testmanyhandles(self): + """ + Test the ability of the module to support many handles. + """ + # We'd like to do more, but currently the C client doesn't + # work with > 83 handles (fails to create a pipe) on MacOS 10.5.8 + handles = [ zookeeper.init(self.host) for i in range(9) ] + + cv = threading.Condition() + self.connected = False + def connection_watcher(handle, type, state, path): + cv.acquire() + self.connected = True + self.assertEqual(zookeeper.CONNECTED_STATE, state) + self.handle = handle + cv.notify() + cv.release() + + cv.acquire() + ret = zookeeper.init(self.host, connection_watcher) + cv.wait(15.0) + cv.release() + self.assertEqual(self.connected, True, "Connection timed out to " + self.host) + + for i,h in enumerate(handles): + path = "/zkpython-test-handles-%s" % str(i) + self.assertEqual(path, zookeeper.create(h, path, "", [ZOO_OPEN_ACL_UNSAFE], zookeeper.EPHEMERAL)) + + self.assertEqual(True, self.all( zookeeper.close(h) == zookeeper.OK for h in handles )) + + def testversionstringexists(self): + self.assertTrue(hasattr(zookeeper, '__version__')) + self.assertTrue(re.match("\d.\d.\d", zookeeper.__version__)) + + + def tearDown(self): + pass + +if __name__ == '__main__': + unittest.main() diff --git a/src/contrib/zkpython/src/test/create_test.py b/src/contrib/zkpython/src/test/create_test.py new file mode 100644 index 0000000..8ab80f9 --- /dev/null +++ b/src/contrib/zkpython/src/test/create_test.py @@ -0,0 +1,104 @@ +#!/usr/bin/python +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import zookeeper, zktestbase, unittest, threading + +ZOO_OPEN_ACL_UNSAFE = {"perms":0x1f, "scheme":"world", "id" :"anyone"} + +class CreationTest(zktestbase.TestBase): + """Test whether we can create znodes""" + # to do: startup and teardown via scripts? + def setUp(self): + zktestbase.TestBase.setUp(self) + try: + zookeeper.delete(self.handle, "/zk-python-createtest") + zookeeper.delete(self.handle, "/zk-python-acreatetest") + except: + pass + + def test_sync_create(self): + self.assertEqual(self.connected, True) + ret = zookeeper.create(self.handle, "/zk-python-createtest", "nodecontents", [ZOO_OPEN_ACL_UNSAFE], zookeeper.EPHEMERAL) + self.assertEqual(ret, "/zk-python-createtest") + self.assertRaises(zookeeper.NoChildrenForEphemeralsException, + zookeeper.create, + self.handle, + "/zk-python-createtest/invalid-child", + "", + [ZOO_OPEN_ACL_UNSAFE], + zookeeper.EPHEMERAL) + + def test_sync_create_existing(self): + self.assertEqual(self.connected, True) + ret = zookeeper.create(self.handle, "/zk-python-createtest-existing", "nodecontents", [ZOO_OPEN_ACL_UNSAFE], zookeeper.EPHEMERAL) + self.assertEqual(ret, "/zk-python-createtest-existing") + + self.assertRaises(zookeeper.NodeExistsException, + zookeeper.create, + self.handle, + "/zk-python-createtest-existing", + "nodecontents", + [ZOO_OPEN_ACL_UNSAFE], + zookeeper.EPHEMERAL) + + + def test_exception_paths(self): + """ + Make sure common exceptions due to API misuse are correctly propogated + """ + self.assertRaises(zookeeper.BadArgumentsException, + zookeeper.create, + self.handle, + "/zk-python-badargs-test", + "", + [ZOO_OPEN_ACL_UNSAFE], + -1) + self.assertRaises(zookeeper.InvalidACLException, + zookeeper.create, + self.handle, + "/zk-python-invalidacl-test", + "", + ZOO_OPEN_ACL_UNSAFE) # Error - not a list + + + def test_async_create(self): + self.cv = threading.Condition() + def callback(handle, rc, value): + self.cv.acquire() + self.callback_flag = True + self.rc = rc + self.cv.notify() + self.cv.release() + + self.assertEqual(self.connected, True, "Not connected!") + self.cv.acquire() + + ret = zookeeper.acreate(self.handle, "/zk-python-acreatetest", "nodecontents", + [ZOO_OPEN_ACL_UNSAFE], zookeeper.EPHEMERAL, + callback ) + self.assertEqual(ret, zookeeper.OK, "acreate failed") + while not self.callback_flag: + self.cv.wait(15) + self.cv.release() + + self.assertEqual(self.callback_flag, True, "acreate timed out") + self.assertEqual(self.rc, zookeeper.OK) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/contrib/zkpython/src/test/delete_test.py b/src/contrib/zkpython/src/test/delete_test.py new file mode 100644 index 0000000..913b6a9 --- /dev/null +++ b/src/contrib/zkpython/src/test/delete_test.py @@ -0,0 +1,68 @@ +#!/usr/bin/python +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import zookeeper, zktestbase, unittest, threading + +class DeletionTest(zktestbase.TestBase): + """Test whether we can delete znodes""" + + def test_sync_delete(self): + ZOO_OPEN_ACL_UNSAFE = {"perms":0x1f, "scheme":"world", "id" :"anyone"} + self.assertEqual(self.connected, True) + ret = zookeeper.create(self.handle, "/zk-python-deletetest", "nodecontents", [ZOO_OPEN_ACL_UNSAFE], zookeeper.EPHEMERAL) + self.assertEqual(ret, "/zk-python-deletetest") + ret = zookeeper.delete(self.handle,"/zk-python-deletetest") + self.assertEqual(ret, zookeeper.OK) + children = zookeeper.get_children(self.handle, "/") + self.assertEqual(False, "zk-python-deletetest" in children) + + # test exception + self.assertRaises(zookeeper.NoNodeException, + zookeeper.delete, + self.handle, + "/zk-python-deletetest") + + def test_async_delete(self): + ZOO_OPEN_ACL_UNSAFE = {"perms":0x1f, "scheme":"world", "id" :"anyone"} + self.assertEqual(self.connected, True) + ret = zookeeper.create(self.handle, "/zk-python-adeletetest", "nodecontents", [ZOO_OPEN_ACL_UNSAFE], zookeeper.EPHEMERAL) + self.assertEqual(ret, "/zk-python-adeletetest") + + self.cv = threading.Condition() + self.callback_flag = False + self.rc = -1 + def callback(handle, rc): + self.cv.acquire() + self.callback_flag = True + self.cv.notify() + self.rc = rc # don't assert this here, as if the assertion fails, the test will block + self.cv.release() + + self.cv.acquire() + ret = zookeeper.adelete(self.handle,"/zk-python-adeletetest",-1,callback) + self.assertEqual(ret, zookeeper.OK, "adelete failed") + while not self.callback_flag: + self.cv.wait(15) + self.cv.release() + + self.assertEqual(self.callback_flag, True, "adelete timed out") + self.assertEqual(self.rc, zookeeper.OK) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/contrib/zkpython/src/test/exists_test.py b/src/contrib/zkpython/src/test/exists_test.py new file mode 100644 index 0000000..ddc6ef3 --- /dev/null +++ b/src/contrib/zkpython/src/test/exists_test.py @@ -0,0 +1,64 @@ +#!/usr/bin/python +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import zookeeper, zktestbase, unittest, threading + +ZOO_OPEN_ACL_UNSAFE = {"perms":0x1f, "scheme":"world", "id" :"anyone"} +class ExistsTest(zktestbase.TestBase): + def setUp( self ): + zktestbase.TestBase.setUp(self) + try: + zookeeper.create(self.handle, "/zk-python-existstest","existstest", [ZOO_OPEN_ACL_UNSAFE],zookeeper.EPHEMERAL) + zookeeper.create(self.handle, "/zk-python-aexiststest","existstest",[ZOO_OPEN_ACL_UNSAFE],zookeeper.EPHEMERAL) + except: + pass + + def test_sync_exists(self): + self.assertEqual(self.connected, True) + ret = zookeeper.exists(self.handle, "/zk-python-existstest", None) + self.assertNotEqual(ret, None, "/zk-python-existstest does not exist (possibly means creation failure)") + + def test_sync_nexists(self): + self.assertEqual(None, zookeeper.exists(self.handle, "/i-dont-exist", None)) + + + def test_async_exists(self): + self.cv = threading.Condition() + def callback(handle, rc, stat): + self.cv.acquire() + self.callback_flag = True + self.cv.notify() + self.cv.release() + self.rc = rc + + self.assertEqual(self.connected, True) + + self.cv.acquire() + ret = zookeeper.aexists(self.handle, "/zk-python-aexiststest", None, + callback ) + self.assertEqual(ret, zookeeper.OK) + while not self.callback_flag: + self.cv.wait(15) + self.cv.release() + + self.assertEqual(self.callback_flag, True, "aexists timed out") + self.assertEqual(self.rc, zookeeper.OK, "Return code not ok:" + zookeeper.zerror(self.rc)) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/contrib/zkpython/src/test/get_set_test.py b/src/contrib/zkpython/src/test/get_set_test.py new file mode 100644 index 0000000..b77b3b2 --- /dev/null +++ b/src/contrib/zkpython/src/test/get_set_test.py @@ -0,0 +1,211 @@ +#!/usr/bin/python +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import zookeeper, zktestbase, unittest, threading, sys +if sys.version_info < (3,): + range = xrange + +ZOO_OPEN_ACL_UNSAFE = {"perms":0x1f, "scheme":"world", "id" :"anyone"} + +class GetSetTest(zktestbase.TestBase): + def setUp( self ): + zktestbase.TestBase.setUp(self) + try: + zookeeper.create(self.handle, "/zk-python-getsettest", "on",[ZOO_OPEN_ACL_UNSAFE], zookeeper.EPHEMERAL) + zookeeper.create(self.handle, "/zk-python-agetsettest", + "on",[ZOO_OPEN_ACL_UNSAFE], zookeeper.EPHEMERAL) + except: + pass + + def test_empty_node(self): + """ + Test for a bug when instead of empty string we can get + random data from buffer malloc'ed to hold node contents. + See ZOOKEEPER-1906 for details + """ + NODE_PATH = "/zk-python-test-empty-node" + self.ensureDeleted(NODE_PATH) + zookeeper.create(self.handle, NODE_PATH, "", + [{"perms":0x1f, "scheme":"world", "id" :"anyone"}]) + (data,stat) = zookeeper.get(self.handle, NODE_PATH, None) + self.assertEqual(data, "", "Data is not empty as expected: " + data) + + def test_sync_getset(self): + self.assertEqual(self.connected, True, "Not connected!") + (data,stat) = zookeeper.get(self.handle, "/zk-python-getsettest", None) + self.assertEqual(data, "on", "Data is not 'on' as expected: " + data) + ret = zookeeper.set(self.handle, "/zk-python-getsettest", + "off", stat["version"]) + (data,stat) = zookeeper.get(self.handle, "/zk-python-getsettest", None) + self.assertEqual(data, "off", "Data is not 'off' as expected: " + data) + self.assertRaises(zookeeper.BadVersionException, + zookeeper.set, + self.handle, + "/zk-python-getsettest", + "test", + stat["version"]+1) + stat2 = zookeeper.set2(self.handle, "/zk-python-getsettest", + "set2", stat["version"]) + self.assertNotEqual(stat2, None, "set2 call failed, return should not be None") + self.assertEqual(stat2["numChildren"], 0, + "set2 call failed, numChildren not 0 in set2 call") + (data,stat) = zookeeper.get(self.handle, "/zk-python-getsettest", None) + self.assertEqual(data, "set2", "Data is not 'set2' as expected: " + data) + + def test_stat_deleted_node(self): + """ + Test for a bug that surfaced when trying to build a + stat object from a non-existant node. + + """ + self.ensureDeleted("/zk-python-test-deleteme") + self.assertRaises(zookeeper.NoNodeException, + zookeeper.get, + self.handle, + "/zk-python-test-deleteme") + self.cv = threading.Condition() + def callback(handle, rc, value, stat): + self.cv.acquire() + self.stat = stat + self.rc = rc + self.value = value + self.callback_flag = True + self.cv.notify() + self.cv.release() + self.cv.acquire() + zookeeper.aget(self.handle, "/zk-python-test-deleteme", None, callback) + self.cv.wait(15) + self.assertEqual(self.callback_flag, True, "aget timed out!") + self.assertEqual(self.stat, None, "Stat should be none!") + self.assertEqual(self.value, None, "Value should be none!") + + def test_sync_get_large_datanode(self): + """ + Test that we can retrieve datanode sizes up to + 1Mb with default parameters (depends on ZooKeeper server). + """ + + data = ''.join(["A" for x in range(1024*1023)]) + self.ensureDeleted("/zk-python-test-large-datanode") + zookeeper.create(self.handle, "/zk-python-test-large-datanode", data, + [{"perms":0x1f, "scheme":"world", "id" :"anyone"}]) + (ret,stat) = zookeeper.get(self.handle, "/zk-python-test-large-datanode") + self.assertEqual(len(ret), 1024*1023, + "Should have got 1Mb returned, instead got %s" % len(ret)) + (ret,stat) = zookeeper.get(self.handle, "/zk-python-test-large-datanode",None,500) + self.assertEqual(len(ret), 500, + "Should have got 500 bytes returned, instead got %s" % len(ret)) + + + + def test_async_getset(self): + self.cv = threading.Condition() + def get_callback(handle, rc, value, stat): + self.cv.acquire() + self.callback_flag = True + self.rc = rc + self.value = (value,stat) + self.cv.notify() + self.cv.release() + + def set_callback(handle, rc, stat): + self.cv.acquire() + self.callback_flag = True + self.rc = rc + self.value = stat + self.cv.notify() + self.cv.release() + + self.assertEqual(self.connected, True, "Not connected!") + + self.cv.acquire() + self.callback_flag = False + ret = zookeeper.aset(self.handle, "/zk-python-agetsettest", "off", -1, set_callback) + self.assertEqual(ret, zookeeper.OK, "aset failed") + while not self.callback_flag: + self.cv.wait(15) + self.cv.release() + self.assertEqual(self.callback_flag, True, "aset timed out") + + self.cv.acquire() + self.callback_flag = False + ret = zookeeper.aget(self.handle, "/zk-python-agetsettest", None, get_callback) + self.assertEqual(ret, zookeeper.OK, "aget failed") + self.cv.wait(15) + self.cv.release() + self.assertEqual(self.callback_flag, True, "aget timed out") + self.assertEqual(self.value[0], "off", "Data is not 'off' as expected: " + self.value[0]) + + def test_sync_getchildren(self): + self.ensureCreated("/zk-python-getchildrentest", flags=0) + self.ensureCreated("/zk-python-getchildrentest/child") + children = zookeeper.get_children(self.handle, "/zk-python-getchildrentest") + self.assertEqual(len(children), 1, "Expected to find 1 child, got " + str(len(children))) + + def test_async_getchildren(self): + self.ensureCreated("/zk-python-getchildrentest", flags=0) + self.ensureCreated("/zk-python-getchildrentest/child") + + def gc_callback(handle, rc, children): + self.cv.acquire() + self.rc = rc + self.children = children + self.callback_flag = True + self.cv.notify() + self.cv.release() + + self.cv.acquire() + self.callback_flag = False + zookeeper.aget_children(self.handle, "/zk-python-getchildrentest", None, gc_callback) + self.cv.wait(15) + self.assertEqual(self.callback_flag, True, "aget_children timed out") + self.assertEqual(self.rc, zookeeper.OK, "Return code for aget_children was not OK - %s" % zookeeper.zerror(self.rc)) + self.assertEqual(len(self.children), 1, "Expected to find 1 child, got " + str(len(self.children))) + + + def test_async_getchildren_with_watcher(self): + self.ensureCreated("/zk-python-getchildrentest", flags=0) + self.ensureCreated("/zk-python-getchildrentest/child") + + watched = [] + + def watcher(*args): + self.cv.acquire() + watched.append(args) + self.cv.notify() + self.cv.release() + + def children_callback(*args): + self.cv.acquire() + self.cv.notify() + self.cv.release() + + zookeeper.aget_children( + self.handle, "/zk-python-getchildrentest", watcher, children_callback) + + self.cv.acquire() + self.cv.wait() + self.cv.release() + + self.cv.acquire() + self.ensureCreated("/zk-python-getchildrentest/child2") + self.cv.wait(15) + self.assertTrue(watched) + +if __name__ == '__main__': + unittest.main() diff --git a/src/contrib/zkpython/src/test/run_tests.sh b/src/contrib/zkpython/src/test/run_tests.sh new file mode 100644 index 0000000..18d9240 --- /dev/null +++ b/src/contrib/zkpython/src/test/run_tests.sh @@ -0,0 +1,40 @@ +#!/bin/sh +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Usage: run_tests.sh testdir [logdir] +# logdir is optional, defaults to cwd + +# get the number of command-line arguments given +ARGC=$# + +# check to make sure enough arguments were given or exit +if [ $ARGC -lt 2 ]; then + export ZKPY_LOG_DIR="." +else + export ZKPY_LOG_DIR=$2 +fi + +# Find the build directory containing zookeeper.so +SO_PATH=`find ../../../build/ -name "zookeeper.so" | head -1` +PYTHONPATH=`dirname $SO_PATH` +LIB_PATH=../../c/.libs/:../../../build/test/test-cppunit/.libs +for test in `ls $1/*_test.py`; +do + echo "Running $test" + LD_LIBRARY_PATH=$LIB_PATH:$LD_LIBRARY_PATH DYLD_LIBRARY_PATH=$LIB_PATH:$DYLD_LIBRARY_PATH PYTHONPATH=$PYTHONPATH python $test +done diff --git a/src/contrib/zkpython/src/test/zkServer.sh b/src/contrib/zkpython/src/test/zkServer.sh new file mode 100644 index 0000000..51d508f --- /dev/null +++ b/src/contrib/zkpython/src/test/zkServer.sh @@ -0,0 +1,77 @@ +#!/bin/bash +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +if [ "x$1" == "x" ] +then + echo "USAGE: $0 startClean|start|stop hostPorts" + exit 2 +fi + +if [ "x$1" == "xstartClean" ] +then + if [ "x${base_dir}" == "x" ] + then + rm -rf /tmp/zkdata + else + rm -rf ${base_dir}/build/tmp + fi +fi + +if [ "x${base_dir}" == "x" ] +then +zk_base="../../../" +else +zk_base="${base_dir}" +fi + +CLASSPATH="$CLASSPATH:${zk_base}/build/classes" +CLASSPATH="$CLASSPATH:${zk_base}/conf" + +for i in "${zk_base}"/build/lib/*.jar +do + CLASSPATH="$CLASSPATH:$i" +done + +for i in "${zk_base}"/src/java/lib/*.jar +do + CLASSPATH="$CLASSPATH:$i" +done + +# Make sure nothing is left over from before +#fuser -skn tcp 22182/tcp + +case $1 in +start|startClean) + if [ "x${base_dir}" == "x" ] + then + mkdir -p /tmp/zkdata + java -cp $CLASSPATH org.apache.zookeeper.server.ZooKeeperServerMain 22182 /tmp/zkdata &> /tmp/zk.log & + else + mkdir -p ${base_dir}/build/tmp/zkdata + java -cp $CLASSPATH org.apache.zookeeper.server.ZooKeeperServerMain 22182 ${base_dir}/build/tmp/zkdata &> ${base_dir}/build/tmp/zk.log & + fi + sleep 5 + ;; +stop) + # Already killed above + ;; +*) + echo "Unknown command " + $1 + exit 2 +esac + diff --git a/src/contrib/zkpython/src/test/zktestbase.py b/src/contrib/zkpython/src/test/zktestbase.py new file mode 100644 index 0000000..8229418 --- /dev/null +++ b/src/contrib/zkpython/src/test/zktestbase.py @@ -0,0 +1,101 @@ +#!/usr/bin/python +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import os +import unittest, threading, zookeeper +ZOO_OPEN_ACL_UNSAFE = {"perms":0x1f, "scheme":"world", "id" :"anyone"} + +class TestBase(unittest.TestCase): + SERVER_PORT = 22182 + + def __init__(self,methodName='runTest'): + unittest.TestCase.__init__(self,methodName) + self.host = "localhost:%d" % self.SERVER_PORT + self.connected = False + self.handle = -1 + logdir = os.environ.get("ZKPY_LOG_DIR") + logfile = os.path.join(logdir, self.__class__.__name__ + ".log") + try: + f = open(logfile,"w") + zookeeper.set_log_stream(f) + except IOError: + print("Couldn't open " + logfile + " for writing") + + + def setUp(self): + self.callback_flag = False + self.cv = threading.Condition() + self.connected = False + def connection_watcher(handle, type, state, path): + self.cv.acquire() + self.connected = True + self.cv.notify() + self.cv.release() + + self.cv.acquire() + self.handle = zookeeper.init(self.host, connection_watcher) + self.cv.wait(15.0) + self.cv.release() + + if not self.connected: + raise Exception("Couldn't connect to host -", self.host) + + def newConnection(self): + cv = threading.Condition() + self.pending_connection = False + def connection_watcher(handle, type, state, path): + cv.acquire() + self.pending_connection = True + cv.notify() + cv.release() + + cv.acquire() + handle = zookeeper.init(self.host, connection_watcher) + cv.wait(15.0) + cv.release() + + if not self.pending_connection: + raise Exception("Couldn't connect to host -", self.host) + return handle + + def ensureDeleted(self,path): + self.assertEqual(zookeeper.CONNECTED_STATE, zookeeper.state(self.handle), "Not connected!") + try: + self.assertEqual(zookeeper.OK, zookeeper.delete(self.handle, path)) + except zookeeper.NoNodeException: + pass + + def ensureCreated(self,path,data="",flags=zookeeper.EPHEMERAL): + """ + It's possible not to get the flags you want here if the node already exists + """ + self.assertEqual(zookeeper.CONNECTED_STATE, zookeeper.state(self.handle), "Not connected!") + try: + self.assertEqual(path, zookeeper.create(self.handle, path, data, [ZOO_OPEN_ACL_UNSAFE], flags)) + except zookeeper.NodeExistsException: + pass + + def tearDown(self): + if self.connected: + zookeeper.close(self.handle) + + def all(self, iterable): + for element in iterable: + if not element: + return False + return True diff --git a/src/contrib/zktreeutil/Makefile.am b/src/contrib/zktreeutil/Makefile.am new file mode 100644 index 0000000..36da1a5 --- /dev/null +++ b/src/contrib/zktreeutil/Makefile.am @@ -0,0 +1,4 @@ +## Process this file with automake to produce Makefile.in + +SUBDIRS = src + diff --git a/src/contrib/zktreeutil/README.txt b/src/contrib/zktreeutil/README.txt new file mode 100644 index 0000000..43b06fa --- /dev/null +++ b/src/contrib/zktreeutil/README.txt @@ -0,0 +1,74 @@ +========================================== +zktreeutil - Zookeeper Tree Data Utility +Author: Anirban Roy +Organization: Yahoo Inc. +========================================== + +zktreeutil program is intended to manage and manipulate zk-tree data quickly, effi- +ciently and with ease. The utility operates on free-form ZK-tree and hence can be used +for any cluster managed by Zookeeper. Here are the basic functionalities - + +EXPORT: The whole/partial ZK-tree is exported into a XML file. This helps in +capturing a current snapshot of the data for backup/analysis. For a subtree +export, one need to specify the path to the ZK-subtree with proper option. + +IMPORT: The ZK-tree can be imported from XML into ZK cluster. This helps in priming +the new ZK cluster with static configuration. The import can be non-intrusive by +making only the additions in the existing data. The import of subtree is also +possible by optionally providing the path to the ZK-subtree. + +DIFF: Creates a diff between live ZK data vs data saved in XML file. Diff can ignore +some ZK-tree branches (possibly dynamic data) on reading the optional ignore flag +from XML file. Diffing on a ZK-subtree achieved by providing path to ZK-subtree with +diff command. + +UPDATE: Make the incremental changes into the live ZK-tree from saved XML, essentia- +lly after running the diff. + +DUMP: Dumps the ZK-tree on the standard output device reading either from live ZK +server or XML file. Like export, ZK-subtree can be dumped with optionaly +providing the path to the ZK-subtree, and till a certain depth of the (sub)tree. + +The exported ZK data into XML file can be shortened by only keeping the static ZK +nodes which are required to prime a cluster. The dynamic zk nodes (created on-the- +fly) can be ignored by setting a 'ignore' attribute at the root node of the dynamic +subtree (see tests/zk_sample.xml), possibly deleting all inner ZK nodes under that. +Once ignored, the whole subtree is ignored during DIFF, UPDATE and WRITE. + +Pre-requisites +-------------- +1. Linux system with 2.6.X kernel. +2. Zookeeper C client library (locally built at ../../c/.libs) >= 3.X.X +3. Development build libraries (rpm packages): + a. boost-devel >= 1.32.0 + b. libxml2-devel >= 2.7.3 + c. log4cxx0100-devel >= 0.10.0 + +Build instructions +------------------ +1. cd into this directory +2. autoreconf -if +3. ./configure +4. make +5. 'zktreeutil' binary created under src directory + +Limitations +----------- +Current version works with text data only, binary data will be supported in future +versions. + +Testing and usage of zktreeutil +-------------------------------- +1. Run Zookeeper server locally on port 2181 +2. export LD_LIBRARY_PATH=../../c/.libs/:/usr/local/lib/ +3. ./src/zktreeutil --help # show help +4. ./src/zktreeutil --zookeeper=localhost:2181 --import --xmlfile=tests/zk_sample.xml 2>/dev/null # import sample ZK tree +5. ./src/zktreeutil --zookeeper=localhost:2181 --dump --path=/myapp/version-1.0 2>/dev/null # dump Zk subtree +5. ./src/zktreeutil --zookeeper=localhost:2181 --dump --depth=3 2>/dev/null # dump Zk tree till certain depth +6. ./src/zktreeutil --xmlfile=zk_sample.xml -D 2>/dev/null # dump the xml data +7. Change zk_sample.xml with adding/deleting/chaging some nodes +8. ./src/zktreeutil -z localhost:2181 -F -x zk_sample.xml -p /myapp/version-1.0/configuration 2>/dev/null # take a diff of changes +9. ./src/zktreeutil -z localhost:2181 -E 2>/dev/null > zk_sample2.xml # export the mofied ZK tree +10. ./src/zktreeutil -z localhost:2181 -U -x zk_sample.xml -p /myapp/version-1.0/distributions 2>/dev/null # update with incr. changes +11. ./src/zktreeutil --zookeeper=localhost:2181 --import --force --xmlfile=zk_sample2.xml 2>/dev/null # re-prime the ZK tree + diff --git a/src/contrib/zktreeutil/build.xml b/src/contrib/zktreeutil/build.xml new file mode 100644 index 0000000..809d134 --- /dev/null +++ b/src/contrib/zktreeutil/build.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/contrib/zktreeutil/configure.ac b/src/contrib/zktreeutil/configure.ac new file mode 100644 index 0000000..b4a82a7 --- /dev/null +++ b/src/contrib/zktreeutil/configure.ac @@ -0,0 +1,66 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +AC_PREREQ(2.59) + +AC_INIT([zktreeutil], [1.0.0]) +AM_INIT_AUTOMAKE(foreign) + +AC_CONFIG_SRCDIR([src]) +AM_CONFIG_HEADER([config.h]) + +PACKAGE=zktreeutil +VERSION=1.0.0 + +AC_SUBST(PACKAGE) +AC_SUBST(VERSION) +BUILD_PATH="`pwd`" + +# Checks for programs. +AC_LANG_CPLUSPLUS +AC_PROG_CXX + +# Checks for libxm2. +AM_PATH_XML2(2.7.3) +XML2_INCLUDE="/usr/include/libxml2" +AC_SUBST(XML2_INCLUDE) + +# Zookeeper C client +ZOOKEEPER_PATH=${BUILD_PATH}/../../c +AC_CHECK_LIB(zookeeper_mt, main, [ZOOKEEPER="-L${ZOOKEEPER_PATH}/.libs -lzookeeper_mt"],,["-L${ZOOKEEPER_PATH}/.libs"]) +if test -z "${ZOOKEEPER}"; then + AC_ERROR("... zookeeper C client not found!") +fi + +AC_SUBST(ZOOKEEPER) +AC_SUBST(ZOOKEEPER_PATH) + +### log4cxx ### + +LOG4CXX_VERSION="0.10.0" +LOG4CXX_INCLUDE="/usr/local/include" +LOG4CXX_LIB_PATH="/usr/local/lib" +AC_CHECK_LIB(log4cxx, main, [LOG4CXX="-L${LOG4CXX_LIB_PATH} -llog4cxx"],,["-L${LOG4CXX_LIB_PATH}"]) +if test -z "${LOG4CXX}"; then + AC_ERROR("... log4cxx not found!") +fi + +AC_SUBST(LOG4CXX) +AC_SUBST(LOG4CXX_VERSION) +AC_SUBST(LOG4CXX_INCLUDE) + +# Checks for header files. +AC_HEADER_DIRENT +AC_HEADER_STDC +AC_CHECK_HEADERS([stdlib.h string.h stdio.h unistd.h boost/shared_ptr.hpp boost/algorithm/string.hpp boost/algorithm/string/split.hpp]) + +# Checks for typedefs, structures, and compiler characteristics. +AC_HEADER_STDBOOL +AC_C_CONST +AC_C_INLINE +AC_TYPE_SIZE_T +AC_C_VOLATILE + +AC_CONFIG_FILES([Makefile]) +AC_CONFIG_FILES([src/Makefile]) +AC_OUTPUT diff --git a/src/contrib/zktreeutil/src/Makefile.am b/src/contrib/zktreeutil/src/Makefile.am new file mode 100644 index 0000000..641077a --- /dev/null +++ b/src/contrib/zktreeutil/src/Makefile.am @@ -0,0 +1,24 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +AM_CXXFLAGS = -I${ZOOKEEPER_PATH}/include -I${ZOOKEEPER_PATH}/generated \ + -I$(top_srcdir)/include -I${LOG4CXX_INCLUDE} -I/usr/include \ + -I${XML2_INCLUDE} + +bin_PROGRAMS = zktreeutil + +zktreeutil_SOURCES = ZkAdaptor.cc ZkTreeUtil.cc ZkTreeUtilMain.cc +zktreeutil_LDADD = ${ZOOKEEPER} ${XML_LIBS} ${LOG4CXX} diff --git a/src/contrib/zktreeutil/src/SimpleTree.h b/src/contrib/zktreeutil/src/SimpleTree.h new file mode 100644 index 0000000..8226f05 --- /dev/null +++ b/src/contrib/zktreeutil/src/SimpleTree.h @@ -0,0 +1,150 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __SIMPLE_TREE_H__ +#define __SIMPLE_TREE_H__ + +#include +#include + +namespace zktreeutil +{ + using std::vector; + + /** + * \brief A simple tree data-structure template. + */ + template < class KeyType, class DataType > class SimpleTreeNode + { + private: + /** + * \brief The type representing simple-tree node smart-pointer. + */ + typedef boost::shared_ptr< SimpleTreeNode< KeyType, DataType > > SimpleTreeNodeSptr; + + public: + /** + * \brief Constructor. + * + * @param isRoot the flag indicating whether the node is root. + */ + SimpleTreeNode (bool isRoot=false) : isRoot_(isRoot) + { + } + + /** + * \brief Constructor. + * + * @param key the key stored at the tree node + * @param isRoot the flag indicating whether the node is root + */ + SimpleTreeNode (const KeyType& key, bool isRoot=false) : + isRoot_(isRoot), key_(key) + { + } + + /** + * \brief Constructor. + * + * @param key the key stored at the tree node + * @param val the value stored at the tree node + * @param isRoot the flag indicating whether the node is root + */ + SimpleTreeNode (const KeyType& key, const DataType& val, bool isRoot=false) : + isRoot_(isRoot), key_(key), val_(val) + { + } + + /** + * \brief Destructor. + */ + ~SimpleTreeNode () throw() {} + + /** + * \brief Add a child node to this node. + * + * @param node the child node to be added + */ + void addChild (const SimpleTreeNodeSptr node) { children_.push_back (node); } + + /** + * \brief Sets the key of this node. + * + * @param key the key to be set + */ + void setKey (const KeyType& key) { key_ = key; } + + /** + * \brief Sets the data of this node. + * + * @param val the value to be set + */ + void setData (const DataType& val) { val_ = val; } + + /** + * \brief Gets the key of this node. + * + * @return the key of this node + */ + KeyType getKey () const { return key_; } + + /** + * \brief Gets the data of this node. + * + * @return the value of this node + */ + DataType getData () const { return val_; } + + /** + * \brief Gets the i'th of this node. + * + * @param idx the index of the child node + * @return the child node + */ + SimpleTreeNodeSptr getChild (unsigned idx) const { return children_[idx]; } + + /** + * \brief Gets the number of children of this node. + * + * @return the number of children + */ + unsigned numChildren () const { return children_.size(); } + + /** + * \brief Indicates whether this node is root. + * + * @return 'true' if this node is root, 'false' otherwise + */ + bool isRoot () const { return isRoot_; } + + /** + * \brief Indicates whether this node is leaf node. + * + * @return 'true' if this node is leaf node, 'false' otherwise + */ + bool isLeaf () const { return !numChildren(); } + + private: + bool isRoot_; // Flag indicates if the node is root + KeyType key_; // Key of this node + DataType val_; // Value of this node + vector< SimpleTreeNodeSptr > children_; // List of children of this node + }; +} + +#endif // __SIMPLE_TREE_H__ diff --git a/src/contrib/zktreeutil/src/ZkAdaptor.cc b/src/contrib/zktreeutil/src/ZkAdaptor.cc new file mode 100644 index 0000000..1df175a --- /dev/null +++ b/src/contrib/zktreeutil/src/ZkAdaptor.cc @@ -0,0 +1,513 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ZkAdaptor.h" +#include +#include +#include +#include +#include + +// Logger +static log4cxx::LoggerPtr zkLoggerPtr = log4cxx::Logger::getLogger ("zookeeper.core"); + +namespace zktreeutil +{ + /** + * \brief This class provides logic for checking if a request can be retried. + */ + class RetryHandler + { + public: + RetryHandler(const ZooKeeperConfig &zkConfig) : m_zkConfig(zkConfig) + { + if (zkConfig.getAutoReconnect()) + retries = 2; + else + retries = 0; + } + + /** + * \brief Attempts to fix a side effect of the given RC. + * + * @param rc the ZK error code + * @return whether the error code has been handled and the caller should + * retry an operation the caused this error + */ + bool handleRC(int rc) + { + //check if the given error code is recoverable + if (!retryOnError(rc)) + return false; + + std::cerr << "[zktreeuti] Number of retries left: " << retries << std::endl; + if (retries-- > 0) + return true; + else + return false; + } + + private: + /** + * The ZK config. + */ + const ZooKeeperConfig &m_zkConfig; + + /** + * The number of outstanding retries. + */ + int retries; + + /** + * Checks whether the given error entitles this adapter + * to retry the previous operation. + * + * @param zkErrorCode one of the ZK error code + */ + static bool retryOnError(int zkErrorCode) + { + return (zkErrorCode == ZCONNECTIONLOSS || zkErrorCode == ZOPERATIONTIMEOUT); + } + }; + + + // ======================================================================= + + ZooKeeperAdapter::ZooKeeperAdapter(ZooKeeperConfig config) throw(ZooKeeperException) : + m_zkConfig(config), + mp_zkHandle(NULL) + { + // Enforce setting up appropriate ZK log level + if (zkLoggerPtr->isDebugEnabled() +#ifdef LOG4CXX_TRACE + || zkLoggerPtr->isTraceEnabled() +#endif + ) + { + zoo_set_debug_level( ZOO_LOG_LEVEL_DEBUG ); + } else if (zkLoggerPtr->isInfoEnabled()) { + zoo_set_debug_level( ZOO_LOG_LEVEL_INFO ); + } else if (zkLoggerPtr->isWarnEnabled()) { + zoo_set_debug_level( ZOO_LOG_LEVEL_WARN ); + } else { + zoo_set_debug_level( ZOO_LOG_LEVEL_ERROR ); + } + + // Establish the connection + reconnect(); + } + + ZooKeeperAdapter::~ZooKeeperAdapter() + { + try + { + disconnect(); + } + catch (std::exception &e) + { + std::cerr << "[zktreeutil] An exception while disconnecting from ZK: " + << e.what() + << std::endl; + } + } + + void ZooKeeperAdapter::validatePath(const string &path) throw(ZooKeeperException) + { + if (path.find ("/") != 0) + { + std::ostringstream oss; + oss << "Node path must start with '/' but" "it was '" + << path + << "'"; + throw ZooKeeperException (oss.str()); + } + if (path.length() > 1) + { + if (path.rfind ("/") == path.length() - 1) + { + std::ostringstream oss; + oss << "Node path must not end with '/' but it was '" + << path + << "'"; + throw ZooKeeperException (oss.str()); + } + if (path.find( "//" ) != string::npos) + { + std::ostringstream oss; + oss << "Node path must not contain '//' but it was '" + << path + << "'"; + throw ZooKeeperException (oss.str()); + } + } + } + + void ZooKeeperAdapter::disconnect() + { + if (mp_zkHandle != NULL) + { + zookeeper_close (mp_zkHandle); + mp_zkHandle = NULL; + } + } + + void ZooKeeperAdapter::reconnect() throw(ZooKeeperException) + { + // Clear the connection state + disconnect(); + + // Establish a new connection to ZooKeeper + mp_zkHandle = zookeeper_init( m_zkConfig.getHosts().c_str(), + NULL, + m_zkConfig.getLeaseTimeout(), + 0, + NULL, + 0); + if (mp_zkHandle == NULL) + { + // Invalid handle returned + std::ostringstream oss; + oss << "Unable to connect to ZK running at '" + << m_zkConfig.getHosts() + << "'"; + throw ZooKeeperException (oss.str()); + } + + // Enter into connect loop + int64_t connWaitTime = m_zkConfig.getConnectTimeout(); + while (1) + { + int state = zoo_state (mp_zkHandle); + if (state == ZOO_CONNECTED_STATE) + { + // connected + std::cerr << "[zktreeutil] Connected! mp_zkHandle: " + << mp_zkHandle + << std::endl; + return; + } + else if ( state && state != ZOO_CONNECTING_STATE) + { + // Not connecting any more... some other issue + std::ostringstream oss; + oss << "Unable to connect to ZK running at '" + << m_zkConfig.getHosts() + << "'; state=" + << state; + throw ZooKeeperException (oss.str()); + } + + // Still connecting, wait and come back + struct timeval now; + gettimeofday( &now, NULL ); + int64_t milliSecs = -(now.tv_sec * 1000LL + now.tv_usec / 1000); + std::cerr << "[zktreeutil] About to wait 1 sec" << std::endl; + sleep (1); + gettimeofday( &now, NULL ); + milliSecs += now.tv_sec * 1000LL + now.tv_usec / 1000; + connWaitTime -= milliSecs; + // Timed out !!! + if (connWaitTime <= 0) + break; + } + + // Timed out while connecting + std::ostringstream oss; + oss << "Timed out while connecting to ZK running at '" + << m_zkConfig.getHosts() + << "'"; + throw ZooKeeperException (oss.str()); + } + + void ZooKeeperAdapter::verifyConnection() throw(ZooKeeperException) + { + // Check connection state + int state = zoo_state (mp_zkHandle); + if (state != ZOO_CONNECTED_STATE) + { + if (m_zkConfig.getAutoReconnect()) + { + // Trying to reconnect + std::cerr << "[zktreeutil] Trying to reconnect..." << std::endl; + reconnect(); + } + else + { + std::ostringstream oss; + oss << "Disconnected from ZK running at '" + << m_zkConfig.getHosts() + << "'; state=" + << state; + throw ZooKeeperException (oss.str()); + } + } + } + + bool ZooKeeperAdapter::createNode(const string &path, + const string &value, + int flags, + bool createAncestors) throw(ZooKeeperException) + { + const int MAX_PATH_LENGTH = 1024; + char realPath[MAX_PATH_LENGTH]; + realPath[0] = 0; + + int rc; + RetryHandler rh(m_zkConfig); + do + { + verifyConnection(); + rc = zoo_create( mp_zkHandle, + path.c_str(), + value.c_str(), + value.length(), + &ZOO_OPEN_ACL_UNSAFE, + flags, + realPath, + MAX_PATH_LENGTH ); + } while (rc != ZOK && rh.handleRC(rc)); + if (rc != ZOK) // check return status + { + if (rc == ZNODEEXISTS) + { + //the node already exists + std::cerr << "[zktreeutil] ZK node " << path << " already exists" << std::endl; + return false; + } + else if (rc == ZNONODE && createAncestors) + { + std::cerr << "[zktreeutil] Intermediate ZK node missing in path " << path << std::endl; + //one of the ancestors doesn't exist so lets start from the root + //and make sure the whole path exists, creating missing nodes if + //necessary + for (string::size_type pos = 1; pos != string::npos; ) + { + pos = path.find( "/", pos ); + if (pos != string::npos) + { + try + { + createNode( path.substr( 0, pos ), "", 0, true ); + } + catch (ZooKeeperException &e) + { + throw ZooKeeperException( string("Unable to create " "node ") + path, rc ); + } + pos++; + } + else + { + // No more path components + return createNode( path, value, flags, false ); + } + } + } + + // Unexpected error during create + std::cerr << "[zktreeutil] Error in creating ZK node " << path << std::endl; + throw ZooKeeperException( string("Unable to create node ") + path, rc ); + } + + // Success + std::cerr << "[zktreeutil] " << realPath << " has been created" << std::endl; + return true; + } + + bool ZooKeeperAdapter::deleteNode(const string &path, + bool recursive, + int version) throw(ZooKeeperException) + { + // Validate the zk path + validatePath( path ); + + int rc; + RetryHandler rh(m_zkConfig); + do + { + verifyConnection(); + rc = zoo_delete( mp_zkHandle, path.c_str(), version ); + } while (rc != ZOK && rh.handleRC(rc)); + if (rc != ZOK) //check return status + { + if (rc == ZNONODE) + { + std::cerr << "[zktreeutil] ZK Node " + << path + << " does not exist" + << std::endl; + return false; + } + if (rc == ZNOTEMPTY && recursive) + { + std::cerr << "[zktreeutil] ZK Node " + << path + << " not empty; deleting..." + << std::endl; + //get all children and delete them recursively... + vector nodeList = getNodeChildren (path); + for (vector::const_iterator i = nodeList.begin(); + i != nodeList.end(); + ++i) { + deleteNode( *i, true ); + } + //...and finally attempt to delete the node again + return deleteNode( path, false ); + } + + // Unexpected return without success + std::cerr << "[zktreeutil] Unable to delete ZK node " << path << std::endl; + throw ZooKeeperException( string("Unable to delete node ") + path, rc ); + } + + // success + std::cerr << "[zktreeutil] " << path << " has been deleted" << std::endl; + return true; + } + + vector< string > ZooKeeperAdapter::getNodeChildren (const string &path) throw (ZooKeeperException) + { + // Validate the zk path + validatePath( path ); + + String_vector children; + memset( &children, 0, sizeof(children) ); + int rc; + RetryHandler rh(m_zkConfig); + do + { + verifyConnection(); + rc = zoo_get_children( mp_zkHandle, + path.c_str(), + 0, + &children ); + } while (rc != ZOK && rh.handleRC(rc)); + if (rc != ZOK) // check return code + { + std::cerr << "[zktreeutil] Error in fetching children of " << path << std::endl; + throw ZooKeeperException( string("Unable to get children of node ") + path, rc ); + } + else + { + vector< string > nodeList; + for (int i = 0; i < children.count; ++i) + { + //convert each child's path from relative to absolute + string absPath(path); + if (path != "/") + { + absPath.append( "/" ); + } + absPath.append( children.data[i] ); + nodeList.push_back( absPath ); + } + + //make sure the order is always deterministic + sort( nodeList.begin(), nodeList.end() ); + return nodeList; + } + } + + bool ZooKeeperAdapter::nodeExists(const string &path) throw(ZooKeeperException) + { + // Validate the zk path + validatePath( path ); + + struct Stat tmpStat; + struct Stat* stat = &tmpStat; + memset( stat, 0, sizeof(Stat) ); + + int rc; + RetryHandler rh(m_zkConfig); + do { + verifyConnection(); + rc = zoo_exists( mp_zkHandle, + path.c_str(), + 0, + stat ); + } while (rc != ZOK && rh.handleRC(rc)); + if (rc != ZOK) + { + if (rc == ZNONODE) + return false; + // Some error + std::cerr << "[zktreeutil] Error in checking existence of " << path << std::endl; + throw ZooKeeperException( string("Unable to check existence of node ") + path, rc ); + } else { + return true; + } + } + + string ZooKeeperAdapter::getNodeData(const string &path) throw(ZooKeeperException) + { + // Validate the zk path + validatePath( path ); + + const int MAX_DATA_LENGTH = 128 * 1024; + char buffer[MAX_DATA_LENGTH]; + memset( buffer, 0, MAX_DATA_LENGTH ); + struct Stat tmpStat; + struct Stat* stat = &tmpStat; + memset( stat, 0, sizeof(Stat) ); + + int rc; + int len; + RetryHandler rh(m_zkConfig); + do { + verifyConnection(); + len = MAX_DATA_LENGTH - 1; + rc = zoo_get( mp_zkHandle, + path.c_str(), + 0, + buffer, &len, stat ); + } while (rc != ZOK && rh.handleRC(rc)); + if (rc != ZOK) // checl return code + { + std::cerr << "[zktreeutil] Error in fetching value of " << path << std::endl; + throw ZooKeeperException( string("Unable to get data of node ") + path, rc ); + } + + // return data + return string( buffer, buffer + len ); + } + + void ZooKeeperAdapter::setNodeData(const string &path, + const string &value, + int version) throw(ZooKeeperException) + { + // Validate the zk path + validatePath( path ); + + int rc; + RetryHandler rh(m_zkConfig); + do { + verifyConnection(); + rc = zoo_set( mp_zkHandle, + path.c_str(), + value.c_str(), + value.length(), + version); + } while (rc != ZOK && rh.handleRC(rc)); + if (rc != ZOK) // check return code + { + std::cerr << "[zktreeutil] Error in setting value of " << path << std::endl; + throw ZooKeeperException( string("Unable to set data for node ") + path, rc ); + } + // success + } + +} /* end of 'namespace zktreeutil' */ diff --git a/src/contrib/zktreeutil/src/ZkAdaptor.h b/src/contrib/zktreeutil/src/ZkAdaptor.h new file mode 100644 index 0000000..4b68e28 --- /dev/null +++ b/src/contrib/zktreeutil/src/ZkAdaptor.h @@ -0,0 +1,327 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __ZK_ADAPTER_H__ +#define __ZK_ADAPTER_H__ + +#include +#include + +extern "C" { +#include "zookeeper.h" +} + +namespace zktreeutil +{ + using std::string; + using std::vector; + + /** + * \brief A cluster related exception. + */ + class ZooKeeperException : public std::exception + { + public: + + /** + * \brief Constructor. + * + * @param msg the detailed message associated with this exception + */ + ZooKeeperException(const string& msg) : + m_message(msg), + m_zkErrorCode(0) {} + + /** + * \brief Constructor. + * + * @param msg the detailed message associated with this exception + * @param errorCode the ZK error code associated with this exception + */ + ZooKeeperException(const string &msg, int errorCode) : + m_zkErrorCode(errorCode) + { + char tmp[100]; + sprintf( tmp, " (ZK error code: %d)", errorCode ); + m_message = msg + tmp; + } + + /** + * \brief Destructor. + */ + ~ZooKeeperException() throw() {} + + /** + * \brief Returns detailed description of the exception. + */ + const char *what() const throw() + { + return m_message.c_str(); + } + + /** + * \brief Returns the ZK error code. + */ + int getZKErrorCode() const + { + return m_zkErrorCode; + } + + private: + + /** + * The detailed message associated with this exception. + */ + string m_message; + + /** + * The optional error code received from ZK. + */ + int m_zkErrorCode; + + }; + + /** + * \brief This class encapsulates configuration of a ZK client. + */ + class ZooKeeperConfig + { + public: + + /** + * \brief Constructor. + * + * @param hosts the comma separated list of host and port pairs of ZK nodes + * @param leaseTimeout the lease timeout (heartbeat) + * @param autoReconnect whether to allow for auto-reconnect + * @param connectTimeout the connect timeout, in milliseconds; + */ + ZooKeeperConfig(const string &hosts, + int leaseTimeout, + bool autoReconnect = true, + long long int connectTimeout = 15000) + : m_hosts(hosts), + m_leaseTimeout(leaseTimeout), + m_autoReconnect(autoReconnect), + m_connectTimeout(connectTimeout) {} + + /** + * \brief Returns the list of ZK hosts to connect to. + */ + string getHosts() const { return m_hosts; } + + /** + * \brief Returns the lease timeout. + */ + int getLeaseTimeout() const { return m_leaseTimeout; } + + /** + * \brief Returns whether {@link ZooKeeperAdapter} should attempt + * \brief to automatically reconnect in case of a connection failure. + */ + bool getAutoReconnect() const { return m_autoReconnect; } + + /** + * \brief Gets the connect timeout. + * + * @return the connect timeout + */ + long long int getConnectTimeout() const { return m_connectTimeout; } + + private: + + /** + * The host addresses of ZK nodes. + */ + const string m_hosts; + + /** + * The ZK lease timeout. + */ + const int m_leaseTimeout; + + /** + * True if this adapater should attempt to autoreconnect in case + * the current session has been dropped. + */ + const bool m_autoReconnect; + + /** + * How long to wait, in milliseconds, before a connection + * is established to ZK. + */ + const long long int m_connectTimeout; + }; + + /** + * \brief This is a wrapper around ZK C synchrounous API. + */ + class ZooKeeperAdapter + { + public: + /** + * \brief Constructor. + * Attempts to create a ZK adapter, optionally connecting + * to the ZK. Note, that if the connection is to be established + * and the given listener is NULL, some events may be lost, + * as they may arrive asynchronously before this method finishes. + * + * @param config the ZK configuration + * @throw ZooKeeperException if cannot establish connection to the given ZK + */ + ZooKeeperAdapter(ZooKeeperConfig config) throw(ZooKeeperException); + + /** + * \brief Destructor. + */ + ~ZooKeeperAdapter(); + + /** + * \brief Returns the current config. + */ + const ZooKeeperConfig &getZooKeeperConfig() const { return m_zkConfig; } + + /** + * \brief Restablishes connection to the ZK. + * If this adapter is already connected, the current connection + * will be dropped and a new connection will be established. + * + * @throw ZooKeeperException if cannot establish connection to the ZK + */ + void reconnect() throw(ZooKeeperException); + + /** + * \brief Disconnects from the ZK and unregisters {@link #mp_zkHandle}. + */ + void disconnect(); + + /** + * \brief Creates a new node identified by the given path. + * This method will optionally attempt to create all missing ancestors. + * + * @param path the absolute path name of the node to be created + * @param value the initial value to be associated with the node + * @param flags the ZK flags of the node to be created + * @param createAncestors if true and there are some missing ancestor nodes, + * this method will attempt to create them + * + * @return true if the node has been successfully created; false otherwise + * @throw ZooKeeperException if the operation has failed + */ + bool createNode(const string &path, + const string &value = "", + int flags = 0, + bool createAncestors = true) throw(ZooKeeperException); + + /** + * \brief Deletes a node identified by the given path. + * + * @param path the absolute path name of the node to be deleted + * @param recursive if true this method will attempt to remove + * all children of the given node if any exist + * @param version the expected version of the node. The function will + * fail if the actual version of the node does not match + * the expected version + * + * @return true if the node has been deleted; false otherwise + * @throw ZooKeeperException if the operation has failed + */ + bool deleteNode(const string &path, + bool recursive = false, + int version = -1) throw(ZooKeeperException); + + /** + * \brief Retrieves list of all children of the given node. + * + * @param path the absolute path name of the node for which to get children + * @return the list of absolute paths of child nodes, possibly empty + * @throw ZooKeeperException if the operation has failed + */ + vector getNodeChildren( const string &path) throw(ZooKeeperException); + + /** + * \brief Check the existence of path to a znode. + * + * @param path the absolute path name of the znode + * @return TRUE if the znode exists; FALSE otherwise + * @throw ZooKeeperException if the operation has failed + */ + bool nodeExists(const string &path) throw(ZooKeeperException); + + /** + * \brief Gets the given node's data. + * + * @param path the absolute path name of the node to get data from + * + * @return the node's data + * @throw ZooKeeperException if the operation has failed + */ + string getNodeData(const string &path) throw(ZooKeeperException); + + /** + * \brief Sets the given node's data. + * + * @param path the absolute path name of the node to get data from + * @param value the node's data to be set + * @param version the expected version of the node. The function will + * fail if the actual version of the node does not match + * the expected version + * + * @throw ZooKeeperException if the operation has failed + */ + void setNodeData(const string &path, + const string &value, + int version = -1) throw(ZooKeeperException); + + /** + * \brief Validates the given path to a node in ZK. + * + * @param the path to be validated + * + * @throw ZooKeeperException if the given path is not valid + * (for instance it doesn't start with "/") + */ + static void validatePath(const string &path) throw(ZooKeeperException); + + private: + + /** + * Verifies whether the connection is established, + * optionally auto reconnecting. + * + * @throw ZooKeeperConnection if this client is disconnected + * and auto-reconnect failed or was not allowed + */ + void verifyConnection() throw(ZooKeeperException); + + private: + + /** + * The current ZK configuration. + */ + const ZooKeeperConfig m_zkConfig; + + /** + * The current ZK session. + */ + zhandle_t *mp_zkHandle; + }; + +} /* end of 'namespace zktreeutil' */ + +#endif /* __ZK_ADAPTER_H__ */ diff --git a/src/contrib/zktreeutil/src/ZkTreeUtil.cc b/src/contrib/zktreeutil/src/ZkTreeUtil.cc new file mode 100644 index 0000000..270bf31 --- /dev/null +++ b/src/contrib/zktreeutil/src/ZkTreeUtil.cc @@ -0,0 +1,705 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ZkTreeUtil.h" + +#include +#include +#include +#include +#include + +namespace zktreeutil +{ + using std::map; + using std::pair; + + static ZkTreeNodeSptr loadZkTree_ (ZooKeeperAdapterSptr zkHandle, + const string& path) + { + // Extract the node value + string value = zkHandle->getNodeData(path); + + // Extract nodename from the path + string nodename = "/"; + if (path != "/") + { + vector< string > nodes; + boost::split(nodes, path, boost::is_any_of ("/") ); + nodename = nodes[nodes.size()-1]; + } + + // Create tree-node with name and value + ZkTreeNodeSptr nodeSptr = ZkTreeNodeSptr (new ZkTreeNode (nodename, value)); + std::cerr << "[zktreeutil] loaded nodename: " + << nodename + << " value: " + << value + << std::endl; + + // Load all the children + vector< string > cnodes = zkHandle->getNodeChildren (path); + for (unsigned i = 0; i < cnodes.size(); i++) + nodeSptr->addChild (loadZkTree_ (zkHandle, cnodes[i])); + + // Return the constructed node + return nodeSptr; + } + + static ZkTreeNodeSptr loadZkTreeXml_ (xmlNode* xmlNodePtr) + { + // Null check + if (xmlNodePtr == NULL) + { + std::cerr << "[zktreeutil] empty XML node encountered" << std::endl; + exit (-1); + } + + // Get the node name + xmlChar* name = xmlGetProp (xmlNodePtr, BAD_CAST "name"); + string nameStr = (const char*)name; + std::cerr << "[zktreeutil] node name: " << nameStr; + xmlFree (name); + // Get the node value + string valueStr; + xmlChar* value = xmlGetProp (xmlNodePtr, BAD_CAST "value"); + if (value) + { + valueStr = (const char*)value; + std::cerr << " value: " << valueStr; + } + xmlFree (value); + // Get the ignore flag + bool doIgnore = false; + xmlChar* ignore = xmlGetProp (xmlNodePtr, BAD_CAST "ignore"); + if (ignore) + { + string ignoreStr = (const char*) ignore; + if (ignoreStr == "true" || ignoreStr == "yes" || ignoreStr == "1") + { + doIgnore = true; + std::cerr << " "; + } + } + xmlFree (ignore); + std::cerr << std::endl; + + // Create the zk node + ZkTreeNodeSptr nodeSptr = + ZkTreeNodeSptr (new ZkTreeNode (nameStr, + ZkNodeData (valueStr, doIgnore))); + + // Load the children + for (xmlNode* chldNode = xmlNodePtr->children; + chldNode; + chldNode = chldNode->next) + if (chldNode->type == XML_ELEMENT_NODE) + nodeSptr->addChild (loadZkTreeXml_ (chldNode)); + + // Return the loaded node + return nodeSptr; + } + + static void writeZkTree_ (ZooKeeperAdapterSptr zkHandle, + const ZkTreeNodeSptr zkNodeSptr, + const string& path) + { + // Create the path in zk-tree + zkHandle->createNode(path.c_str(), "", 0, false); + std::cerr << "[zktreeutil] created key: " << path << std::endl; + // Set value for the path + string value = zkNodeSptr->getData().value; + if (value != "") + { + zkHandle->setNodeData (path.c_str(), value.c_str()); + std::cerr << "[zktreeutil] set value: " << std::endl; + } + + // Go deep to write the subtree rooted in the node, if not to be ignored + if (!(zkNodeSptr->getData().ignoreUpdate)) + { + for (unsigned i=0; i < zkNodeSptr->numChildren(); i++) + { + ZkTreeNodeSptr childNodeSptr = zkNodeSptr->getChild (i); + // Add the node name into the path and write in zk-tree + string cpath = ((path != "/")? path : "") + + string("/") + + childNodeSptr->getKey(); + writeZkTree_ (zkHandle, childNodeSptr, cpath); + } + } + + return; + } + + static void addTreeZkAction_ (const ZkTreeNodeSptr zkNodeSptr, + const string& path, + vector< ZkAction >& actions) + { + // Create the key + actions.push_back (ZkAction (ZkAction::CREATE, path)); + + // Set value for the new key + if (zkNodeSptr->getData().value != "") + actions.push_back (ZkAction (ZkAction::VALUE, + path, + zkNodeSptr->getData().value)); + + // Add all the children + for (unsigned i=0; i < zkNodeSptr->numChildren(); i++) + { + ZkTreeNodeSptr childSptr = zkNodeSptr->getChild (i); + string cpath = path + string("/") + childSptr->getKey(); + addTreeZkAction_ (childSptr, cpath, actions); + } + + return; + } + + static xmlNodePtr dumpZkTreeXml_ (const ZkTreeNodeSptr zkNodeSptr) + { + // Create xml node with zknode name and value + string nodename = zkNodeSptr->getKey (); + string value = zkNodeSptr->getData().value; + xmlNodePtr node = xmlNewNode(NULL, BAD_CAST "zknode"); + xmlNewProp (node, BAD_CAST "name", BAD_CAST nodename.c_str()); + if (value.length()) + xmlNewProp (node, BAD_CAST "value", BAD_CAST value.c_str()); + + // Add all the children rotted at this node + for (unsigned i=0; i < zkNodeSptr->numChildren(); i++) + xmlAddChild (node, dumpZkTreeXml_ (zkNodeSptr->getChild (i))); + + // Return xml node + return node; + } + + static void dumpZkTree_ (const ZkTreeNodeSptr zkNodeSptr, + int maxLevel, + int level, + vector< bool >& masks) + { + // Check the max. dlevel to be dumped + if (level > maxLevel) + return; + + + // Create branch + for (int i=0; i < level; i++) + { + if ( i== level-1) std::cout << "| "; + else if (masks[i]) std::cout << " "; + else std::cout << "| "; + } + std::cout << std::endl; + for (int i=0; i < level-1; i++) + { + if (masks[i]) std::cout << " "; + else std::cout << "| "; + } + + // Dump the node name and value + std::cout << "|--[" << zkNodeSptr->getKey(); + if (zkNodeSptr->getData().value != "") + std::cout << " => " << zkNodeSptr->getData().value; + std::cout << "]" << std::endl; + + // Dump all the children + for (unsigned i=0; i < zkNodeSptr->numChildren(); i++) + { + // Add mask for last child + if (i == zkNodeSptr->numChildren()-1) + masks.push_back(true); + else + masks.push_back(false); + dumpZkTree_ (zkNodeSptr->getChild (i), maxLevel, level+1, masks); + } + + masks.pop_back(); + return; + } + + static ZkTreeNodeSptr traverseBranch_ (const ZkTreeNodeSptr& zkRootSptr, + const string& path) + { + // Check if the tree is loaded into memory + if (zkRootSptr == NULL) + { + string errMsg = "[zktreeutil] null root passed for traversing"; + std::cout << errMsg << std::endl; + throw std::logic_error (errMsg); + } + + // Split the path and add intermediate znodes + vector< string > nodes; + boost::split(nodes, path, boost::is_any_of ("/") ); + + // Start traversing the tree + ZkTreeNodeSptr currNodeSptr = zkRootSptr; + for (unsigned znode_idx = 1; znode_idx < nodes.size(); znode_idx++) + { + bool found = false; + for (unsigned i=0; i < currNodeSptr->numChildren(); i++) + { + ZkTreeNodeSptr childNodeSptr = currNodeSptr->getChild(i); + if (childNodeSptr->getKey() == nodes[znode_idx]) + { + // Found! go to the znode + currNodeSptr = childNodeSptr; + found = true; + break; + } + } + if (!found) // No such znode found; return NULL node-ptr + { + string errMsg = string("[zktreeutil] unknown znode during traversal: ") + + nodes[znode_idx]; + std::cout << errMsg << std::endl; + throw std::logic_error (errMsg); + } + } + + return currNodeSptr; + } + + static ZkTreeNodeSptr createAncestors_ (const string& path) + { + // Create the root znode + ZkTreeNodeSptr zkRootSptr = ZkTreeNodeSptr (new ZkTreeNode ("/")); + ZkTreeNodeSptr currNodeSptr = zkRootSptr; + // Split the path and add intermediate znodes + vector< string > nodes; + boost::split(nodes, path, boost::is_any_of ("/") ); + for (unsigned i=1; i < nodes.size()-1; i++) + { + ZkTreeNodeSptr childNodeSptr = ZkTreeNodeSptr (new ZkTreeNode (nodes[i])); + currNodeSptr->addChild (childNodeSptr); + currNodeSptr = childNodeSptr; + } + + //Return the root of the branch + return zkRootSptr; + } + + ZooKeeperAdapterSptr ZkTreeUtil::get_zkHandle (const string& zkHosts) + { + try + { + // Create an instance of ZK adapter. + ZooKeeperConfig config (zkHosts, 10000); + ZooKeeperAdapterSptr zkHandleSptr = + ZooKeeperAdapterSptr (new ZooKeeperAdapter (config)); + return zkHandleSptr; + } + catch (const ZooKeeperException &e) + { + std::cerr << "[zktreeutil] zooKeeper exception caught: " + << e.what() + << std::endl; + throw; + } + catch (std::exception &stde) + { + std::cerr << "[zktreeutil] standard exception caught: " + << stde.what() + << std::endl; + throw; + } + catch (...) + { + std::cerr + << "[zktreeutil] unknown exception while connecting to zookeeper" + << std::endl; + throw; + } + } + + + void ZkTreeUtil::loadZkTree (const string& zkHosts, + const string& path, + bool force) + { + // Check if already loaded + if (loaded_ && !force) + { + std::cerr << "[zktreeutil] zk-tree already loaded into memory" + << std::endl; + return; + } + + // Connect to ZK server + ZooKeeperAdapterSptr zkHandle = get_zkHandle (zkHosts); + std::cerr << "[zktreeutil] connected to ZK serverfor reading" + << std::endl; + + // Check the existence of the path to znode + if (!zkHandle->nodeExists (path)) + { + string errMsg = string("[zktreeutil] path does not exists : ") + path; + std::cout << errMsg << std::endl; + throw std::logic_error (errMsg); + } + + // Load the rooted (sub)tree + ZkTreeNodeSptr zkSubrootSptr = loadZkTree_ (zkHandle, path); + + // Create the ancestors before loading the rooted subtree + if (path != "/") + { + zkRootSptr_ = createAncestors_(path); + string ppath = path.substr (0, path.rfind('/')); + ZkTreeNodeSptr parentSptr = traverseBranch_( zkRootSptr_, ppath); + parentSptr->addChild (zkSubrootSptr); + } + else // Loaded entire zk-tree + { + zkRootSptr_ = zkSubrootSptr; + } + + // Set load flag + loaded_ = true; + return; + } + + void ZkTreeUtil::loadZkTreeXml (const string& zkXmlConfig, + bool force) + { + // Check if already loaded + if (loaded_ && !force) + { + std::cerr << "[zktreeutil] zk-tree already loaded into memory" + << std::endl; + return; + } + + // Parse the file and get the DOM + xmlDocPtr docPtr = xmlReadFile(zkXmlConfig.c_str(), NULL, 0); + if (docPtr == NULL) { + std::cerr << "[zktreeutil] could not parse XML file " + << zkXmlConfig + << std::endl; + exit (-1); + } + std::cerr << "[zktreeutil] zk-tree XML parsing successful" + << std::endl; + + // Get the root element node + xmlNodePtr rootPtr = xmlDocGetRootElement(docPtr); + // Create the root zk node + zkRootSptr_ = ZkTreeNodeSptr (new ZkTreeNode ("/")); + // Load the rooted XML tree + for (xmlNode* chldNode = rootPtr->children; + chldNode; + chldNode = chldNode->next) + { + if (chldNode->type == XML_ELEMENT_NODE) + zkRootSptr_->addChild (loadZkTreeXml_ (chldNode)); + } + + // set oad flag + loaded_ = true; + // Cleanup stuff + xmlFreeDoc(docPtr); + xmlCleanupParser(); + return; + } + + void ZkTreeUtil::writeZkTree (const string& zkHosts, + const string& path, + bool force) const + { + // Connect to ZK server + ZooKeeperAdapterSptr zkHandle = get_zkHandle (zkHosts); + std::cerr << "[zktreeutil] connected to ZK server for writing" + << std::endl; + + // Go to the rooted subtree + ZkTreeNodeSptr zkRootSptr = traverseBranch_ (zkRootSptr_, path); + + // Cleanup before write if forceful write enabled + if (force) + { + if (path != "/") // remove the subtree rooted at the znode + { + // Delete the subtree rooted at the znode before write + if (zkHandle->nodeExists (path)) + { + std::cerr << "[zktreeutil] deleting subtree rooted at " + << path + << "..." + << std::endl; + zkHandle->deleteNode (path, true); + } + } + else // remove the rooted znodes + { + std::cerr << "[zktreeutil] deleting rooted zk-tree" + << "..." + << std::endl; + // Get the root's children + vector< string > cnodes = zkHandle->getNodeChildren ("/"); + for (unsigned i=0; i < cnodes.size(); i++) + { + if ( cnodes[i] != "/zookeeper") // reserved for zookeeper use + zkHandle->deleteNode(cnodes[i], true); + } + } + } + + // Start tree construction + writeZkTree_ (zkHandle, zkRootSptr, path); + return; + } + + void ZkTreeUtil::dumpZkTree (bool xml, int depth) const + { + if (xml) + { + // Creates a new document, a node and set it as a root node + xmlDocPtr docPtr = xmlNewDoc(BAD_CAST "1.0"); + xmlNodePtr rootNode = xmlNewNode(NULL, BAD_CAST "root"); + xmlDocSetRootElement(docPtr, rootNode); + + // Add all the rooted children + for (unsigned i=0; i < zkRootSptr_->numChildren(); i++) + xmlAddChild (rootNode, dumpZkTreeXml_ (zkRootSptr_->getChild (i))); + + // Dumping document to stdio or file + xmlSaveFormatFileEnc("-", docPtr, "UTF-8", 1); + + // Cleanup stuff + xmlFreeDoc(docPtr); + xmlCleanupParser(); + return; + } + + // Dump text + std::cout << "/" << std::endl; + vector< bool > masks; + for (unsigned i=0; i < zkRootSptr_->numChildren(); i++) + { + if (i == zkRootSptr_->numChildren()-1) + masks.push_back(true); + else + masks.push_back(false); + dumpZkTree_ (zkRootSptr_->getChild (i), depth, 1, masks); + } + + return; + } + + vector< ZkAction > ZkTreeUtil::diffZkTree (const string& zkHosts, + const string& path) const + { + // Action container + vector< ZkAction > actions; + + if (!loaded_) + { + std::cout << "[zktreeutil] zk-tree not loaded for diff" + << std::endl; + exit (-1); + } + + // Load the rooted subtree from zookeeper + ZooKeeperAdapterSptr zkHandle = get_zkHandle (zkHosts); + std::cerr << "[zktreeutil] connected to ZK server for reading" + << std::endl; + ZkTreeNodeSptr zkLiveRootSptr = loadZkTree_ (zkHandle, path); + + // Go to the saved rooted subtree + ZkTreeNodeSptr zkLoadedRootSptr = + traverseBranch_ (zkRootSptr_, path); + + // Check the root value first + if (zkLoadedRootSptr->getData().value + != zkLiveRootSptr->getData().value) + { + actions.push_back (ZkAction (ZkAction::VALUE, + path, + zkLoadedRootSptr->getData().value, + zkLiveRootSptr->getData().value)); + } + + // Start traversal from root + vector< string > ppaths; + vector< pair< ZkTreeNodeSptr, ZkTreeNodeSptr > > commonNodes; + ppaths.push_back ((path != "/")? path : ""); + commonNodes.push_back (pair< ZkTreeNodeSptr, ZkTreeNodeSptr > + (zkLoadedRootSptr, zkLiveRootSptr)); + + for (unsigned j=0; j < commonNodes.size(); j++) + { + // Get children of loaded tree + map< string, ZkTreeNodeSptr > loadedChildren; + for (unsigned i=0; i < commonNodes[j].first->numChildren(); i++) + { + ZkTreeNodeSptr childSptr = commonNodes[j].first->getChild (i); + loadedChildren[childSptr->getKey()] = childSptr; + } + // Get children of live tree + map< string, ZkTreeNodeSptr > liveChildren; + for (unsigned i=0; i < commonNodes[j].second->numChildren(); i++) + { + ZkTreeNodeSptr childSptr = commonNodes[j].second->getChild (i); + liveChildren[childSptr->getKey()] = childSptr; + } + + // Start comparing the children + for (map< string, ZkTreeNodeSptr >::const_iterator it = + loadedChildren.begin(); + it != loadedChildren.end(); + it++) + { + bool ignoreKey = it->second->getData().ignoreUpdate; + string loadedVal = it->second->getData().value; + // Path to this node + string path = ppaths[j] + string("/") + it->first; + + map< string, ZkTreeNodeSptr >::const_iterator jt = + liveChildren.find (it->first); + if (jt != liveChildren.end()) + { + // Key is present in live zk-tree + string liveVal = jt->second->getData().value; + // Check value for the key, if not ignored + if (!ignoreKey) + { + if (loadedVal != liveVal) + { + // Value differs, set the new value for the key + actions.push_back (ZkAction (ZkAction::VALUE, + path, + loadedVal, + liveVal)); + } + + // Add node to common nodes + ppaths.push_back (path); + commonNodes.push_back (pair< ZkTreeNodeSptr, ZkTreeNodeSptr > + (it->second, jt->second)); + } + + // Remove the live zk node + liveChildren.erase (it->first); + } + else + { + // Add the subtree rooted to this node, if not ignored + if (!ignoreKey) + addTreeZkAction_ (it->second, path, actions); + } + } + + // Remaining live zk nodes to be deleted + for (map< string, ZkTreeNodeSptr >::const_iterator it = liveChildren.begin(); + it != liveChildren.end(); it++) + { + string path = ppaths[j] + string("/") + it->first; + actions.push_back (ZkAction (ZkAction::DELETE, path)); + } + } + // return the diff actions + return actions; + } + + void ZkTreeUtil::executeZkActions (const string& zkHosts, + const vector< ZkAction >& zkActions, + int execFlags) const + { + // Execute the diff zk actions + if (zkActions.size()) + { + // Connect to Zookeeper for writing + ZooKeeperAdapterSptr zkHandleSptr; + if ((execFlags & EXECUTE) + || (execFlags & INTERACTIVE)) + { + zkHandleSptr = get_zkHandle (zkHosts); + std::cerr << "[zktreeutil] connected to ZK server for writing" + << std::endl; + } + + for (unsigned i=0; i < zkActions.size(); i++) + { + if (zkActions[i].action == ZkAction::CREATE) + { + if (execFlags & PRINT) + std::cout << "CREAT- key:" << zkActions[i].key << std::endl; + if (execFlags & EXECUTE) + { + if (execFlags & INTERACTIVE) + { + string resp; + std::cout << "Execute this action?[yes/no]: "; + std::getline(std::cin, resp); + if (resp != "yes") + continue; + } + zkHandleSptr->createNode(zkActions[i].key.c_str(), "", 0, false); + } + } + else if (zkActions[i].action == ZkAction::DELETE) + { + if (execFlags & PRINT) + std::cout << "DELET- key:" << zkActions[i].key << std::endl; + if (execFlags & EXECUTE) + { + if (execFlags & INTERACTIVE) + { + string resp; + std::cout << "Execute this action?[yes/no]: "; + std::getline(std::cin, resp); + if (resp != "yes") + continue; + } + zkHandleSptr->deleteNode(zkActions[i].key.c_str(), true); + } + } + else if (zkActions[i].action == ZkAction::VALUE) + { + if (execFlags & PRINT) + { + std::cout << "VALUE- key:" + << zkActions[i].key + << " value:" << zkActions[i].newval; + if (zkActions[i].oldval != "") + std::cout << " old_value:" << zkActions[i].oldval; + std::cout << std::endl; + } + if (execFlags & EXECUTE) + { + if (execFlags & INTERACTIVE) + { + string resp; + std::cout << "Execute this action?[yes/no]: "; + std::getline(std::cin, resp); + if (resp != "yes") + continue; + } + zkHandleSptr->setNodeData (zkActions[i].key, zkActions[i].newval); + } + } + } + } + + return; + } + +} + diff --git a/src/contrib/zktreeutil/src/ZkTreeUtil.h b/src/contrib/zktreeutil/src/ZkTreeUtil.h new file mode 100644 index 0000000..0a9be03 --- /dev/null +++ b/src/contrib/zktreeutil/src/ZkTreeUtil.h @@ -0,0 +1,262 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __ZK_TREE_UTIL_H__ +#define __ZK_TREE_UTIL_H__ + +#include +#include +#include "SimpleTree.h" +#include "ZkAdaptor.h" + +namespace zktreeutil +{ + +#define ZKTREEUTIL_INF 1000000000 + /** + * \brief A structure containing ZK node data. + */ + struct ZkNodeData + { + /** + * \brief The value string of the ZK node. + */ + string value; + + /** + * \brief The flag indicating whether children of the + * \brief node shduld be ignored during create/diff/update + */ + bool ignoreUpdate; + + /** + * \brief Constructor. + * + * @param val the value string + * @param ignore the flag indicating ignore any update/diff + */ + ZkNodeData (const string& val, bool ignore=false) + : value (val), ignoreUpdate (ignore) {} + + /** + * \brief Constructor. + * + * @param ignore the flag indicating ignore any update/diff + */ + ZkNodeData (bool ignore=false) + : ignoreUpdate (ignore) {} + }; + + /** + * \brief The type representing a ZK Treenode + */ + typedef SimpleTreeNode< string, ZkNodeData > ZkTreeNode; + + /** + * \brief The type representing a ZK Treenode smart-pointer + */ + typedef boost::shared_ptr< ZkTreeNode > ZkTreeNodeSptr; + + /** + * \brief The type representing a ZK Adapter smart-pointer + */ + typedef boost::shared_ptr< ZooKeeperAdapter > ZooKeeperAdapterSptr; + + /** + * \brief A structure defining a particular action on ZK node; + * \brief the action can be any of - + * \brief CREAT- : creates recussively + * \brief DELET- : deletes recursively + * \brief VALUE- : sets to + */ + struct ZkAction + { + /** + * \brief The action type; any of create/delete/setvalue. + */ + enum ZkActionType + { + NONE, + CREATE, + DELETE, + VALUE, + }; + + /** + * \brief action of this instance + */ + ZkActionType action; + + /** + * \brief ZK node key + */ + string key; + + /** + * \brief value to be set, if action is setvalue + */ + string newval; + + /** + * \brief existing value of the ZK node key + */ + string oldval; + + /** + * \brief Constructor. + */ + ZkAction () + : action (ZkAction::NONE) {} + + /** + * \brief Constructor. + * + * @param act the action to be taken + * @param k the key on which action to be taken + */ + ZkAction (ZkActionType act, const string& k) + : action(act), + key(k) {} + + /** + * \brief Constructor. + * + * @param act the action to be taken + * @param k the key on which action to be taken + * @param v the value of the ZK node key + */ + ZkAction (ZkActionType act, const string& k, const string& v) + : action(act), + key(k), + newval(v) {} + + /** + * \brief Constructor. + * + * @param act the action to be taken + * @param k the key on which action to be taken + * @param nv the new value of the ZK node key + * @param ov the old value of the ZK node key + */ + ZkAction (ZkActionType act, const string& k, const string& nv, const string& ov) + : action (act), + key(k), + newval(nv), + oldval(ov) {} + }; + + /** + * \brief The ZK tree utility class; supports loading ZK tree from ZK server OR + * \brief from saved XML file, saving ZK tree into XML file, dumping the ZK tree + * \brief on standard output, creting a diff between saved ZK tree and live ZK + * \brief tree and incremental update of the live ZK tree. + */ + class ZkTreeUtil + { + public: + /** + * \brief Execution flag on ZkAction + */ + enum ZkActionExecuteFlag + { + NONE = 0, + PRINT = 1, + EXECUTE = 2, + INTERACTIVE = 5, + }; + + public: + /** + * \brief Connects to zookeeper and returns a valid ZK handle + * + * @param zkHosts comma separated list of host:port forming ZK quorum + * @param a valid ZK handle + */ + static ZooKeeperAdapterSptr get_zkHandle (const string& zkHosts); + + + public: + /** + * \brief Constructor. + */ + ZkTreeUtil () : loaded_(false) {} + + /** + * \brief loads the ZK tree from ZK server into memory + * + * @param zkHosts comma separated list of host:port forming ZK quorum + * @param path path to the subtree to be loaded into memory + * @param force forces reloading in case tree already loaded into memory + */ + void loadZkTree (const string& zkHosts, const string& path="/", bool force=false); + + /** + * \brief loads the ZK tree from XML file into memory + * + * @param zkXmlConfig ZK tree XML file + * @param force forces reloading in case tree already loaded into memory + */ + void loadZkTreeXml (const string& zkXmlConfig, bool force=false); + + /** + * \brief writes the in-memory ZK tree on to ZK server + * + * @param zkHosts comma separated list of host:port forming ZK quorum + * @param path path to the subtree to be written to ZK tree + * @param force forces cleanup of the ZK tree on the ZK server before writing + */ + void writeZkTree (const string& zkHosts, const string& path="/", bool force=false) const; + + /** + * \brief dupms the in-memory ZK tree on the standard output device; + * + * @param xml flag indicates whether tree should be dumped in XML format + * @param depth the depth of the tree to be dumped for non-xml dump + */ + void dumpZkTree (bool xml=false, int depth=ZKTREEUTIL_INF) const; + + /** + * \brief returns a list of actions after taking a diff of in-memory + * \brief ZK tree and live ZK tree. + * + * @param zkHosts comma separated list of host:port forming ZK quorum + * @param path path to the subtree in consideration while taking diff with ZK tree + * @return a list of ZKAction instances to be performed on live ZK tree + */ + vector< ZkAction > diffZkTree (const string& zkHosts, const string& path="/") const; + + /** + * \brief performs create/delete/setvalue by executing a set of + * ZkActions on a live ZK tree. + * + * @param zkHosts comma separated list of host:port forming ZK quorum + * @param zkActions set of ZkActions + * @param execFlags flags indicating print/execute/interactive etc + */ + void executeZkActions (const string& zkHosts, + const vector< ZkAction >& zkActions, + int execFlags) const; + + private: + + ZkTreeNodeSptr zkRootSptr_; // ZK tree root node + bool loaded_; // Falg indicating whether ZK tree loaded into memory + }; +} + +#endif // __ZK_TREE_UTIL_H__ diff --git a/src/contrib/zktreeutil/src/ZkTreeUtilMain.cc b/src/contrib/zktreeutil/src/ZkTreeUtilMain.cc new file mode 100644 index 0000000..8afebf6 --- /dev/null +++ b/src/contrib/zktreeutil/src/ZkTreeUtilMain.cc @@ -0,0 +1,247 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif +#include +#include +#include "ZkTreeUtil.h" + +using namespace zktreeutil; + +// The set of "long" options accepted by this program. +static struct option long_options[] = { + {"help", no_argument, 0, 'h'}, + {"import", no_argument, 0, 'I'}, + {"export", no_argument, 0, 'E'}, + {"update", no_argument, 0, 'U'}, + {"diff", no_argument, 0, 'F'}, + {"dump", no_argument, 0, 'D'}, + {"force", no_argument, 0, 'f'}, + {"xmlfile", required_argument, 0, 'x'}, + {"path", required_argument, 0, 'p'}, + {"depth", required_argument, 0, 'd'}, + {"zookeeper", required_argument, 0, 'z'}, + {0, 0, 0, 0} +}; +static char *short_options = "IEUFDfx:p:d:hz:"; + +static void usage(int argc, char *argv[]) +{ + std::cout << "ZK-tree utility for managing ZK-tree with XML import/export," << std::endl; + std::cout << "viewing diff between live and saved ZK-tree and performing" << std::endl; + std::cout << "incremental update of the same." << std::endl; + std::cout << "Usage: " << argv[0] << " [args-and-values]+" << std::endl; + std::cout + << "\t--import or -I: " + << std::endl + << "\t Imports the zookeeper tree from XML file. Must be specified with" + << std::endl + << "\t --zookeeper AND --xmlfile options. Optionally takes --path for" + << std::endl + << "\t importing subtree" + << std::endl; + std::cout + << "\t--export or -E: " + << std::endl + << "\t Exports the zookeeper tree to XML file. Must be specified with" + << std::endl + << "\t --zookeeper option. Optionally takes --path for exporting subtree" + << std::endl; + std::cout + << "\t--update or -U: " + << std::endl + << "\t Updates zookeeper tree with changes from XML file. Update operation" + << std::endl + << "\t is interactive unless specified with --force option. Must be speci-" + << std::endl + << "\t fied with --zookeeper AND --xmlfile options. Optionally takes --path" + << std::endl + << "\t for updating subtree." + << std::endl; + std::cout + << "\t--diff or -F: " + << std::endl + << "\t Creates a list of diff actions on ZK tree based on XML data. Must" + << std::endl + << "\t be specified with --zookeeper OR --xmlfile options. Optionally takes" + << std::endl + << "\t --path for subtree diff" + << std::endl; + std::cout + << "\t--dump or -D: " + << std::endl + << "\t Dumps the entire ZK (sub)tree to standard output. Must be specified" + << std::endl + << "\t with --zookeeper OR --xmlfile options. Optionally takes --path and" + << std::endl + << "\t --depth for dumping subtree." + << std::endl; + std::cout + << "\t--xmlfile= or -x : " + << std::endl + << "\t Zookeeper tree-data XML file." + << std::endl; + std::cout + << "\t--path= or -p : " + << std::endl + << "\t Path to the zookeeper subtree rootnode." + << std::endl; + std::cout + << "\t--depth= or -d : " + << std::endl + << "\t Depth of the ZK tree to be dumped (ignored for XML dump)." + << std::endl; + std::cout + << "\t--force or -f: Forces cleanup before import; also used for forceful" + << std::endl + << "\t update. Optionally be specified with --import and --update." + << std::endl; + std::cout + << "\t--help or -h: " + << std::endl + << "\t prints this message" + << std::endl; + std::cout + << "\t--zookeeper= or -z : " + << std::endl + << "\t specifies information to connect to zookeeper." + << std::endl; +} + +int main(int argc, char **argv) +{ + if (argc == 1) { + usage(argc, argv); + exit(0); + } + + // Parse the arguments. + int op = 0; + bool force = false; + string zkHosts; + string xmlFile; + string path = "/"; + int depth = 0; + while (1) + { + int c = getopt_long(argc, argv, short_options, long_options, 0); + if (c == -1) + break; + + switch (c) { + case 'I': op = c; + break; + case 'E': op = c; + break; + case 'U': op = c; + break; + case 'F': op = c; + break; + case 'D': op = c; + break; + case 'f': force = true; + break; + case 'x': xmlFile = optarg; + break; + case 'p': path = optarg; + break; + case 'd': depth = atoi (optarg); + break; + case 'z': zkHosts = optarg; + break; + case 'h': usage (argc, argv); + exit(0); + } + } + + ZkTreeUtil zkTreeUtil; + switch (op) + { + case 'I': { + if (zkHosts == "" || xmlFile == "") + { + std::cout << "[zktreeutil] missing params; please see usage" << std::endl; + exit (-1); + } + zkTreeUtil.loadZkTreeXml (xmlFile); + zkTreeUtil.writeZkTree (zkHosts, path, force); + std::cout << "[zktreeutil] import successful!" << std::endl; + break; + } + case 'E': { + if (zkHosts == "") + { + std::cout << "[zktreeutil] missing params; please see usage" << std::endl; + exit (-1); + } + zkTreeUtil.loadZkTree (zkHosts, path); + zkTreeUtil.dumpZkTree (true); + break; + } + case 'U': { + if (zkHosts == "" || xmlFile == "") + { + std::cout << "[zktreeutil] missing params; please see usage" << std::endl; + exit (-1); + } + zkTreeUtil.loadZkTreeXml (xmlFile); + vector< ZkAction > zkActions = zkTreeUtil.diffZkTree (zkHosts, path); + int flags = ZkTreeUtil::EXECUTE; + if (!force) flags |= ZkTreeUtil::INTERACTIVE; + zkTreeUtil.executeZkActions (zkHosts, zkActions, flags); + std::cout << "[zktreeutil] update successful!" << std::endl; + break; + } + case 'F': { + if (zkHosts == "" || xmlFile == "") + { + std::cout << "[zktreeutil] missing params; please see usage" << std::endl; + exit (-1); + } + zkTreeUtil.loadZkTreeXml (xmlFile); + vector< ZkAction > zkActions = zkTreeUtil.diffZkTree (zkHosts, path); + zkTreeUtil.executeZkActions (zkHosts, zkActions, ZkTreeUtil::PRINT); + break; + } + case 'D': { + if (zkHosts != "") + zkTreeUtil.loadZkTree (zkHosts, path); + else if (xmlFile != "") + zkTreeUtil.loadZkTreeXml (xmlFile); + else + { + std::cout << "[zktreeutil] missing params; please see usage" << std::endl; + exit (-1); + } + // Dump the ZK tree + if (depth) zkTreeUtil.dumpZkTree (false, depth); + else zkTreeUtil.dumpZkTree (false); + break; + } + } + + exit(0); +} + diff --git a/src/contrib/zktreeutil/tests/zk_sample.xml b/src/contrib/zktreeutil/tests/zk_sample.xml new file mode 100644 index 0000000..6e97daa --- /dev/null +++ b/src/contrib/zktreeutil/tests/zk_sample.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/contrib/zooinspector/NOTICE.txt b/src/contrib/zooinspector/NOTICE.txt new file mode 100644 index 0000000..e0bf2f0 --- /dev/null +++ b/src/contrib/zooinspector/NOTICE.txt @@ -0,0 +1,3 @@ +This contrib module includes icons available under the Eclipse Public Licence Version 1.0 +. from the Eclipse Java Devlopment Platform. +The lib sub-directory includes a binary only jar library developed at http://sourceforge.net/projects/jtoaster/ \ No newline at end of file diff --git a/src/contrib/zooinspector/README.txt b/src/contrib/zooinspector/README.txt new file mode 100644 index 0000000..3c2a58f --- /dev/null +++ b/src/contrib/zooinspector/README.txt @@ -0,0 +1,94 @@ +========================================== +ZooInspector - Browser and Editor for ZooKeeper Instances +Author: Colin Goodheart-Smithe +Date: February 2010 +========================================== + +ZooInspector is a Java Swing based application for browsing and editing ZooKeeper instances. + +Contents +-------- + - Features + - Pre-requisites + - Build Instructions + - Using ZooInspector + - Creating and Using Plugins + +Features +-------- + Below is a list of features in the current release of ZooInspector. + - Load connection settings from a zookeeper properties file + - Plugable DataEncryptionManagers to specify how data should be encrypted and decrypted in the Zookeeper instance + - Browseable tree view of the ZooKeeper instance + - View the data in a node + - View the ACL's currently applied to a node + - View the metadata for a node (Version, Number of Children, Last modified Tiem, etc.) + - Plugable NodeViewers interface + - Ability to save/load and set default Node Viewers + +Pre-requisites +-------------- + - The main zookeeper build script must have been run before building this module + +Build Instructions +------------------ + 1. Open a command line. + 2. cd into this directory + 3. Run command: ant + 4. ZooInspector will be built to ../../../build/contrib/ZooInspector + 5. Copy zookeeper-3.x.x.jar into the lib sub-directory (if you are using zookeeper-3.3.0.jar it will have been + copied to this directory during the build + 6. By default the zookeeper.cmd and zookeeper.sh files expect zookeeper-3.3.0.jar. If you are using another version + you will need to change these files to point to the zookeeper-3.x.x.jar you copied to the lib directory + 7. To run ZooInspector run zooInspector.cmd (on Windows) or zooInspector.sh (on Linux). If you are using + zookeeper-3.3.0.jar and do not require any classpath changes you can run the zookeeper-dev-ZooInspector.jar + directly + +Using ZooInspector +------------------ + To start ZooInspector run zooInspector.cmd (on Windows) or zooInspector.sh (on Linux). If you are using + zookeeper-3.3.0.jar and do not require any classpath changes you can run the zookeeper-dev-ZooInspector.jar + directly. + + Click the play button on the toolbar to bring up the connection dialog. From here you can enter connection + information for your zookeeper instance. You can also load the connection properties from a file. This file can + have the format as a normal zookeeper properties file (i.e. hosts and timeout key-value pairs) and van optional have + an encryptionManager key-value pair to specify the DataEncryptionManager to use for this connection + (DataEncryptionManagers are explained in further detail in the 'Creating and Using Plugins' section below). You can + also set the entered information as the defaults so that when you first start ZooInspector these settings are + automatically loaded into this dialog. Pressing the OK button with connect to your ZooKeeper instance and show the + current node tree on the left of the main panel. + + Clicking a node in the node tree will load the data for that node into the node viewers. Three node viewers are + currently distributed with ZooInspector: + 1. Node Data - This enables you to see the data current stored on that node. This data can be modified and + saved. The data is decrypted and encrypted using the DataEncryptionManager specified on the connection + dialog. + 2. Node Metadata - This enables you to see the metadata associiated with this node. This is Essentially the data + obtained from the Stat object for this node. + 3. Node ACLs - This allows you to see the ACLs currently applied to this node. Currently there is no ability + to change the ACLs on a node, but it is a feature I would like to add. + Other custom Node Viewers can be added, this is explained in the 'Creating and Using Plugins' section below. + + +Creating and Using Plugins +-------------------------- + There are two types of plugin which can be used with ZooInspector: + 1. DataEncryptionManager - This specifies how data should be encrypted and decrypted when working with a + zookeeper instance. + 2. ZooInspectorNodeViewer - This is a GUI panel which provides a view of visualisation on a node. + More information on these interfaces can be found in the javadocs for this module. + + To use a plugin in ZooInspector, build the plugin to a jar and copy the jar to the lib sub-directory. Edit the + zooInspector.cmd and/or zooInspector.sh files to include your new jar on the classpath and run ZooInspector. + + For DataEncryptionManagers, click the play button to open the connection dialog and enter the full class name of + your DataEncryptionManager in the 'Data Encryption Manager' field. You can make this Data Encryption Manager the + default by clicking 'Set As Default'. Click the 'OK' button to instantiate and use your plugin. + + For ZooInspectorNodeViewers, Click the 'Change Node Viewers' button on the toolbar (looks like a tree with a pencil) + and enter the full classname for your Node Viewer in the field left of the 'Add' button, then click the 'Add' + button. The Node Viewer will be instantiated and should appear in the list. You can change the order of the Node + viewers by clicking the up and dpwn buttons and delete a Node Viewer by clicking the delete button. You can save + to configuration to a file or set it as the default if necessary. Then click the 'OK' button and your Node Viewer + should appear in the tabs on the right of the main panel. \ No newline at end of file diff --git a/src/contrib/zooinspector/build.xml b/src/contrib/zooinspector/build.xml new file mode 100644 index 0000000..a242790 --- /dev/null +++ b/src/contrib/zooinspector/build.xml @@ -0,0 +1,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Tests failed! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/contrib/zooinspector/config/defaultConnectionSettings.cfg b/src/contrib/zooinspector/config/defaultConnectionSettings.cfg new file mode 100644 index 0000000..36a34ff --- /dev/null +++ b/src/contrib/zooinspector/config/defaultConnectionSettings.cfg @@ -0,0 +1,21 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +#Default connection for ZooInspector +hosts=localhost\:2181 +encryptionManager=org.apache.zookeeper.inspector.encryption.BasicDataEncryptionManager +timeout=5000 +authScheme= +authData= diff --git a/src/contrib/zooinspector/config/defaultNodeVeiwers.cfg b/src/contrib/zooinspector/config/defaultNodeVeiwers.cfg new file mode 100644 index 0000000..38fe9a8 --- /dev/null +++ b/src/contrib/zooinspector/config/defaultNodeVeiwers.cfg @@ -0,0 +1,17 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +org.apache.zookeeper.inspector.gui.nodeviewer.NodeViewerData +org.apache.zookeeper.inspector.gui.nodeviewer.NodeViewerMetaData +org.apache.zookeeper.inspector.gui.nodeviewer.NodeViewerACL diff --git a/src/contrib/zooinspector/icons/edtsrclkup_co.gif b/src/contrib/zooinspector/icons/edtsrclkup_co.gif new file mode 100644 index 0000000000000000000000000000000000000000..94eedf6f92944ef56a7165d98ee6482ad24d00f3 GIT binary patch literal 204 zcmZ?wbhEHb6krfwIKsdXQ?+X1(&P7^zE^TizkPY(?k!y(Zmf8Dr0(0Z6O(Jgr_{$z zZA_S45!jz;(U)n_pJO+nzamx|{omhdZ+pPy1w_LK}lAnr-`SJ62+pK*(^ACOa@_X{KW3$$r zUbOlAiXE5N?74dH#gDtszu$lH{mGl3&)@xg`{~!`Z@=#VMPB~6_u~7*S3h2T`1$R} z?`Q9Re)#(P)3@JWfBgRb^LKTLe^s%6bxA;7sb4jaQ5?`-<Y72H(vk7Xs us!1$fvP8{QU92ZrK%7tARasP&f6JDw8m_8J3W|I7DyXXX9C3DJum%7=h^`F) literal 0 HcmV?d00001 diff --git a/src/contrib/zooinspector/icons/fldr_obj.gif b/src/contrib/zooinspector/icons/fldr_obj.gif new file mode 100644 index 0000000000000000000000000000000000000000..51e703b1b9c671baa2be0f6525edb3b69403370d GIT binary patch literal 216 zcmZ?wbhEHb6krfwIKsg2wj(b5!P~sjn^4pBFDXFJ7TPNb)}zFdzZN zpDc_F4AKlbATf}g46LCK)cR5~=VfGBty!EmMJ+qTijl!k<;;`cOWYDXbj&=28jDUI znIPA;;-J&oD09KqYe6rnb~B%5E3$|tF?k!UrOe@6&xDe6Z(8Y4cFg@2oFwXHJRx@P^{Hj-{g3x~&Wh)&R@kLgN4c literal 0 HcmV?d00001 diff --git a/src/contrib/zooinspector/icons/launch_run.gif b/src/contrib/zooinspector/icons/launch_run.gif new file mode 100644 index 0000000000000000000000000000000000000000..57f410224cf0e125fefdfbfd424b34ca32650ac4 GIT binary patch literal 379 zcmZ?wbhEHb6krfwxXQqw(BP;BL>-Qf6T{aP*iM?lCLeYNChZ zME|t4Kq*J#ax2FU508od{@|VOltj+J(UOww!N5}U3iQCI3ZqHwGu%qFO+M$;f|G|KP zbfEZ?g^__lk3k2d733!dwiyo73p{kh9NV1~0xTMO)-@+?HCpL1C+*_|jkQs$L%3SK zWZD#%Uw+AK^#3sVq2$yax7_cq>g;#(C^lABHOjI%u}OEy<@M@F%Q8AK@K5dOm7mJO z;KV30f4Z*Rd;#G}fjokO)8$r)3o+Lza0p5E$no(>iVJg;1ab?@$%#scNeOe;IkR(c Y3G?y_b8(z@@nG_1@(Z}@>d0UX09ibCp#T5? literal 0 HcmV?d00001 diff --git a/src/contrib/zooinspector/icons/launch_stop.gif b/src/contrib/zooinspector/icons/launch_stop.gif new file mode 100644 index 0000000000000000000000000000000000000000..fbf1686e4b47fd4e9fe639c6b6d7bb49ca09b706 GIT binary patch literal 916 zcma)5Ur1A76hFJWvg?r8zLu)g97e2UJ)cYo*m&hPxr`ObGw zHlGlVw3)yJ-2jSHPy|sC-HKbvwFeR=yJC0B4q@ICkR?%Wb+3=dWKoCD>tJZN&Y})vc0? zTOEK!!^&%5<_m>7ZC_W>bffI*0Q3M>?MO!kHZXwP0@Ip=?UVM1>UuGCF{Xf8sWA(3 z)Kjm6bOcEU|GOtg`5x>V>q(97$0M}V=%K74XBDyf1rJb_8f)3XjPuJ9KnQ?UaVC_s zI}OT#>bSLH<}0q*A08y4I)F~U@`hh_BjWqhz;@}spU0B0JaRKb20rPPmvrzs9h@Tm z1Ot1pchVsPFe=U=z6~%Txx#KZA-Ifg}E3bkV~vIf*ZhHQ@NZ<>v6tiSIG- zJpteVwvnz-wlM@ySr)le222^KbHuRX_{y85@o6sN&lpg|KRX{GE~iCqrTN3WZDOeH zD$FI%!P#(rsFZ_rp2k-}g#b=1?~2ho0qqqLoD>;I_~1$d9PEONHF*}VfWSVLrv4Ma zU5C9K?;ejP?{V90ebMO9v2L@mwpEFe)rKmPps{rBguKlfhzc=G1w^LIbre)@Ii`S<%Te>{Bk z12|TpyR{>mrI{2JXHL%C7O09Mu>554H9&1sF`=rV`q@7GGB8G zKfk`Pt2BF0FFPY+r;7~t)M?XXTxEIZ%$>s~>nhH=Wa(0IS4pnbYt~4*N^x%5yop81 WRg`1b?%krUA_op05^-{5um%7kHK6(c literal 0 HcmV?d00001 diff --git a/src/contrib/zooinspector/icons/refresh.gif b/src/contrib/zooinspector/icons/refresh.gif new file mode 100644 index 0000000000000000000000000000000000000000..3ca04d06ff9c811a6f791d029a802a7be4681ff4 GIT binary patch literal 327 zcmZ?wbhEHb6krfwxXQrrJWa!4-LeYm0=|77MK@5?WI%v@BcT|Ns9CR0WDZSr{1@R2g(Yrh@#$z?O1g zQh|q#RHw+PiyoXB)1AE)3U1~skT{fJ?U6BUYICAZn$5HYp3GD7dKS#fQdLEHHy z6I^aRo~tUt;P2kV6w~t;=?ud9vy7?cE^q z*1q%4_Md-x_|o&km!6%t_VVPl7w2!kK6mTY)%$O+-hXrZ@w-PaKBPA<&u(2-(6RIc zNcPq9H=oX5zOnP@<=ao*J$&)u*_+SB-Al@Q7r*)NC8Bg+ zz;2_n+r|KMbN2{G6a4_&{kGN)4gvc5juAGR#sRMOu1@w&t^vlzRuN`KMgigX?uQ4k zYgk5@s;SFPcrC52W*VWRCnlyRuKMMRsEVpigru?tONzsU2OVNcZfg!)N^s&3;9>A! zDQIQv=+@exGeO}YGc&uwQjf$B2b)>gB6wUn7Bn7go*uf&AmXGW<1{9LBBLK|is)RRH2yZMG-dG{LyHRvkqv*C;prFW}Cb1QH0&9u|R~HDbFBMu_B(%Cf zXj8fH`cmQLIReYF1^)m4&p+|z+lLr1JVKV69Zf3ff)rJI#S8AmOS&g!objY zXp*F{?P9eo9}@`oK{Iw9&}i^SBU4D}c3FLN?5SiQ`V!5RSYo{04T literal 0 HcmV?d00001 diff --git a/src/contrib/zooinspector/icons/search_prev.gif b/src/contrib/zooinspector/icons/search_prev.gif new file mode 100644 index 0000000000000000000000000000000000000000..07164754e5ca231666d9daf7fa4a9d12e378a52a GIT binary patch literal 323 zcmZ?wbhEHb6krfwxXQrr@9+D6zn=X4cJ<${r+>d*`SKk--`OT*-X9 literal 0 HcmV?d00001 diff --git a/src/contrib/zooinspector/icons/trash.gif b/src/contrib/zooinspector/icons/trash.gif new file mode 100644 index 0000000000000000000000000000000000000000..5f47780f0e61161f1fb21701d68f697fe80cbec9 GIT binary patch literal 132 zcmV-~0DJ#ONk%w1VGsZi0Kx|VhLob9uDr9s&%Mjp$JFB5==JpZ{{R30A^8LW000L7 zEC2ui01yBW0009?c&gC8kOf0c0P(oZ7pO)d76c&(n8vM*SB<2ZGNDimwh*AuSJ=4U mZlJf6sN=bQN1>AjWhS3M!*M literal 0 HcmV?d00001 diff --git a/src/contrib/zooinspector/ivy.xml b/src/contrib/zooinspector/ivy.xml new file mode 100644 index 0000000..bc02946 --- /dev/null +++ b/src/contrib/zooinspector/ivy.xml @@ -0,0 +1,48 @@ + + + + + + + + ZooInspector + + + + + + + + + + + + + + + + + + + + diff --git a/src/contrib/zooinspector/lib/jtoaster-1.0.4.jar b/src/contrib/zooinspector/lib/jtoaster-1.0.4.jar new file mode 100644 index 0000000000000000000000000000000000000000..aaf3f6ea06f4b66fbe1719f63dd8f68e6ed05193 GIT binary patch literal 14975 zcma)j1CS-#)@IqZZ5v&-ZQHhO+vswaZQHhOqpP~AOVj<{%-p^==700niHyh-=j6)0 zkSq88_P6AvfI(0IAbx#Tnn;)d{ty%Z5C9nwWdT|VSy6f!0a*!A5hZ0h8PSh%0DuRX z$q8vGTDmz{DO#%O$(aU4hDGMxqkEaj$px2b2^zX)Me*sGrHKieG3l`tYTB_$%4O;? zIT|_%+Igoc@k!cIiKC#a+|7~xT`H&38yb;{V;V#5|hZG_E&iW z2%Jkk38E-?9Z5z zt>C9Zic@bS+-4c@eDS~Wh(WiJ+z;!VF;S?{1uM2Ye&boH8CEbBj|uz9*;+ijUf(iL zk#AkJJc{}Qj77j9f-+QkcQ>=cTmSn928(-=`dDhNJC6h1ROoyk(77m{O0ap)ad7Ws zJEdmwT5vRjCx^(si)&61Mi%OTxPtTyHiQ}k@+bjzd`&5raQZv{hp!~Qi?X`Uz)wLk zAtZtXjs#|5cE=-5Q0!Hb=%iV+W-~fh)6OmY-=Wk0nWb(92moLS^q)dU`rm}k(!kX~ zC6*CBkO3j&WV?nVBR>BPVBg$OI-9|P0gjx-y{@r{)==>IMldg^Mf-mH$F+{wQWjQ7 zicRreZ&Qko{*_7XVUQyz{|XINL)U6`!*?u*$@arAN+6QMF!F%%72;m__w?r`p09$@SluV{&)V82-sTK7&u$l+5S6& zQ&hF=kxfuOWa}l?o%3l4DV~Uufh;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dw$3~8s`zarxy!}{fq1G+7IZTfWO!4jg9-E zHt+xdx-`GhCqN(+fWP|N{%ke--QV_i`JcMo{?zijE$z>)r{8?Qza;M0>3`Rx_D`LE zHWU5c@Bd3Af8h@QU!A{q|Nm6^n~we`QT=xp(qAG5{2x^Q4?Ri$)cz-3@;BN2FX4s! zFSP$ZsPF&0!=L1czq=XjS9t$Nm;4_>#J_q0|J3=LR`DmI{C77;qW>2<|LNx6Q1qYh z?r$jiFDWDX6PW&UD8IqqKT*=(;O}2zNBkEQ{O47_5!63X!rut$U!wo(>wkl%{;Bad zy7(u)^&4IMOHzM%=-*i5pV$0GzW#j1ej{Ih2_5 + + + + + +Eclipse Public License - Version 1.0 + + + + + + +

    Eclipse Public License - v 1.0

    + +

    THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE +PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR +DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS +AGREEMENT.

    + +

    1. DEFINITIONS

    + +

    "Contribution" means:

    + +

    a) in the case of the initial Contributor, the initial +code and documentation distributed under this Agreement, and

    +

    b) in the case of each subsequent Contributor:

    +

    i) changes to the Program, and

    +

    ii) additions to the Program;

    +

    where such changes and/or additions to the Program +originate from and are distributed by that particular Contributor. A +Contribution 'originates' from a Contributor if it was added to the +Program by such Contributor itself or anyone acting on such +Contributor's behalf. Contributions do not include additions to the +Program which: (i) are separate modules of software distributed in +conjunction with the Program under their own license agreement, and (ii) +are not derivative works of the Program.

    + +

    "Contributor" means any person or entity that distributes +the Program.

    + +

    "Licensed Patents" mean patent claims licensable by a +Contributor which are necessarily infringed by the use or sale of its +Contribution alone or when combined with the Program.

    + +

    "Program" means the Contributions distributed in accordance +with this Agreement.

    + +

    "Recipient" means anyone who receives the Program under +this Agreement, including all Contributors.

    + +

    2. GRANT OF RIGHTS

    + +

    a) Subject to the terms of this Agreement, each +Contributor hereby grants Recipient a non-exclusive, worldwide, +royalty-free copyright license to reproduce, prepare derivative works +of, publicly display, publicly perform, distribute and sublicense the +Contribution of such Contributor, if any, and such derivative works, in +source code and object code form.

    + +

    b) Subject to the terms of this Agreement, each +Contributor hereby grants Recipient a non-exclusive, worldwide, +royalty-free patent license under Licensed Patents to make, use, sell, +offer to sell, import and otherwise transfer the Contribution of such +Contributor, if any, in source code and object code form. This patent +license shall apply to the combination of the Contribution and the +Program if, at the time the Contribution is added by the Contributor, +such addition of the Contribution causes such combination to be covered +by the Licensed Patents. The patent license shall not apply to any other +combinations which include the Contribution. No hardware per se is +licensed hereunder.

    + +

    c) Recipient understands that although each Contributor +grants the licenses to its Contributions set forth herein, no assurances +are provided by any Contributor that the Program does not infringe the +patent or other intellectual property rights of any other entity. Each +Contributor disclaims any liability to Recipient for claims brought by +any other entity based on infringement of intellectual property rights +or otherwise. As a condition to exercising the rights and licenses +granted hereunder, each Recipient hereby assumes sole responsibility to +secure any other intellectual property rights needed, if any. For +example, if a third party patent license is required to allow Recipient +to distribute the Program, it is Recipient's responsibility to acquire +that license before distributing the Program.

    + +

    d) Each Contributor represents that to its knowledge it +has sufficient copyright rights in its Contribution, if any, to grant +the copyright license set forth in this Agreement.

    + +

    3. REQUIREMENTS

    + +

    A Contributor may choose to distribute the Program in object code +form under its own license agreement, provided that:

    + +

    a) it complies with the terms and conditions of this +Agreement; and

    + +

    b) its license agreement:

    + +

    i) effectively disclaims on behalf of all Contributors +all warranties and conditions, express and implied, including warranties +or conditions of title and non-infringement, and implied warranties or +conditions of merchantability and fitness for a particular purpose;

    + +

    ii) effectively excludes on behalf of all Contributors +all liability for damages, including direct, indirect, special, +incidental and consequential damages, such as lost profits;

    + +

    iii) states that any provisions which differ from this +Agreement are offered by that Contributor alone and not by any other +party; and

    + +

    iv) states that source code for the Program is available +from such Contributor, and informs licensees how to obtain it in a +reasonable manner on or through a medium customarily used for software +exchange.

    + +

    When the Program is made available in source code form:

    + +

    a) it must be made available under this Agreement; and

    + +

    b) a copy of this Agreement must be included with each +copy of the Program.

    + +

    Contributors may not remove or alter any copyright notices contained +within the Program.

    + +

    Each Contributor must identify itself as the originator of its +Contribution, if any, in a manner that reasonably allows subsequent +Recipients to identify the originator of the Contribution.

    + +

    4. COMMERCIAL DISTRIBUTION

    + +

    Commercial distributors of software may accept certain +responsibilities with respect to end users, business partners and the +like. While this license is intended to facilitate the commercial use of +the Program, the Contributor who includes the Program in a commercial +product offering should do so in a manner which does not create +potential liability for other Contributors. Therefore, if a Contributor +includes the Program in a commercial product offering, such Contributor +("Commercial Contributor") hereby agrees to defend and +indemnify every other Contributor ("Indemnified Contributor") +against any losses, damages and costs (collectively "Losses") +arising from claims, lawsuits and other legal actions brought by a third +party against the Indemnified Contributor to the extent caused by the +acts or omissions of such Commercial Contributor in connection with its +distribution of the Program in a commercial product offering. The +obligations in this section do not apply to any claims or Losses +relating to any actual or alleged intellectual property infringement. In +order to qualify, an Indemnified Contributor must: a) promptly notify +the Commercial Contributor in writing of such claim, and b) allow the +Commercial Contributor to control, and cooperate with the Commercial +Contributor in, the defense and any related settlement negotiations. The +Indemnified Contributor may participate in any such claim at its own +expense.

    + +

    For example, a Contributor might include the Program in a commercial +product offering, Product X. That Contributor is then a Commercial +Contributor. If that Commercial Contributor then makes performance +claims, or offers warranties related to Product X, those performance +claims and warranties are such Commercial Contributor's responsibility +alone. Under this section, the Commercial Contributor would have to +defend claims against the other Contributors related to those +performance claims and warranties, and if a court requires any other +Contributor to pay any damages as a result, the Commercial Contributor +must pay those damages.

    + +

    5. NO WARRANTY

    + +

    EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS +PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS +OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, +ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY +OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely +responsible for determining the appropriateness of using and +distributing the Program and assumes all risks associated with its +exercise of rights under this Agreement , including but not limited to +the risks and costs of program errors, compliance with applicable laws, +damage to or loss of data, programs or equipment, and unavailability or +interruption of operations.

    + +

    6. DISCLAIMER OF LIABILITY

    + +

    EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT +NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING +WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR +DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED +HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

    + +

    7. GENERAL

    + +

    If any provision of this Agreement is invalid or unenforceable under +applicable law, it shall not affect the validity or enforceability of +the remainder of the terms of this Agreement, and without further action +by the parties hereto, such provision shall be reformed to the minimum +extent necessary to make such provision valid and enforceable.

    + +

    If Recipient institutes patent litigation against any entity +(including a cross-claim or counterclaim in a lawsuit) alleging that the +Program itself (excluding combinations of the Program with other +software or hardware) infringes such Recipient's patent(s), then such +Recipient's rights granted under Section 2(b) shall terminate as of the +date such litigation is filed.

    + +

    All Recipient's rights under this Agreement shall terminate if it +fails to comply with any of the material terms or conditions of this +Agreement and does not cure such failure in a reasonable period of time +after becoming aware of such noncompliance. If all Recipient's rights +under this Agreement terminate, Recipient agrees to cease use and +distribution of the Program as soon as reasonably practicable. However, +Recipient's obligations under this Agreement and any licenses granted by +Recipient relating to the Program shall continue and survive.

    + +

    Everyone is permitted to copy and distribute copies of this +Agreement, but in order to avoid inconsistency the Agreement is +copyrighted and may only be modified in the following manner. The +Agreement Steward reserves the right to publish new versions (including +revisions) of this Agreement from time to time. No one other than the +Agreement Steward has the right to modify this Agreement. The Eclipse +Foundation is the initial Agreement Steward. The Eclipse Foundation may +assign the responsibility to serve as the Agreement Steward to a +suitable separate entity. Each new version of the Agreement will be +given a distinguishing version number. The Program (including +Contributions) may always be distributed subject to the version of the +Agreement under which it was received. In addition, after a new version +of the Agreement is published, Contributor may elect to distribute the +Program (including its Contributions) under the new version. Except as +expressly stated in Sections 2(a) and 2(b) above, Recipient receives no +rights or licenses to the intellectual property of any Contributor under +this Agreement, whether expressly, by implication, estoppel or +otherwise. All rights in the Program not expressly granted under this +Agreement are reserved.

    + +

    This Agreement is governed by the laws of the State of New York and +the intellectual property laws of the United States of America. No party +to this Agreement will bring a legal action under this Agreement more +than one year after the cause of action arose. Each party waives its +rights to a jury trial in any resulting litigation.

    + + + + diff --git a/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/ZooInspector.java b/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/ZooInspector.java new file mode 100644 index 0000000..b637bfd --- /dev/null +++ b/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/ZooInspector.java @@ -0,0 +1,66 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.inspector; + +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; + +import javax.swing.JFrame; +import javax.swing.JOptionPane; +import javax.swing.UIManager; + +import org.apache.zookeeper.inspector.gui.ZooInspectorPanel; +import org.apache.zookeeper.inspector.logger.LoggerFactory; +import org.apache.zookeeper.inspector.manager.ZooInspectorManagerImpl; + +/** + * + */ +public class ZooInspector { + /** + * @param args + * - not used. The value of these parameters will have no effect + * on the application + */ + public static void main(String[] args) { + try { + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + JFrame frame = new JFrame("ZooInspector"); + frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + final ZooInspectorPanel zooInspectorPanel = new ZooInspectorPanel( + new ZooInspectorManagerImpl()); + frame.addWindowListener(new WindowAdapter() { + @Override + public void windowClosed(WindowEvent e) { + super.windowClosed(e); + zooInspectorPanel.disconnect(true); + } + }); + + frame.setContentPane(zooInspectorPanel); + frame.setSize(1024, 768); + frame.setVisible(true); + } catch (Exception e) { + LoggerFactory.getLogger().error( + "Error occurred loading ZooInspector", e); + JOptionPane.showMessageDialog(null, + "ZooInspector failed to start: " + e.getMessage(), "Error", + JOptionPane.ERROR_MESSAGE); + } + } +} diff --git a/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/encryption/BasicDataEncryptionManager.java b/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/encryption/BasicDataEncryptionManager.java new file mode 100644 index 0000000..a9e5ac4 --- /dev/null +++ b/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/encryption/BasicDataEncryptionManager.java @@ -0,0 +1,50 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.inspector.encryption; + +/** + * + */ +public class BasicDataEncryptionManager implements DataEncryptionManager { + + /* + * (non-Javadoc) + * + * @see + * org.apache.zookeeper.inspector.encryption.DataEncryptionManager#decryptData + * (byte[]) + */ + public String decryptData(byte[] encrypted) throws Exception { + return new String(encrypted); + } + + /* + * (non-Javadoc) + * + * @see + * org.apache.zookeeper.inspector.encryption.DataEncryptionManager#encryptData + * (java.lang.String) + */ + public byte[] encryptData(String data) throws Exception { + if (data == null) { + return new byte[0]; + } + return data.getBytes(); + } + +} diff --git a/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/encryption/DataEncryptionManager.java b/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/encryption/DataEncryptionManager.java new file mode 100644 index 0000000..15a9ee4 --- /dev/null +++ b/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/encryption/DataEncryptionManager.java @@ -0,0 +1,39 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.inspector.encryption; + +/** + * A class which describes how data should be encrypted and decrypted + */ +public interface DataEncryptionManager { + /** + * @param data + * - the data to be encrypted + * @return the encrypted data + * @throws Exception + */ + public byte[] encryptData(String data) throws Exception; + + /** + * @param encrypted + * - the data to be decrypted + * @return the decrypted data + * @throws Exception + */ + public String decryptData(byte[] encrypted) throws Exception; +} diff --git a/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/NodeViewersChangeListener.java b/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/NodeViewersChangeListener.java new file mode 100644 index 0000000..b0b1e98 --- /dev/null +++ b/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/NodeViewersChangeListener.java @@ -0,0 +1,37 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.inspector.gui; + +import java.util.List; + +import org.apache.zookeeper.inspector.gui.nodeviewer.ZooInspectorNodeViewer; + +/** + * A Listener for changes to the configuration of which node viewers are shown + */ +public interface NodeViewersChangeListener { + /** + * Called when the node viewers configuration is changed (i.e node viewers + * are added, removed or the order of the node viewers is changed) + * + * @param newViewers + * - a {@link List} of {@link ZooInspectorNodeViewer}s which are + * to be shown + */ + public void nodeViewersChanged(List newViewers); +} diff --git a/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/ZooInspectorAboutDialog.java b/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/ZooInspectorAboutDialog.java new file mode 100644 index 0000000..fbae8f1 --- /dev/null +++ b/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/ZooInspectorAboutDialog.java @@ -0,0 +1,80 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.inspector.gui; + +import java.awt.BorderLayout; +import java.awt.Dimension; +import java.awt.FlowLayout; +import java.awt.Frame; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.io.IOException; + +import javax.swing.JButton; +import javax.swing.JDialog; +import javax.swing.JEditorPane; +import javax.swing.JPanel; + +import org.apache.zookeeper.inspector.logger.LoggerFactory; + +/** + * The About Dialog for the application + */ +public class ZooInspectorAboutDialog extends JDialog { + /** + * @param frame + * - the Frame from which the dialog is displayed + */ + public ZooInspectorAboutDialog(Frame frame) { + super(frame); + this.setLayout(new BorderLayout()); + this.setIconImage(ZooInspectorIconResources.getInformationIcon() + .getImage()); + this.setTitle("About ZooInspector"); + this.setModal(true); + this.setAlwaysOnTop(true); + this.setResizable(false); + JPanel panel = new JPanel(); + panel.setLayout(new BorderLayout()); + JEditorPane aboutPane = new JEditorPane(); + aboutPane.setEditable(false); + aboutPane.setOpaque(false); + java.net.URL aboutURL = ZooInspectorAboutDialog.class + .getResource("about.html"); + try { + aboutPane.setPage(aboutURL); + } catch (IOException e) { + LoggerFactory.getLogger().error( + "Error loading about.html, file may be corrupt", e); + } + panel.add(aboutPane, BorderLayout.CENTER); + panel.setPreferredSize(new Dimension(600, 200)); + JPanel buttonsPanel = new JPanel(); + buttonsPanel.setLayout(new FlowLayout(FlowLayout.CENTER, 10, 10)); + JButton okButton = new JButton("OK"); + okButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + ZooInspectorAboutDialog.this.dispose(); + } + }); + buttonsPanel.add(okButton); + this.add(panel, BorderLayout.CENTER); + this.add(buttonsPanel, BorderLayout.SOUTH); + this.pack(); + } +} diff --git a/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/ZooInspectorConnectionPropertiesDialog.java b/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/ZooInspectorConnectionPropertiesDialog.java new file mode 100644 index 0000000..c7db524 --- /dev/null +++ b/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/ZooInspectorConnectionPropertiesDialog.java @@ -0,0 +1,321 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.inspector.gui; + +import java.awt.BorderLayout; +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; +import java.awt.Insets; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.io.File; +import java.io.FileReader; +import java.io.IOException; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Properties; +import java.util.Map.Entry; + +import javax.swing.JButton; +import javax.swing.JComboBox; +import javax.swing.JComponent; +import javax.swing.JDialog; +import javax.swing.JFileChooser; +import javax.swing.JLabel; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.JTextField; + +import org.apache.zookeeper.inspector.logger.LoggerFactory; +import org.apache.zookeeper.inspector.manager.Pair; + +/** + * The connection properties dialog. This is used to determine the settings for + * connecting to a zookeeper instance + */ +public class ZooInspectorConnectionPropertiesDialog extends JDialog { + + private final HashMap components; + + /** + * @param lastConnectionProps + * - the last connection properties used. if this is the first + * conneciton since starting the applications this will be the + * default settings + * @param connectionPropertiesTemplateAndLabels + * - the connection properties and labels to show in this dialog + * @param zooInspectorPanel + * - the {@link ZooInspectorPanel} linked to this dialog + */ + public ZooInspectorConnectionPropertiesDialog( + Properties lastConnectionProps, + Pair>, Map> connectionPropertiesTemplateAndLabels, + final ZooInspectorPanel zooInspectorPanel) { + final Map> connectionPropertiesTemplate = connectionPropertiesTemplateAndLabels + .getKey(); + final Map connectionPropertiesLabels = connectionPropertiesTemplateAndLabels + .getValue(); + this.setLayout(new BorderLayout()); + this.setTitle("Connection Settings"); + this.setModal(true); + this.setAlwaysOnTop(true); + this.setResizable(false); + final JPanel options = new JPanel(); + final JFileChooser fileChooser = new JFileChooser(); + options.setLayout(new GridBagLayout()); + int i = 0; + components = new HashMap(); + for (Entry> entry : connectionPropertiesTemplate + .entrySet()) { + int rowPos = 2 * i + 1; + JLabel label = new JLabel(connectionPropertiesLabels.get(entry + .getKey())); + GridBagConstraints c1 = new GridBagConstraints(); + c1.gridx = 0; + c1.gridy = rowPos; + c1.gridwidth = 1; + c1.gridheight = 1; + c1.weightx = 0; + c1.weighty = 0; + c1.anchor = GridBagConstraints.WEST; + c1.fill = GridBagConstraints.HORIZONTAL; + c1.insets = new Insets(5, 5, 5, 5); + c1.ipadx = 0; + c1.ipady = 0; + options.add(label, c1); + if (entry.getValue().size() == 0) { + JTextField text = new JTextField(); + GridBagConstraints c2 = new GridBagConstraints(); + c2.gridx = 2; + c2.gridy = rowPos; + c2.gridwidth = 1; + c2.gridheight = 1; + c2.weightx = 0; + c2.weighty = 0; + c2.anchor = GridBagConstraints.WEST; + c2.fill = GridBagConstraints.HORIZONTAL; + c2.insets = new Insets(5, 5, 5, 5); + c2.ipadx = 0; + c2.ipady = 0; + options.add(text, c2); + components.put(entry.getKey(), text); + } else if (entry.getValue().size() == 1) { + JTextField text = new JTextField(entry.getValue().get(0)); + GridBagConstraints c2 = new GridBagConstraints(); + c2.gridx = 2; + c2.gridy = rowPos; + c2.gridwidth = 1; + c2.gridheight = 1; + c2.weightx = 0; + c2.weighty = 0; + c2.anchor = GridBagConstraints.WEST; + c2.fill = GridBagConstraints.HORIZONTAL; + c2.insets = new Insets(5, 5, 5, 5); + c2.ipadx = 0; + c2.ipady = 0; + options.add(text, c2); + components.put(entry.getKey(), text); + } else { + List list = entry.getValue(); + JComboBox combo = new JComboBox(list.toArray(new String[list + .size()])); + combo.setSelectedItem(list.get(0)); + GridBagConstraints c2 = new GridBagConstraints(); + c2.gridx = 2; + c2.gridy = rowPos; + c2.gridwidth = 1; + c2.gridheight = 1; + c2.weightx = 0; + c2.weighty = 0; + c2.anchor = GridBagConstraints.WEST; + c2.fill = GridBagConstraints.HORIZONTAL; + c2.insets = new Insets(5, 5, 5, 5); + c2.ipadx = 0; + c2.ipady = 0; + options.add(combo, c2); + components.put(entry.getKey(), combo); + } + i++; + } + loadConnectionProps(lastConnectionProps); + JPanel buttonsPanel = new JPanel(); + buttonsPanel.setLayout(new GridBagLayout()); + JButton loadPropsFileButton = new JButton("Load from file"); + loadPropsFileButton.addActionListener(new ActionListener() { + + public void actionPerformed(ActionEvent e) { + int result = fileChooser + .showOpenDialog(ZooInspectorConnectionPropertiesDialog.this); + if (result == JFileChooser.APPROVE_OPTION) { + File propsFilePath = fileChooser.getSelectedFile(); + Properties props = new Properties(); + try { + FileReader reader = new FileReader(propsFilePath); + try { + props.load(reader); + loadConnectionProps(props); + } finally { + reader.close(); + } + } catch (IOException ex) { + LoggerFactory + .getLogger() + .error( + "An Error occurred loading connection properties from file", + ex); + JOptionPane + .showMessageDialog( + ZooInspectorConnectionPropertiesDialog.this, + "An Error occurred loading connection properties from file", + "Error", JOptionPane.ERROR_MESSAGE); + } + options.revalidate(); + options.repaint(); + } + + } + }); + GridBagConstraints c3 = new GridBagConstraints(); + c3.gridx = 0; + c3.gridy = 0; + c3.gridwidth = 1; + c3.gridheight = 1; + c3.weightx = 0; + c3.weighty = 1; + c3.anchor = GridBagConstraints.SOUTHWEST; + c3.fill = GridBagConstraints.NONE; + c3.insets = new Insets(5, 5, 5, 5); + c3.ipadx = 0; + c3.ipady = 0; + buttonsPanel.add(loadPropsFileButton, c3); + JButton saveDefaultPropsFileButton = new JButton("Set As Default"); + saveDefaultPropsFileButton.addActionListener(new ActionListener() { + + public void actionPerformed(ActionEvent e) { + + Properties connectionProps = getConnectionProps(); + try { + zooInspectorPanel + .setdefaultConnectionProps(connectionProps); + } catch (IOException ex) { + LoggerFactory + .getLogger() + .error( + "An Error occurred saving the default connection properties file", + ex); + JOptionPane + .showMessageDialog( + ZooInspectorConnectionPropertiesDialog.this, + "An Error occurred saving the default connection properties file", + "Error", JOptionPane.ERROR_MESSAGE); + } + } + }); + GridBagConstraints c6 = new GridBagConstraints(); + c6.gridx = 1; + c6.gridy = 0; + c6.gridwidth = 1; + c6.gridheight = 1; + c6.weightx = 1; + c6.weighty = 1; + c6.anchor = GridBagConstraints.SOUTHWEST; + c6.fill = GridBagConstraints.NONE; + c6.insets = new Insets(5, 5, 5, 5); + c6.ipadx = 0; + c6.ipady = 0; + buttonsPanel.add(saveDefaultPropsFileButton, c6); + JButton okButton = new JButton("OK"); + okButton.addActionListener(new ActionListener() { + + public void actionPerformed(ActionEvent e) { + ZooInspectorConnectionPropertiesDialog.this.dispose(); + Properties connectionProps = getConnectionProps(); + zooInspectorPanel.connect(connectionProps); + } + }); + GridBagConstraints c4 = new GridBagConstraints(); + c4.gridx = 2; + c4.gridy = 0; + c4.gridwidth = 1; + c4.gridheight = 1; + c4.weightx = 0; + c4.weighty = 1; + c4.anchor = GridBagConstraints.SOUTH; + c4.fill = GridBagConstraints.HORIZONTAL; + c4.insets = new Insets(5, 5, 5, 5); + c4.ipadx = 0; + c4.ipady = 0; + buttonsPanel.add(okButton, c4); + JButton cancelButton = new JButton("Cancel"); + cancelButton.addActionListener(new ActionListener() { + + public void actionPerformed(ActionEvent e) { + ZooInspectorConnectionPropertiesDialog.this.dispose(); + } + }); + GridBagConstraints c5 = new GridBagConstraints(); + c5.gridx = 3; + c5.gridy = 0; + c5.gridwidth = 1; + c5.gridheight = 1; + c5.weightx = 0; + c5.weighty = 1; + c5.anchor = GridBagConstraints.SOUTH; + c5.fill = GridBagConstraints.HORIZONTAL; + c5.insets = new Insets(5, 5, 5, 5); + c5.ipadx = 0; + c5.ipady = 0; + buttonsPanel.add(cancelButton, c5); + this.add(options, BorderLayout.CENTER); + this.add(buttonsPanel, BorderLayout.SOUTH); + this.pack(); + } + + private void loadConnectionProps(Properties props) { + if (props != null) { + for (Object key : props.keySet()) { + String propsKey = (String) key; + if (components.containsKey(propsKey)) { + JComponent component = components.get(propsKey); + String value = props.getProperty(propsKey); + if (component instanceof JTextField) { + ((JTextField) component).setText(value); + } else if (component instanceof JComboBox) { + ((JComboBox) component).setSelectedItem(value); + } + } + } + } + } + + private Properties getConnectionProps() { + Properties connectionProps = new Properties(); + for (Entry entry : components.entrySet()) { + String value = null; + JComponent component = entry.getValue(); + if (component instanceof JTextField) { + value = ((JTextField) component).getText(); + } else if (component instanceof JComboBox) { + value = ((JComboBox) component).getSelectedItem().toString(); + } + connectionProps.put(entry.getKey(), value); + } + return connectionProps; + } +} diff --git a/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/ZooInspectorIconResources.java b/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/ZooInspectorIconResources.java new file mode 100644 index 0000000..fa45ab3 --- /dev/null +++ b/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/ZooInspectorIconResources.java @@ -0,0 +1,118 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.inspector.gui; + +import javax.swing.ImageIcon; + +/** + * A class containing static methods for retrieving {@link ImageIcon}s used in + * the application + */ +public class ZooInspectorIconResources { + + /** + * @return file icon + */ + public static ImageIcon getTreeLeafIcon() { + return new ImageIcon("icons/file_obj.gif"); //$NON-NLS-1$ + } + + /** + * @return folder open icon + */ + public static ImageIcon getTreeOpenIcon() { + return new ImageIcon("icons/fldr_obj.gif"); //$NON-NLS-1$ + } + + /** + * @return folder closed icon + */ + public static ImageIcon getTreeClosedIcon() { + return new ImageIcon("icons/fldr_obj.gif"); //$NON-NLS-1$ + } + + /** + * @return connect icon + */ + public static ImageIcon getConnectIcon() { + return new ImageIcon("icons/launch_run.gif"); //$NON-NLS-1$ + } + + /** + * @return disconnect icon + */ + public static ImageIcon getDisconnectIcon() { + return new ImageIcon("icons/launch_stop.gif"); //$NON-NLS-1$ + } + + /** + * @return save icon + */ + public static ImageIcon getSaveIcon() { + return new ImageIcon("icons/save_edit.gif"); //$NON-NLS-1$ + } + + /** + * @return add icon + */ + public static ImageIcon getAddNodeIcon() { + return new ImageIcon("icons/new_con.gif"); //$NON-NLS-1$ + } + + /** + * @return delete icon + */ + public static ImageIcon getDeleteNodeIcon() { + return new ImageIcon("icons/trash.gif"); //$NON-NLS-1$ + } + + /** + * @return refresh icon + */ + public static ImageIcon getRefreshIcon() { + return new ImageIcon("icons/refresh.gif"); //$NON-NLS-1$ + } + + /** + * @return information icon + */ + public static ImageIcon getInformationIcon() { + return new ImageIcon("icons/info_obj.gif"); //$NON-NLS-1$ + } + + /** + * @return node viewers icon + */ + public static ImageIcon getChangeNodeViewersIcon() { + return new ImageIcon("icons/edtsrclkup_co.gif"); //$NON-NLS-1$ + } + + /** + * @return up icon + */ + public static ImageIcon getUpIcon() { + return new ImageIcon("icons/search_prev.gif"); //$NON-NLS-1$ + } + + /** + * @return down icon + */ + public static ImageIcon getDownIcon() { + return new ImageIcon("icons/search_next.gif"); //$NON-NLS-1$ + } +} diff --git a/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/ZooInspectorNodeViewersDialog.java b/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/ZooInspectorNodeViewersDialog.java new file mode 100644 index 0000000..fd0b00a --- /dev/null +++ b/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/ZooInspectorNodeViewersDialog.java @@ -0,0 +1,605 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.inspector.gui; + +import java.awt.BorderLayout; +import java.awt.Component; +import java.awt.FlowLayout; +import java.awt.Frame; +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; +import java.awt.Insets; +import java.awt.datatransfer.Transferable; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import javax.swing.DefaultListCellRenderer; +import javax.swing.DefaultListModel; +import javax.swing.DropMode; +import javax.swing.JButton; +import javax.swing.JComponent; +import javax.swing.JDialog; +import javax.swing.JFileChooser; +import javax.swing.JLabel; +import javax.swing.JList; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import javax.swing.JTextField; +import javax.swing.ListSelectionModel; +import javax.swing.TransferHandler; +import javax.swing.event.ListSelectionEvent; +import javax.swing.event.ListSelectionListener; + +import org.apache.zookeeper.inspector.gui.nodeviewer.ZooInspectorNodeViewer; +import org.apache.zookeeper.inspector.logger.LoggerFactory; +import org.apache.zookeeper.inspector.manager.ZooInspectorManager; + +/** + * A {@link JDialog} for configuring which {@link ZooInspectorNodeViewer}s to + * show in the application + */ +public class ZooInspectorNodeViewersDialog extends JDialog implements + ListSelectionListener { + + private final JButton upButton; + private final JButton downButton; + private final JButton removeButton; + private final JButton addButton; + private final JList viewersList; + private final JButton saveFileButton; + private final JButton loadFileButton; + private final JButton setDefaultsButton; + private final JFileChooser fileChooser = new JFileChooser(new File(".")); + + /** + * @param frame + * - the Frame from which the dialog is displayed + * @param currentViewers + * - the {@link ZooInspectorNodeViewer}s to show + * @param listeners + * - the {@link NodeViewersChangeListener}s which need to be + * notified of changes to the node viewers configuration + * @param manager + * - the {@link ZooInspectorManager} for the application + * + */ + public ZooInspectorNodeViewersDialog(Frame frame, + final List currentViewers, + final Collection listeners, + final ZooInspectorManager manager) { + super(frame); + final List newViewers = new ArrayList( + currentViewers); + this.setLayout(new BorderLayout()); + this.setIconImage(ZooInspectorIconResources.getChangeNodeViewersIcon() + .getImage()); + this.setTitle("About ZooInspector"); + this.setModal(true); + this.setAlwaysOnTop(true); + this.setResizable(true); + final JPanel panel = new JPanel(); + panel.setLayout(new GridBagLayout()); + viewersList = new JList(); + DefaultListModel model = new DefaultListModel(); + for (ZooInspectorNodeViewer viewer : newViewers) { + model.addElement(viewer); + } + viewersList.setModel(model); + viewersList.setCellRenderer(new DefaultListCellRenderer() { + @Override + public Component getListCellRendererComponent(JList list, + Object value, int index, boolean isSelected, + boolean cellHasFocus) { + ZooInspectorNodeViewer viewer = (ZooInspectorNodeViewer) value; + JLabel label = (JLabel) super.getListCellRendererComponent( + list, value, index, isSelected, cellHasFocus); + label.setText(viewer.getTitle()); + return label; + } + }); + viewersList.setDropMode(DropMode.INSERT); + viewersList.enableInputMethods(true); + viewersList.setDragEnabled(true); + viewersList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); + viewersList.getSelectionModel().addListSelectionListener(this); + viewersList.setTransferHandler(new TransferHandler() { + + @Override + public boolean canImport(TransferHandler.TransferSupport info) { + // we only import NodeViewers + if (!info + .isDataFlavorSupported(ZooInspectorNodeViewer.nodeViewerDataFlavor)) { + return false; + } + + JList.DropLocation dl = (JList.DropLocation) info + .getDropLocation(); + if (dl.getIndex() == -1) { + return false; + } + return true; + } + + @Override + public boolean importData(TransferHandler.TransferSupport info) { + JList.DropLocation dl = (JList.DropLocation) info + .getDropLocation(); + DefaultListModel listModel = (DefaultListModel) viewersList + .getModel(); + int index = dl.getIndex(); + boolean insert = dl.isInsert(); + // Get the string that is being dropped. + Transferable t = info.getTransferable(); + String data; + try { + data = (String) t + .getTransferData(ZooInspectorNodeViewer.nodeViewerDataFlavor); + } catch (Exception e) { + return false; + } + try { + ZooInspectorNodeViewer viewer = (ZooInspectorNodeViewer) Class + .forName(data).newInstance(); + if (listModel.contains(viewer)) { + listModel.removeElement(viewer); + } + if (insert) { + listModel.add(index, viewer); + } else { + listModel.set(index, viewer); + } + return true; + } catch (Exception e) { + LoggerFactory.getLogger().error( + "Error instantiating class: " + data, e); + return false; + } + + } + + @Override + public int getSourceActions(JComponent c) { + return MOVE; + } + + @Override + protected Transferable createTransferable(JComponent c) { + JList list = (JList) c; + ZooInspectorNodeViewer value = (ZooInspectorNodeViewer) list + .getSelectedValue(); + return value; + } + }); + JScrollPane scroller = new JScrollPane(viewersList); + GridBagConstraints c1 = new GridBagConstraints(); + c1.gridx = 0; + c1.gridy = 0; + c1.gridwidth = 3; + c1.gridheight = 3; + c1.weightx = 0; + c1.weighty = 1; + c1.anchor = GridBagConstraints.CENTER; + c1.fill = GridBagConstraints.BOTH; + c1.insets = new Insets(5, 5, 5, 5); + c1.ipadx = 0; + c1.ipady = 0; + panel.add(scroller, c1); + upButton = new JButton(ZooInspectorIconResources.getUpIcon()); + downButton = new JButton(ZooInspectorIconResources.getDownIcon()); + removeButton = new JButton(ZooInspectorIconResources + .getDeleteNodeIcon()); + addButton = new JButton(ZooInspectorIconResources.getAddNodeIcon()); + upButton.setEnabled(false); + downButton.setEnabled(false); + removeButton.setEnabled(false); + addButton.setEnabled(true); + upButton.setToolTipText("Move currently selected node viewer up"); + downButton.setToolTipText("Move currently selected node viewer down"); + removeButton.setToolTipText("Remove currently selected node viewer"); + addButton.setToolTipText("Add node viewer"); + final JTextField newViewerTextField = new JTextField(); + GridBagConstraints c2 = new GridBagConstraints(); + c2.gridx = 3; + c2.gridy = 0; + c2.gridwidth = 1; + c2.gridheight = 1; + c2.weightx = 0; + c2.weighty = 0; + c2.anchor = GridBagConstraints.NORTH; + c2.fill = GridBagConstraints.HORIZONTAL; + c2.insets = new Insets(5, 5, 5, 5); + c2.ipadx = 0; + c2.ipady = 0; + panel.add(upButton, c2); + GridBagConstraints c3 = new GridBagConstraints(); + c3.gridx = 3; + c3.gridy = 2; + c3.gridwidth = 1; + c3.gridheight = 1; + c3.weightx = 0; + c3.weighty = 0; + c3.anchor = GridBagConstraints.NORTH; + c3.fill = GridBagConstraints.HORIZONTAL; + c3.insets = new Insets(5, 5, 5, 5); + c3.ipadx = 0; + c3.ipady = 0; + panel.add(downButton, c3); + GridBagConstraints c4 = new GridBagConstraints(); + c4.gridx = 3; + c4.gridy = 1; + c4.gridwidth = 1; + c4.gridheight = 1; + c4.weightx = 0; + c4.weighty = 0; + c4.anchor = GridBagConstraints.NORTH; + c4.fill = GridBagConstraints.HORIZONTAL; + c4.insets = new Insets(5, 5, 5, 5); + c4.ipadx = 0; + c4.ipady = 0; + panel.add(removeButton, c4); + GridBagConstraints c5 = new GridBagConstraints(); + c5.gridx = 0; + c5.gridy = 3; + c5.gridwidth = 3; + c5.gridheight = 1; + c5.weightx = 0; + c5.weighty = 0; + c5.anchor = GridBagConstraints.CENTER; + c5.fill = GridBagConstraints.BOTH; + c5.insets = new Insets(5, 5, 5, 5); + c5.ipadx = 0; + c5.ipady = 0; + panel.add(newViewerTextField, c5); + GridBagConstraints c6 = new GridBagConstraints(); + c6.gridx = 3; + c6.gridy = 3; + c6.gridwidth = 1; + c6.gridheight = 1; + c6.weightx = 0; + c6.weighty = 0; + c6.anchor = GridBagConstraints.CENTER; + c6.fill = GridBagConstraints.BOTH; + c6.insets = new Insets(5, 5, 5, 5); + c6.ipadx = 0; + c6.ipady = 0; + panel.add(addButton, c6); + upButton.addActionListener(new ActionListener() { + + public void actionPerformed(ActionEvent e) { + DefaultListModel listModel = (DefaultListModel) viewersList + .getModel(); + ZooInspectorNodeViewer viewer = (ZooInspectorNodeViewer) viewersList + .getSelectedValue(); + int index = viewersList.getSelectedIndex(); + if (listModel.contains(viewer)) { + listModel.removeElementAt(index); + listModel.insertElementAt(viewer, index - 1); + viewersList.setSelectedValue(viewer, true); + } + } + }); + downButton.addActionListener(new ActionListener() { + + public void actionPerformed(ActionEvent e) { + DefaultListModel listModel = (DefaultListModel) viewersList + .getModel(); + ZooInspectorNodeViewer viewer = (ZooInspectorNodeViewer) viewersList + .getSelectedValue(); + int index = viewersList.getSelectedIndex(); + if (listModel.contains(viewer)) { + listModel.removeElementAt(index); + listModel.insertElementAt(viewer, index + 1); + viewersList.setSelectedValue(viewer, true); + } + } + }); + removeButton.addActionListener(new ActionListener() { + + public void actionPerformed(ActionEvent e) { + DefaultListModel listModel = (DefaultListModel) viewersList + .getModel(); + ZooInspectorNodeViewer viewer = (ZooInspectorNodeViewer) viewersList + .getSelectedValue(); + int index = viewersList.getSelectedIndex(); + if (listModel.contains(viewer)) { + listModel.removeElement(viewer); + viewersList + .setSelectedIndex(index == listModel.size() ? index - 1 + : index); + } + } + }); + addButton.addActionListener(new ActionListener() { + + public void actionPerformed(ActionEvent e) { + String className = newViewerTextField.getText(); + if (className == null || className.length() == 0) { + JOptionPane + .showMessageDialog( + ZooInspectorNodeViewersDialog.this, + "Please enter the full class name for a Node Viewer and click the add button", + "Input Error", JOptionPane.ERROR_MESSAGE); + } else { + try { + DefaultListModel listModel = (DefaultListModel) viewersList + .getModel(); + ZooInspectorNodeViewer viewer = (ZooInspectorNodeViewer) Class + .forName(className).newInstance(); + if (listModel.contains(viewer)) { + JOptionPane + .showMessageDialog( + ZooInspectorNodeViewersDialog.this, + "Node viewer already exists. Each node viewer can only be added once.", + "Input Error", + JOptionPane.ERROR_MESSAGE); + } else { + listModel.addElement(viewer); + } + } catch (Exception ex) { + LoggerFactory + .getLogger() + .error( + "An error occurred while instaniating the node viewer. ", + ex); + JOptionPane.showMessageDialog( + ZooInspectorNodeViewersDialog.this, + "An error occurred while instaniating the node viewer: " + + ex.getMessage(), "Error", + JOptionPane.ERROR_MESSAGE); + } + } + } + }); + saveFileButton = new JButton("Save"); + loadFileButton = new JButton("Load"); + setDefaultsButton = new JButton("Set As Defaults"); + saveFileButton + .setToolTipText("Save current node viewer configuration to file"); + loadFileButton + .setToolTipText("Load node viewer configuration frm file"); + setDefaultsButton + .setToolTipText("Set current configuration asd defaults"); + GridBagConstraints c7 = new GridBagConstraints(); + c7.gridx = 0; + c7.gridy = 4; + c7.gridwidth = 1; + c7.gridheight = 1; + c7.weightx = 1; + c7.weighty = 0; + c7.anchor = GridBagConstraints.WEST; + c7.fill = GridBagConstraints.VERTICAL; + c7.insets = new Insets(5, 5, 5, 5); + c7.ipadx = 0; + c7.ipady = 0; + panel.add(saveFileButton, c7); + GridBagConstraints c8 = new GridBagConstraints(); + c8.gridx = 1; + c8.gridy = 4; + c8.gridwidth = 1; + c8.gridheight = 1; + c8.weightx = 0; + c8.weighty = 0; + c8.anchor = GridBagConstraints.WEST; + c8.fill = GridBagConstraints.VERTICAL; + c8.insets = new Insets(5, 5, 5, 5); + c8.ipadx = 0; + c8.ipady = 0; + panel.add(loadFileButton, c8); + GridBagConstraints c9 = new GridBagConstraints(); + c9.gridx = 2; + c9.gridy = 4; + c9.gridwidth = 1; + c9.gridheight = 1; + c9.weightx = 0; + c9.weighty = 0; + c9.anchor = GridBagConstraints.WEST; + c9.fill = GridBagConstraints.VERTICAL; + c9.insets = new Insets(5, 5, 5, 5); + c9.ipadx = 0; + c9.ipady = 0; + panel.add(setDefaultsButton, c9); + saveFileButton.addActionListener(new ActionListener() { + + public void actionPerformed(ActionEvent e) { + int result = fileChooser + .showSaveDialog(ZooInspectorNodeViewersDialog.this); + if (result == JFileChooser.APPROVE_OPTION) { + File selectedFile = fileChooser.getSelectedFile(); + int answer = JOptionPane.YES_OPTION; + if (selectedFile.exists()) { + answer = JOptionPane + .showConfirmDialog( + ZooInspectorNodeViewersDialog.this, + "The specified file already exists. do you want to overwrite it?", + "Confirm Overwrite", + JOptionPane.YES_NO_OPTION, + JOptionPane.WARNING_MESSAGE); + } + if (answer == JOptionPane.YES_OPTION) { + DefaultListModel listModel = (DefaultListModel) viewersList + .getModel(); + List nodeViewersClassNames = new ArrayList(); + Object[] modelContents = listModel.toArray(); + for (Object o : modelContents) { + nodeViewersClassNames + .add(((ZooInspectorNodeViewer) o) + .getClass().getCanonicalName()); + } + try { + manager.saveNodeViewersFile(selectedFile, + nodeViewersClassNames); + } catch (IOException ex) { + LoggerFactory + .getLogger() + .error( + "Error saving node veiwer configuration from file.", + ex); + JOptionPane.showMessageDialog( + ZooInspectorNodeViewersDialog.this, + "Error saving node veiwer configuration from file: " + + ex.getMessage(), "Error", + JOptionPane.ERROR_MESSAGE); + } + } + } + } + }); + loadFileButton.addActionListener(new ActionListener() { + + public void actionPerformed(ActionEvent e) { + int result = fileChooser + .showOpenDialog(ZooInspectorNodeViewersDialog.this); + if (result == JFileChooser.APPROVE_OPTION) { + try { + List nodeViewersClassNames = manager + .loadNodeViewersFile(fileChooser + .getSelectedFile()); + List nodeViewers = new ArrayList(); + for (String nodeViewersClassName : nodeViewersClassNames) { + ZooInspectorNodeViewer viewer = (ZooInspectorNodeViewer) Class + .forName(nodeViewersClassName) + .newInstance(); + nodeViewers.add(viewer); + } + DefaultListModel model = new DefaultListModel(); + for (ZooInspectorNodeViewer viewer : nodeViewers) { + model.addElement(viewer); + } + viewersList.setModel(model); + panel.revalidate(); + panel.repaint(); + } catch (Exception ex) { + LoggerFactory + .getLogger() + .error( + "Error loading node veiwer configuration from file.", + ex); + JOptionPane.showMessageDialog( + ZooInspectorNodeViewersDialog.this, + "Error loading node veiwer configuration from file: " + + ex.getMessage(), "Error", + JOptionPane.ERROR_MESSAGE); + } + } + } + }); + setDefaultsButton.addActionListener(new ActionListener() { + + public void actionPerformed(ActionEvent e) { + int answer = JOptionPane + .showConfirmDialog( + ZooInspectorNodeViewersDialog.this, + "Are you sure you want to save this configuration as the default?", + "Confirm Set Defaults", + JOptionPane.YES_NO_OPTION, + JOptionPane.WARNING_MESSAGE); + if (answer == JOptionPane.YES_OPTION) { + DefaultListModel listModel = (DefaultListModel) viewersList + .getModel(); + List nodeViewersClassNames = new ArrayList(); + Object[] modelContents = listModel.toArray(); + for (Object o : modelContents) { + nodeViewersClassNames.add(((ZooInspectorNodeViewer) o) + .getClass().getCanonicalName()); + } + try { + manager + .setDefaultNodeViewerConfiguration(nodeViewersClassNames); + } catch (IOException ex) { + LoggerFactory + .getLogger() + .error( + "Error setting default node veiwer configuration.", + ex); + JOptionPane.showMessageDialog( + ZooInspectorNodeViewersDialog.this, + "Error setting default node veiwer configuration: " + + ex.getMessage(), "Error", + JOptionPane.ERROR_MESSAGE); + } + } + } + }); + + JPanel buttonsPanel = new JPanel(); + buttonsPanel.setLayout(new FlowLayout(FlowLayout.CENTER, 10, 10)); + JButton okButton = new JButton("OK"); + okButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + ZooInspectorNodeViewersDialog.this.dispose(); + DefaultListModel listModel = (DefaultListModel) viewersList + .getModel(); + newViewers.clear(); + Object[] modelContents = listModel.toArray(); + for (Object o : modelContents) { + newViewers.add((ZooInspectorNodeViewer) o); + } + currentViewers.clear(); + currentViewers.addAll(newViewers); + for (NodeViewersChangeListener listener : listeners) { + listener.nodeViewersChanged(currentViewers); + } + } + }); + buttonsPanel.add(okButton); + JButton cancelButton = new JButton("Cancel"); + cancelButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + ZooInspectorNodeViewersDialog.this.dispose(); + } + }); + buttonsPanel.add(cancelButton); + this.add(panel, BorderLayout.CENTER); + this.add(buttonsPanel, BorderLayout.SOUTH); + this.pack(); + } + + /* + * (non-Javadoc) + * + * @see + * javax.swing.event.ListSelectionListener#valueChanged(javax.swing.event + * .ListSelectionEvent) + */ + public void valueChanged(ListSelectionEvent e) { + int index = viewersList.getSelectedIndex(); + if (index == -1) { + removeButton.setEnabled(false); + upButton.setEnabled(false); + downButton.setEnabled(false); + } else { + removeButton.setEnabled(true); + if (index == 0) { + upButton.setEnabled(false); + } else { + upButton.setEnabled(true); + } + if (index == ((DefaultListModel) viewersList.getModel()).getSize()) { + downButton.setEnabled(false); + } else { + downButton.setEnabled(true); + } + } + } +} diff --git a/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/ZooInspectorNodeViewersPanel.java b/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/ZooInspectorNodeViewersPanel.java new file mode 100644 index 0000000..05c256b --- /dev/null +++ b/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/ZooInspectorNodeViewersPanel.java @@ -0,0 +1,140 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.inspector.gui; + +import java.awt.BorderLayout; +import java.util.ArrayList; +import java.util.List; + +import javax.swing.JPanel; +import javax.swing.JTabbedPane; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; +import javax.swing.event.TreeSelectionEvent; +import javax.swing.event.TreeSelectionListener; +import javax.swing.tree.TreePath; + +import org.apache.zookeeper.inspector.gui.nodeviewer.ZooInspectorNodeViewer; +import org.apache.zookeeper.inspector.manager.ZooInspectorManager; +import org.apache.zookeeper.inspector.manager.ZooInspectorNodeManager; + +/** + * This is the {@link JPanel} which contains the {@link ZooInspectorNodeViewer}s + */ +public class ZooInspectorNodeViewersPanel extends JPanel implements + TreeSelectionListener, ChangeListener { + + private final List nodeVeiwers = new ArrayList(); + private final List needsReload = new ArrayList(); + private final JTabbedPane tabbedPane; + private final List selectedNodes = new ArrayList(); + private final ZooInspectorNodeManager zooInspectorManager; + + /** + * @param zooInspectorManager + * - the {@link ZooInspectorManager} for the application + * @param nodeVeiwers + * - the {@link ZooInspectorNodeViewer}s to show + */ + public ZooInspectorNodeViewersPanel( + ZooInspectorNodeManager zooInspectorManager, + List nodeVeiwers) { + this.zooInspectorManager = zooInspectorManager; + this.setLayout(new BorderLayout()); + tabbedPane = new JTabbedPane(JTabbedPane.TOP, + JTabbedPane.WRAP_TAB_LAYOUT); + setNodeViewers(nodeVeiwers); + tabbedPane.addChangeListener(this); + this.add(tabbedPane, BorderLayout.CENTER); + reloadSelectedViewer(); + } + + /** + * @param nodeViewers + * - the {@link ZooInspectorNodeViewer}s to show + */ + public void setNodeViewers(List nodeViewers) { + this.nodeVeiwers.clear(); + this.nodeVeiwers.addAll(nodeViewers); + needsReload.clear(); + tabbedPane.removeAll(); + for (ZooInspectorNodeViewer nodeViewer : nodeVeiwers) { + nodeViewer.setZooInspectorManager(zooInspectorManager); + needsReload.add(true); + tabbedPane.add(nodeViewer.getTitle(), nodeViewer); + } + this.revalidate(); + this.repaint(); + } + + private void reloadSelectedViewer() { + int index = this.tabbedPane.getSelectedIndex(); + if (index != -1 && this.needsReload.get(index)) { + ZooInspectorNodeViewer viewer = this.nodeVeiwers.get(index); + viewer.nodeSelectionChanged(selectedNodes); + this.needsReload.set(index, false); + } + } + + /* + * (non-Javadoc) + * + * @see + * javax.swing.event.TreeSelectionListener#valueChanged(javax.swing.event + * .TreeSelectionEvent) + */ + public void valueChanged(TreeSelectionEvent e) { + TreePath[] paths = e.getPaths(); + selectedNodes.clear(); + for (TreePath path : paths) { + boolean appended = false; + StringBuilder sb = new StringBuilder(); + Object[] pathArray = path.getPath(); + for (Object o : pathArray) { + if (o != null) { + String nodeName = o.toString(); + if (nodeName != null) { + if (nodeName.length() > 0) { + appended = true; + sb.append("/"); //$NON-NLS-1$ + sb.append(o.toString()); + } + } + } + } + if (appended) { + selectedNodes.add(sb.toString()); + } + } + for (int i = 0; i < needsReload.size(); i++) { + this.needsReload.set(i, true); + } + reloadSelectedViewer(); + } + + /* + * (non-Javadoc) + * + * @see + * javax.swing.event.ChangeListener#stateChanged(javax.swing.event.ChangeEvent + * ) + */ + public void stateChanged(ChangeEvent e) { + reloadSelectedViewer(); + } +} diff --git a/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/ZooInspectorPanel.java b/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/ZooInspectorPanel.java new file mode 100644 index 0000000..7a4efaf --- /dev/null +++ b/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/ZooInspectorPanel.java @@ -0,0 +1,361 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.inspector.gui; + +import java.awt.BorderLayout; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.Properties; +import java.util.concurrent.ExecutionException; + +import javax.swing.JButton; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import javax.swing.JSplitPane; +import javax.swing.JToolBar; +import javax.swing.SwingWorker; + +import org.apache.zookeeper.inspector.gui.nodeviewer.ZooInspectorNodeViewer; +import org.apache.zookeeper.inspector.logger.LoggerFactory; +import org.apache.zookeeper.inspector.manager.ZooInspectorManager; + +/** + * The parent {@link JPanel} for the whole application + */ +public class ZooInspectorPanel extends JPanel implements + NodeViewersChangeListener { + private final JButton refreshButton; + private final JButton disconnectButton; + private final JButton connectButton; + private final ZooInspectorNodeViewersPanel nodeViewersPanel; + private final ZooInspectorTreeViewer treeViewer; + private final ZooInspectorManager zooInspectorManager; + private final JButton addNodeButton; + private final JButton deleteNodeButton; + private final JButton nodeViewersButton; + private final JButton aboutButton; + private final List listeners = new ArrayList(); + { + listeners.add(this); + } + + /** + * @param zooInspectorManager + * - the {@link ZooInspectorManager} for the application + */ + public ZooInspectorPanel(final ZooInspectorManager zooInspectorManager) { + this.zooInspectorManager = zooInspectorManager; + final ArrayList nodeViewers = new ArrayList(); + try { + List defaultNodeViewersClassNames = this.zooInspectorManager + .getDefaultNodeViewerConfiguration(); + for (String className : defaultNodeViewersClassNames) { + nodeViewers.add((ZooInspectorNodeViewer) Class.forName( + className).newInstance()); + } + } catch (Exception ex) { + LoggerFactory.getLogger().error( + "Error loading default node viewers.", ex); + JOptionPane.showMessageDialog(ZooInspectorPanel.this, + "Error loading default node viewers: " + ex.getMessage(), + "Error", JOptionPane.ERROR_MESSAGE); + } + nodeViewersPanel = new ZooInspectorNodeViewersPanel( + zooInspectorManager, nodeViewers); + treeViewer = new ZooInspectorTreeViewer(zooInspectorManager, + nodeViewersPanel); + this.setLayout(new BorderLayout()); + JToolBar toolbar = new JToolBar(); + toolbar.setFloatable(false); + connectButton = new JButton(ZooInspectorIconResources.getConnectIcon()); + disconnectButton = new JButton(ZooInspectorIconResources + .getDisconnectIcon()); + refreshButton = new JButton(ZooInspectorIconResources.getRefreshIcon()); + addNodeButton = new JButton(ZooInspectorIconResources.getAddNodeIcon()); + deleteNodeButton = new JButton(ZooInspectorIconResources + .getDeleteNodeIcon()); + nodeViewersButton = new JButton(ZooInspectorIconResources + .getChangeNodeViewersIcon()); + aboutButton = new JButton(ZooInspectorIconResources + .getInformationIcon()); + toolbar.add(connectButton); + toolbar.add(disconnectButton); + toolbar.add(refreshButton); + toolbar.add(addNodeButton); + toolbar.add(deleteNodeButton); + toolbar.add(nodeViewersButton); + toolbar.add(aboutButton); + aboutButton.setEnabled(true); + connectButton.setEnabled(true); + disconnectButton.setEnabled(false); + refreshButton.setEnabled(false); + addNodeButton.setEnabled(false); + deleteNodeButton.setEnabled(false); + nodeViewersButton.setEnabled(true); + nodeViewersButton.setToolTipText("Change Node Viewers"); + aboutButton.setToolTipText("About ZooInspector"); + connectButton.setToolTipText("Connect"); + disconnectButton.setToolTipText("Disconnect"); + refreshButton.setToolTipText("Refresh"); + addNodeButton.setToolTipText("Add Node"); + deleteNodeButton.setToolTipText("Delete Node"); + connectButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + ZooInspectorConnectionPropertiesDialog zicpd = new ZooInspectorConnectionPropertiesDialog( + zooInspectorManager.getLastConnectionProps(), + zooInspectorManager.getConnectionPropertiesTemplate(), + ZooInspectorPanel.this); + zicpd.setVisible(true); + } + }); + disconnectButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + disconnect(); + } + }); + refreshButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + treeViewer.refreshView(); + } + }); + addNodeButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + final List selectedNodes = treeViewer + .getSelectedNodes(); + if (selectedNodes.size() == 1) { + final String nodeName = JOptionPane.showInputDialog( + ZooInspectorPanel.this, + "Please Enter a name for the new node", + "Create Node", JOptionPane.INFORMATION_MESSAGE); + if (nodeName != null && nodeName.length() > 0) { + SwingWorker worker = new SwingWorker() { + + @Override + protected Boolean doInBackground() throws Exception { + return ZooInspectorPanel.this.zooInspectorManager + .createNode(selectedNodes.get(0), + nodeName); + } + + @Override + protected void done() { + treeViewer.refreshView(); + } + }; + worker.execute(); + } + } else { + JOptionPane.showMessageDialog(ZooInspectorPanel.this, + "Please select 1 parent node for the new node."); + } + } + }); + deleteNodeButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + final List selectedNodes = treeViewer + .getSelectedNodes(); + if (selectedNodes.size() == 0) { + JOptionPane.showMessageDialog(ZooInspectorPanel.this, + "Please select at least 1 node to be deleted"); + } else { + int answer = JOptionPane.showConfirmDialog( + ZooInspectorPanel.this, + "Are you sure you want to delete the selected nodes?" + + "(This action cannot be reverted)", + "Confirm Delete", JOptionPane.YES_NO_OPTION, + JOptionPane.WARNING_MESSAGE); + if (answer == JOptionPane.YES_OPTION) { + SwingWorker worker = new SwingWorker() { + + @Override + protected Boolean doInBackground() throws Exception { + for (String nodePath : selectedNodes) { + ZooInspectorPanel.this.zooInspectorManager + .deleteNode(nodePath); + } + return true; + } + + @Override + protected void done() { + treeViewer.refreshView(); + } + }; + worker.execute(); + } + } + } + }); + nodeViewersButton.addActionListener(new ActionListener() { + + public void actionPerformed(ActionEvent e) { + ZooInspectorNodeViewersDialog nvd = new ZooInspectorNodeViewersDialog( + JOptionPane.getRootFrame(), nodeViewers, listeners, + zooInspectorManager); + nvd.setVisible(true); + } + }); + aboutButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + ZooInspectorAboutDialog zicpd = new ZooInspectorAboutDialog( + JOptionPane.getRootFrame()); + zicpd.setVisible(true); + } + }); + JScrollPane treeScroller = new JScrollPane(treeViewer); + JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, + treeScroller, nodeViewersPanel); + splitPane.setResizeWeight(0.25); + this.add(splitPane, BorderLayout.CENTER); + this.add(toolbar, BorderLayout.NORTH); + } + + /** + * @param connectionProps + * the {@link Properties} for connecting to the zookeeper + * instance + */ + public void connect(final Properties connectionProps) { + SwingWorker worker = new SwingWorker() { + + @Override + protected Boolean doInBackground() throws Exception { + zooInspectorManager.setLastConnectionProps(connectionProps); + return zooInspectorManager.connect(connectionProps); + } + + @Override + protected void done() { + try { + if (get()) { + treeViewer.refreshView(); + connectButton.setEnabled(false); + disconnectButton.setEnabled(true); + refreshButton.setEnabled(true); + addNodeButton.setEnabled(true); + deleteNodeButton.setEnabled(true); + } else { + JOptionPane.showMessageDialog(ZooInspectorPanel.this, + "Unable to connect to zookeeper", "Error", + JOptionPane.ERROR_MESSAGE); + } + } catch (InterruptedException e) { + LoggerFactory + .getLogger() + .error( + "Error occurred while connecting to ZooKeeper server", + e); + } catch (ExecutionException e) { + LoggerFactory + .getLogger() + .error( + "Error occurred while connecting to ZooKeeper server", + e); + } + } + + }; + worker.execute(); + } + + /** + * + */ + public void disconnect() { + disconnect(false); + } + + /** + * @param wait + * - set this to true if the method should only return once the + * application has successfully disconnected + */ + public void disconnect(boolean wait) { + SwingWorker worker = new SwingWorker() { + + @Override + protected Boolean doInBackground() throws Exception { + return ZooInspectorPanel.this.zooInspectorManager.disconnect(); + } + + @Override + protected void done() { + try { + if (get()) { + treeViewer.clearView(); + connectButton.setEnabled(true); + disconnectButton.setEnabled(false); + refreshButton.setEnabled(false); + addNodeButton.setEnabled(false); + deleteNodeButton.setEnabled(false); + } + } catch (InterruptedException e) { + LoggerFactory + .getLogger() + .error( + "Error occurred while disconnecting from ZooKeeper server", + e); + } catch (ExecutionException e) { + LoggerFactory + .getLogger() + .error( + "Error occurred while disconnecting from ZooKeeper server", + e); + } + } + + }; + worker.execute(); + if (wait) { + while (!worker.isDone()) { + try { + Thread.sleep(100); + } catch (InterruptedException e) { + LoggerFactory + .getLogger() + .error( + "Error occurred while disconnecting from ZooKeeper server", + e); + } + } + } + } + + /* + * (non-Javadoc) + * + * @seeorg.apache.zookeeper.inspector.gui.NodeViewersChangeListener# + * nodeViewersChanged(java.util.List) + */ + public void nodeViewersChanged(List newViewers) { + this.nodeViewersPanel.setNodeViewers(newViewers); + } + + /** + * @param connectionProps + * @throws IOException + */ + public void setdefaultConnectionProps(Properties connectionProps) + throws IOException { + this.zooInspectorManager.saveDefaultConnectionFile(connectionProps); + } +} diff --git a/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/ZooInspectorTreeViewer.java b/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/ZooInspectorTreeViewer.java new file mode 100644 index 0000000..128b358 --- /dev/null +++ b/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/ZooInspectorTreeViewer.java @@ -0,0 +1,362 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.inspector.gui; + +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Enumeration; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import javax.swing.JMenuItem; +import javax.swing.JPanel; +import javax.swing.JPopupMenu; +import javax.swing.JTree; +import javax.swing.SwingWorker; +import javax.swing.event.TreeSelectionListener; +import javax.swing.tree.DefaultMutableTreeNode; +import javax.swing.tree.DefaultTreeCellRenderer; +import javax.swing.tree.DefaultTreeModel; +import javax.swing.tree.TreeNode; +import javax.swing.tree.TreePath; + +import org.apache.zookeeper.inspector.manager.NodeListener; +import org.apache.zookeeper.inspector.manager.ZooInspectorManager; + +import com.nitido.utils.toaster.Toaster; + +/** + * A {@link JPanel} for showing the tree view of all the nodes in the zookeeper + * instance + */ +public class ZooInspectorTreeViewer extends JPanel implements NodeListener { + private final ZooInspectorManager zooInspectorManager; + private final JTree tree; + private final Toaster toasterManager; + + /** + * @param zooInspectorManager + * - the {@link ZooInspectorManager} for the application + * @param listener + * - the {@link TreeSelectionListener} to listen for changes in + * the selected node on the node tree + */ + public ZooInspectorTreeViewer( + final ZooInspectorManager zooInspectorManager, + TreeSelectionListener listener) { + this.zooInspectorManager = zooInspectorManager; + this.setLayout(new BorderLayout()); + final JPopupMenu popupMenu = new JPopupMenu(); + final JMenuItem addNotify = new JMenuItem("Add Change Notification"); + this.toasterManager = new Toaster(); + this.toasterManager.setBorderColor(Color.BLACK); + this.toasterManager.setMessageColor(Color.BLACK); + this.toasterManager.setToasterColor(Color.WHITE); + addNotify.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + List selectedNodes = getSelectedNodes(); + zooInspectorManager.addWatchers(selectedNodes, + ZooInspectorTreeViewer.this); + } + }); + final JMenuItem removeNotify = new JMenuItem( + "Remove Change Notification"); + removeNotify.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + List selectedNodes = getSelectedNodes(); + zooInspectorManager.removeWatchers(selectedNodes); + } + }); + tree = new JTree(new DefaultMutableTreeNode()); + tree.setCellRenderer(new ZooInspectorTreeCellRenderer()); + tree.setEditable(false); + tree.getSelectionModel().addTreeSelectionListener(listener); + tree.addMouseListener(new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent e) { + if (e.isPopupTrigger() || e.getButton() == MouseEvent.BUTTON3) { + // TODO only show add if a selected node isn't being + // watched, and only show remove if a selected node is being + // watched + popupMenu.removeAll(); + popupMenu.add(addNotify); + popupMenu.add(removeNotify); + popupMenu.show(ZooInspectorTreeViewer.this, e.getX(), e + .getY()); + } + } + }); + this.add(tree, BorderLayout.CENTER); + } + + /** + * Refresh the tree view + */ + public void refreshView() { + final Set expandedNodes = new LinkedHashSet(); + int rowCount = tree.getRowCount(); + for (int i = 0; i < rowCount; i++) { + TreePath path = tree.getPathForRow(i); + if (tree.isExpanded(path)) { + expandedNodes.add(path); + } + } + final TreePath[] selectedNodes = tree.getSelectionPaths(); + SwingWorker worker = new SwingWorker() { + + @Override + protected Boolean doInBackground() throws Exception { + tree.setModel(new DefaultTreeModel(new ZooInspectorTreeNode( + "/", null))); + return true; + } + + @Override + protected void done() { + for (TreePath path : expandedNodes) { + tree.expandPath(path); + } + tree.getSelectionModel().setSelectionPaths(selectedNodes); + } + }; + worker.execute(); + } + + /** + * clear the tree view of all nodes + */ + public void clearView() { + tree.setModel(new DefaultTreeModel(new DefaultMutableTreeNode())); + } + + /** + * @author Colin + * + */ + private static class ZooInspectorTreeCellRenderer extends + DefaultTreeCellRenderer { + public ZooInspectorTreeCellRenderer() { + setLeafIcon(ZooInspectorIconResources.getTreeLeafIcon()); + setOpenIcon(ZooInspectorIconResources.getTreeOpenIcon()); + setClosedIcon(ZooInspectorIconResources.getTreeClosedIcon()); + } + } + + /** + * @author Colin + * + */ + private class ZooInspectorTreeNode implements TreeNode { + private final String nodePath; + private final String nodeName; + private final ZooInspectorTreeNode parent; + + public ZooInspectorTreeNode(String nodePath, ZooInspectorTreeNode parent) { + this.parent = parent; + this.nodePath = nodePath; + int index = nodePath.lastIndexOf("/"); + if (index == -1) { + throw new IllegalArgumentException("Invalid node path" + + nodePath); + } + this.nodeName = nodePath.substring(index + 1); + } + + /* + * (non-Javadoc) + * + * @see javax.swing.tree.TreeNode#children() + */ + public Enumeration children() { + List children = zooInspectorManager + .getChildren(this.nodePath); + Collections.sort(children); + List returnChildren = new ArrayList(); + for (String child : children) { + returnChildren.add(new ZooInspectorTreeNode((this.nodePath + .equals("/") ? "" : this.nodePath) + + "/" + child, this)); + } + return Collections.enumeration(returnChildren); + } + + /* + * (non-Javadoc) + * + * @see javax.swing.tree.TreeNode#getAllowsChildren() + */ + public boolean getAllowsChildren() { + return zooInspectorManager.isAllowsChildren(this.nodePath); + } + + /* + * (non-Javadoc) + * + * @see javax.swing.tree.TreeNode#getChildAt(int) + */ + public TreeNode getChildAt(int childIndex) { + String child = zooInspectorManager.getNodeChild(this.nodePath, + childIndex); + if (child != null) { + return new ZooInspectorTreeNode((this.nodePath.equals("/") ? "" + : this.nodePath) + + "/" + child, this); + } + return null; + } + + /* + * (non-Javadoc) + * + * @see javax.swing.tree.TreeNode#getChildCount() + */ + public int getChildCount() { + return zooInspectorManager.getNumChildren(this.nodePath); + } + + /* + * (non-Javadoc) + * + * @see javax.swing.tree.TreeNode#getIndex(javax.swing.tree.TreeNode) + */ + public int getIndex(TreeNode node) { + return zooInspectorManager.getNodeIndex(this.nodePath); + } + + /* + * (non-Javadoc) + * + * @see javax.swing.tree.TreeNode#getParent() + */ + public TreeNode getParent() { + return this.parent; + } + + /* + * (non-Javadoc) + * + * @see javax.swing.tree.TreeNode#isLeaf() + */ + public boolean isLeaf() { + return !zooInspectorManager.hasChildren(this.nodePath); + } + + @Override + public String toString() { + return this.nodeName; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + getOuterType().hashCode(); + result = prime * result + + ((nodePath == null) ? 0 : nodePath.hashCode()); + result = prime * result + + ((parent == null) ? 0 : parent.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + ZooInspectorTreeNode other = (ZooInspectorTreeNode) obj; + if (!getOuterType().equals(other.getOuterType())) + return false; + if (nodePath == null) { + if (other.nodePath != null) + return false; + } else if (!nodePath.equals(other.nodePath)) + return false; + if (parent == null) { + if (other.parent != null) + return false; + } else if (!parent.equals(other.parent)) + return false; + return true; + } + + private ZooInspectorTreeViewer getOuterType() { + return ZooInspectorTreeViewer.this; + } + + } + + /** + * @return {@link List} of the currently selected nodes + */ + public List getSelectedNodes() { + TreePath[] paths = tree.getSelectionPaths(); + List selectedNodes = new ArrayList(); + if (paths != null) { + for (TreePath path : paths) { + StringBuilder sb = new StringBuilder(); + Object[] pathArray = path.getPath(); + for (Object o : pathArray) { + String nodeName = o.toString(); + if (nodeName.length() > 0) { + sb.append("/"); + sb.append(o.toString()); + } + } + selectedNodes.add(sb.toString()); + } + } + return selectedNodes; + } + + /* + * (non-Javadoc) + * + * @see + * org.apache.zookeeper.inspector.manager.NodeListener#processEvent(java + * .lang.String, java.lang.String, java.util.Map) + */ + public void processEvent(String nodePath, String eventType, + Map eventInfo) { + StringBuilder sb = new StringBuilder(); + sb.append("Node: "); + sb.append(nodePath); + sb.append("\nEvent: "); + sb.append(eventType); + if (eventInfo != null) { + for (Map.Entry entry : eventInfo.entrySet()) { + sb.append("\n"); + sb.append(entry.getKey()); + sb.append(": "); + sb.append(entry.getValue()); + } + } + this.toasterManager.showToaster(ZooInspectorIconResources + .getInformationIcon(), sb.toString()); + } +} diff --git a/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/about.html b/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/about.html new file mode 100644 index 0000000..17fb3dc --- /dev/null +++ b/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/about.html @@ -0,0 +1,21 @@ + + + + +ZooInspector v0.1 + + +

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

    +
    +

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

    +

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

    + + diff --git a/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/nodeviewer/NodeViewerACL.java b/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/nodeviewer/NodeViewerACL.java new file mode 100644 index 0000000..5ac203c --- /dev/null +++ b/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/nodeviewer/NodeViewerACL.java @@ -0,0 +1,187 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.inspector.gui.nodeviewer; + +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; +import java.awt.Insets; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.concurrent.ExecutionException; + +import javax.swing.BorderFactory; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import javax.swing.JTextField; +import javax.swing.SwingWorker; + +import org.apache.zookeeper.inspector.logger.LoggerFactory; +import org.apache.zookeeper.inspector.manager.ZooInspectorNodeManager; + +/** + * A node viewer for displaying the ACLs currently applied to the selected node + */ +public class NodeViewerACL extends ZooInspectorNodeViewer { + private ZooInspectorNodeManager zooInspectorManager; + private final JPanel aclDataPanel; + private String selectedNode; + + /** + * + */ + public NodeViewerACL() { + this.setLayout(new BorderLayout()); + this.aclDataPanel = new JPanel(); + this.aclDataPanel.setBackground(Color.WHITE); + JScrollPane scroller = new JScrollPane(this.aclDataPanel); + this.add(scroller, BorderLayout.CENTER); + } + + /* + * (non-Javadoc) + * + * @see + * org.apache.zookeeper.inspector.gui.nodeviewer.ZooInspectorNodeViewer# + * getTitle() + */ + @Override + public String getTitle() { + return "Node ACLs"; + } + + /* + * (non-Javadoc) + * + * @see + * org.apache.zookeeper.inspector.gui.nodeviewer.ZooInspectorNodeViewer# + * nodeSelectionChanged(java.util.Set) + */ + @Override + public void nodeSelectionChanged(List selectedNodes) { + this.aclDataPanel.removeAll(); + if (selectedNodes.size() > 0) { + this.selectedNode = selectedNodes.get(0); + SwingWorker>, Void> worker = new SwingWorker>, Void>() { + + @Override + protected List> doInBackground() + throws Exception { + return NodeViewerACL.this.zooInspectorManager + .getACLs(NodeViewerACL.this.selectedNode); + } + + @Override + protected void done() { + List> acls = null; + try { + acls = get(); + } catch (InterruptedException e) { + acls = new ArrayList>(); + LoggerFactory.getLogger().error( + "Error retrieving ACL Information for node: " + + NodeViewerACL.this.selectedNode, e); + } catch (ExecutionException e) { + acls = new ArrayList>(); + LoggerFactory.getLogger().error( + "Error retrieving ACL Information for node: " + + NodeViewerACL.this.selectedNode, e); + } + aclDataPanel.setLayout(new GridBagLayout()); + int j = 0; + for (Map data : acls) { + int rowPos = 2 * j + 1; + JPanel aclPanel = new JPanel(); + aclPanel.setBorder(BorderFactory + .createLineBorder(Color.BLACK)); + aclPanel.setBackground(Color.WHITE); + aclPanel.setLayout(new GridBagLayout()); + int i = 0; + for (Map.Entry entry : data.entrySet()) { + int rowPosACL = 2 * i + 1; + JLabel label = new JLabel(entry.getKey()); + JTextField text = new JTextField(entry.getValue()); + text.setEditable(false); + GridBagConstraints c1 = new GridBagConstraints(); + c1.gridx = 1; + c1.gridy = rowPosACL; + c1.gridwidth = 1; + c1.gridheight = 1; + c1.weightx = 0; + c1.weighty = 0; + c1.anchor = GridBagConstraints.NORTHWEST; + c1.fill = GridBagConstraints.BOTH; + c1.insets = new Insets(5, 5, 5, 5); + c1.ipadx = 0; + c1.ipady = 0; + aclPanel.add(label, c1); + GridBagConstraints c2 = new GridBagConstraints(); + c2.gridx = 3; + c2.gridy = rowPosACL; + c2.gridwidth = 1; + c2.gridheight = 1; + c2.weightx = 0; + c2.weighty = 0; + c2.anchor = GridBagConstraints.NORTHWEST; + c2.fill = GridBagConstraints.BOTH; + c2.insets = new Insets(5, 5, 5, 5); + c2.ipadx = 0; + c2.ipady = 0; + aclPanel.add(text, c2); + i++; + } + GridBagConstraints c = new GridBagConstraints(); + c.gridx = 1; + c.gridy = rowPos; + c.gridwidth = 1; + c.gridheight = 1; + c.weightx = 1; + c.weighty = 1; + c.anchor = GridBagConstraints.NORTHWEST; + c.fill = GridBagConstraints.NONE; + c.insets = new Insets(5, 5, 5, 5); + c.ipadx = 0; + c.ipady = 0; + aclDataPanel.add(aclPanel, c); + } + NodeViewerACL.this.aclDataPanel.revalidate(); + NodeViewerACL.this.aclDataPanel.repaint(); + } + }; + worker.execute(); + } + } + + /* + * (non-Javadoc) + * + * @see + * org.apache.zookeeper.inspector.gui.nodeviewer.ZooInspectorNodeViewer# + * setZooInspectorManager + * (org.apache.zookeeper.inspector.manager.ZooInspectorNodeManager) + */ + @Override + public void setZooInspectorManager( + ZooInspectorNodeManager zooInspectorManager) { + this.zooInspectorManager = zooInspectorManager; + } + +} diff --git a/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/nodeviewer/NodeViewerData.java b/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/nodeviewer/NodeViewerData.java new file mode 100644 index 0000000..001cb7b --- /dev/null +++ b/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/nodeviewer/NodeViewerData.java @@ -0,0 +1,146 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.inspector.gui.nodeviewer; + +import java.awt.BorderLayout; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.util.List; +import java.util.concurrent.ExecutionException; + +import javax.swing.JButton; +import javax.swing.JOptionPane; +import javax.swing.JScrollPane; +import javax.swing.JTextPane; +import javax.swing.JToolBar; +import javax.swing.SwingWorker; + +import org.apache.zookeeper.inspector.gui.ZooInspectorIconResources; +import org.apache.zookeeper.inspector.logger.LoggerFactory; +import org.apache.zookeeper.inspector.manager.ZooInspectorNodeManager; + +/** + * A node viewer for displaying the data for the currently selected node + */ +public class NodeViewerData extends ZooInspectorNodeViewer { + private ZooInspectorNodeManager zooInspectorManager; + private final JTextPane dataArea; + private final JToolBar toolbar; + private String selectedNode; + + /** + * + */ + public NodeViewerData() { + this.setLayout(new BorderLayout()); + this.dataArea = new JTextPane(); + this.toolbar = new JToolBar(); + this.toolbar.setFloatable(false); + JScrollPane scroller = new JScrollPane(this.dataArea); + scroller + .setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); + this.add(scroller, BorderLayout.CENTER); + this.add(this.toolbar, BorderLayout.NORTH); + JButton saveButton = new JButton(ZooInspectorIconResources + .getSaveIcon()); + saveButton.addActionListener(new ActionListener() { + + public void actionPerformed(ActionEvent e) { + if (selectedNode != null) { + if (JOptionPane.showConfirmDialog(NodeViewerData.this, + "Are you sure you want to save this node?" + + " (this action cannot be reverted)", + "Confirm Save", JOptionPane.YES_NO_OPTION, + JOptionPane.WARNING_MESSAGE) == JOptionPane.YES_OPTION) { + zooInspectorManager.setData(selectedNode, dataArea + .getText()); + } + } + } + }); + this.toolbar.add(saveButton); + + } + + /* + * (non-Javadoc) + * + * @see + * org.apache.zookeeper.inspector.gui.nodeviewer.ZooInspectorNodeViewer# + * getTitle() + */ + @Override + public String getTitle() { + return "Node Data"; + } + + /* + * (non-Javadoc) + * + * @see + * org.apache.zookeeper.inspector.gui.nodeviewer.ZooInspectorNodeViewer# + * nodeSelectionChanged(java.util.Set) + */ + @Override + public void nodeSelectionChanged(List selectedNodes) { + if (selectedNodes.size() > 0) { + this.selectedNode = selectedNodes.get(0); + SwingWorker worker = new SwingWorker() { + + @Override + protected String doInBackground() throws Exception { + return NodeViewerData.this.zooInspectorManager + .getData(NodeViewerData.this.selectedNode); + } + + @Override + protected void done() { + String data = ""; + try { + data = get(); + } catch (InterruptedException e) { + LoggerFactory.getLogger().error( + "Error retrieving data for node: " + + NodeViewerData.this.selectedNode, e); + } catch (ExecutionException e) { + LoggerFactory.getLogger().error( + "Error retrieving data for node: " + + NodeViewerData.this.selectedNode, e); + } + NodeViewerData.this.dataArea.setText(data); + } + }; + worker.execute(); + } + } + + /* + * (non-Javadoc) + * + * @see + * org.apache.zookeeper.inspector.gui.nodeviewer.ZooInspectorNodeViewer# + * setZooInspectorManager + * (org.apache.zookeeper.inspector.manager.ZooInspectorNodeManager) + */ + @Override + public void setZooInspectorManager( + ZooInspectorNodeManager zooInspectorManager) { + this.zooInspectorManager = zooInspectorManager; + } + +} diff --git a/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/nodeviewer/NodeViewerMetaData.java b/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/nodeviewer/NodeViewerMetaData.java new file mode 100644 index 0000000..5c2df8d --- /dev/null +++ b/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/nodeviewer/NodeViewerMetaData.java @@ -0,0 +1,186 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.inspector.gui.nodeviewer; + +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; +import java.awt.Insets; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.ExecutionException; + +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import javax.swing.JTextField; +import javax.swing.SwingWorker; + +import org.apache.zookeeper.data.Stat; +import org.apache.zookeeper.inspector.logger.LoggerFactory; +import org.apache.zookeeper.inspector.manager.ZooInspectorNodeManager; + +/** + * A node viewer for displaying the meta data for the currently selected node. + * The meta data is essentially the information from the {@link Stat} for the + * node + */ +public class NodeViewerMetaData extends ZooInspectorNodeViewer { + private ZooInspectorNodeManager zooInspectorManager; + private final JPanel metaDataPanel; + private String selectedNode; + + /** + * + */ + public NodeViewerMetaData() { + this.setLayout(new BorderLayout()); + this.metaDataPanel = new JPanel(); + this.metaDataPanel.setBackground(Color.WHITE); + JScrollPane scroller = new JScrollPane(this.metaDataPanel); + this.add(scroller, BorderLayout.CENTER); + } + + /* + * (non-Javadoc) + * + * @see + * org.apache.zookeeper.inspector.gui.nodeviewer.ZooInspectorNodeViewer# + * getTitle() + */ + @Override + public String getTitle() { + return "Node Metadata"; + } + + /* + * (non-Javadoc) + * + * @see + * org.apache.zookeeper.inspector.gui.nodeviewer.ZooInspectorNodeViewer# + * nodeSelectionChanged(java.util.Set) + */ + @Override + public void nodeSelectionChanged(List selectedNodes) { + this.metaDataPanel.removeAll(); + if (selectedNodes.size() > 0) { + this.selectedNode = selectedNodes.get(0); + SwingWorker, Void> worker = new SwingWorker, Void>() { + + @Override + protected Map doInBackground() throws Exception { + return NodeViewerMetaData.this.zooInspectorManager + .getNodeMeta(NodeViewerMetaData.this.selectedNode); + } + + @Override + protected void done() { + Map data = null; + try { + data = get(); + } catch (InterruptedException e) { + data = new HashMap(); + LoggerFactory.getLogger().error( + "Error retrieving meta data for node: " + + NodeViewerMetaData.this.selectedNode, + e); + } catch (ExecutionException e) { + data = new HashMap(); + LoggerFactory.getLogger().error( + "Error retrieving meta data for node: " + + NodeViewerMetaData.this.selectedNode, + e); + } + NodeViewerMetaData.this.metaDataPanel + .setLayout(new GridBagLayout()); + JPanel infoPanel = new JPanel(); + infoPanel.setBackground(Color.WHITE); + infoPanel.setLayout(new GridBagLayout()); + int i = 0; + int rowPos = 0; + for (Map.Entry entry : data.entrySet()) { + rowPos = 2 * i + 1; + JLabel label = new JLabel(entry.getKey()); + JTextField text = new JTextField(entry.getValue()); + text.setEditable(false); + GridBagConstraints c1 = new GridBagConstraints(); + c1.gridx = 0; + c1.gridy = rowPos; + c1.gridwidth = 1; + c1.gridheight = 1; + c1.weightx = 0; + c1.weighty = 0; + c1.anchor = GridBagConstraints.WEST; + c1.fill = GridBagConstraints.HORIZONTAL; + c1.insets = new Insets(5, 5, 5, 5); + c1.ipadx = 0; + c1.ipady = 0; + infoPanel.add(label, c1); + GridBagConstraints c2 = new GridBagConstraints(); + c2.gridx = 2; + c2.gridy = rowPos; + c2.gridwidth = 1; + c2.gridheight = 1; + c2.weightx = 0; + c2.weighty = 0; + c2.anchor = GridBagConstraints.WEST; + c2.fill = GridBagConstraints.HORIZONTAL; + c2.insets = new Insets(5, 5, 5, 5); + c2.ipadx = 0; + c2.ipady = 0; + infoPanel.add(text, c2); + i++; + } + GridBagConstraints c = new GridBagConstraints(); + c.gridx = 1; + c.gridy = rowPos; + c.gridwidth = 1; + c.gridheight = 1; + c.weightx = 1; + c.weighty = 1; + c.anchor = GridBagConstraints.NORTHWEST; + c.fill = GridBagConstraints.NONE; + c.insets = new Insets(5, 5, 5, 5); + c.ipadx = 0; + c.ipady = 0; + NodeViewerMetaData.this.metaDataPanel.add(infoPanel, c); + NodeViewerMetaData.this.metaDataPanel.revalidate(); + NodeViewerMetaData.this.metaDataPanel.repaint(); + } + }; + worker.execute(); + } + } + + /* + * (non-Javadoc) + * + * @see + * org.apache.zookeeper.inspector.gui.nodeviewer.ZooInspectorNodeViewer# + * setZooInspectorManager + * (org.apache.zookeeper.inspector.manager.ZooInspectorNodeManager) + */ + @Override + public void setZooInspectorManager( + ZooInspectorNodeManager zooInspectorManager) { + this.zooInspectorManager = zooInspectorManager; + } + +} diff --git a/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/nodeviewer/ZooInspectorNodeViewer.java b/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/nodeviewer/ZooInspectorNodeViewer.java new file mode 100644 index 0000000..32119a8 --- /dev/null +++ b/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/nodeviewer/ZooInspectorNodeViewer.java @@ -0,0 +1,138 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.inspector.gui.nodeviewer; + +import java.awt.datatransfer.DataFlavor; +import java.awt.datatransfer.Transferable; +import java.awt.datatransfer.UnsupportedFlavorException; +import java.io.IOException; +import java.util.List; + +import javax.swing.JPanel; + +import org.apache.zookeeper.inspector.manager.ZooInspectorNodeManager; + +/** + * A {@link JPanel} for displaying information about the currently selected + * node(s) + */ +public abstract class ZooInspectorNodeViewer extends JPanel implements + Transferable { + /** + * The {@link DataFlavor} used for DnD in the node viewer configuration + * dialog + */ + public static final DataFlavor nodeViewerDataFlavor = new DataFlavor( + ZooInspectorNodeViewer.class, "nodeviewer"); + + /** + * @param zooInspectorManager + */ + public abstract void setZooInspectorManager( + ZooInspectorNodeManager zooInspectorManager); + + /** + * Called whenever the selected nodes in the tree view changes. + * + * @param selectedNodes + * - the nodes currently selected in the tree view + * + */ + public abstract void nodeSelectionChanged(List selectedNodes); + + /** + * @return the title of the node viewer. this will be shown on the tab for + * this node viewer. + */ + public abstract String getTitle(); + + /* + * (non-Javadoc) + * + * @see + * java.awt.datatransfer.Transferable#getTransferData(java.awt.datatransfer + * .DataFlavor) + */ + public Object getTransferData(DataFlavor flavor) + throws UnsupportedFlavorException, IOException { + if (flavor.equals(nodeViewerDataFlavor)) { + return this.getClass().getCanonicalName(); + } else { + return null; + } + } + + /* + * (non-Javadoc) + * + * @see java.awt.datatransfer.Transferable#getTransferDataFlavors() + */ + public DataFlavor[] getTransferDataFlavors() { + return new DataFlavor[] { nodeViewerDataFlavor }; + } + + /* + * (non-Javadoc) + * + * @seejava.awt.datatransfer.Transferable#isDataFlavorSupported(java.awt. + * datatransfer.DataFlavor) + */ + public boolean isDataFlavorSupported(DataFlavor flavor) { + return flavor.equals(nodeViewerDataFlavor); + } + + /* + * (non-Javadoc) + * + * @see java.lang.Object#hashCode() + */ + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + + ((getTitle() == null) ? 0 : getTitle().hashCode()); + return result; + } + + /* + * (non-Javadoc) + * + * @see java.lang.Object#equals(java.lang.Object) + */ + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + ZooInspectorNodeViewer other = (ZooInspectorNodeViewer) obj; + if (getClass().getCanonicalName() != other.getClass() + .getCanonicalName()) { + return false; + } + if (getTitle() == null) { + if (other.getTitle() != null) + return false; + } else if (!getTitle().equals(other.getTitle())) + return false; + return true; + } +} diff --git a/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/logger/LoggerFactory.java b/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/logger/LoggerFactory.java new file mode 100644 index 0000000..e4fae41 --- /dev/null +++ b/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/logger/LoggerFactory.java @@ -0,0 +1,36 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.inspector.logger; + +/** + * Provides a {@link Logger} for use across the entire application + * + */ +public class LoggerFactory +{ + private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger("org.apache.zookeeper.inspector"); //$NON-NLS-1$ + + /** + * @return {@link Logger} for ZooInspector + */ + public static org.slf4j.Logger getLogger() + { + return logger; + } + +} diff --git a/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/manager/NodeListener.java b/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/manager/NodeListener.java new file mode 100644 index 0000000..fe55a45 --- /dev/null +++ b/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/manager/NodeListener.java @@ -0,0 +1,37 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.inspector.manager; + +import java.util.Map; + +/** + * A Listener for Events on zookeeper nodes + */ +public interface NodeListener { + /** + * @param nodePath + * - the path of the node + * @param eventType + * - the event type + * @param eventInfo + * - a {@link Map} containing any other information about this + * event + */ + public void processEvent(String nodePath, String eventType, + Map eventInfo); +} diff --git a/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/manager/Pair.java b/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/manager/Pair.java new file mode 100644 index 0000000..b72950c --- /dev/null +++ b/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/manager/Pair.java @@ -0,0 +1,120 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.inspector.manager; + +/** + * A utility class for storing a pair of objects + * + * @param + * @param + */ +public class Pair { + private K key; + private V value; + + /** + * @param key + * @param value + */ + public Pair(K key, V value) { + this.key = key; + this.value = value; + } + + /** + * + */ + public Pair() { + // Do Nothing + } + + /** + * @return key + */ + public K getKey() { + return key; + } + + /** + * @param key + */ + public void setKey(K key) { + this.key = key; + } + + /** + * @return value + */ + public V getValue() { + return value; + } + + /** + * @param value + */ + public void setValue(V value) { + this.value = value; + } + + @Override + public String toString() { + return "Pair [" + key + ", " + value + "]"; + } + + /* + * (non-Javadoc) + * + * @see java.lang.Object#hashCode() + */ + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((key == null) ? 0 : key.hashCode()); + result = prime * result + ((value == null) ? 0 : value.hashCode()); + return result; + } + + /* + * (non-Javadoc) + * + * @see java.lang.Object#equals(java.lang.Object) + */ + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + Pair other = (Pair) obj; + if (key == null) { + if (other.key != null) + return false; + } else if (!key.equals(other.key)) + return false; + if (value == null) { + if (other.value != null) + return false; + } else if (!value.equals(other.value)) + return false; + return true; + } + +} diff --git a/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/manager/ZooInspectorManager.java b/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/manager/ZooInspectorManager.java new file mode 100644 index 0000000..74c3cb2 --- /dev/null +++ b/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/manager/ZooInspectorManager.java @@ -0,0 +1,139 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.zookeeper.inspector.manager; + +import java.io.File; +import java.io.IOException; +import java.util.Collection; +import java.util.List; +import java.util.Map; +import java.util.Properties; + +import javax.swing.JComboBox; +import javax.swing.JTextField; + +/** + * A Manager for all interactions between the application and the Zookeeper + * instance + */ +public interface ZooInspectorManager extends ZooInspectorNodeManager, + ZooInspectorNodeTreeManager { + + /** + * @param connectionProps + * @return true if successfully connected + */ + public boolean connect(Properties connectionProps); + + /** + * @return true if successfully disconnected + */ + public boolean disconnect(); + + /** + * @return a {@link Pair} containing the following: + *

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

+ + + +
+ + + + + + + + + + + + +
+