21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/conf/zoo_sample.cfg:
--------------------------------------------------------------------------------
1 | # The number of milliseconds of each tick
2 | tickTime=2000
3 | # The number of ticks that the initial
4 | # synchronization phase can take
5 | initLimit=10
6 | # The number of ticks that can pass between
7 | # sending a request and getting an acknowledgement
8 | syncLimit=5
9 | # the directory where the snapshot is stored.
10 | # do not use /tmp for storage, /tmp here is just
11 | # example sakes.
12 | dataDir=/tmp/zookeeper
13 | # the port at which the clients will connect
14 | clientPort=2181
15 | #
16 | # Be sure to read the maintenance section of the
17 | # administrator guide before turning on autopurge.
18 | #
19 | # http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
20 | #
21 | # The number of snapshots to retain in dataDir
22 | #autopurge.snapRetainCount=3
23 | # Purge task interval in hours
24 | # Set to "0" to disable auto purge feature
25 | #autopurge.purgeInterval=1
26 |
--------------------------------------------------------------------------------
/docs/api/org/apache/zookeeper/client/package-frame.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/docs/api/package-list:
--------------------------------------------------------------------------------
1 | org.apache.zookeeper
2 | org.apache.zookeeper.client
3 | org.apache.zookeeper.data
4 | org.apache.zookeeper.server
5 | org.apache.zookeeper.server.quorum
6 | org.apache.zookeeper.server.upgrade
7 |
--------------------------------------------------------------------------------
/docs/api/resources/inherit.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/api/resources/inherit.gif
--------------------------------------------------------------------------------
/docs/api/stylesheet.css:
--------------------------------------------------------------------------------
1 | /* Javadoc style sheet */
2 |
3 | /* Define colors, fonts and other style attributes here to override the defaults */
4 |
5 | /* Page background color */
6 | body { background-color: #FFFFFF; color:#000000 }
7 |
8 | /* Headings */
9 | h1 { font-size: 145% }
10 |
11 | /* Table colors */
12 | .TableHeadingColor { background: #CCCCFF; color:#000000 } /* Dark mauve */
13 | .TableSubHeadingColor { background: #EEEEFF; color:#000000 } /* Light mauve */
14 | .TableRowColor { background: #FFFFFF; color:#000000 } /* White */
15 |
16 | /* Font used in left-hand frame lists */
17 | .FrameTitleFont { font-size: 100%; font-family: Helvetica, Arial, sans-serif; color:#000000 }
18 | .FrameHeadingFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif; color:#000000 }
19 | .FrameItemFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif; color:#000000 }
20 |
21 | /* Navigation bar fonts and colors */
22 | .NavBarCell1 { background-color:#EEEEFF; color:#000000} /* Light mauve */
23 | .NavBarCell1Rev { background-color:#00008B; color:#FFFFFF} /* Dark Blue */
24 | .NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;color:#000000;}
25 | .NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;color:#FFFFFF;}
26 |
27 | .NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000}
28 | .NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000}
29 |
30 |
--------------------------------------------------------------------------------
/docs/bookkeeperConfig.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/bookkeeperConfig.pdf
--------------------------------------------------------------------------------
/docs/bookkeeperOverview.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/bookkeeperOverview.pdf
--------------------------------------------------------------------------------
/docs/bookkeeperProgrammer.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/bookkeeperProgrammer.pdf
--------------------------------------------------------------------------------
/docs/bookkeeperStarted.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/bookkeeperStarted.pdf
--------------------------------------------------------------------------------
/docs/bookkeeperStream.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/bookkeeperStream.pdf
--------------------------------------------------------------------------------
/docs/broken-links.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/docs/images/2pc.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/images/2pc.jpg
--------------------------------------------------------------------------------
/docs/images/bk-overview.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/images/bk-overview.jpg
--------------------------------------------------------------------------------
/docs/images/built-with-forrest-button.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/images/built-with-forrest-button.png
--------------------------------------------------------------------------------
/docs/images/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/images/favicon.ico
--------------------------------------------------------------------------------
/docs/images/hadoop-logo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/images/hadoop-logo.jpg
--------------------------------------------------------------------------------
/docs/images/instruction_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/images/instruction_arrow.png
--------------------------------------------------------------------------------
/docs/images/state_dia.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/images/state_dia.jpg
--------------------------------------------------------------------------------
/docs/images/zkcomponents.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/images/zkcomponents.jpg
--------------------------------------------------------------------------------
/docs/images/zknamespace.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/images/zknamespace.jpg
--------------------------------------------------------------------------------
/docs/images/zkperfRW-3.2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/images/zkperfRW-3.2.jpg
--------------------------------------------------------------------------------
/docs/images/zkperfRW.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/images/zkperfRW.jpg
--------------------------------------------------------------------------------
/docs/images/zkperfreliability.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/images/zkperfreliability.jpg
--------------------------------------------------------------------------------
/docs/images/zkservice.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/images/zkservice.jpg
--------------------------------------------------------------------------------
/docs/images/zookeeper_small.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/images/zookeeper_small.gif
--------------------------------------------------------------------------------
/docs/index.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/index.pdf
--------------------------------------------------------------------------------
/docs/javaExample.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/javaExample.pdf
--------------------------------------------------------------------------------
/docs/linkmap.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/linkmap.pdf
--------------------------------------------------------------------------------
/docs/recipes.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/recipes.pdf
--------------------------------------------------------------------------------
/docs/releasenotes.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/releasenotes.pdf
--------------------------------------------------------------------------------
/docs/skin/CommonMessages_de.xml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/CommonMessages_de.xml
--------------------------------------------------------------------------------
/docs/skin/CommonMessages_en_US.xml:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 | Font size:
20 | Last Published:
21 | Search
22 | Search site with
23 |
24 |
--------------------------------------------------------------------------------
/docs/skin/CommonMessages_es.xml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/CommonMessages_es.xml
--------------------------------------------------------------------------------
/docs/skin/CommonMessages_fr.xml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/CommonMessages_fr.xml
--------------------------------------------------------------------------------
/docs/skin/images/README.txt:
--------------------------------------------------------------------------------
1 | The images in this directory are used if the current skin lacks them.
2 |
--------------------------------------------------------------------------------
/docs/skin/images/add.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/add.jpg
--------------------------------------------------------------------------------
/docs/skin/images/built-with-forrest-button.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/built-with-forrest-button.png
--------------------------------------------------------------------------------
/docs/skin/images/chapter.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/chapter.gif
--------------------------------------------------------------------------------
/docs/skin/images/chapter_open.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/chapter_open.gif
--------------------------------------------------------------------------------
/docs/skin/images/current.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/current.gif
--------------------------------------------------------------------------------
/docs/skin/images/error.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/error.png
--------------------------------------------------------------------------------
/docs/skin/images/external-link.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/external-link.gif
--------------------------------------------------------------------------------
/docs/skin/images/fix.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/fix.jpg
--------------------------------------------------------------------------------
/docs/skin/images/forrest-credit-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/forrest-credit-logo.png
--------------------------------------------------------------------------------
/docs/skin/images/hack.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/hack.jpg
--------------------------------------------------------------------------------
/docs/skin/images/header_white_line.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/header_white_line.gif
--------------------------------------------------------------------------------
/docs/skin/images/info.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/info.png
--------------------------------------------------------------------------------
/docs/skin/images/instruction_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/instruction_arrow.png
--------------------------------------------------------------------------------
/docs/skin/images/label.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/label.gif
--------------------------------------------------------------------------------
/docs/skin/images/page.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/page.gif
--------------------------------------------------------------------------------
/docs/skin/images/pdfdoc.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/pdfdoc.gif
--------------------------------------------------------------------------------
/docs/skin/images/poddoc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/poddoc.png
--------------------------------------------------------------------------------
/docs/skin/images/printer.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/printer.gif
--------------------------------------------------------------------------------
/docs/skin/images/rc-b-l-15-1body-2menu-3menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/rc-b-l-15-1body-2menu-3menu.png
--------------------------------------------------------------------------------
/docs/skin/images/rc-b-r-15-1body-2menu-3menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/rc-b-r-15-1body-2menu-3menu.png
--------------------------------------------------------------------------------
/docs/skin/images/rc-b-r-5-1header-2tab-selected-3tab-selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/rc-b-r-5-1header-2tab-selected-3tab-selected.png
--------------------------------------------------------------------------------
/docs/skin/images/rc-t-l-5-1header-2searchbox-3searchbox.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/rc-t-l-5-1header-2searchbox-3searchbox.png
--------------------------------------------------------------------------------
/docs/skin/images/rc-t-l-5-1header-2tab-selected-3tab-selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/rc-t-l-5-1header-2tab-selected-3tab-selected.png
--------------------------------------------------------------------------------
/docs/skin/images/rc-t-l-5-1header-2tab-unselected-3tab-unselected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/rc-t-l-5-1header-2tab-unselected-3tab-unselected.png
--------------------------------------------------------------------------------
/docs/skin/images/rc-t-r-15-1body-2menu-3menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/rc-t-r-15-1body-2menu-3menu.png
--------------------------------------------------------------------------------
/docs/skin/images/rc-t-r-5-1header-2searchbox-3searchbox.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/rc-t-r-5-1header-2searchbox-3searchbox.png
--------------------------------------------------------------------------------
/docs/skin/images/rc-t-r-5-1header-2tab-selected-3tab-selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/rc-t-r-5-1header-2tab-selected-3tab-selected.png
--------------------------------------------------------------------------------
/docs/skin/images/rc-t-r-5-1header-2tab-unselected-3tab-unselected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/rc-t-r-5-1header-2tab-unselected-3tab-unselected.png
--------------------------------------------------------------------------------
/docs/skin/images/remove.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/remove.jpg
--------------------------------------------------------------------------------
/docs/skin/images/rss.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/rss.png
--------------------------------------------------------------------------------
/docs/skin/images/spacer.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/spacer.gif
--------------------------------------------------------------------------------
/docs/skin/images/success.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/success.png
--------------------------------------------------------------------------------
/docs/skin/images/txtdoc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/txtdoc.png
--------------------------------------------------------------------------------
/docs/skin/images/update.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/update.jpg
--------------------------------------------------------------------------------
/docs/skin/images/valid-html401.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/valid-html401.png
--------------------------------------------------------------------------------
/docs/skin/images/vcss.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/vcss.png
--------------------------------------------------------------------------------
/docs/skin/images/warning.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/warning.png
--------------------------------------------------------------------------------
/docs/skin/images/xmldoc.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/skin/images/xmldoc.gif
--------------------------------------------------------------------------------
/docs/skin/print.css:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | body {
18 | font-family: Georgia, Palatino, serif;
19 | font-size: 12pt;
20 | background: white;
21 | }
22 |
23 | #tabs,
24 | #menu,
25 | #content .toc {
26 | display: none;
27 | }
28 |
29 | #content {
30 | width: auto;
31 | padding: 0;
32 | float: none !important;
33 | color: black;
34 | background: inherit;
35 | }
36 |
37 | a:link, a:visited {
38 | color: #336699;
39 | background: inherit;
40 | text-decoration: underline;
41 | }
42 |
43 | #top .logo {
44 | padding: 0;
45 | margin: 0 0 2em 0;
46 | }
47 |
48 | #footer {
49 | margin-top: 4em;
50 | }
51 |
52 | acronym {
53 | border: 0;
54 | }
--------------------------------------------------------------------------------
/docs/zookeeperAdmin.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/zookeeperAdmin.pdf
--------------------------------------------------------------------------------
/docs/zookeeperHierarchicalQuorums.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/zookeeperHierarchicalQuorums.pdf
--------------------------------------------------------------------------------
/docs/zookeeperInternals.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/zookeeperInternals.pdf
--------------------------------------------------------------------------------
/docs/zookeeperJMX.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/zookeeperJMX.pdf
--------------------------------------------------------------------------------
/docs/zookeeperObservers.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/zookeeperObservers.pdf
--------------------------------------------------------------------------------
/docs/zookeeperOtherInfo.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/zookeeperOtherInfo.pdf
--------------------------------------------------------------------------------
/docs/zookeeperOver.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/zookeeperOver.pdf
--------------------------------------------------------------------------------
/docs/zookeeperProgrammers.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/zookeeperProgrammers.pdf
--------------------------------------------------------------------------------
/docs/zookeeperQuotas.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/zookeeperQuotas.pdf
--------------------------------------------------------------------------------
/docs/zookeeperStarted.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/zookeeperStarted.pdf
--------------------------------------------------------------------------------
/docs/zookeeperTutorial.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/docs/zookeeperTutorial.pdf
--------------------------------------------------------------------------------
/lib/cobertura/README.txt:
--------------------------------------------------------------------------------
1 | Download the cobertura binary from the following location and unpack it into this directory. Run "cobertura-report" target from build.xml to generate coverage report.
2 |
3 | http://cobertura.sourceforge.net/download.html
4 |
--------------------------------------------------------------------------------
/lib/jline-0.9.94.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/lib/jline-0.9.94.jar
--------------------------------------------------------------------------------
/lib/log4j-1.2.15.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/lib/log4j-1.2.15.jar
--------------------------------------------------------------------------------
/lib/netty-3.2.2.Final.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/lib/netty-3.2.2.Final.jar
--------------------------------------------------------------------------------
/lib/slf4j-api-1.6.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/lib/slf4j-api-1.6.1.jar
--------------------------------------------------------------------------------
/lib/slf4j-log4j12-1.6.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/lib/slf4j-log4j12-1.6.1.jar
--------------------------------------------------------------------------------
/src/c/ChangeLog:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/c/ChangeLog
--------------------------------------------------------------------------------
/src/c/include/zookeeper_version.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | #ifndef ZOOKEEPER_VERSION_H_
19 | #define ZOOKEEPER_VERSION_H_
20 |
21 | #ifdef __cplusplus
22 | extern "C" {
23 | #endif
24 |
25 | #define ZOO_MAJOR_VERSION 3
26 | #define ZOO_MINOR_VERSION 4
27 | #define ZOO_PATCH_VERSION 3
28 |
29 | #ifdef __cplusplus
30 | }
31 | #endif
32 |
33 | #endif /* ZOOKEEPER_VERSION_H_ */
34 |
--------------------------------------------------------------------------------
/src/c/tests/MocksBase.cc:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | #include
20 | #include
21 |
22 | #include "MocksBase.h"
23 | #include "LibCSymTable.h"
24 |
25 | // *****************************************************************************
26 | // Mock base
27 | void* Mock::operator new(std::size_t s){
28 | void* p=malloc(s);
29 | if(!p)
30 | throw std::bad_alloc();
31 | return p;
32 | }
33 |
34 | void Mock::operator delete(void* p){
35 | LIBC_SYMBOLS.free(p);
36 | }
37 |
--------------------------------------------------------------------------------
/src/c/tests/MocksBase.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | #ifndef MOCKSBASE_H_
20 | #define MOCKSBASE_H_
21 |
22 | #include
23 |
24 | // *****************************************************************************
25 | // Mock base
26 |
27 | class Mock
28 | {
29 | public:
30 | virtual ~Mock(){}
31 |
32 | static void* operator new(std::size_t s);
33 | static void operator delete(void* p);
34 | };
35 |
36 | #endif /*MOCKSBASE_H_*/
37 |
--------------------------------------------------------------------------------
/src/c/tests/Vector.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | #ifndef _VECTOR_UTIL_H
19 | #define _VECTOR_UTIL_H
20 |
21 | #include
22 |
23 | // function to conveniently stream vectors
24 | template
25 | std::ostream& operator<<(std::ostream& os,const std::vector& c){
26 | typedef std::vector V;
27 | os<<"[";
28 | if(c.size()>0){
29 | for(typename V::const_iterator it=c.begin();it!=c.end();++it)
30 | os<<*it<<",";
31 | os.seekp(-1,std::ios::cur);
32 | }
33 | os<<"]";
34 | return os;
35 | }
36 |
37 | #endif // _VECTOR_UTIL_H
38 |
--------------------------------------------------------------------------------
/src/c/tests/wrappers-mt.opt:
--------------------------------------------------------------------------------
1 | -Wl,--wrap -Wl,pthread_mutex_lock
2 | -Wl,--wrap -Wl,pthread_mutex_trylock
3 | -Wl,--wrap -Wl,pthread_mutex_unlock
4 |
--------------------------------------------------------------------------------
/src/c/tests/wrappers.opt:
--------------------------------------------------------------------------------
1 | -Wl,--wrap -Wl,calloc
2 | -Wl,--wrap -Wl,free
3 | -Wl,--wrap -Wl,flush_send_queue
4 | -Wl,--wrap -Wl,get_xid
5 | -Wl,--wrap -Wl,deliverWatchers
6 | -Wl,--wrap -Wl,activateWatcher
7 |
--------------------------------------------------------------------------------
/src/contrib/fatjar/README.txt:
--------------------------------------------------------------------------------
1 | This package contains build to create a fat zookeeper jar. You need to run ant to create the fat jar.
2 | To run the fatjar you can use. java -jar zoookeeper-*fatjar.jar
3 |
--------------------------------------------------------------------------------
/src/contrib/fatjar/conf/mainClasses:
--------------------------------------------------------------------------------
1 | ::Client Commands
2 | client:org.apache.zookeeper.ZooKeeperMain:Client shell to ZooKeeper
3 | ::Server Commands
4 | server:org.apache.zookeeper.server.quorum.QuorumPeerMain:Start ZooKeeper server
5 | ::Test Commands
6 | generateLoad:org.apache.zookeeper.test.system.GenerateLoad:A distributed load generator for testing
7 | quorumBench:org.apache.zookeeper.server.QuorumBenchmark:A benchmark of just the quorum protocol
8 | abBench:org.apache.zookeeper.server.quorum.AtomicBroadcastBenchmark:A benchmark of just the atomic broadcast
9 | ic:org.apache.zookeeper.test.system.InstanceContainer:A container that will instantiate classes as directed by an instance manager
10 | systest:org.apache.zookeeper.test.system.BaseSysTest:Start system test
11 |
--------------------------------------------------------------------------------
/src/contrib/huebrowser/zkui/Makefile:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 |
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | ifeq ($(ROOT),)
18 | $(error "Error: Expect the environment variable $$ROOT to point to the Desktop installation")
19 | endif
20 |
21 | include $(ROOT)/Makefile.sdk
22 |
--------------------------------------------------------------------------------
/src/contrib/huebrowser/zkui/src/zkui/__init__.py:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 |
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 |
--------------------------------------------------------------------------------
/src/contrib/huebrowser/zkui/src/zkui/forms.py:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 |
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | from django import forms
18 | from django.forms.widgets import Textarea, HiddenInput
19 |
20 | class CreateZNodeForm(forms.Form):
21 | name = forms.CharField(max_length=64)
22 | data = forms.CharField(required=False, widget=Textarea)
23 | sequence = forms.BooleanField(required=False)
24 |
25 | class EditZNodeForm(forms.Form):
26 | data = forms.CharField(required=False, widget=Textarea)
27 | version = forms.IntegerField(required=False, widget=HiddenInput)
28 |
29 |
30 |
--------------------------------------------------------------------------------
/src/contrib/huebrowser/zkui/src/zkui/models.py:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 |
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 |
18 |
--------------------------------------------------------------------------------
/src/contrib/huebrowser/zkui/src/zkui/settings.py:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 |
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | DJANGO_APPS = [ "zkui" ]
18 | NICE_NAME = "ZooKeeper Browser"
19 | REQUIRES_HADOOP = False
20 |
21 | CLUSTERS = [{
22 | 'nice_name': 'Default',
23 | 'hostport': 'localhost:2181,localhost:2182,localhost:2183',
24 | 'rest_gateway': 'http://localhost:9998'
25 | }
26 | ]
27 |
28 | DEPENDER_PACKAGE_YMLS = [
29 | "src/zkui/static/js/package.yml",
30 | ]
31 |
--------------------------------------------------------------------------------
/src/contrib/huebrowser/zkui/src/zkui/static/art/line_icons.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/contrib/huebrowser/zkui/src/zkui/static/art/line_icons.png
--------------------------------------------------------------------------------
/src/contrib/huebrowser/zkui/src/zkui/static/art/zkui.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/contrib/huebrowser/zkui/src/zkui/static/art/zkui.png
--------------------------------------------------------------------------------
/src/contrib/huebrowser/zkui/src/zkui/static/bootstrap.js:
--------------------------------------------------------------------------------
1 | // Licensed to the Apache Software Foundation (ASF) under one
2 | // or more contributor license agreements. See the NOTICE file
3 | // distributed with this work for additional information
4 | // regarding copyright ownership. The ASF licenses this file
5 | // to you under the Apache License, Version 2.0 (the
6 | // "License"); you may not use this file except in compliance
7 | // with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 | CCS.Desktop.register({
17 | Zkui : {
18 | name : 'ZooKeeper Browser',
19 | css : '/zkui/static/css/zkui.css',
20 | require: [ 'Zkui' ],
21 | launch: function(path, options){
22 | return new Zkui(path || '/zkui/', options);
23 | },
24 | menu: {
25 | id: 'ccs-zkui-menu',
26 | img: {
27 | src: '/zkui/static/art/zkui.png'
28 | }
29 | },
30 | help: '/help/zkui/'
31 | }
32 | });
33 |
--------------------------------------------------------------------------------
/src/contrib/huebrowser/zkui/src/zkui/static/help/index.html:
--------------------------------------------------------------------------------
1 |
17 |
18 |
ZooKeeper Browser
19 |
20 |
21 |
ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services
22 |
23 |
About
24 |
25 |
The ZooKeeper Browser application allows you to see how the cluster nodes are working and also allows you to do CRUD operations on the znode hierarchy.
26 |
27 |
--------------------------------------------------------------------------------
/src/contrib/huebrowser/zkui/src/zkui/static/js/Source/Zkui/Zkui.js:
--------------------------------------------------------------------------------
1 | // Licensed to the Apache Software Foundation (ASF) under one
2 | // or more contributor license agreements. See the NOTICE file
3 | // distributed with this work for additional information
4 | // regarding copyright ownership. The ASF licenses this file
5 | // to you under the Apache License, Version 2.0 (the
6 | // "License"); you may not use this file except in compliance
7 | // with the License. You may obtain a copy of the License at
8 | //
9 | // http://www.apache.org/licenses/LICENSE-2.0
10 | //
11 | // Unless required by applicable law or agreed to in writing, software
12 | // distributed under the License is distributed on an "AS IS" BASIS,
13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | // See the License for the specific language governing permissions and
15 | // limitations under the License.
16 |
17 | /*
18 | ---
19 |
20 | script: Zkui.js
21 |
22 | description: Defines Zkui; a Hue application that extends CCS.JBrowser.
23 |
24 | authors:
25 | - Unknown
26 |
27 | requires:
28 | - ccs-shared/CCS.JBrowser
29 |
30 | provides: [Zkui]
31 |
32 | ...
33 | */
34 | ART.Sheet.define('window.art.browser.zkui', {
35 | 'min-width': 620
36 | });
37 |
38 | var Zkui = new Class({
39 |
40 | Extends: CCS.JBrowser,
41 |
42 | options: {
43 | className: 'art browser logo_header zkui'
44 | },
45 |
46 | initialize: function(path, options){
47 | this.parent(path || '/zkui/', options);
48 | }
49 |
50 | });
51 |
--------------------------------------------------------------------------------
/src/contrib/huebrowser/zkui/src/zkui/static/js/package.yml:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | copyright: Apache License v2.0
16 | version: 0.1
17 | description: ZooKeeper Browser
18 | name: ZooKeeper Browser
19 | sources: [Source/Zkui/Zkui.js]
20 |
--------------------------------------------------------------------------------
/src/contrib/huebrowser/zkui/src/zkui/templates/create.mako:
--------------------------------------------------------------------------------
1 | <%!
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 |
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | %>
18 | <%namespace name="shared" file="shared_components.mako" />
19 |
20 | ${shared.header("ZooKeeper Browser > Create Znode")}
21 |
22 |
Create New Znode :: ${path}
23 |
24 |
25 |
33 |
34 | ${shared.footer()}
35 |
--------------------------------------------------------------------------------
/src/contrib/huebrowser/zkui/src/zkui/templates/edit.mako:
--------------------------------------------------------------------------------
1 | <%!
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 |
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | %>
18 | <%namespace name="shared" file="shared_components.mako" />
19 |
20 | ${shared.header("ZooKeeper Browser > Edit Znode > %s" % path)}
21 |
22 |
Edit Znode Data :: ${path}
23 |
24 |
25 |
33 |
34 | ${shared.footer()}
35 |
--------------------------------------------------------------------------------
/src/contrib/huebrowser/zkui/src/zkui/urls.py:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 |
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | from django.conf.urls.defaults import patterns, url
18 |
19 | urlpatterns = patterns('zkui',
20 | url(r'^$', 'views.index'),
21 | url(r'view/(?P\d+)$', 'views.view'),
22 | url(r'clients/(?P.+)$', 'views.clients'),
23 | url(r'tree/(?P\d+)(?P.+)$', 'views.tree'),
24 | url(r'create/(?P\d+)(?P.*)$', 'views.create'),
25 | url(r'delete/(?P\d+)(?P.*)$', 'views.delete'),
26 | url(r'edit/base64/(?P\d+)(?P.*)$', 'views.edit_as_base64'),
27 | url(r'edit/text/(?P\d+)(?P.*)$', 'views.edit_as_text')
28 | )
29 |
--------------------------------------------------------------------------------
/src/contrib/huebrowser/zkui/src/zkui/utils.py:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 |
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | from zkui import settings
18 |
19 | from django.http import Http404
20 |
21 | def get_cluster_or_404(id):
22 | try:
23 | id = int(id)
24 | if not (0 <= id < len(settings.CLUSTERS)):
25 | raise ValueError, 'Undefined cluster id.'
26 | except (TypeError, ValueError):
27 | raise Http404()
28 |
29 | cluster = settings.CLUSTERS[id]
30 | cluster['id'] = id
31 |
32 | return cluster
33 |
34 |
--------------------------------------------------------------------------------
/src/contrib/huebrowser/zkui/src/zkui/windmilltests.py:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 |
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | from desktop.lib.windmill_util import logged_in_client
18 |
19 | def test_zkui():
20 | """ launches the default view for zkui """
21 | client = logged_in_client()
22 | client.click(id='ccs-zkui-menu')
23 | client.waits.forElement(classname='CCS-ZKUI', timeout='2000')
24 |
--------------------------------------------------------------------------------
/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/FilterException.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | package org.apache.zookeeper.graph;
19 |
20 | public class FilterException extends Exception {
21 | public FilterException(String s) { super(s); }
22 | };
23 |
--------------------------------------------------------------------------------
/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/LogIterator.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | package org.apache.zookeeper.graph;
19 |
20 | import java.io.Closeable;
21 | import java.util.Iterator;
22 | import java.io.IOException;
23 |
24 | public interface LogIterator extends Iterator, Closeable {
25 | long size() throws IOException;;
26 | };
27 |
--------------------------------------------------------------------------------
/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/AndOp.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | package org.apache.zookeeper.graph.filterops;
19 |
20 | import org.apache.zookeeper.graph.LogEntry;
21 | import org.apache.zookeeper.graph.FilterOp;
22 | import org.apache.zookeeper.graph.FilterException;
23 |
24 | public class AndOp extends FilterOp {
25 | public boolean matches(LogEntry entry) throws FilterException {
26 | for (FilterOp f : subOps) {
27 | if (!f.matches(entry)) {
28 | return false;
29 | }
30 | }
31 | return true;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/Arg.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | package org.apache.zookeeper.graph.filterops;
19 |
20 | import org.apache.zookeeper.graph.FilterOp.*;
21 |
22 | public class Arg {
23 | private ArgType type;
24 | protected T value;
25 |
26 | protected Arg(ArgType type) {
27 | this.type = type;
28 | }
29 |
30 | public ArgType getType() { return type; }
31 | public T getValue() { return value; }
32 |
33 | public String toString() {
34 | return "[" + type + ":" + value + "]";
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/NotOp.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | package org.apache.zookeeper.graph.filterops;
19 |
20 | import org.apache.zookeeper.graph.LogEntry;
21 | import org.apache.zookeeper.graph.FilterOp;
22 | import org.apache.zookeeper.graph.FilterException;
23 |
24 | public class NotOp extends FilterOp {
25 | public boolean matches(LogEntry entry) throws FilterException {
26 | if (subOps.size() != 1) {
27 | throw new FilterException("Not operation can only take one argument");
28 | }
29 | return !subOps.get(0).matches(entry);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/NumberArg.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | package org.apache.zookeeper.graph.filterops;
19 |
20 | import org.apache.zookeeper.graph.FilterOp.*;
21 |
22 | public class NumberArg extends Arg {
23 | public NumberArg(Long value) {
24 | super(ArgType.NUMBER);
25 | this.value = value;
26 | }
27 | };
28 |
29 |
--------------------------------------------------------------------------------
/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/OrOp.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | package org.apache.zookeeper.graph.filterops;
19 |
20 | import org.apache.zookeeper.graph.LogEntry;
21 | import org.apache.zookeeper.graph.FilterOp;
22 | import org.apache.zookeeper.graph.FilterException;
23 |
24 | public class OrOp extends FilterOp {
25 | public boolean matches(LogEntry entry) throws FilterException {
26 | for (FilterOp f : subOps) {
27 | if (f.matches(entry)) {
28 | return true;
29 | }
30 | }
31 | return false;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/StringArg.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | package org.apache.zookeeper.graph.filterops;
19 |
20 | import org.apache.zookeeper.graph.FilterOp.*;
21 |
22 | public class StringArg extends Arg {
23 | public StringArg(String value) {
24 | super(ArgType.STRING);
25 | this.value = value;
26 | }
27 | };
28 |
29 |
--------------------------------------------------------------------------------
/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/filterops/SymbolArg.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | package org.apache.zookeeper.graph.filterops;
19 |
20 | import org.apache.zookeeper.graph.FilterOp.*;
21 |
22 | public class SymbolArg extends Arg {
23 | public SymbolArg(String value) {
24 | super(ArgType.SYMBOL);
25 | this.value = value;
26 | }
27 | };
28 |
--------------------------------------------------------------------------------
/src/contrib/loggraph/web/org/apache/zookeeper/graph/log4j.properties:
--------------------------------------------------------------------------------
1 | log4j.rootLogger=TRACE, CONSOLE
2 |
3 | # Print the date in ISO 8601 format
4 | log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
5 | log4j.appender.CONSOLE.Threshold=TRACE
6 | log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
7 | log4j.appender.CONSOLE.layout.ConversionPattern=%d{ISO8601} - %-5p [%t:%C{1}@%L] - %m%n
8 |
9 | log4j.logger.org.apache.zookeeper.graph.LogSkipList=off
10 | log4j.logger.org.apache.zookeeper.graph.RandomAccessFileReader=off
11 | #log4j.logger.org.apache.zookeeper.graph.Log4JSource=off
--------------------------------------------------------------------------------
/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/load-big.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/load-big.gif
--------------------------------------------------------------------------------
/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/load.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/load.gif
--------------------------------------------------------------------------------
/src/contrib/monitoring/JMX-RESOURCES:
--------------------------------------------------------------------------------
1 |
2 | Resources for monitoring ZooKeeper using JMX
3 | --------------------------------------------
4 |
5 | JMX/REST Bridge
6 | ---------------
7 |
8 | http://code.google.com/p/polarrose-jmx-rest-bridge/
9 |
10 | "Simple Java Web Application that exposes JMX servers through HTTP. This was written so that external tools can easily query JMX attributes of Java applications. More specifically, this was written to allow Cacti to generate fancy graphs of ActiveMQ instances."
11 |
12 | JMXetric
13 | --------
14 |
15 | http://code.google.com/p/jmxetric/
16 |
17 | "JMXetric is a 100% java, configurable JVM agent that periodically polls MBean attributes and reports their values to Ganglia."
18 |
19 | jmxquery
20 | --------
21 |
22 | http://code.google.com/p/jmxquery/
23 |
24 | "a plugin for nagios to check jmx"
25 |
26 | check_jmx
27 | ---------
28 |
29 | http://exchange.nagios.org/directory/Plugins/Java-Applications-and-Servers/check_jmx/details
30 |
31 |
32 | jmx2snmp
33 | --------
34 |
35 | http://github.com/tcurdt/jmx2snmp
36 |
37 | Expose application JMX properties via SNMP
38 |
39 |
--------------------------------------------------------------------------------
/src/contrib/monitoring/ganglia/Screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/contrib/monitoring/ganglia/Screenshot.png
--------------------------------------------------------------------------------
/src/contrib/monitoring/ganglia/modpython.conf:
--------------------------------------------------------------------------------
1 | /* Licensed to the Apache Software Foundation (ASF) under one
2 | or more contributor license agreements. See the NOTICE file
3 | distributed with this work for additional information
4 | regarding copyright ownership. The ASF licenses this file
5 | to you under the Apache License, Version 2.0 (the
6 | "License"); you may not use this file except in compliance
7 | with the License. You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License. */
16 |
17 | /* Update gmond.conf */
18 |
19 | modules {
20 | module {
21 | name = "python_module"
22 | path = "/usr/lib/ganglia/modpython.so"
23 | params = "/usr/lib/ganglia/python_modules"
24 | }
25 | }
26 |
27 | include ('/etc/ganglia/conf.d/*.pyconf')
28 |
29 |
--------------------------------------------------------------------------------
/src/contrib/monitoring/nagios/Screenshot-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/contrib/monitoring/nagios/Screenshot-1.png
--------------------------------------------------------------------------------
/src/contrib/monitoring/nagios/Screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/contrib/monitoring/nagios/Screenshot.png
--------------------------------------------------------------------------------
/src/contrib/monitoring/nagios/hostgroups.cfg:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 |
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | # A group containing all the ZooKeeper nodes
18 |
19 | define hostgroup {
20 | hostgroup_name zookeeper-servers
21 | alias ZooKeeper Servers
22 | members localhost
23 | }
24 |
25 |
26 |
--------------------------------------------------------------------------------
/src/contrib/rest/NOTICE.txt:
--------------------------------------------------------------------------------
1 | This contrib module includes software developed under the
2 | COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
3 |
4 | This contrib depends on binary only jar libraries developed at:
5 |
6 | https://jersey.dev.java.net/
7 | https://grizzly.dev.java.net/
8 |
--------------------------------------------------------------------------------
/src/contrib/rest/conf/keys/README:
--------------------------------------------------------------------------------
1 |
2 | In order to generate .jks (java keystore files) you need to use keytool.
3 |
4 | The password for the existing .jks is "123456" (without quotes).
5 |
6 | Some tutorials:
7 | - http://www.mobilefish.com/tutorials/java/java_quickguide_keytool.html
8 |
9 |
--------------------------------------------------------------------------------
/src/contrib/rest/conf/keys/rest.cer:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/contrib/rest/conf/keys/rest.cer
--------------------------------------------------------------------------------
/src/contrib/rest/conf/keys/rest.jks:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/contrib/rest/conf/keys/rest.jks
--------------------------------------------------------------------------------
/src/contrib/rest/src/java/org/apache/zookeeper/server/jersey/jaxb/ZError.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package org.apache.zookeeper.server.jersey.jaxb;
20 |
21 | import javax.xml.bind.annotation.XmlRootElement;
22 |
23 |
24 | /**
25 | * Represents an ERROR using JAXB.
26 | */
27 | @XmlRootElement(name="error")
28 | public class ZError {
29 | public String request;
30 | public String message;
31 |
32 | public ZError(){
33 | // needed by jersey
34 | }
35 |
36 | public ZError(String request, String message) {
37 | this.request = request;
38 | this.message = message;
39 | }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/src/contrib/rest/src/python/README.txt:
--------------------------------------------------------------------------------
1 | Some basic python scripts which use the REST interface:
2 |
3 | zkrest.py -- basic REST ZooKeeper client
4 | demo_master_election.py -- shows how to implement master election
5 | demo_queue.py -- basic queue
6 | zk_dump_tree.py -- dumps the nodes & data of a znode hierarchy
7 |
8 | Generally these scripts require:
9 | * simplejson
10 |
--------------------------------------------------------------------------------
/src/contrib/zkfuse/Makefile.am:
--------------------------------------------------------------------------------
1 | ## Process this file with automake to produce Makefile.in
2 |
3 | SUBDIRS = src
4 |
5 |
--------------------------------------------------------------------------------
/src/contrib/zkfuse/src/Makefile.am:
--------------------------------------------------------------------------------
1 | AM_CXXFLAGS = -I${ZOOKEEPER_PATH}/include -I${ZOOKEEPER_PATH}/generated \
2 | -I$(top_srcdir)/include -I/usr/include -D_FILE_OFFSET_BITS=64 -D_REENTRANT
3 |
4 | noinst_PROGRAMS = zkfuse
5 |
6 | zkfuse_SOURCES = zkfuse.cc zkadapter.cc thread.cc log.cc
7 | zkfuse_LDADD = ${ZOOKEEPER_LD}
--------------------------------------------------------------------------------
/src/contrib/zkfuse/src/event.cc:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | #include "event.h"
20 |
21 | #define LOG_LEVEL LOG_FATAL
22 | #define MODULE_NAME "Event"
23 |
24 | using namespace std;
25 |
26 | namespace zkfuse {
27 |
28 | } /* end of 'namespace zkfuse' */
29 |
30 |
--------------------------------------------------------------------------------
/src/contrib/zkfuse/src/log.cc:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | #include
20 |
21 | #include "log.h"
22 |
23 | using namespace std;
24 |
25 | /**
26 | * \brief This class encapsulates a log4cxx configuration.
27 | */
28 | class LogConfiguration {
29 | public:
30 | LogConfiguration(const string &file) {
31 | PropertyConfigurator::configureAndWatch( file, 5000 );
32 | }
33 | };
34 |
35 | //enforces the configuration to be initialized
36 | static LogConfiguration logConfig( "log4cxx.properties" );
37 |
--------------------------------------------------------------------------------
/src/contrib/zkfuse/src/log4cxx.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 |
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | # Set root logger level to DEBUG and its only appender to A1.
18 | log4j.rootLogger=TRACE, A1
19 |
20 | # A1 is set to be a ConsoleAppender.
21 | log4j.appender.A1=org.apache.log4cxx.ConsoleAppender
22 |
23 | # A1 uses PatternLayout.
24 | log4j.appender.A1.layout=org.apache.log4cxx.PatternLayout
25 | log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
26 |
27 | log4j.category.zkfuse=TRACE
28 |
29 |
--------------------------------------------------------------------------------
/src/contrib/zkfuse/src/thread.cc:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | #include
20 |
21 | #include "thread.h"
22 |
23 | DEFINE_LOGGER( LOG, "Thread" )
24 |
25 | START_ZKFUSE_NAMESPACE
26 |
27 | void Thread::Create(void* ctx, ThreadFunc func)
28 | {
29 | pthread_attr_t attr;
30 | pthread_attr_init(&attr);
31 | pthread_attr_setstacksize(&attr, _stackSize);
32 | int ret = pthread_create(&mThread, &attr, func, ctx);
33 | if(ret != 0) {
34 | LOG_FATAL( LOG, "pthread_create failed: %s", strerror(errno) );
35 | }
36 | // pthread_attr_destroy(&attr);
37 | _ctx = ctx;
38 | _func = func;
39 | }
40 |
41 | END_ZKFUSE_NAMESPACE
42 |
--------------------------------------------------------------------------------
/src/contrib/zkperl/MANIFEST:
--------------------------------------------------------------------------------
1 | Changes
2 | LICENSE
3 | Makefile.PL
4 | MANIFEST
5 | NOTICE
6 | README
7 | typemap
8 | ZooKeeper.pm
9 | ZooKeeper.xs
10 | build/check_zk_version.c
11 | build/check_zk_version.h
12 | t/10_invalid.t
13 | t/15_thread.t
14 | t/20_tie.t
15 | t/22_stat_tie.t
16 | t/24_watch_tie.t
17 | t/30_connect.t
18 | t/35_log.t
19 | t/40_basic.t
20 | t/45_class.t
21 | t/50_access.t
22 | t/60_watch.t
23 | t/util.pl
24 |
--------------------------------------------------------------------------------
/src/contrib/zkperl/NOTICE:
--------------------------------------------------------------------------------
1 | Net::ZooKeeper - Perl extension for Apache ZooKeeper
2 | Copyright 2009 The Apache Software Foundation
3 |
4 | This product includes software developed at
5 | The Apache Software Foundation (http://www.apache.org/).
6 |
7 |
--------------------------------------------------------------------------------
/src/contrib/zkperl/build/check_zk_version.c:
--------------------------------------------------------------------------------
1 | /* Net::ZooKeeper - Perl extension for Apache ZooKeeper
2 | *
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | */
19 |
20 | #include
21 | #include
22 |
23 | #include "check_zk_version.h"
24 |
25 | int main() {
26 | printf("%d.%d.%d\n", ZOO_MAJOR_VERSION, ZOO_MINOR_VERSION, ZOO_PATCH_VERSION);
27 | return 0;
28 | }
29 |
30 |
--------------------------------------------------------------------------------
/src/contrib/zkperl/build/check_zk_version.h:
--------------------------------------------------------------------------------
1 | /* Net::ZooKeeper - Perl extension for Apache ZooKeeper
2 | *
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | */
19 |
20 | /* keep in sync with Makefile.PL */
21 | #if !defined(ZOO_MAJOR_VERSION) || ZOO_MAJOR_VERSION != 3 || \
22 | !defined(ZOO_MINOR_VERSION) || ZOO_MINOR_VERSION < 1 || \
23 | !defined(ZOO_PATCH_VERSION) || \
24 | (ZOO_MINOR_VERSION == 1 && ZOO_PATCH_VERSION < 1)
25 | #error "Net::ZooKeeper requires at least ZooKeeper version 3.1.1"
26 | #endif
27 |
28 |
--------------------------------------------------------------------------------
/src/contrib/zkperl/typemap:
--------------------------------------------------------------------------------
1 | # Net::ZooKeeper - Perl extension for Apache ZooKeeper
2 | #
3 | # Licensed to the Apache Software Foundation (ASF) under one
4 | # or more contributor license agreements. See the NOTICE file
5 | # distributed with this work for additional information
6 | # regarding copyright ownership. The ASF licenses this file
7 | # to you under the Apache License, Version 2.0 (the
8 | # "License"); you may not use this file except in compliance
9 | # with the License. You may obtain a copy of the License at
10 | #
11 | # http://www.apache.org/licenses/LICENSE-2.0
12 | #
13 | # Unless required by applicable law or agreed to in writing, software
14 | # distributed under the License is distributed on an "AS IS" BASIS,
15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | # See the License for the specific language governing permissions and
17 | # limitations under the License.
18 |
19 | TYPEMAP
20 | Net::ZooKeeper T_ZK_HANDLE
21 | Net::ZooKeeper::Stat T_ZK_HANDLE
22 | Net::ZooKeeper::Watch T_ZK_HANDLE
23 |
24 | INPUT
25 | T_ZK_HANDLE
26 | if (SvROK($arg) && SvTYPE(SvRV($arg)) == SVt_PVHV &&
27 | sv_derived_from($arg, \"${ntype}\")) {
28 | $var = (HV*) SvRV($arg);
29 | }
30 | else {
31 | Perl_croak(aTHX_
32 | \"$var is not a hash reference of type ${ntype}\");
33 | }
34 |
35 | OUTPUT
36 | T_ZK_HANDLE
37 | NOT_IMPLEMENTED
38 |
39 |
--------------------------------------------------------------------------------
/src/contrib/zkpython/src/examples/README:
--------------------------------------------------------------------------------
1 |
2 | This folder contains sample showing how you can use ZooKeeper from Python.
3 |
4 | You should also check the following projects:
5 |
6 | * http://github.com/phunt/zk-smoketest
7 | * http://github.com/henryr/pyzk-recipes
8 |
9 |
--------------------------------------------------------------------------------
/src/contrib/zkpython/src/packages/deb/zkpython.control/control:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | Package: zkpython
16 | Version: @version@
17 | Section: misc
18 | Priority: optional
19 | Architecture: all
20 | Depends: python
21 | Maintainer: Apache Software Foundation
22 | Description: ZooKeeper python binding library
23 | Distribution: development
24 |
--------------------------------------------------------------------------------
/src/contrib/zkpython/src/test/async_test.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 | #
3 | # Licensed to the Apache Software Foundation (ASF) under one
4 | # or more contributor license agreements. See the NOTICE file
5 | # distributed with this work for additional information
6 | # regarding copyright ownership. The ASF licenses this file
7 | # to you under the Apache License, Version 2.0 (the
8 | # "License"); you may not use this file except in compliance
9 | # with the License. You may obtain a copy of the License at
10 |
11 | # http://www.apache.org/licenses/LICENSE-2.0
12 |
13 | # Unless required by applicable law or agreed to in writing, software
14 | # distributed under the License is distributed on an "AS IS" BASIS,
15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | # See the License for the specific language governing permissions and
17 | # limitations under the License.
18 |
19 | import zookeeper, zktestbase, unittest, threading
20 |
21 | class AsyncTest(zktestbase.TestBase):
22 | """Test whether async works"""
23 | # to do: startup and teardown via scripts?
24 | def setUp( self ):
25 | zktestbase.TestBase.setUp(self)
26 |
27 | def test_async(self):
28 | self.assertEqual(self.connected, True)
29 | ret = zookeeper.async(self.handle, "/")
30 | self.assertEqual(ret, zookeeper.OK, "async failed")
31 |
32 | if __name__ == '__main__':
33 | unittest.main()
34 |
--------------------------------------------------------------------------------
/src/contrib/zktreeutil/Makefile.am:
--------------------------------------------------------------------------------
1 | ## Process this file with automake to produce Makefile.in
2 |
3 | SUBDIRS = src
4 |
5 |
--------------------------------------------------------------------------------
/src/contrib/zktreeutil/src/Makefile.am:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | AM_CXXFLAGS = -I${ZOOKEEPER_PATH}/include -I${ZOOKEEPER_PATH}/generated \
18 | -I$(top_srcdir)/include -I${LOG4CXX_INCLUDE} -I/usr/include \
19 | -I${XML2_INCLUDE}
20 |
21 | bin_PROGRAMS = zktreeutil
22 |
23 | zktreeutil_SOURCES = ZkAdaptor.cc ZkTreeUtil.cc ZkTreeUtilMain.cc
24 | zktreeutil_LDADD = ${ZOOKEEPER} ${XML_LIBS} ${LOG4CXX}
25 |
--------------------------------------------------------------------------------
/src/contrib/zooinspector/NOTICE.txt:
--------------------------------------------------------------------------------
1 | This contrib module includes icons available under the Eclipse Public Licence Version 1.0
2 | . from the Eclipse Java Devlopment Platform.
3 | The lib sub-directory includes a binary only jar library developed at http://sourceforge.net/projects/jtoaster/
--------------------------------------------------------------------------------
/src/contrib/zooinspector/config/defaultConnectionSettings.cfg:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 | #Default connection for ZooInspector
17 | #Sun Feb 28 14:46:55 GMT 2010
18 | hosts=localhost\:2181
19 | encryptionManager=org.apache.zookeeper.inspector.encryption.BasicDataEncryptionManager
20 | timeout=5000
21 |
--------------------------------------------------------------------------------
/src/contrib/zooinspector/config/defaultNodeVeiwers.cfg:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | org.apache.zookeeper.inspector.gui.nodeviewer.NodeViewerData
16 | org.apache.zookeeper.inspector.gui.nodeviewer.NodeViewerMetaData
17 | org.apache.zookeeper.inspector.gui.nodeviewer.NodeViewerACL
18 |
--------------------------------------------------------------------------------
/src/contrib/zooinspector/icons/edtsrclkup_co.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/contrib/zooinspector/icons/edtsrclkup_co.gif
--------------------------------------------------------------------------------
/src/contrib/zooinspector/icons/file_obj.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/contrib/zooinspector/icons/file_obj.gif
--------------------------------------------------------------------------------
/src/contrib/zooinspector/icons/fldr_obj.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/contrib/zooinspector/icons/fldr_obj.gif
--------------------------------------------------------------------------------
/src/contrib/zooinspector/icons/info_obj.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/contrib/zooinspector/icons/info_obj.gif
--------------------------------------------------------------------------------
/src/contrib/zooinspector/icons/jspdecl.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/contrib/zooinspector/icons/jspdecl.gif
--------------------------------------------------------------------------------
/src/contrib/zooinspector/icons/launch_run.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/contrib/zooinspector/icons/launch_run.gif
--------------------------------------------------------------------------------
/src/contrib/zooinspector/icons/launch_stop.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/contrib/zooinspector/icons/launch_stop.gif
--------------------------------------------------------------------------------
/src/contrib/zooinspector/icons/new_con.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/contrib/zooinspector/icons/new_con.gif
--------------------------------------------------------------------------------
/src/contrib/zooinspector/icons/refresh.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/contrib/zooinspector/icons/refresh.gif
--------------------------------------------------------------------------------
/src/contrib/zooinspector/icons/save_edit.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/contrib/zooinspector/icons/save_edit.gif
--------------------------------------------------------------------------------
/src/contrib/zooinspector/icons/search_next.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/contrib/zooinspector/icons/search_next.gif
--------------------------------------------------------------------------------
/src/contrib/zooinspector/icons/search_prev.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/contrib/zooinspector/icons/search_prev.gif
--------------------------------------------------------------------------------
/src/contrib/zooinspector/icons/trash.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/contrib/zooinspector/icons/trash.gif
--------------------------------------------------------------------------------
/src/contrib/zooinspector/lib/jtoaster-1.0.4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/contrib/zooinspector/lib/jtoaster-1.0.4.jar
--------------------------------------------------------------------------------
/src/contrib/zooinspector/lib/log4j.properties:
--------------------------------------------------------------------------------
1 | # ***** Set root logger level to INFO and it appender to stdout.
2 | log4j.rootLogger=info, stdout
3 |
4 | # ***** stdout is set to be a ConsoleAppender.
5 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender
6 | # ***** stdout uses PatternLayout.
7 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
8 | # ***** Pattern to output the caller's file name and line number.
9 | log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n
--------------------------------------------------------------------------------
/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/about.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZooInspector v0.1
6 |
7 |
8 |
ZooInspector was developed by Colin Goodheart-Smithe and is
9 | available under the Apache Software Licence v2.0.
20 |
21 |
22 |
--------------------------------------------------------------------------------
/src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/logger/LoggerFactory.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | package org.apache.zookeeper.inspector.logger;
19 |
20 | /**
21 | * Provides a {@link Logger} for use across the entire application
22 | *
23 | */
24 | public class LoggerFactory
25 | {
26 | private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger("org.apache.zookeeper.inspector"); //$NON-NLS-1$
27 |
28 | /**
29 | * @return {@link Logger} for ZooInspector
30 | */
31 | public static org.slf4j.Logger getLogger()
32 | {
33 | return logger;
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/src/contrib/zooinspector/zooInspector-dev.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # Licensed to the Apache Software Foundation (ASF) under one or more
4 | # contributor license agreements. See the NOTICE file distributed with
5 | # this work for additional information regarding copyright ownership.
6 | # The ASF licenses this file to You under the Apache License, Version 2.0
7 | # (the "License"); you may not use this file except in compliance with
8 | # the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 |
18 | java -cp ../../../build/contrib/ZooInspector/zookeeper-dev-ZooInspector.jar:../../../build/lib/log4j-1.2.15.jar:lib/zookeeper-3.3.0.jar:lib/jtoaster-1.0.4.jar:lib org.apache.zookeeper.inspector.ZooInspector
--------------------------------------------------------------------------------
/src/contrib/zooinspector/zooInspector.cmd:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # Licensed to the Apache Software Foundation (ASF) under one or more
4 | # contributor license agreements. See the NOTICE file distributed with
5 | # this work for additional information regarding copyright ownership.
6 | # The ASF licenses this file to You under the Apache License, Version 2.0
7 | # (the "License"); you may not use this file except in compliance with
8 | # the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 |
18 | java -cp zookeeper-dev-ZooInspector.jar;lib/log4j-1.2.15.jar;lib/zookeeper-3.3.0.jar;lib/jToaster-1.0.4.jar;lib org.apache.zookeeper.inspector.ZooInspector
--------------------------------------------------------------------------------
/src/contrib/zooinspector/zooInspector.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # Licensed to the Apache Software Foundation (ASF) under one or more
4 | # contributor license agreements. See the NOTICE file distributed with
5 | # this work for additional information regarding copyright ownership.
6 | # The ASF licenses this file to You under the Apache License, Version 2.0
7 | # (the "License"); you may not use this file except in compliance with
8 | # the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 |
18 | java -cp lib/New.jar:zookeeper-dev-ZooInspector.jar:lib/log4j-1.2.15.jar:;lib/zookeeper-3.3.0.jar:lib/jToaster-1.0.4.jar:lib org.apache.zookeeper.inspector.ZooInspector
19 |
--------------------------------------------------------------------------------
/src/docs/src/documentation/README.txt:
--------------------------------------------------------------------------------
1 | This is the base documentation directory.
2 |
3 | skinconf.xml # This file customizes Forrest for your project. In it, you
4 | # tell forrest the project name, logo, copyright info, etc
5 |
6 | sitemap.xmap # Optional. This sitemap is consulted before all core sitemaps.
7 | # See http://forrest.apache.org/docs/project-sitemap.html
8 |
--------------------------------------------------------------------------------
/src/docs/src/documentation/resources/images/2pc.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/docs/src/documentation/resources/images/2pc.jpg
--------------------------------------------------------------------------------
/src/docs/src/documentation/resources/images/bk-overview.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/docs/src/documentation/resources/images/bk-overview.jpg
--------------------------------------------------------------------------------
/src/docs/src/documentation/resources/images/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/docs/src/documentation/resources/images/favicon.ico
--------------------------------------------------------------------------------
/src/docs/src/documentation/resources/images/hadoop-logo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/docs/src/documentation/resources/images/hadoop-logo.jpg
--------------------------------------------------------------------------------
/src/docs/src/documentation/resources/images/state_dia.dia:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/docs/src/documentation/resources/images/state_dia.dia
--------------------------------------------------------------------------------
/src/docs/src/documentation/resources/images/state_dia.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/docs/src/documentation/resources/images/state_dia.jpg
--------------------------------------------------------------------------------
/src/docs/src/documentation/resources/images/zkarch.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/docs/src/documentation/resources/images/zkarch.jpg
--------------------------------------------------------------------------------
/src/docs/src/documentation/resources/images/zkcomponents.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/docs/src/documentation/resources/images/zkcomponents.jpg
--------------------------------------------------------------------------------
/src/docs/src/documentation/resources/images/zknamespace.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/docs/src/documentation/resources/images/zknamespace.jpg
--------------------------------------------------------------------------------
/src/docs/src/documentation/resources/images/zkperfRW-3.2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/docs/src/documentation/resources/images/zkperfRW-3.2.jpg
--------------------------------------------------------------------------------
/src/docs/src/documentation/resources/images/zkperfRW.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/docs/src/documentation/resources/images/zkperfRW.jpg
--------------------------------------------------------------------------------
/src/docs/src/documentation/resources/images/zkperfreliability.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/docs/src/documentation/resources/images/zkperfreliability.jpg
--------------------------------------------------------------------------------
/src/docs/src/documentation/resources/images/zkservice.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/docs/src/documentation/resources/images/zkservice.jpg
--------------------------------------------------------------------------------
/src/docs/src/documentation/resources/images/zookeeper_small.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/docs/src/documentation/resources/images/zookeeper_small.gif
--------------------------------------------------------------------------------
/src/dotnet/.gitignore:
--------------------------------------------------------------------------------
1 | _ReSharper*
2 | *ReSharper*
3 | *.suo
4 | TestResults
5 | *.testsettings
6 | *.vsmdi
7 | ZooKeeperNet/bin
8 | ZooKeeperNet/obj
9 | ZooKeeperNet.Recipes/bin
10 | ZooKeeperNet.Recipes/obj
11 | ZooKeeperNet.MsTests/bin
12 | ZooKeeperNet.MsTests/obj
13 | ZooKeeperNet.Tests/bin
14 | ZooKeeperNet.Tests/obj
15 | ZooKeeperNet.Recipes.Tests/bin
16 | ZooKeeperNet.Recipes.Tests/obj
17 | ZooKeeper.Profiled/obj
18 | ZooKeeper.Profiled/bin
19 | *.vsp
20 | *.7z
--------------------------------------------------------------------------------
/src/dotnet/ZooKeeperKey.snk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/dotnet/ZooKeeperKey.snk
--------------------------------------------------------------------------------
/src/dotnet/ZooKeeperNet.Recipes.Tests/.gitignore:
--------------------------------------------------------------------------------
1 | bin
2 | obj
3 | *.*~
4 |
--------------------------------------------------------------------------------
/src/dotnet/ZooKeeperNet.Recipes.Tests/ZooKeeperNet.Recipes.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp2.1
5 |
6 | ZooKeeper Client for .NET http://zookeeper.apache.org
7 | Copyright 2007-2012 ewhauser, omwok. - All rights reserved.
8 | 3.4.6.3
9 |
10 | false
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/src/dotnet/ZooKeeperNet.Recipes/.gitignore:
--------------------------------------------------------------------------------
1 | bin
2 | obj
3 | *.*~
4 |
--------------------------------------------------------------------------------
/src/dotnet/ZooKeeperNet.Recipes/Locks/InterProcessLock.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace ZooKeeperNet.Recipes.Locks
4 | {
5 | ///
6 | /// Roughly following the pattern from curator-recipes
7 | /// See: http://curator.incubator.apache.org/curator-recipes/index.html
8 | ///
9 | public interface IInterProcessLock
10 | {
11 | ///
12 | /// Acquire the mutex, blocking until it's available or the timeout passes. Each call
13 | /// to Acquire() must be balanced by a call to Release.
14 | ///
15 | /// NOTE: The same thread can call acquire re-entrantly.
16 | ///
17 | /// time to wait or null to wait indefinitely
18 | /// true if the mutex was acquired, false otherwise.
19 | bool Acquire(TimeSpan? timeout = null);
20 |
21 | ///
22 | /// Perform a single release of the mutex. If the thread had made multiple calls
23 | /// to acquire, the mutex will continue to be held until all such calls are balanced
24 | /// with corresponding Release() calls.
25 | ///
26 | void Release();
27 |
28 | ///
29 | /// Returns true if the mutex is acquired by a thread in this process.
30 | ///
31 | ///
32 | bool IsAcquiredInThisProcess();
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/dotnet/ZooKeeperNet.Recipes/ZooKeeperNet.Recipes.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 |
6 | ZooKeeper Client for .NET http://zookeeper.apache.org
7 | Copyright 2007-2012 ewhauser, omwok. - All rights reserved.
8 | 3.4.6.3
9 | true
10 | ..\ZooKeeperKey.snk
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/src/dotnet/ZooKeeperNet.Tests/.gitignore:
--------------------------------------------------------------------------------
1 | bin
2 | obj
3 |
--------------------------------------------------------------------------------
/src/dotnet/ZooKeeperNet.Tests/CountDownLatch.cs:
--------------------------------------------------------------------------------
1 | namespace ZooKeeperNet.Tests
2 | {
3 | using System;
4 | using System.Threading;
5 |
6 | public class CountDownLatch
7 | {
8 | private readonly ManualResetEvent reset;
9 | private readonly int occurences;
10 | private int count;
11 | private DateTime start;
12 | private TimeSpan remaining;
13 |
14 | public CountDownLatch(int occurences)
15 | {
16 | this.occurences = occurences;
17 | reset = new ManualResetEvent(false);
18 | }
19 |
20 | public bool Await(TimeSpan wait)
21 | {
22 | start = DateTime.UtcNow;
23 | remaining = wait;
24 | while (count < occurences)
25 | {
26 | if (!reset.WaitOne(remaining))
27 | return false;
28 | }
29 | return true;
30 | }
31 |
32 | public void CountDown()
33 | {
34 | remaining = DateTime.UtcNow - start;
35 | Interlocked.Increment(ref count);
36 | reset.Set();
37 | }
38 |
39 | public int Count
40 | {
41 | get
42 | {
43 | return count;
44 | }
45 | }
46 | }
47 | }
--------------------------------------------------------------------------------
/src/dotnet/ZooKeeperNet.Tests/SocketTests.cs:
--------------------------------------------------------------------------------
1 | namespace ZooKeeperNet.Tests
2 | {
3 | using System;
4 | using System.Linq;
5 | using NUnit.Framework;
6 |
7 | [TestFixture]
8 | public class SocketTests : AbstractZooKeeperTests
9 | {
10 | [Test]
11 | public void CanReadAndWriteOverASingleFrame()
12 | {
13 | SendBigByteArray(10000);
14 | }
15 |
16 | [Test]
17 | public void CanReadAndWriteOverTwoFrames()
18 | {
19 | SendBigByteArray(20000);
20 | }
21 |
22 | [Test]
23 | public void CanReadAndWriteOverManyFrames()
24 | {
25 | SendBigByteArray(100000);
26 | }
27 |
28 | private void SendBigByteArray(int bytes)
29 | {
30 | var b = new byte[bytes];
31 | foreach (var i in Enumerable.Range(0, bytes))
32 | {
33 | b[i] = Convert.ToByte(i % 255);
34 | }
35 |
36 | using (var client = CreateClient())
37 | {
38 | var node = "/" + Guid.NewGuid();
39 | client.Create(node, b, Ids.OPEN_ACL_UNSAFE, CreateMode.Persistent);
40 |
41 | var received = client.GetData(node, false, null);
42 | CollectionAssert.AreEqual(b, received);
43 | }
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/src/dotnet/ZooKeeperNet.Tests/ZooKeeperNet.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp2.1
5 |
6 | ZooKeeper Client for .NET http://zookeeper.apache.org
7 | Copyright 2007-2012 ewhauser, omwok. - All rights reserved.
8 | 3.4.6.3
9 |
10 | false
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | PreserveNewest
20 |
21 |
22 |
23 |
24 |
25 | ..\lib\S22.Sasl.dll
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/src/dotnet/ZooKeeperNet.Tests/log4net.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/dotnet/ZooKeeperNet/.gitignore:
--------------------------------------------------------------------------------
1 | bin
2 | obj
3 | _ReSharper*
4 | *ReSharper*
5 | *.suo
6 | Generated
--------------------------------------------------------------------------------
/src/dotnet/ZooKeeperNet/EventType.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | *
17 | */
18 | namespace ZooKeeperNet
19 | {
20 | public enum EventType
21 | {
22 | None = -1,
23 | NodeCreated = 1,
24 | NodeDeleted = 2,
25 | NodeDataChanged = 3,
26 | NodeChildrenChanged = 4
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/dotnet/ZooKeeperNet/IO/Endianness.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | *
17 | * Copyright (c) 2004-2008 Jon Skeet and Marc Gravell.
18 | * All rights reserved.
19 | */
20 | namespace ZooKeeperNet.IO
21 | {
22 | ///
23 | /// Endianness of a converter
24 | ///
25 | public enum Endianness
26 | {
27 | ///
28 | /// Little endian - least significant byte first
29 | ///
30 | LittleEndian,
31 | ///
32 | /// Big endian - most significant byte first
33 | ///
34 | BigEndian
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/src/dotnet/ZooKeeperNet/IStartable.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | *
17 | */
18 | namespace ZooKeeperNet
19 | {
20 | public interface IStartable
21 | {
22 | void Start();
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/dotnet/ZooKeeperNet/IWatcher.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | *
17 | */
18 | namespace ZooKeeperNet
19 | {
20 | public interface IWatcher
21 | {
22 | void Process(WatchedEvent @event);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/dotnet/ZooKeeperNet/Jute/IIndex.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | *
17 | */
18 | namespace Org.Apache.Jute
19 | {
20 | public interface IIndex
21 | {
22 | bool Done();
23 | void Incr();
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/dotnet/ZooKeeperNet/Jute/IRecord.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | *
17 | */
18 | namespace Org.Apache.Jute
19 | {
20 | public interface IRecord
21 | {
22 | void Serialize(IOutputArchive archive, string tag);
23 | void Deserialize(IInputArchive archive, string tag);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/dotnet/ZooKeeperNet/Jute/RecordReader.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | *
17 | */
18 | using ZooKeeperNet.IO;
19 |
20 | namespace Org.Apache.Jute
21 | {
22 | public class RecordReader
23 | {
24 | private readonly IInputArchive archive;
25 |
26 | public RecordReader(EndianBinaryReader reader, string format)
27 | {
28 | archive = new BinaryInputArchive(reader);
29 | }
30 |
31 | public void Read(IRecord r)
32 | {
33 | r.Deserialize(archive, "");
34 | }
35 |
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/dotnet/ZooKeeperNet/Jute/RecordWriter.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | *
17 | */
18 | using ZooKeeperNet.IO;
19 |
20 | namespace Org.Apache.Jute
21 | {
22 | public class RecordWriter
23 | {
24 | private readonly BinaryOutputArchive archive;
25 |
26 | public RecordWriter(EndianBinaryWriter writer, string format)
27 | {
28 | archive = new BinaryOutputArchive(writer);
29 | }
30 |
31 | public void Write(IRecord r)
32 | {
33 | r.Serialize(archive, "");
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/src/dotnet/ZooKeeperNet/KeeperState.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | *
17 | */
18 | namespace ZooKeeperNet
19 | {
20 | public enum KeeperState
21 | {
22 | Unknown = -1,
23 | Disconnected = 0,
24 | NoSyncConnected = 1,
25 | SyncConnected = 3,
26 | AuthFailed = 4,
27 | SaslAuthenticated = 6,
28 | Expired = -112
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/dotnet/ZooKeeperNet/OpCode.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | *
17 | */
18 | namespace ZooKeeperNet
19 | {
20 | public enum OpCode
21 | {
22 | Notification = 0,
23 | Create = 1,
24 | Delete = 2,
25 | Exists = 3,
26 | GetData = 4,
27 | SetData = 5,
28 | GetACL = 6,
29 | SetACL = 7,
30 | GetChildren = 8,
31 | Sync = 9,
32 | Ping = 11,
33 | GetChildren2 = 12,
34 | Auth = 100,
35 | SetWatches = 101,
36 | SASL = 102,
37 | CreateSession = -10,
38 | CloseSession = -11,
39 | Error = -1,
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/src/dotnet/ZooKeeperNet/Perms.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | *
17 | */
18 | namespace ZooKeeperNet
19 | {
20 | public sealed class Perms
21 | {
22 | private Perms() { }
23 | public const int READ = 1 << 0;
24 | public const int WRITE = 1 << 1;
25 | public const int CREATE = 1 << 2;
26 | public const int DELETE = 1 << 3;
27 | public const int ADMIN = 1 << 4;
28 | public const int ALL = READ | WRITE | CREATE | DELETE | ADMIN;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/dotnet/ZooKeeperNet/SessionExpiredException.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | *
17 | */
18 | namespace ZooKeeperNet
19 | {
20 | using System.IO;
21 | using System;
22 | [Serializable]
23 | internal class SessionExpiredException : IOException
24 | {
25 | public SessionExpiredException(string msg) : base(msg)
26 | {
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/dotnet/ZooKeeperNet/SessionTimeoutException.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | *
17 | */
18 | namespace ZooKeeperNet
19 | {
20 | using System.IO;
21 | using System;
22 |
23 | [Serializable]
24 | internal class SessionTimeoutException : IOException
25 | {
26 | public SessionTimeoutException(string msg) : base(msg)
27 | {
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/dotnet/ZooKeeperNet/ZooKeeperNet.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 | ZooKeeper Client for .NET http://zookeeper.apache.org
6 | Copyright 2007-2012 ewhauser, omwok. - All rights reserved.
7 | 3.4.6.3
8 | true
9 | ..\ZooKeeperKey.snk
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/src/dotnet/lib/S22.Sasl.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/dotnet/lib/S22.Sasl.dll
--------------------------------------------------------------------------------
/src/dotnet/lib/S22.Sasl.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/dotnet/lib/S22.Sasl.pdb
--------------------------------------------------------------------------------
/src/java/OldChangeLog:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/java/OldChangeLog
--------------------------------------------------------------------------------
/src/java/lib/cobertura/README.txt:
--------------------------------------------------------------------------------
1 | Download the cobertura binary from the following location and unpack it into this directory. Run "cobertura-report" target from build.xml to generate coverage report.
2 |
3 | http://cobertura.sourceforge.net/download.html
4 |
--------------------------------------------------------------------------------
/src/java/main/org/apache/jute/Index.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package org.apache.jute;
20 |
21 | /**
22 | * Interface that acts as an iterator for deserializing maps.
23 | * The deserializer returns an instance that the record uses to
24 | * read vectors and maps. An example of usage is as follows:
25 | *
26 | *
27 | * Index idx = startVector(...);
28 | * while (!idx.done()) {
29 | * .... // read element of a vector
30 | * idx.incr();
31 | * }
32 | *
33 | *
34 | */
35 | public interface Index {
36 | public boolean done();
37 | public void incr();
38 | }
39 |
--------------------------------------------------------------------------------
/src/java/main/org/apache/jute/Record.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package org.apache.jute;
20 |
21 | import java.io.IOException;
22 |
23 | /**
24 | * Interface that is implemented by generated classes.
25 | *
26 | */
27 | public interface Record {
28 | public void serialize(OutputArchive archive, String tag)
29 | throws IOException;
30 | public void deserialize(InputArchive archive, String tag)
31 | throws IOException;
32 | }
33 |
--------------------------------------------------------------------------------
/src/java/main/org/apache/jute/compiler/JByte.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package org.apache.jute.compiler;
20 |
21 | /**
22 | *
23 | */
24 | public class JByte extends JType {
25 |
26 | /** Creates a new instance of JByte */
27 | public JByte() {
28 | super("char", "int8_t", "byte", "byte", "Byte", "Byte", "byte", "toByte");
29 | }
30 |
31 | public String getSignature() {
32 | return "b";
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/java/main/org/apache/jute/compiler/JFloat.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package org.apache.jute.compiler;
20 |
21 | /**
22 | *
23 | */
24 | public class JFloat extends JType {
25 |
26 | /** Creates a new instance of JFloat */
27 | public JFloat() {
28 | super("float", "float", "float", "float", "Float", "Float", "float", "toFloat");
29 | }
30 |
31 | public String getSignature() {
32 | return "f";
33 | }
34 |
35 | public String genJavaHashCode(String fname) {
36 | return " ret = Float.floatToIntBits("+fname+");\n";
37 | }
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/src/java/main/org/apache/jute/compiler/JInt.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package org.apache.jute.compiler;
20 |
21 | /**
22 | *
23 | */
24 | public class JInt extends JType {
25 |
26 | /** Creates a new instance of JInt */
27 | public JInt() {
28 | super("int32_t", "int32_t", "int", "int", "Int", "Integer", "int", "toInt");
29 | }
30 |
31 | public String getSignature() {
32 | return "i";
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/java/main/org/apache/jute/compiler/JLong.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package org.apache.jute.compiler;
20 |
21 | /**
22 | *
23 | */
24 | public class JLong extends JType {
25 |
26 | /** Creates a new instance of JLong */
27 | public JLong() {
28 | super("int64_t", "int64_t", "long", "long", "Long", "Long", "long", "toLong");
29 | }
30 |
31 | public String getSignature() {
32 | return "l";
33 | }
34 |
35 | public String genJavaHashCode(String fname) {
36 | return " ret = (int) ("+fname+"^("+fname+">>>32));\n";
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/java/main/org/apache/jute/compiler/generated/package.html:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
20 |
21 | Hadoop Record Compiler: Parser
22 |
23 |
24 | This package contains code generated by JavaCC from the
25 | Hadoop record syntax file rcc.jj. For details about the
26 | record file syntax please @see org.apache.hadoop.record.
27 |
28 |
29 |
--------------------------------------------------------------------------------
/src/java/main/org/apache/jute/compiler/package.html:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
20 |
21 | Hadoop Record Compiler
22 |
23 |
24 | This package contains classes needed for code generation
25 | from the hadoop record compiler. CppGenerator and JavaGenerator
26 | are the main entry points from the parser. There are classes
27 | corrsponding to every primitive type and compound type
28 | included in Hadoop record I/O syntax.
29 |
30 |
31 |
--------------------------------------------------------------------------------
/src/java/main/org/apache/zookeeper/jmx/CommonNames.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package org.apache.zookeeper.jmx;
20 |
21 | /**
22 | * A bunch of constants.
23 | * TODO: will get rid of it eventually.
24 | */
25 | public class CommonNames {
26 | public static final String DOMAIN="org.apache.ZooKeeperService";
27 | public static final String DATA_TREE_KEY="DataTree";
28 | public static final String STANDALONE_SERVER_KEY="StandaloneServer";
29 | }
30 |
--------------------------------------------------------------------------------
/src/java/main/org/apache/zookeeper/jmx/ZKMBeanInfo.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package org.apache.zookeeper.jmx;
20 |
21 | /**
22 | * Zookeeper MBean info interface. MBeanRegistry uses the interface to generate
23 | * JMX object name.
24 | */
25 | public interface ZKMBeanInfo {
26 | /**
27 | * @return a string identifying the MBean
28 | */
29 | public String getName();
30 | /**
31 | * If isHidden returns true, the MBean won't be registered with MBean server,
32 | * and thus won't be available for management tools. Used for grouping MBeans.
33 | * @return true if the MBean is hidden.
34 | */
35 | public boolean isHidden();
36 | }
37 |
--------------------------------------------------------------------------------
/src/java/main/org/apache/zookeeper/server/quorum/Election.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package org.apache.zookeeper.server.quorum;
20 |
21 |
22 | import org.apache.zookeeper.server.quorum.Vote;
23 |
24 | public interface Election {
25 | public Vote lookForLeader() throws InterruptedException;
26 | public void shutdown();
27 | }
28 |
--------------------------------------------------------------------------------
/src/java/main/org/apache/zookeeper/server/quorum/FollowerMXBean.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package org.apache.zookeeper.server.quorum;
20 |
21 | import org.apache.zookeeper.server.ZooKeeperServerMXBean;
22 |
23 | /**
24 | * Follower MBean
25 | */
26 | public interface FollowerMXBean extends ZooKeeperServerMXBean {
27 | /**
28 | * @return socket address
29 | */
30 | public String getQuorumAddress();
31 |
32 | /**
33 | * @return last queued zxid
34 | */
35 | public String getLastQueuedZxid();
36 |
37 | /**
38 | * @return count of pending revalidations
39 | */
40 | public int getPendingRevalidationCount();
41 | }
42 |
--------------------------------------------------------------------------------
/src/java/main/org/apache/zookeeper/server/quorum/LeaderElectionMXBean.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package org.apache.zookeeper.server.quorum;
20 |
21 |
22 | /**
23 | * Leader election protocol MBean.
24 | */
25 | public interface LeaderElectionMXBean {
26 | /**
27 | *
28 | * @return the time when the leader election started
29 | */
30 | public String getStartTime();
31 | }
32 |
--------------------------------------------------------------------------------
/src/java/main/org/apache/zookeeper/server/quorum/LeaderMXBean.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package org.apache.zookeeper.server.quorum;
20 |
21 | import org.apache.zookeeper.server.ZooKeeperServerMXBean;
22 |
23 | /**
24 | * Leader MBean.
25 | */
26 | public interface LeaderMXBean extends ZooKeeperServerMXBean {
27 | /**
28 | * Current zxid of cluster.
29 | */
30 | public String getCurrentZxid();
31 |
32 | /**
33 | * @return information on current followers
34 | */
35 | public String followerInfo();
36 | }
37 |
--------------------------------------------------------------------------------
/src/java/main/org/apache/zookeeper/server/quorum/LearnerSyncRequest.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package org.apache.zookeeper.server.quorum;
20 |
21 | import java.nio.ByteBuffer;
22 | import java.util.List;
23 |
24 | import org.apache.zookeeper.data.Id;
25 | import org.apache.zookeeper.server.Request;
26 |
27 | public class LearnerSyncRequest extends Request {
28 | LearnerHandler fh;
29 | public LearnerSyncRequest(LearnerHandler fh, long sessionId, int xid, int type,
30 | ByteBuffer bb, List authInfo) {
31 | super(null, sessionId, xid, type, bb, authInfo);
32 | this.fh = fh;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/java/main/org/apache/zookeeper/server/quorum/ObserverMXBean.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package org.apache.zookeeper.server.quorum;
20 |
21 | import org.apache.zookeeper.server.ZooKeeperServerMXBean;
22 |
23 | /**
24 | * Observer MX Bean interface, implemented by ObserverBean
25 | *
26 | */
27 | public interface ObserverMXBean extends ZooKeeperServerMXBean {
28 | /**
29 | * @return count of pending revalidations
30 | */
31 | public int getPendingRevalidationCount();
32 |
33 | /**
34 | * @return socket address
35 | */
36 | public String getQuorumAddress();
37 | }
38 |
--------------------------------------------------------------------------------
/src/java/main/org/apache/zookeeper/server/quorum/QuorumMXBean.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package org.apache.zookeeper.server.quorum;
20 |
21 | /**
22 | * An MBean representing a zookeeper cluster nodes (aka quorum peers)
23 | */
24 | public interface QuorumMXBean {
25 | /**
26 | * @return the name of the quorum
27 | */
28 | public String getName();
29 |
30 | /**
31 | * @return configured number of peers in the quorum
32 | */
33 | public int getQuorumSize();
34 | }
35 |
--------------------------------------------------------------------------------
/src/java/main/org/apache/zookeeper/server/quorum/ReadOnlyBean.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package org.apache.zookeeper.server.quorum;
20 |
21 | import org.apache.zookeeper.server.ZooKeeperServer;
22 | import org.apache.zookeeper.server.ZooKeeperServerBean;
23 |
24 | /**
25 | * ReadOnly MX Bean interface, implemented by ReadOnlyBean
26 | *
27 | */
28 | public class ReadOnlyBean extends ZooKeeperServerBean {
29 |
30 | public ReadOnlyBean(ZooKeeperServer zks) {
31 | super(zks);
32 | }
33 |
34 | public String getName() {
35 | return "ReadOnlyServer";
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/src/java/main/org/apache/zookeeper/server/quorum/RemotePeerMXBean.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package org.apache.zookeeper.server.quorum;
20 |
21 | /**
22 | * A proxy for a remote quorum peer.
23 | */
24 | public interface RemotePeerMXBean {
25 | /**
26 | * @return name of the peer
27 | */
28 | public String getName();
29 | /**
30 | * @return IP address of the quorum peer
31 | */
32 | public String getQuorumAddress();
33 | }
34 |
--------------------------------------------------------------------------------
/src/java/main/org/apache/zookeeper/server/quorum/ServerBean.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package org.apache.zookeeper.server.quorum;
20 |
21 | import java.util.Date;
22 |
23 | import org.apache.zookeeper.jmx.ZKMBeanInfo;
24 |
25 | /**
26 | * An abstract base class for the leader and follower MBeans.
27 | */
28 | public abstract class ServerBean implements ServerMXBean, ZKMBeanInfo {
29 | private final Date startTime=new Date();
30 |
31 | public boolean isHidden() {
32 | return false;
33 | }
34 |
35 | public String getStartTime() {
36 | return startTime.toString();
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/java/main/org/apache/zookeeper/server/quorum/ServerMXBean.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package org.apache.zookeeper.server.quorum;
20 |
21 | /**
22 | * A quorum server MBean.
23 | */
24 | public interface ServerMXBean {
25 | /**
26 | * @return name of the server MBean
27 | */
28 | public String getName();
29 | /**
30 | * @return the start time the server
31 | */
32 | public String getStartTime();
33 | }
34 |
--------------------------------------------------------------------------------
/src/java/main/org/apache/zookeeper/server/quorum/flexible/QuorumVerifier.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package org.apache.zookeeper.server.quorum.flexible;
20 |
21 | import java.util.HashSet;
22 |
23 | /**
24 | * All quorum validators have to implement a method called
25 | * containsQuorum, which verifies if a HashSet of server
26 | * identifiers constitutes a quorum.
27 | *
28 | */
29 |
30 | public interface QuorumVerifier {
31 | long getWeight(long id);
32 | boolean containsQuorum(HashSet set);
33 | }
34 |
--------------------------------------------------------------------------------
/src/java/main/org/apache/zookeeper/server/upgrade/UpgradeSnapShot.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package org.apache.zookeeper.server.upgrade;
20 |
21 | import java.io.IOException;
22 | import java.util.concurrent.ConcurrentHashMap;
23 |
24 | import org.apache.zookeeper.server.DataTree;
25 |
26 | /**
27 | * interface for snapshot conversion.
28 | *
29 | */
30 | public interface UpgradeSnapShot {
31 | public DataTree getNewDataTree() throws IOException;
32 | public ConcurrentHashMap getSessionWithTimeOuts();
33 | }
34 |
--------------------------------------------------------------------------------
/src/java/main/org/apache/zookeeper/server/util/ZxidUtils.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package org.apache.zookeeper.server.util;
20 |
21 | public class ZxidUtils {
22 | static public long getEpochFromZxid(long zxid) {
23 | return zxid >> 32L;
24 | }
25 | static public long getCounterFromZxid(long zxid) {
26 | return zxid & 0xffffffffL;
27 | }
28 | static public long makeZxid(long epoch, long counter) {
29 | return (epoch << 32L) | (counter & 0xffffffffL);
30 | }
31 | static public String zxidToString(long zxid) {
32 | return Long.toHexString(zxid);
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/java/main/overview.html:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
20 |
21 | ZooKeeper
22 |
23 |
24 | ZooKeeper is a service for coordinating processes of distributed applications.
25 |
26 |
27 |
--------------------------------------------------------------------------------
/src/java/systest/org/apache/zookeeper/test/system/DuplicateNameException.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package org.apache.zookeeper.test.system;
20 |
21 | public class DuplicateNameException extends Exception {
22 | private static final long serialVersionUID = 1L;
23 | public DuplicateNameException(String mess) {
24 | super(mess);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/java/systest/org/apache/zookeeper/test/system/NoAssignmentException.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package org.apache.zookeeper.test.system;
20 |
21 | public class NoAssignmentException extends Exception {
22 | private static final long serialVersionUID = 1L;
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/src/java/systest/org/apache/zookeeper/test/system/NoAvailableContainers.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package org.apache.zookeeper.test.system;
20 |
21 | public class NoAvailableContainers extends Exception {
22 | public NoAvailableContainers(String string) {
23 | super(string);
24 | }
25 |
26 | private static final long serialVersionUID = 1L;
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/src/java/test/bin/test-patch.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | OK_RELEASEAUDIT_WARNINGS=24
17 | OK_FINDBUGS_WARNINGS=0
18 | OK_JAVADOC_WARNINGS=0
19 |
--------------------------------------------------------------------------------
/src/java/test/data/invalidsnap/version-2/log.1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/java/test/data/invalidsnap/version-2/log.1
--------------------------------------------------------------------------------
/src/java/test/data/invalidsnap/version-2/log.274:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/java/test/data/invalidsnap/version-2/log.274
--------------------------------------------------------------------------------
/src/java/test/data/invalidsnap/version-2/log.63b:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/java/test/data/invalidsnap/version-2/log.63b
--------------------------------------------------------------------------------
/src/java/test/data/invalidsnap/version-2/snapshot.0:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/java/test/data/invalidsnap/version-2/snapshot.0
--------------------------------------------------------------------------------
/src/java/test/data/invalidsnap/version-2/snapshot.272:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/java/test/data/invalidsnap/version-2/snapshot.272
--------------------------------------------------------------------------------
/src/java/test/data/invalidsnap/version-2/snapshot.639:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/java/test/data/invalidsnap/version-2/snapshot.639
--------------------------------------------------------------------------------
/src/java/test/data/invalidsnap/version-2/snapshot.83f:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/java/test/data/invalidsnap/version-2/snapshot.83f
--------------------------------------------------------------------------------
/src/java/test/data/upgrade/log.100000001:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/java/test/data/upgrade/log.100000001
--------------------------------------------------------------------------------
/src/java/test/data/upgrade/log.100001bf0:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/java/test/data/upgrade/log.100001bf0
--------------------------------------------------------------------------------
/src/java/test/data/upgrade/snapshot.100000000:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/java/test/data/upgrade/snapshot.100000000
--------------------------------------------------------------------------------
/src/java/test/data/upgrade/snapshot.100001bec:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ewhauser/zookeeper/0a872cfbcb77dbcacc28838b0290eee21cf01aa4/src/java/test/data/upgrade/snapshot.100001bec
--------------------------------------------------------------------------------
/src/java/test/org/apache/zookeeper/PortAssignment.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package org.apache.zookeeper;
20 |
21 | import org.slf4j.Logger;
22 | import org.slf4j.LoggerFactory;
23 |
24 | /** Assign ports to tests */
25 | public class PortAssignment {
26 | private static final Logger LOG = LoggerFactory.getLogger(PortAssignment.class);
27 |
28 | private static int nextPort = 11221;
29 |
30 | /** Assign a new, unique port to the test */
31 | public synchronized static int unique() {
32 | LOG.info("assigning port " + nextPort);
33 | return nextPort++;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/src/java/test/org/apache/zookeeper/server/ServerCnxnFactoryAccessor.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | package org.apache.zookeeper.server;
19 |
20 | public class ServerCnxnFactoryAccessor {
21 | public static ZooKeeperServer getZkServer(ServerCnxnFactory fac) {
22 | return fac.zkServer;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/java/test/org/apache/zookeeper/test/NioNettySuiteHammerTest.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package org.apache.zookeeper.test;
20 |
21 | import org.junit.runners.Suite;
22 |
23 | /**
24 | * Run tests with: Nio Client against Netty server
25 | */
26 | @Suite.SuiteClasses({
27 | AsyncHammerTest.class
28 | })
29 | public class NioNettySuiteHammerTest extends NioNettySuiteBase {
30 | }
31 |
--------------------------------------------------------------------------------
/src/java/test/org/apache/zookeeper/test/NioNettySuiteTest.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package org.apache.zookeeper.test;
20 |
21 | import org.junit.runners.Suite;
22 |
23 | /**
24 | * Run tests with: Nio Client against Netty server
25 | */
26 | @Suite.SuiteClasses({
27 | ACLTest.class,
28 | AsyncOpsTest.class,
29 | ChrootClientTest.class,
30 | ClientTest.class,
31 | FourLetterWordsTest.class,
32 | NullDataTest.class,
33 | SessionTest.class,
34 | WatcherTest.class
35 | })
36 | public class NioNettySuiteTest extends NioNettySuiteBase {
37 | }
38 |
--------------------------------------------------------------------------------
/src/lastRevision.bat:
--------------------------------------------------------------------------------
1 | echo off
2 | rem Licensed to the Apache Software Foundation (ASF) under one
3 | rem or more contributor license agreements. See the NOTICE file
4 | rem distributed with this work for additional information
5 | rem regarding copyright ownership. The ASF licenses this file
6 | rem to you under the Apache License, Version 2.0 (the
7 | rem "License"); you may not use this file except in compliance
8 | rem with the License. You may obtain a copy of the License at
9 | rem
10 | rem http://www.apache.org/licenses/LICENSE-2.0
11 | rem
12 | rem Unless required by applicable law or agreed to in writing, software
13 | rem distributed under the License is distributed on an "AS IS" BASIS,
14 | rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | rem See the License for the specific language governing permissions and
16 | rem limitations under the License.
17 |
18 | rem Find the current revision, store it in a file, for DOS
19 | svn info | findstr Revision > %1
20 |
21 | For /F "tokens=1,2 delims= " %%a In (%1) Do (
22 | echo lastRevision=%%b> %1
23 | )
24 |
--------------------------------------------------------------------------------
/src/lastRevision.sh:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | # Find the current revision, store it in a file
18 | FILE=$1
19 | LASTREV=`svn info | grep '^Revision' | sed -e 's/Revision: *//'`
20 |
21 | echo "lastRevision=${LASTREV}" > $FILE
22 |
--------------------------------------------------------------------------------
/src/packages/deb/zookeeper.control/conffile:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | /etc/zookeeper
16 |
--------------------------------------------------------------------------------
/src/packages/deb/zookeeper.control/control:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | Package: zookeeper
16 | Version: @version@
17 | Section: misc
18 | Priority: optional
19 | Architecture: all
20 | Depends: sun-java6-jre
21 | Maintainer: Apache Software Foundation
22 | Description: ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services.
23 | Distribution: development
24 |
--------------------------------------------------------------------------------
/src/packages/deb/zookeeper.control/postinst:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # Licensed to the Apache Software Foundation (ASF) under one or more
4 | # contributor license agreements. See the NOTICE file distributed with
5 | # this work for additional information regarding copyright ownership.
6 | # The ASF licenses this file to You under the Apache License, Version 2.0
7 | # (the "License"); you may not use this file except in compliance with
8 | # the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 |
18 | bash /usr/sbin/update-zookeeper-env.sh \
19 | --prefix=/usr \
20 | --conf-dir=/etc/zookeeper \
21 | --log-dir=/var/log/zookeeper \
22 | --pid-dir=/var/run/zookeeper \
23 | --var-dir=/var/lib/zookeeper
24 |
--------------------------------------------------------------------------------
/src/packages/deb/zookeeper.control/postrm:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # Licensed to the Apache Software Foundation (ASF) under one or more
4 | # contributor license agreements. See the NOTICE file distributed with
5 | # this work for additional information regarding copyright ownership.
6 | # The ASF licenses this file to You under the Apache License, Version 2.0
7 | # (the "License"); you may not use this file except in compliance with
8 | # the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 |
18 | /usr/sbin/userdel zookeeper 2> /dev/null >/dev/null
19 | exit 0
20 |
--------------------------------------------------------------------------------
/src/packages/deb/zookeeper.control/preinst:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # Licensed to the Apache Software Foundation (ASF) under one or more
4 | # contributor license agreements. See the NOTICE file distributed with
5 | # this work for additional information regarding copyright ownership.
6 | # The ASF licenses this file to You under the Apache License, Version 2.0
7 | # (the "License"); you may not use this file except in compliance with
8 | # the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 |
18 | getent group hadoop 2>/dev/null >/dev/null || /usr/sbin/groupadd -r hadoop
19 |
20 | /usr/sbin/useradd --comment "ZooKeeper" --shell /bin/bash -M -r --groups hadoop --home /usr/share/zookeeper zookeeper 2> /dev/null || :
21 |
--------------------------------------------------------------------------------
/src/packages/deb/zookeeper.control/prerm:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # Licensed to the Apache Software Foundation (ASF) under one or more
4 | # contributor license agreements. See the NOTICE file distributed with
5 | # this work for additional information regarding copyright ownership.
6 | # The ASF licenses this file to You under the Apache License, Version 2.0
7 | # (the "License"); you may not use this file except in compliance with
8 | # the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 |
18 | /etc/init.d/zookeeper stop 2>/dev/null >/dev/null
19 | bash /usr/sbin/update-zookeeper-env.sh \
20 | --prefix=/usr \
21 | --conf-dir=/etc/zookeeper \
22 | --log-dir=/var/log/zookeeper \
23 | --pid-dir=/var/run/zookeeper \
24 | --uninstal
25 |
--------------------------------------------------------------------------------
/src/packages/templates/conf/zookeeper-env.sh:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | export JAVA_HOME=${JAVA_HOME}
16 | export ZOO_LOG_DIR=${LOG_DIR}
17 |
--------------------------------------------------------------------------------
/src/recipes/README.txt:
--------------------------------------------------------------------------------
1 | 1) This source directory contains various Zookeeper recipe implementations.
2 |
3 | 2) The recipe directory name should specify the name of the recipe you are implementing - eg. lock/.
4 |
5 | 3) It would be great if you can provide both the java and c recipes for the zookeeper recipes.
6 | The c recipes go in to recipe-name/src/c and the java implementation goes into recipe-name/src/java.
7 |
8 | 4) The recipes hold high standards like our zookeeper c/java libraries, so make sure that you include
9 | some unit testing with both the c and java recipe code.
10 |
11 | 5) Also, please name your c client public methods as
12 | zkr_recipe-name_methodname
13 | (eg. zkr_lock_lock in lock/src/c)
14 |
15 | 6) The various recipes are in ../../docs/recipes.html or
16 | ../../docs/reciped.pdf. Also, this is not an exhaustive list by any chance.
17 | Zookeeper is used (and can be used) for more than what we have listed in the docs.
18 |
19 | 7) To run the c tests in all the recipes,
20 | - make sure the main zookeeper c libraries in
21 | {top}/src/c/ are compiled. Run autoreconf -if;./configure; make. The libaries
22 | will be installed in {top}/src/c/.libs.
23 | - run autoreconf if;./configure;make run-check
24 | in src/recipes/$recipename/src/c
25 |
26 |
--------------------------------------------------------------------------------
/src/recipes/election/README.txt:
--------------------------------------------------------------------------------
1 |
17 |
18 | 1) This election interface recipe implements the leader election recipe
19 | mentioned in ../../../docs/recipes.[html,pdf].
20 |
21 | 2) To compile the leader election java recipe you can just run ant jar from
22 | this directory.
23 | Please report any bugs on the jira
24 |
25 | http://issues.apache.org/jira/browse/ZOOKEEPER
26 |
27 |
28 |
--------------------------------------------------------------------------------
/src/recipes/lock/README.txt:
--------------------------------------------------------------------------------
1 |
17 |
18 | 1) This lock interface recipe implements the lock recipe
19 | mentioned in ../../../docs/recipes.[html,pdf].
20 |
21 | 2) To compile the lock java recipe you can just run ant jar from
22 | this directory. For compiling the c libarary go to src/c and read
23 | the INSTALLATION instructions.
24 | Please report any bugs on the jira
25 |
26 | http://issues.apache.org/jira/browse/ZOOKEEPER
27 |
28 |
29 |
--------------------------------------------------------------------------------
/src/recipes/lock/src/c/README.txt:
--------------------------------------------------------------------------------
1 | Zookeeper C lock client library
2 |
3 |
4 | INSTALLATION
5 |
6 | If you're building the client from a source checkout you need to
7 | follow the steps outlined below. If you're building from a release
8 | tar downloaded from Apache please skip to step 2.
9 |
10 | 1) make sure that you compile the main zookeeper c client library.
11 |
12 | 2) change directory to src/recipes/lock/src/c
13 | and do a "autoreconf -if" to bootstrap
14 | autoconf, automake and libtool. Please make sure you have autoconf
15 | version 2.59 or greater installed.
16 | 3) do a "./configure [OPTIONS]" to generate the makefile. See INSTALL
17 | for general information about running configure.
18 |
19 | 4) do a "make" or "make install" to build the libraries and install them.
20 | Alternatively, you can also build and run a unit test suite (and
21 | you probably should). Please make sure you have cppunit-1.10.x or
22 | higher installed before you execute step 4. Once ./configure has
23 | finished, do a "make run-check". It will build the libraries, build
24 | the tests and run them.
25 | 5) to generate doxygen documentation do a "make doxygen-doc". All
26 | documentations will be placed to a new subfolder named docs. By
27 | default only HTML documentation is generated. For information on
28 | other document formats please use "./configure --help"
29 |
--------------------------------------------------------------------------------
/src/recipes/lock/src/c/tests/Util.cc:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | #include "Util.h"
20 |
21 | const std::string EMPTY_STRING;
22 |
23 | TestConfig globalTestConfig;
24 |
25 | void millisleep(int ms){
26 | timespec ts;
27 | ts.tv_sec=ms/1000;
28 | ts.tv_nsec=(ms%1000)*1000000; // to nanoseconds
29 | nanosleep(&ts,0);
30 | }
31 |
--------------------------------------------------------------------------------
/src/recipes/lock/src/java/org/apache/zookeeper/recipes/lock/LockListener.java:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | * Licensed to the Apache Software Foundation (ASF) under one or more
4 | * contributor license agreements. See the NOTICE file distributed with
5 | * this work for additional information regarding copyright ownership.
6 | * The ASF licenses this file to You under the Apache License, Version 2.0
7 | * (the "License"); you may not use this file except in compliance with
8 | * the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | package org.apache.zookeeper.recipes.lock;
19 |
20 | /**
21 | * This class has two methods which are call
22 | * back methods when a lock is acquired and
23 | * when the lock is released.
24 | *
25 | */
26 | public interface LockListener {
27 | /**
28 | * call back called when the lock
29 | * is acquired
30 | */
31 | public void lockAcquired();
32 |
33 | /**
34 | * call back called when the lock is
35 | * released.
36 | */
37 | public void lockReleased();
38 | }
39 |
--------------------------------------------------------------------------------
/src/recipes/queue/src/c/tests/Util.cc:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | #include "Util.h"
20 |
21 | const std::string EMPTY_STRING;
22 |
23 | TestConfig globalTestConfig;
24 |
25 | void millisleep(int ms){
26 | timespec ts;
27 | ts.tv_sec=ms/1000;
28 | ts.tv_nsec=(ms%1000)*1000000; // to nanoseconds
29 | nanosleep(&ts,0);
30 | }
31 |
--------------------------------------------------------------------------------