Kitxuuu commited on
Commit
e1028bb
·
verified ·
1 Parent(s): f4a7cbe

Add files using upload-large-folder tool

Browse files
Files changed (20) hide show
  1. local-test-zookeeper-delta-01/afc-zookeeper/zookeeper-contrib/zookeeper-contrib-fatjar/pom.xml +141 -0
  2. local-test-zookeeper-delta-01/afc-zookeeper/zookeeper-contrib/zookeeper-contrib-huebrowser/README +62 -0
  3. local-test-zookeeper-delta-01/afc-zookeeper/zookeeper-contrib/zookeeper-contrib-loggraph/README.md +80 -0
  4. local-test-zookeeper-delta-01/afc-zookeeper/zookeeper-contrib/zookeeper-contrib-loggraph/pom.xml +127 -0
  5. local-test-zookeeper-delta-01/afc-zookeeper/zookeeper-contrib/zookeeper-contrib-monitoring/test.py +282 -0
  6. local-test-zookeeper-delta-01/afc-zookeeper/zookeeper-contrib/zookeeper-contrib-rest/rest.sh +90 -0
  7. local-test-zookeeper-delta-01/afc-zookeeper/zookeeper-contrib/zookeeper-contrib-zkfuse/Makefile.am +4 -0
  8. local-test-zookeeper-delta-01/afc-zookeeper/zookeeper-contrib/zookeeper-contrib-zkfuse/README.txt +63 -0
  9. local-test-zookeeper-delta-01/afc-zookeeper/zookeeper-contrib/zookeeper-contrib-zkfuse/build.xml +61 -0
  10. local-test-zookeeper-delta-01/afc-zookeeper/zookeeper-contrib/zookeeper-contrib-zkfuse/configure.ac +72 -0
  11. local-test-zookeeper-delta-01/afc-zookeeper/zookeeper-contrib/zookeeper-contrib-zkperl/build.xml +61 -0
  12. local-test-zookeeper-delta-01/afc-zookeeper/zookeeper-contrib/zookeeper-contrib-zktreeutil/Makefile.am +4 -0
  13. local-test-zookeeper-delta-01/afc-zookeeper/zookeeper-contrib/zookeeper-contrib-zooinspector/NOTICE.txt +9 -0
  14. local-test-zookeeper-delta-01/afc-zookeeper/zookeeper-contrib/zookeeper-contrib-zooinspector/README.txt +102 -0
  15. local-test-zookeeper-delta-01/afc-zookeeper/zookeeper-contrib/zookeeper-contrib-zooinspector/TODO +19 -0
  16. local-test-zookeeper-delta-01/afc-zookeeper/zookeeper-contrib/zookeeper-contrib-zooinspector/build.xml +148 -0
  17. local-test-zookeeper-delta-01/afc-zookeeper/zookeeper-contrib/zookeeper-contrib-zooinspector/ivy.xml +45 -0
  18. local-test-zookeeper-delta-01/afc-zookeeper/zookeeper-contrib/zookeeper-contrib-zooinspector/zooInspector-dev.sh +18 -0
  19. local-test-zookeeper-delta-01/afc-zookeeper/zookeeper-contrib/zookeeper-contrib-zooinspector/zooInspector.cmd +26 -0
  20. local-test-zookeeper-delta-01/afc-zookeeper/zookeeper-contrib/zookeeper-contrib-zooinspector/zooInspector.sh +25 -0
local-test-zookeeper-delta-01/afc-zookeeper/zookeeper-contrib/zookeeper-contrib-fatjar/pom.xml ADDED
@@ -0,0 +1,141 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
3
+ <!--
4
+ /**
5
+ * Licensed to the Apache Software Foundation (ASF) under one
6
+ * or more contributor license agreements. See the NOTICE file
7
+ * distributed with this work for additional information
8
+ * regarding copyright ownership. The ASF licenses this file
9
+ * to you under the Apache License, Version 2.0 (the
10
+ * "License"); you may not use this file except in compliance
11
+ * with the License. You may obtain a copy of the License at
12
+ *
13
+ * http://www.apache.org/licenses/LICENSE-2.0
14
+ *
15
+ * Unless required by applicable law or agreed to in writing, software
16
+ * distributed under the License is distributed on an "AS IS" BASIS,
17
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
+ * See the License for the specific language governing permissions and
19
+ * limitations under the License.
20
+ */
21
+ -->
22
+ <modelVersion>4.0.0</modelVersion>
23
+ <parent>
24
+ <groupId>org.apache.zookeeper</groupId>
25
+ <artifactId>zookeeper-contrib</artifactId>
26
+ <version>3.10.0-SNAPSHOT</version>
27
+ </parent>
28
+
29
+ <groupId>org.apache.zookeeper</groupId>
30
+ <artifactId>zookeeper-contrib-fatjar</artifactId>
31
+ <packaging>jar</packaging>
32
+ <name>Apache ZooKeeper - Contrib - Fatjar</name>
33
+
34
+ <properties>
35
+ <maven.javadoc.skip>true</maven.javadoc.skip>
36
+ <maven.source.skip>true</maven.source.skip>
37
+ </properties>
38
+
39
+ <dependencies>
40
+ <dependency>
41
+ <groupId>org.apache.zookeeper</groupId>
42
+ <artifactId>zookeeper-jute</artifactId>
43
+ <version>${project.version}</version>
44
+ </dependency>
45
+ <dependency>
46
+ <groupId>org.apache.zookeeper</groupId>
47
+ <artifactId>zookeeper</artifactId>
48
+ <version>${project.version}</version>
49
+ </dependency>
50
+ <dependency>
51
+ <groupId>org.apache.zookeeper</groupId>
52
+ <artifactId>zookeeper</artifactId>
53
+ <version>${project.version}</version>
54
+ <type>test-jar</type>
55
+ </dependency>
56
+ <dependency>
57
+ <groupId>org.apache.zookeeper</groupId>
58
+ <artifactId>zookeeper-it</artifactId>
59
+ <version>${project.version}</version>
60
+ </dependency>
61
+ <dependency>
62
+ <groupId>org.slf4j</groupId>
63
+ <artifactId>slf4j-api</artifactId>
64
+ </dependency>
65
+ <dependency>
66
+ <groupId>commons-cli</groupId>
67
+ <artifactId>commons-cli</artifactId>
68
+ </dependency>
69
+ <dependency>
70
+ <groupId>org.eclipse.jetty</groupId>
71
+ <artifactId>jetty-server</artifactId>
72
+ </dependency>
73
+ <dependency>
74
+ <groupId>org.eclipse.jetty</groupId>
75
+ <artifactId>jetty-servlet</artifactId>
76
+ </dependency>
77
+ <dependency>
78
+ <groupId>com.fasterxml.jackson.core</groupId>
79
+ <artifactId>jackson-databind</artifactId>
80
+ </dependency>
81
+ <dependency>
82
+ <groupId>jline</groupId>
83
+ <artifactId>jline</artifactId>
84
+ </dependency>
85
+ <dependency>
86
+ <groupId>io.dropwizard.metrics</groupId>
87
+ <artifactId>metrics-core</artifactId>
88
+ </dependency>
89
+ <dependency>
90
+ <groupId>org.xerial.snappy</groupId>
91
+ <artifactId>snappy-java</artifactId>
92
+ </dependency>
93
+ <dependency>
94
+ <groupId>ch.qos.logback</groupId>
95
+ <artifactId>logback-core</artifactId>
96
+ </dependency>
97
+ </dependencies>
98
+
99
+ <build>
100
+ <resources>
101
+ <resource>
102
+ <directory>${project.basedir}/src/main/resources</directory>
103
+ </resource>
104
+ <resource>
105
+ <directory>${project.basedir}/../../conf</directory>
106
+ <includes>
107
+ <include>logback.xml</include>
108
+ </includes>
109
+ </resource>
110
+ </resources>
111
+ <plugins>
112
+ <plugin>
113
+ <groupId>org.apache.maven.plugins</groupId>
114
+ <artifactId>maven-assembly-plugin</artifactId>
115
+ <configuration>
116
+ <descriptorRefs>
117
+ <descriptorRef>jar-with-dependencies</descriptorRef>
118
+ </descriptorRefs>
119
+ <archive>
120
+ <manifest>
121
+ <mainClass>org.apache.zookeeper.util.FatJarMain</mainClass>
122
+ </manifest>
123
+ </archive>
124
+ <finalName>zookeeper-${project.version}-fatjar</finalName>
125
+ <appendAssemblyId>false</appendAssemblyId>
126
+ <attach>false</attach>
127
+ </configuration>
128
+ <executions>
129
+ <execution>
130
+ <id>make-assembly</id>
131
+ <phase>package</phase>
132
+ <goals>
133
+ <goal>single</goal>
134
+ </goals>
135
+ </execution>
136
+ </executions>
137
+ </plugin>
138
+ </plugins>
139
+ </build>
140
+
141
+ </project>
local-test-zookeeper-delta-01/afc-zookeeper/zookeeper-contrib/zookeeper-contrib-huebrowser/README ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ZooKeeper Browser - Hue Application
3
+ ===================================
4
+
5
+ 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.
6
+
7
+ Requirements
8
+ ------------
9
+
10
+ Hue-1.0:
11
+ * http://github.com/downloads/cloudera/hue/hue-1.0.tgz
12
+ * http://github.com/downloads/cloudera/hue/release-notes-1.0.html
13
+
14
+ ZooKeeper REST gateway:
15
+ * available as contrib: contrib/rest
16
+
17
+ How to install?
18
+ ---------------
19
+
20
+ First of all you need to install Hue 1.0 release:
21
+
22
+ * http://archive.cloudera.com/cdh/3/hue/sdk/sdk.html
23
+ * http://github.com/cloudera/hue/tree/release-1.0
24
+
25
+ After you finish the previous step you should copy the zkui/ folder to apps/ and register the new application:
26
+
27
+ * $ ./build/env/bin/python tools/app_reg/app_reg.py --install apps/zkui
28
+ * $ ./build/env/bin/python tools/app_reg/app_reg.py --list 2>&1 | grep zkui
29
+ zkui 0.1 /Users/philip/src/hue/apps/zkui
30
+
31
+
32
+ And restart the Hue application server.
33
+
34
+ Configuration
35
+ -------------
36
+
37
+ Edit zkui/src/zkui/settings.py:
38
+
39
+ CLUSTERS = [{
40
+ 'nice_name': 'Default',
41
+ 'hostport': 'localhost:2181,localhost:2182,localhost:2183',
42
+ 'rest_gateway': 'http://localhost:9998'
43
+ }, {
44
+ # ... and more clusters
45
+ }
46
+ ]
47
+
48
+ What is Hue?
49
+ ------------
50
+
51
+ Wiki: http://wiki.github.com/cloudera/hue/
52
+ Main Repo: http://github.com/cloudera/hue
53
+
54
+ Hue is both a web UI for Hadoop and a framework to create interactive web applications. It features a FileBrowser for accessing HDFS, JobSub and JobBrowser applications for submitting and viewing MapReduce jobs, a Beeswax application for interacting with Hive. On top of that, the web frontend is mostly built from declarative widgets that require no JavaScript and are easy to learn.
55
+
56
+ What is ZooKeeper?
57
+ ------------------
58
+
59
+ http://zookeeper.apache.org/
60
+
61
+ ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services. All of these kinds of services are used in some form or another by distributed applications. Each time they are implemented there is a lot of work that goes into fixing the bugs and race conditions that are inevitable. Because of the difficulty of implementing these kinds of services, applications initially usually skimp on them ,which make them brittle in the presence of change and difficult to manage. Even when done correctly, different implementations of these services lead to management complexity when the applications are deployed.
62
+
local-test-zookeeper-delta-01/afc-zookeeper/zookeeper-contrib/zookeeper-contrib-loggraph/README.md ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # LogGraph README
2
+
3
+ ## 1 - About
4
+ LogGraph is an application for viewing and filtering zookeeper logs. It can handle transaction logs and message logs.
5
+
6
+ ## 2 - Compiling
7
+
8
+ Run `mvn clean install dependency:copy-dependencies` in zookeeper-contrib/zookeeper-contrib-loggraph/.
9
+ This will download all dependencies and compile all the loggraph code.
10
+
11
+ Once compilation has finished, you can run it the the `loggraph.sh` script in zookeeper-contrib/zookeeper-contrib-loggraph/src/main/resources.
12
+ This will start and embedded web server on your machine.
13
+ Navigate to `http://localhost:8182/graph/main.html`
14
+
15
+ ## 3 - Usage
16
+ LogGraph presents the user with 4 views,
17
+
18
+ a) Simple log view
19
+ This view simply displays the log text. This isn't very useful without filters (see "Filtering the logs").
20
+
21
+ b) Server view
22
+ The server view shows the interactions between the different servers in an ensemble. The X axis represents time.
23
+
24
+ * Exceptions show up as red dots. Hovering your mouse over them will give you more details of the exception
25
+ * The colour of the line represents the election state of the server.
26
+ - orange means LOOKING for leader
27
+ - dark green means the server is the leader
28
+ - light green means the server is following a leader
29
+ - yellow means there isn't enough information to determine the state of the server.
30
+ * The gray arrows denote election messages between servers. Pink dashed arrows are messages that were sent but never delivered.
31
+
32
+ c) Session view
33
+ The session view shows the lifetime of sessions on a server. Use the time filter to narrow down the view. Any more than about 2000 events will take a long time to view in your browser.
34
+ The X axis represents time. Each line is a session. The black dots represent events on the session. You can click on the black dots for more details of the event.
35
+
36
+ d) Stats view
37
+ There is currently only one statistics view, Transactions/minute. Suggestions for other statistic views are very welcome.
38
+
39
+ ## 4 - Filtering the logs
40
+ The logs can be filtered in 2 ways, by time and by content.
41
+
42
+ To filter by time simply move the slider to the desired start time. The time window specifies how many milliseconds after and including the start time will be displayed.
43
+
44
+ Content filtering uses a adhoc filtering language, using prefix notation. The language looks somewhat similar to lisp. A statement in the language takes the form (op arg arg ....). A statement resolves to a boolean value. Statements can be nested.
45
+
46
+ ### 4.1 - Filter arguments
47
+ An argument can be a number, a string or a symbol. A number is any argument which starts with -, + or 0 to 9. If the number starts with 0x it is interpreted as hexadecimal. Otherwise it is interpreted as decimal. If the argument begins with a double-quote, (") it is interpreted as a string. Anything else is interpreted as a symbol.
48
+
49
+ ### 4.2 - Filter symbols
50
+ The possible filter symbols are:
51
+
52
+ client-id : number, the session id of the client who initiated a transaction.
53
+
54
+ cxid : number, the cxid of a transaction
55
+
56
+ zxid : number, the zxid of a transaction
57
+
58
+ operation : string, the operation being performed, for example "setData", "createSession", "closeSession", "error", "create"
59
+
60
+ ### 4.3 - Filter operations
61
+ The possible filter operations are:
62
+
63
+ or : logical or, takes 1 or more arguments which must be other statements.
64
+
65
+ and : logical and, takes 1 or more arguments which must be other statements.
66
+
67
+ not : logical not, takes 1 argument which must be another statement.
68
+
69
+ xor : exclusive or, takes 1 or more arguments which must be other statements.
70
+
71
+ = : equals, takes 1 or more arguments, which must all be equal to each other to return true.
72
+
73
+ &gt; : greater than, takes 1 or more arguments, to return true the 1st argument must be greater than the 2nd argument which must be greater than the 3rd argument and so on...
74
+
75
+ &lt; : less than, takes 1 or more arguments, to return true the 1st argument must be less than the 2nd argument which must be less than the 3rd argument and so on...
76
+
77
+ ### 4.4 - Filter examples
78
+ Give me all the setData operations with session id 0xdeadbeef or 0xcafeb33r but not with zxid 0x12341234 ->
79
+
80
+ (and (= operation "setData") (or (= client-id 0xdeadbeef) (= client-id 0xcafeb33r)) (not (= zxid 0x12341234)))
local-test-zookeeper-delta-01/afc-zookeeper/zookeeper-contrib/zookeeper-contrib-loggraph/pom.xml ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
3
+ <!--
4
+ /**
5
+ * Licensed to the Apache Software Foundation (ASF) under one
6
+ * or more contributor license agreements. See the NOTICE file
7
+ * distributed with this work for additional information
8
+ * regarding copyright ownership. The ASF licenses this file
9
+ * to you under the Apache License, Version 2.0 (the
10
+ * "License"); you may not use this file except in compliance
11
+ * with the License. You may obtain a copy of the License at
12
+ *
13
+ * http://www.apache.org/licenses/LICENSE-2.0
14
+ *
15
+ * Unless required by applicable law or agreed to in writing, software
16
+ * distributed under the License is distributed on an "AS IS" BASIS,
17
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
+ * See the License for the specific language governing permissions and
19
+ * limitations under the License.
20
+ */
21
+ -->
22
+ <modelVersion>4.0.0</modelVersion>
23
+ <parent>
24
+ <groupId>org.apache.zookeeper</groupId>
25
+ <artifactId>zookeeper-contrib</artifactId>
26
+ <version>3.10.0-SNAPSHOT</version>
27
+ </parent>
28
+
29
+ <artifactId>zookeeper-contrib-loggraph</artifactId>
30
+ <packaging>jar</packaging>
31
+ <name>Apache ZooKeeper - Contrib - Loggraph</name>
32
+ <description>
33
+ LogGraph is an application for viewing and filtering zookeeper logs. It can handle transaction logs and message logs.
34
+ </description>
35
+
36
+ <dependencies>
37
+ <dependency>
38
+ <groupId>org.apache.zookeeper</groupId>
39
+ <artifactId>zookeeper-jute</artifactId>
40
+ <version>${project.version}</version>
41
+ </dependency>
42
+ <dependency>
43
+ <groupId>org.apache.zookeeper</groupId>
44
+ <artifactId>zookeeper</artifactId>
45
+ <version>${project.version}</version>
46
+ </dependency>
47
+ <dependency>
48
+ <groupId>com.fasterxml.jackson.core</groupId>
49
+ <artifactId>jackson-databind</artifactId>
50
+ </dependency>
51
+ <dependency>
52
+ <groupId>org.slf4j</groupId>
53
+ <artifactId>slf4j-api</artifactId>
54
+ </dependency>
55
+ <dependency>
56
+ <groupId>ch.qos.logback</groupId>
57
+ <artifactId>logback-core</artifactId>
58
+ <exclusions>
59
+ <exclusion>
60
+ <groupId>*</groupId>
61
+ <artifactId>*</artifactId>
62
+ </exclusion>
63
+ </exclusions>
64
+ </dependency>
65
+ <dependency>
66
+ <groupId>org.eclipse.jetty</groupId>
67
+ <artifactId>jetty-server</artifactId>
68
+ </dependency>
69
+ <dependency>
70
+ <groupId>org.eclipse.jetty</groupId>
71
+ <artifactId>jetty-servlet</artifactId>
72
+ </dependency>
73
+ <dependency>
74
+ <groupId>org.junit.jupiter</groupId>
75
+ <artifactId>junit-jupiter-api</artifactId>
76
+ <scope>test</scope>
77
+ </dependency>
78
+ <dependency>
79
+ <groupId>org.junit.jupiter</groupId>
80
+ <artifactId>junit-jupiter-engine</artifactId>
81
+ <scope>test</scope>
82
+ </dependency>
83
+ <dependency>
84
+ <groupId>org.mockito</groupId>
85
+ <artifactId>mockito-core</artifactId>
86
+ <scope>test</scope>
87
+ </dependency>
88
+ </dependencies>
89
+
90
+ <build>
91
+ <resources>
92
+ <resource>
93
+ <directory>${project.basedir}/src/main/resources/webapp</directory>
94
+ </resource>
95
+ </resources>
96
+ <plugins>
97
+ <plugin>
98
+ <groupId>org.apache.maven.plugins</groupId>
99
+ <artifactId>maven-dependency-plugin</artifactId>
100
+ <configuration>
101
+ <outputDirectory>
102
+ ${project.basedir}/lib
103
+ </outputDirectory>
104
+ </configuration>
105
+ </plugin>
106
+ <plugin>
107
+ <groupId>org.apache.maven.plugins</groupId>
108
+ <artifactId>maven-surefire-plugin</artifactId>
109
+ <configuration>
110
+ <includes>
111
+ <include>**/*Test.java</include>
112
+ </includes>
113
+ <forkCount>${surefire-forkcount}</forkCount>
114
+ <reuseForks>false</reuseForks>
115
+ <argLine>-Xmx512m -Dtest.junit.threads=${surefire-forkcount} -Dzookeeper.junit.threadid=${surefire.forkNumber}</argLine>
116
+ <basedir>${project.basedir}</basedir>
117
+ <redirectTestOutputToFile>true</redirectTestOutputToFile>
118
+ <systemPropertyVariables>
119
+ <build.test.dir>${project.build.directory}/surefire</build.test.dir>
120
+ <zookeeper.DigestAuthenticationProvider.superDigest>super:D/InIHSb7yEEbrWz8b9l71RjZJU=</zookeeper.DigestAuthenticationProvider.superDigest>
121
+ </systemPropertyVariables>
122
+ </configuration>
123
+ </plugin>
124
+ </plugins>
125
+ </build>
126
+
127
+ </project>
local-test-zookeeper-delta-01/afc-zookeeper/zookeeper-contrib/zookeeper-contrib-monitoring/test.py ADDED
@@ -0,0 +1,282 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #! /usr/bin/env python
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
+ import unittest
19
+ import socket
20
+ import sys
21
+
22
+ from StringIO import StringIO
23
+
24
+ from check_zookeeper import ZooKeeperServer, NagiosHandler, CactiHandler, GangliaHandler
25
+
26
+ ZK_MNTR_OUTPUT = """zk_version\t3.4.0--1, built on 06/19/2010 15:07 GMT
27
+ zk_avg_latency\t1
28
+ zk_max_latency\t132
29
+ zk_min_latency\t0
30
+ zk_packets_received\t640
31
+ zk_packets_sent\t639
32
+ zk_outstanding_requests\t0
33
+ zk_server_state\tfollower
34
+ zk_znode_count\t4
35
+ zk_watch_count\t0
36
+ zk_ephemerals_count\t0
37
+ zk_approximate_data_size\t27
38
+ zk_open_file_descriptor_count\t22
39
+ zk_max_file_descriptor_count\t1024
40
+ """
41
+
42
+ ZK_MNTR_OUTPUT_WITH_BROKEN_LINES = """zk_version\t3.4.0
43
+ zk_avg_latency\t23
44
+ broken-line
45
+
46
+ """
47
+
48
+ ZK_STAT_OUTPUT = """Zookeeper version: 3.3.0-943314, built on 05/11/2010 22:20 GMT
49
+ Clients:
50
+ /0:0:0:0:0:0:0:1:34564[0](queued=0,recved=1,sent=0)
51
+
52
+ Latency min/avg/max: 0/40/121
53
+ Received: 11
54
+ Sent: 10
55
+ Outstanding: 0
56
+ Zxid: 0x700000003
57
+ Mode: follower
58
+ Node count: 4
59
+ """
60
+
61
+ class SocketMock(object):
62
+ def __init__(self):
63
+ self.sent = []
64
+
65
+ def settimeout(self, timeout):
66
+ self.timeout = timeout
67
+
68
+ def connect(self, address):
69
+ self.address = address
70
+
71
+ def send(self, data):
72
+ self.sent.append(data)
73
+ return len(data)
74
+
75
+ def recv(self, size):
76
+ return ZK_MNTR_OUTPUT[:size]
77
+
78
+ def close(self): pass
79
+
80
+ class ZK33xSocketMock(SocketMock):
81
+ def __init__(self):
82
+ SocketMock.__init__(self)
83
+ self.got_stat_cmd = False
84
+
85
+ def recv(self, size):
86
+ if 'stat' in self.sent:
87
+ return ZK_STAT_OUTPUT[:size]
88
+ else:
89
+ return ''
90
+
91
+ class UnableToConnectSocketMock(SocketMock):
92
+ def connect(self, _):
93
+ raise socket.error('[Errno 111] Connection refused')
94
+
95
+ def create_server_mock(socket_class):
96
+ class ZooKeeperServerMock(ZooKeeperServer):
97
+ def _create_socket(self):
98
+ return socket_class()
99
+ return ZooKeeperServerMock()
100
+
101
+ class TestCheckZookeeper(unittest.TestCase):
102
+
103
+ def setUp(self):
104
+ self.zk = ZooKeeperServer()
105
+
106
+ def test_parse_valid_line(self):
107
+ key, value = self.zk._parse_line('something\t5')
108
+
109
+ self.assertEqual(key, 'something')
110
+ self.assertEqual(value, 5)
111
+
112
+ def test_parse_line_raises_exception_on_invalid_output(self):
113
+ invalid_lines = ['something', '', 'a\tb\tc', '\t1']
114
+ for line in invalid_lines:
115
+ self.assertRaises(ValueError, self.zk._parse_line, line)
116
+
117
+ def test_parser_on_valid_output(self):
118
+ data = self.zk._parse(ZK_MNTR_OUTPUT)
119
+
120
+ self.assertEqual(len(data), 14)
121
+ self.assertEqual(data['zk_znode_count'], 4)
122
+
123
+ def test_parse_should_ignore_invalid_lines(self):
124
+ data = self.zk._parse(ZK_MNTR_OUTPUT_WITH_BROKEN_LINES)
125
+
126
+ self.assertEqual(len(data), 2)
127
+
128
+ def test_parse_stat_valid_output(self):
129
+ data = self.zk._parse_stat(ZK_STAT_OUTPUT)
130
+
131
+ result = {
132
+ 'zk_version' : '3.3.0-943314, built on 05/11/2010 22:20 GMT',
133
+ 'zk_min_latency' : 0,
134
+ 'zk_avg_latency' : 40,
135
+ 'zk_max_latency' : 121,
136
+ 'zk_packets_received': 11,
137
+ 'zk_packets_sent': 10,
138
+ 'zk_server_state': 'follower',
139
+ 'zk_znode_count': 4
140
+ }
141
+ for k, v in result.iteritems():
142
+ self.assertEqual(v, data[k])
143
+
144
+ def test_recv_valid_output(self):
145
+ zk = create_server_mock(SocketMock)
146
+
147
+ data = zk.get_stats()
148
+ self.assertEqual(len(data), 14)
149
+ self.assertEqual(data['zk_znode_count'], 4)
150
+
151
+ def test_socket_unable_to_connect(self):
152
+ zk = create_server_mock(UnableToConnectSocketMock)
153
+
154
+ self.assertRaises(socket.error, zk.get_stats)
155
+
156
+ def test_use_stat_cmd_if_mntr_is_not_available(self):
157
+ zk = create_server_mock(ZK33xSocketMock)
158
+
159
+ data = zk.get_stats()
160
+ self.assertEqual(data['zk_version'], '3.3.0-943314, built on 05/11/2010 22:20 GMT')
161
+
162
+ class HandlerTestCase(unittest.TestCase):
163
+
164
+ def setUp(self):
165
+ try:
166
+ sys._stdout
167
+ except:
168
+ sys._stdout = sys.stdout
169
+
170
+ sys.stdout = StringIO()
171
+
172
+ def tearDown(self):
173
+ sys.stdout = sys._stdout
174
+
175
+ def output(self):
176
+ sys.stdout.seek(0)
177
+ return sys.stdout.read()
178
+
179
+
180
+ class TestNagiosHandler(HandlerTestCase):
181
+
182
+ def _analyze(self, w, c, k, stats):
183
+ class Opts(object):
184
+ warning = w
185
+ critical = c
186
+ key = k
187
+
188
+ return NagiosHandler().analyze(Opts(), {'localhost:2181':stats})
189
+
190
+ def test_ok_status(self):
191
+ r = self._analyze(10, 20, 'a', {'a': 5})
192
+
193
+ self.assertEqual(r, 0)
194
+ self.assertEqual(self.output(), 'Ok "a"!|localhost:2181=5;10;20\n')
195
+
196
+ r = self._analyze(20, 10, 'a', {'a': 30})
197
+ self.assertEqual(r, 0)
198
+
199
+ def test_warning_status(self):
200
+ r = self._analyze(10, 20, 'a', {'a': 15})
201
+ self.assertEqual(r, 1)
202
+ self.assertEqual(self.output(),
203
+ 'Warning "a" localhost:2181!|localhost:2181=15;10;20\n')
204
+
205
+ r = self._analyze(20, 10, 'a', {'a': 15})
206
+ self.assertEqual(r, 1)
207
+
208
+ def test_critical_status(self):
209
+ r = self._analyze(10, 20, 'a', {'a': 30})
210
+ self.assertEqual(r, 2)
211
+ self.assertEqual(self.output(),
212
+ 'Critical "a" localhost:2181!|localhost:2181=30;10;20\n')
213
+
214
+ r = self._analyze(20, 10, 'a', {'a': 5})
215
+ self.assertEqual(r, 2)
216
+
217
+ def test_check_a_specific_key_on_all_hosts(self):
218
+ class Opts(object):
219
+ warning = 10
220
+ critical = 20
221
+ key = 'latency'
222
+
223
+ r = NagiosHandler().analyze(Opts(), {
224
+ 's1:2181': {'latency': 5},
225
+ 's2:2181': {'latency': 15},
226
+ 's3:2181': {'latency': 35},
227
+ })
228
+ self.assertEqual(r, 2)
229
+ self.assertEqual(self.output(),
230
+ 'Critical "latency" s3:2181!|s1:2181=5;10;20 '\
231
+ 's3:2181=35;10;20 s2:2181=15;10;20\n')
232
+
233
+ class TestCactiHandler(HandlerTestCase):
234
+ class Opts(object):
235
+ key = 'a'
236
+ leader = False
237
+
238
+ def __init__(self, leader=False):
239
+ self.leader = leader
240
+
241
+ def test_output_values_for_all_hosts(self):
242
+ r = CactiHandler().analyze(TestCactiHandler.Opts(), {
243
+ 's1:2181':{'a':1},
244
+ 's2:2181':{'a':2, 'b':3}
245
+ })
246
+ self.assertEqual(r, None)
247
+ self.assertEqual(self.output(), 's1_2181:1 s2_2181:2')
248
+
249
+ def test_output_single_value_for_leader(self):
250
+ r = CactiHandler().analyze(TestCactiHandler.Opts(leader=True), {
251
+ 's1:2181': {'a':1, 'zk_server_state': 'leader'},
252
+ 's2:2181': {'a':2}
253
+ })
254
+ self.assertEqual(r, 0)
255
+ self.assertEqual(self.output(), '1\n')
256
+
257
+
258
+ class TestGangliaHandler(unittest.TestCase):
259
+
260
+ class TestableGangliaHandler(GangliaHandler):
261
+ def __init__(self):
262
+ GangliaHandler.__init__(self)
263
+ self.cli_calls = []
264
+
265
+ def call(self, cli):
266
+ self.cli_calls.append(' '.join(cli))
267
+
268
+ def test_send_single_metric(self):
269
+ class Opts(object):
270
+ @property
271
+ def gmetric(self): return '/usr/bin/gmetric'
272
+ opts = Opts()
273
+
274
+ h = TestGangliaHandler.TestableGangliaHandler()
275
+ h.analyze(opts, {'localhost:2181':{'latency':10}})
276
+
277
+ cmd = "%s -n latency -v 10 -t uint32" % opts.gmetric
278
+ assert cmd in h.cli_calls
279
+
280
+ if __name__ == '__main__':
281
+ unittest.main()
282
+
local-test-zookeeper-delta-01/afc-zookeeper/zookeeper-contrib/zookeeper-contrib-rest/rest.sh ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ #
19
+ # If this scripted is run out of /usr/bin or some other system bin directory
20
+ # it should be linked to and not copied. Things like java jar files are found
21
+ # relative to the canonical path of this script.
22
+ #
23
+
24
+ # Only follow symlinks if readlink supports it
25
+ if readlink -f "$0" > /dev/null 2>&1
26
+ then
27
+ ZKREST=`readlink -f "$0"`
28
+ else
29
+ ZKREST="$0"
30
+ fi
31
+ ZKREST_HOME=`dirname "$ZKREST"`
32
+
33
+ if $cygwin
34
+ then
35
+ # cygwin has a "kill" in the shell itself, gets confused
36
+ KILL=/bin/kill
37
+ else
38
+ KILL=kill
39
+ fi
40
+
41
+ if [ -z $ZKREST_PIDFILE ]
42
+ then ZKREST_PIDFILE=$ZKREST_HOME/server.pid
43
+ fi
44
+
45
+ ZKREST_MAIN=org.apache.zookeeper.server.jersey.RestMain
46
+
47
+ ZKREST_CONF=$ZKREST_HOME/conf
48
+ ZKREST_LOG=$ZKREST_HOME/zkrest.log
49
+
50
+ CLASSPATH="$ZKREST_CONF:$CLASSPATH"
51
+
52
+ for i in "$ZKREST_HOME"/lib/*.jar
53
+ do
54
+ CLASSPATH="$i:$CLASSPATH"
55
+ done
56
+
57
+ for i in "$ZKREST_HOME"/zookeeper-*.jar
58
+ do
59
+ CLASSPATH="$i:$CLASSPATH"
60
+ done
61
+
62
+ case $1 in
63
+ start)
64
+ echo "Starting ZooKeeper REST Gateway ... "
65
+ java -cp "$CLASSPATH" $JVMFLAGS $ZKREST_MAIN >$ZKREST_LOG 2>&1 &
66
+ /bin/echo -n $! > "$ZKREST_PIDFILE"
67
+ echo STARTED
68
+ ;;
69
+ stop)
70
+ echo "Stopping ZooKeeper REST Gateway ... "
71
+ if [ ! -f "$ZKREST_PIDFILE" ]
72
+ then
73
+ echo "error: could not find file $ZKREST_PIDFILE"
74
+ exit 1
75
+ else
76
+ $KILL -9 $(cat "$ZKREST_PIDFILE")
77
+ rm "$ZKREST_PIDFILE"
78
+ echo STOPPED
79
+ fi
80
+ ;;
81
+ restart)
82
+ shift
83
+ "$0" stop ${@}
84
+ sleep 3
85
+ "$0" start ${@}
86
+ ;;
87
+ *)
88
+ echo "Usage: $0 {start|stop|restart}" >&2
89
+
90
+ esac
local-test-zookeeper-delta-01/afc-zookeeper/zookeeper-contrib/zookeeper-contrib-zkfuse/Makefile.am ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ ## Process this file with automake to produce Makefile.in
2
+
3
+ SUBDIRS = src
4
+
local-test-zookeeper-delta-01/afc-zookeeper/zookeeper-contrib/zookeeper-contrib-zkfuse/README.txt ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Original authors of zkfuse are Swee Lim & Bartlomiej M Niechwiej of Yahoo.
2
+ '
3
+ ZooKeeper FUSE (File System in Userspace)
4
+ =========================================
5
+
6
+ Pre-requisites
7
+ --------------
8
+ 1. Linux system with 2.6.X kernel.
9
+ 2. Fuse (Filesystem in Userspace) must be installed on the build node.
10
+ 3. Development build libraries:
11
+ a. fuse
12
+ b. log4cxx
13
+ c. pthread
14
+ d. boost
15
+
16
+ Build instructions
17
+ ------------------
18
+ 1. cd into this directory
19
+ 2. autoreconf -if
20
+ 3. ./configure
21
+ 4. make
22
+ 5. zkfuse binary is under the src directory
23
+
24
+ Testing Zkfuse
25
+ --------------
26
+ 1. Depending on permission on /dev/fuse, you may need to sudo -u root.
27
+ * If /dev/fuse has permissions 0600, then you have to run Zkfuse as root.
28
+ * If /dev/fuse has permissions 0666, then you can run Zkfuse as any user.
29
+ 2. Create or find a mount point that you have "rwx" permission.
30
+ * e.g. mkdir -p /tmp/zkfuse
31
+ 3. Run Zkfuse as follows:
32
+ zkfuse -z <hostspec> -m /tmp/zkfuse -d
33
+ -z specifies ZooKeeper address(es) <host>:<port>
34
+ -m specifies the mount point
35
+ -d specifies the debug mode.
36
+ For additional command line options, try "zkfuse -h".
37
+
38
+ FAQ
39
+ ---
40
+ Q. How to fix "warning: macro `AM_PATH_CPPUNIT' not found in library"?
41
+ A. * install cppunit (src or pkg) on build machine
42
+
43
+ Q. Why can't Zkfuse cannot write to current directory?
44
+ A. * If Zkfuse is running as root on a NFS mounted file system, it will not
45
+ have root permissions because root user is mapped to another user by
46
+ NFS admin.
47
+ * If you run Zkfuse as root, it is a good idea to run Zkfuse from a
48
+ directory that you have write access to. This will allow core files
49
+ to be saved.
50
+
51
+ Q. Why Zkfuse cannot mount?
52
+ A. * Check that the mount point exists and you have "rwx" permissions.
53
+ * Check that previous mounts have been umounted. If Zkfuse does not
54
+ exit cleanly, its mount point may have to be umounted manually.
55
+ If you cannot umount manually, make sure that there no files is open
56
+ within the mount point.
57
+
58
+ Q. Why does Zkfuse complain about logging at startup?
59
+ A. * Zkfuse uses log4cxx for logging. It is looking for log4cxx.properties
60
+ file to obtain its logging configuration.
61
+ * There is an example log4cxx.properties file in the Zkfuse source
62
+ directory.
63
+
local-test-zookeeper-delta-01/afc-zookeeper/zookeeper-contrib/zookeeper-contrib-zkfuse/build.xml ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+
3
+ <!--
4
+ Licensed to the Apache Software Foundation (ASF) under one or more
5
+ contributor license agreements. See the NOTICE file distributed with
6
+ this work for additional information regarding copyright ownership.
7
+ The ASF licenses this file to You under the Apache License, Version 2.0
8
+ (the "License"); you may not use this file except in compliance with
9
+ 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
+ <project name="zkfuse" default="compile">
21
+ <import file="../build-contrib.xml"/>
22
+
23
+ <target name="init" depends="check-contrib" unless="skip.contrib">
24
+ <echo message="contrib: ${name}"/>
25
+ <mkdir dir="${build.dir}"/>
26
+ <antcall target="init-contrib"/>
27
+ </target>
28
+
29
+ <target name="compile" depends="init" unless="skip.contrib">
30
+ <echo message="contrib: ${name}"/>
31
+
32
+ <mkdir dir="${build.dir}"/>
33
+ <copy todir="${build.dir}">
34
+ <fileset dir="${basedir}">
35
+ <exclude name="**/VERSION"/>
36
+ </fileset>
37
+ </copy>
38
+ <exec executable="echo" output="${build.dir}/VERSION">
39
+ <arg line="${version}" />
40
+ </exec>
41
+ </target>
42
+
43
+ <target name="jar" depends="compile" >
44
+ <echo message="No jar target defined for this package"/>
45
+ </target>
46
+
47
+ <target name="test">
48
+ <echo message="No test target defined for this package" />
49
+ </target>
50
+
51
+
52
+ <target name="package" depends="compile" unless="skip.contrib">
53
+ <echo message="contrib: ${name}"/>
54
+
55
+ <mkdir dir="${dist.dir}/zookeeper-contrib/zookeeper-contrib-${name}"/>
56
+ <copy todir="${dist.dir}/zookeeper-contrib/zookeeper-contrib-${name}">
57
+ <fileset dir="${build.dir}"/>
58
+ </copy>
59
+ </target>
60
+
61
+ </project>
local-test-zookeeper-delta-01/afc-zookeeper/zookeeper-contrib/zookeeper-contrib-zkfuse/configure.ac ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # -*- Autoconf -*-
2
+ # Process this file with autoconf to produce a configure script.
3
+
4
+ AC_PREREQ(2.59)
5
+
6
+ AC_INIT([zkfuse], [2.2.0])
7
+ AM_INIT_AUTOMAKE(foreign)
8
+
9
+ AC_CONFIG_SRCDIR([src/zkadapter.h])
10
+ AM_CONFIG_HEADER([config.h])
11
+
12
+ PACKAGE=zkfuse
13
+ VERSION=1.0
14
+
15
+ AC_SUBST(PACKAGE)
16
+ AC_SUBST(VERSION)
17
+
18
+ BUILD_PATH="`pwd`"
19
+
20
+ # Checks for programs.
21
+ AC_LANG_CPLUSPLUS
22
+ AC_PROG_CXX
23
+
24
+ # Checks for libraries.
25
+ AC_CHECK_LIB([fuse], [main])
26
+ AC_CHECK_LIB([log4cxx], [main], [], [AC_MSG_ERROR("We need log4cxx to build zkfuse")])
27
+ AC_CHECK_LIB([thread], [thr_create])
28
+ AC_CHECK_LIB([pthread], [pthread_create])
29
+ AC_CHECK_LIB([rt], [clock_gettime])
30
+ AC_CHECK_LIB([socket], [socket])
31
+ AC_CHECK_LIB([nsl], [gethostbyname])
32
+ AC_CHECK_LIB([ulockmgr], [ulockmgr_op])
33
+
34
+ ZOOKEEPER_PATH=${BUILD_PATH}/../../c
35
+ ZOOKEEPER_BUILD_PATH=${BUILD_PATH}/../../../build/c
36
+ AC_CHECK_LIB(zookeeper_mt, main, [ZOOKEEPER_LD="-L${ZOOKEEPER_BUILD_PATH}/.libs -lzookeeper_mt"],,["-L${ZOOKEEPER_BUILD_PATH}/.libs"])
37
+
38
+ AC_SUBST(ZOOKEEPER_PATH)
39
+ AC_SUBST(ZOOKEEPER_LD)
40
+
41
+ # Checks for header files.
42
+ AC_HEADER_DIRENT
43
+ AC_HEADER_STDC
44
+ AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/time.h unistd.h])
45
+ AC_CHECK_HEADERS([boost/shared_ptr.hpp boost/utility.hpp boost/weak_ptr.hpp],, AC_MSG_ERROR([boost library headers not found. Please install boost library.]))
46
+
47
+ # Checks for typedefs, structures, and compiler characteristics.
48
+ AC_HEADER_STDBOOL
49
+ AC_C_CONST
50
+ AC_TYPE_UID_T
51
+ AC_C_INLINE
52
+ AC_TYPE_INT32_T
53
+ AC_TYPE_INT64_T
54
+ AC_TYPE_MODE_T
55
+ AC_TYPE_OFF_T
56
+ AC_TYPE_SIZE_T
57
+ AC_CHECK_MEMBERS([struct stat.st_blksize])
58
+ AC_STRUCT_ST_BLOCKS
59
+ AC_HEADER_TIME
60
+ AC_TYPE_UINT32_T
61
+ AC_TYPE_UINT64_T
62
+ AC_TYPE_UINT8_T
63
+ AC_C_VOLATILE
64
+
65
+ # Checks for library functions.
66
+ AC_FUNC_UTIME_NULL
67
+ AC_CHECK_FUNCS([gettimeofday memset mkdir rmdir strdup strerror strstr strtol strtoul strtoull utime])
68
+
69
+ AC_CONFIG_FILES([Makefile])
70
+ AC_CONFIG_FILES([src/Makefile])
71
+ AC_OUTPUT
72
+ AC_C_VOLATILE
local-test-zookeeper-delta-01/afc-zookeeper/zookeeper-contrib/zookeeper-contrib-zkperl/build.xml ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+
3
+ <!--
4
+ Licensed to the Apache Software Foundation (ASF) under one or more
5
+ contributor license agreements. See the NOTICE file distributed with
6
+ this work for additional information regarding copyright ownership.
7
+ The ASF licenses this file to You under the Apache License, Version 2.0
8
+ (the "License"); you may not use this file except in compliance with
9
+ 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
+ <project name="zkperl" default="compile">
21
+ <import file="../build-contrib.xml"/>
22
+
23
+ <target name="init" depends="check-contrib" unless="skip.contrib">
24
+ <echo message="contrib: ${name}"/>
25
+ <mkdir dir="${build.dir}"/>
26
+ <antcall target="init-contrib"/>
27
+ </target>
28
+
29
+ <target name="compile" depends="init" unless="skip.contrib">
30
+ <echo message="contrib: ${name}"/>
31
+
32
+ <mkdir dir="${build.dir}"/>
33
+ <copy todir="${build.dir}">
34
+ <fileset dir="${basedir}">
35
+ <exclude name="**/VERSION"/>
36
+ </fileset>
37
+ </copy>
38
+ <exec executable="echo" output="${build.dir}/VERSION">
39
+ <arg line="${version}" />
40
+ </exec>
41
+ </target>
42
+
43
+ <target name="jar" depends="compile" >
44
+ <echo message="No jar target defined for this package"/>
45
+ </target>
46
+
47
+ <target name="test">
48
+ <echo message="No test target defined for this package" />
49
+ </target>
50
+
51
+
52
+ <target name="package" depends="compile" unless="skip.contrib">
53
+ <echo message="contrib: ${name}"/>
54
+
55
+ <mkdir dir="${dist.dir}/zookeeper-contrib/zookeeper-contrib-${name}"/>
56
+ <copy todir="${dist.dir}/zookeeper-contrib/zookeeper-contrib-${name}">
57
+ <fileset dir="${build.dir}"/>
58
+ </copy>
59
+ </target>
60
+
61
+ </project>
local-test-zookeeper-delta-01/afc-zookeeper/zookeeper-contrib/zookeeper-contrib-zktreeutil/Makefile.am ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ ## Process this file with automake to produce Makefile.in
2
+
3
+ SUBDIRS = src
4
+
local-test-zookeeper-delta-01/afc-zookeeper/zookeeper-contrib/zookeeper-contrib-zooinspector/NOTICE.txt ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ src/java/com/nitido/utils/toaster/Toaster.java:
2
+ This java file is copyright by Daniele Piras ("danielepiras80", no email known) released under the Apache Software License 2.0
3
+ It has been downloaded in december 2009 from the CVS web interface of the sourceforge project http://sourceforge.net/projects/jtoaster/ . The web interface to CVS is not available anymore on sourceforge.
4
+
5
+ The icons in src/main/resources/icons are taken from the Tango project
6
+ downloaded from http://tango.freedesktop.org/releases on 2011-09-06.
7
+ The Tango project is public domain.
8
+
9
+ Distribution packagers should not include the icons in the package but rather depend on tango-icon-theme (Debian package name). ZooInspector will then try to get the icons from /usr/share/icons/Tango rather then from its jar file.
local-test-zookeeper-delta-01/afc-zookeeper/zookeeper-contrib/zookeeper-contrib-zooinspector/README.txt ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ==========================================
2
+ ZooInspector - Browser and Editor for ZooKeeper Instances
3
+ Author: Colin Goodheart-Smithe
4
+ Date: February 2010
5
+ ==========================================
6
+
7
+ ZooInspector is a Java Swing based application for browsing and editing ZooKeeper instances.
8
+
9
+ Contents
10
+ --------
11
+ - Features
12
+ - Pre-requisites
13
+ - Build Instructions
14
+ - Using ZooInspector
15
+ - Creating and Using Plugins
16
+
17
+ Features
18
+ --------
19
+ Below is a list of features in the current release of ZooInspector.
20
+ - Load connection settings from a zookeeper properties file
21
+ - Pluggable DataEncryptionManagers to specify how data should be encrypted and decrypted in the Zookeeper instance
22
+ - Browsable tree view of the ZooKeeper instance
23
+ - View the data in a node
24
+ - View the ACLs currently applied to a node
25
+ - View the metadata for a node (Version, Number of Children, Last modified Time, etc.)
26
+ - Pluggable NodeViewers interface
27
+ - Ability to save/load and set default Node Viewers
28
+
29
+ Maven Build Instructions
30
+ -------------------------
31
+ 0. Pre-requisites
32
+ - Run "mvn install" in the root directory of the Zookeeper project
33
+ 1. Open a command line
34
+ 2. cd into this directory
35
+ 3. mvn install
36
+ 4. To run ZooInspector run zooInspector.cmd (on Windows) or zooInspector.sh (on Linux) (these scripts will
37
+ find the built JAR automatically in the "target" directory as long as you don't move it)
38
+
39
+ Ant Build Instructions
40
+ -----------------------
41
+ 0. Pre-requisites
42
+ - The main zookeeper build script must have been run before building this module
43
+ 1. Open a command line.
44
+ 2. cd into this directory
45
+ 3. Run command: ant
46
+ 4. ZooInspector will be built to ../../../build/contrib/ZooInspector
47
+ 5. Copy zookeeper-3.x.x.jar into the lib sub-directory (if you are using zookeeper-3.3.0.jar it will have been
48
+ copied to this directory during the build
49
+ 6. By default the zookeeper.cmd and zookeeper.sh files expect zookeeper-3.3.0.jar. If you are using another version
50
+ you will need to change these files to point to the zookeeper-3.x.x.jar you copied to the lib directory
51
+ 7. To run ZooInspector run zooInspector.cmd (on Windows) or zooInspector.sh (on Linux). If you are using
52
+ zookeeper-3.3.0.jar and do not require any classpath changes you can run the zookeeper-dev-ZooInspector.jar
53
+ directly
54
+
55
+ Using ZooInspector
56
+ ------------------
57
+ To start ZooInspector run zooInspector.cmd (on Windows) or zooInspector.sh (on Linux). If you are using
58
+ zookeeper-3.3.0.jar and do not require any classpath changes you can run the zookeeper-dev-ZooInspector.jar
59
+ directly.
60
+
61
+ Click the play button on the toolbar to bring up the connection dialog. From here you can enter connection
62
+ information for your zookeeper instance. You can also load the connection properties from a file. This file can
63
+ have the format as a normal zookeeper properties file (i.e. hosts and timeout key-value pairs) and van optional have
64
+ an encryptionManager key-value pair to specify the DataEncryptionManager to use for this connection
65
+ (DataEncryptionManagers are explained in further detail in the 'Creating and Using Plugins' section below). You can
66
+ also set the entered information as the defaults so that when you first start ZooInspector these settings are
67
+ automatically loaded into this dialog. Pressing the OK button with connect to your ZooKeeper instance and show the
68
+ current node tree on the left of the main panel.
69
+
70
+ Clicking a node in the node tree will load the data for that node into the node viewers. Three node viewers are
71
+ currently distributed with ZooInspector:
72
+ 1. Node Data - This enables you to see the data current stored on that node. This data can be modified and
73
+ saved. The data is decrypted and encrypted using the DataEncryptionManager specified on the connection
74
+ dialog.
75
+ 2. Node Metadata - This enables you to see the metadata associated with this node. This is essentially the data
76
+ obtained from the Stat object for this node.
77
+ 3. Node ACLs - This allows you to see the ACLs currently applied to this node. Currently there is no ability
78
+ to change the ACLs on a node, but it is a feature I would like to add.
79
+ Other custom Node Viewers can be added, this is explained in the 'Creating and Using Plugins' section below.
80
+
81
+
82
+ Creating and Using Plugins
83
+ --------------------------
84
+ There are two types of plugin which can be used with ZooInspector:
85
+ 1. DataEncryptionManager - This specifies how data should be encrypted and decrypted when working with a
86
+ zookeeper instance.
87
+ 2. ZooInspectorNodeViewer - This is a GUI panel which provides a view of visualisation on a node.
88
+ More information on these interfaces can be found in the javadocs for this module.
89
+
90
+ To use a plugin in ZooInspector, build the plugin to a jar and copy the jar to the lib sub-directory. Edit the
91
+ zooInspector.cmd and/or zooInspector.sh files to include your new jar on the classpath and run ZooInspector.
92
+
93
+ For DataEncryptionManagers, click the play button to open the connection dialog and enter the full class name of
94
+ your DataEncryptionManager in the 'Data Encryption Manager' field. You can make this Data Encryption Manager the
95
+ default by clicking 'Set As Default'. Click the 'OK' button to instantiate and use your plugin.
96
+
97
+ For ZooInspectorNodeViewers, Click the 'Change Node Viewers' button on the toolbar (looks like a tree with a pencil)
98
+ and enter the full classname for your Node Viewer in the field left of the 'Add' button, then click the 'Add'
99
+ button. The Node Viewer will be instantiated and should appear in the list. You can change the order of the Node
100
+ viewers by clicking the up and down buttons and delete a Node Viewer by clicking the delete button. You can save
101
+ to configuration to a file or set it as the default if necessary. Then click the 'OK' button and your Node Viewer
102
+ should appear in the tabs on the right of the main panel.
local-test-zookeeper-delta-01/afc-zookeeper/zookeeper-contrib/zookeeper-contrib-zooinspector/TODO ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ - replace JToaster with standard notifications, see:
2
+ http://www.galago-project.org/specs/notification/
3
+ http://stackoverflow.com/questions/857154/freedesktop-org-notifications-in-java
4
+ DBus and Java:
5
+ http://bolta-gecko.blogspot.com/2009/06/using-d-bus-in-java.html
6
+ http://dbus.freedesktop.org/doc/dbus-java/ (packaged in Debian)
7
+
8
+ - properly respect
9
+ http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html
10
+ http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
11
+ http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html
12
+
13
+ - Rename classes to avoid redundant "ZooInspector" prefix.
14
+
15
+ - Ant build file has hard coded log4j dependency. (ZK will move to maven anyways...)
16
+
17
+ - make directory for config files configurable via commandline parameter
18
+
19
+ - Clean up the code! :-)
local-test-zookeeper-delta-01/afc-zookeeper/zookeeper-contrib/zookeeper-contrib-zooinspector/build.xml ADDED
@@ -0,0 +1,148 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ <project name="zooinspector" default="jar">
19
+ <import file="../build-contrib.xml" />
20
+
21
+
22
+ <target name="setjarname">
23
+ <property name="jarname" value="${build.dir}/zookeeper-${version}-${name}.jar" />
24
+ </target>
25
+
26
+ <target name="init" depends="checkMainCompiled, zookeeperbuildcontrib.init">
27
+ <mkdir dir="${build.dir}/licences" />
28
+ <copy todir="${build.dir}/licences">
29
+ <fileset dir="${basedir}/licences" />
30
+ </copy>
31
+ <mkdir dir="${build.dir}/icons" />
32
+ <copy todir="${build.dir}/icons">
33
+ <fileset dir="${basedir}/src/main/resources/icons" />
34
+ </copy>
35
+ <mkdir dir="${build.dir}/config" />
36
+ <copy todir="${build.dir}/config">
37
+ <fileset dir="${basedir}/src/main/resources">
38
+ <include name="defaultConnectionSettings.cfg" />
39
+ <include name="defaultNodeViewers.cfg" />
40
+ </fileset>
41
+ </copy>
42
+ <copy todir="${build.dir}/lib">
43
+ <fileset file="${basedir}/src/main/resources/log4j.properties" />
44
+ </copy>
45
+ <copy todir="${build.dir}/lib">
46
+ <fileset file="../../build/zookeeper-${version}.jar" />
47
+ </copy>
48
+ <copy todir="${build.dir}">
49
+ <fileset dir="${basedir}" includes="*.*" excludes="build.xml,ivy.xml" />
50
+ </copy>
51
+ </target>
52
+
53
+ <!-- Override jar target to specify main class -->
54
+ <target name="jar" depends="setjarname, compile">
55
+ <echo message="contrib: ${name}" />
56
+
57
+ <jar jarfile="${jarname}">
58
+ <manifest>
59
+ <attribute name="Main-Class" value="org.apache.zookeeper.inspector.ZooInspector" />
60
+ <attribute name="Built-By" value="${user.name}" />
61
+ <attribute name="Built-At" value="${build.time}" />
62
+ <attribute name="Built-On" value="${host.name}" />
63
+ <attribute name="Implementation-Title" value="org.apache.zookeeper" />
64
+ <attribute name="Implementation-Version" value="${revision}" />
65
+ <attribute name="Implementation-Vendor" value="The Apache Software Foundation" />
66
+ </manifest>
67
+ <fileset file="${zk.root}/LICENSE.txt" />
68
+ <fileset dir="${build.classes}" />
69
+ <fileset dir="${basedir}/src/main/resources">
70
+ <exclude name="*.cfg" />
71
+ <exclude name="*.properties" />
72
+ </fileset>
73
+ <fileset dir="${basedir}/src/main/java" excludes="**/*.jar, **/*.java"/>
74
+ </jar>
75
+ </target>
76
+
77
+ <target name="compile" depends="ivy-retrieve,zookeeperbuildcontrib.compile" />
78
+
79
+ <target name="test" depends="checkMainTestCompiled,compile-test,test-init,test-category,junit.run" />
80
+
81
+ <target name="compile-test" depends="ivy-retrieve-test,compile">
82
+ <property name="target.jdk" value="${ant.java.version}" />
83
+ <property name="src.test.local" location="${basedir}/test" />
84
+ <mkdir dir="${build.test}" />
85
+ <javac srcdir="${src.test.local}" destdir="${build.test}" target="${target.jdk}" debug="on" encoding="${build.encoding}">
86
+ <classpath refid="classpath" />
87
+ <classpath>
88
+ <pathelement location="${zk.root}/build/test/classes" />
89
+ </classpath>
90
+ </javac>
91
+ </target>
92
+
93
+ <target name="test-init" depends="jar,compile-test">
94
+ <delete dir="${test.log.dir}" />
95
+ <delete dir="${test.tmp.dir}" />
96
+ <delete dir="${test.data.dir}" />
97
+ <mkdir dir="${test.log.dir}" />
98
+ <mkdir dir="${test.tmp.dir}" />
99
+ <mkdir dir="${test.data.dir}" />
100
+ </target>
101
+
102
+ <target name="test-category">
103
+ <property name="test.category" value="" />
104
+ </target>
105
+
106
+ <target name="junit.run">
107
+ <echo message="${test.src.dir}" />
108
+ <junit showoutput="${test.output}" printsummary="${test.junit.printsummary}" haltonfailure="${test.junit.haltonfailure}" fork="yes" forkmode="${test.junit.fork.mode}" maxmemory="${test.junit.maxmem}" dir="${basedir}" timeout="${test.timeout}" errorProperty="tests.failed" failureProperty="tests.failed">
109
+ <sysproperty key="build.test.dir" value="${test.tmp.dir}" />
110
+ <sysproperty key="test.data.dir" value="${test.data.dir}" />
111
+ <sysproperty key="log4j.configuration" value="file:${basedir}/conf/log4j.properties" />
112
+ <classpath refid="classpath" />
113
+ <classpath>
114
+ <pathelement path="${build.test}" />
115
+ <pathelement location="${zk.root}/build/test/classes" />
116
+ </classpath>
117
+ <formatter type="${test.junit.output.format}" />
118
+ <batchtest todir="${test.log.dir}" unless="testcase">
119
+ <fileset dir="${test.src.dir}" includes="**/*${test.category}Test.java" />
120
+ </batchtest>
121
+ <batchtest todir="${test.log.dir}" if="testcase">
122
+ <fileset dir="${test.src.dir}" includes="**/${testcase}.java" />
123
+ </batchtest>
124
+ </junit>
125
+ <fail if="tests.failed">Tests failed!</fail>
126
+ </target>
127
+
128
+ <target name="package" depends="jar, zookeeperbuildcontrib.package" unless="skip.contrib">
129
+
130
+ <copy file="${basedir}/build.xml" todir="${dist.dir}/zookeeper-contrib/zookeeper-contrib-${name}" />
131
+
132
+ <mkdir dir="${dist.dir}/zookeeper-contrib/zookeeper-contrib-${name}/src" />
133
+ <copy todir="${dist.dir}/zookeeper-contrib/zookeeper-contrib-${name}/src">
134
+ <fileset dir="${basedir}/src" />
135
+ </copy>
136
+ <mkdir dir="${dist.dir}/zookeeper-contrib/zookeeper-contrib-${name}/licences" />
137
+ <copy todir="${dist.dir}/zookeeper-contrib/zookeeper-contrib-${name}/licences">
138
+ <fileset dir="${basedir}/licences" />
139
+ </copy>
140
+ <mkdir dir="${dist.dir}/zookeeper-contrib/zookeeper-contrib-${name}/config" />
141
+ <copy todir="${dist.dir}/zookeeper-contrib/zookeeper-contrib-${name}/config">
142
+ <fileset dir="${basedir}/src/main/resources">
143
+ <include name="defaultConnectionSettings.cfg" />
144
+ <include name="defaultNodeViewers.cfg" />
145
+ </fileset>
146
+ </copy>
147
+ </target>
148
+ </project>
local-test-zookeeper-delta-01/afc-zookeeper/zookeeper-contrib/zookeeper-contrib-zooinspector/ivy.xml ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ <ivy-module version="2.0"
19
+ xmlns:e="http://ant.apache.org/ivy/extra">
20
+
21
+ <info organisation="org.apache.zookeeper"
22
+ module="${name}" revision="${version}">
23
+ <license name="Apache 2.0"/>
24
+ <ivyauthor name="Apache Hadoop" url="http://hadoop.apache.org"/>
25
+ <description>ZooInspector</description>
26
+ </info>
27
+
28
+ <configurations defaultconfmapping="default">
29
+ <conf name="default"/>
30
+ <conf name="test"/>
31
+ <conf name="releaseaudit" visibility="private" description="Artifacts required for releaseaudit target"/>
32
+ </configurations>
33
+
34
+ <dependencies>
35
+ <dependency org="com.google.guava" name="guava" rev="18.0" />
36
+
37
+ <dependency org="org.slf4j" name="slf4j-api" rev="1.7.5"/>
38
+ <dependency org="org.slf4j" name="slf4j-log4j12" rev="1.7.5" transitive="false"/>
39
+
40
+ <dependency org="log4j" name="log4j" rev="1.2.17" transitive="false"/>
41
+ <dependency org="junit" name="junit" rev="4.12" conf="test->default"/>
42
+ <dependency org="org.apache.rat" name="apache-rat-tasks" rev="0.6" conf="releaseaudit->default"/>
43
+ </dependencies>
44
+
45
+ </ivy-module>
local-test-zookeeper-delta-01/afc-zookeeper/zookeeper-contrib/zookeeper-contrib-zooinspector/zooInspector-dev.sh ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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/*:../../../build/*:../../../build/lib/*:lib org.apache.zookeeper.inspector.ZooInspector
local-test-zookeeper-delta-01/afc-zookeeper/zookeeper-contrib/zookeeper-contrib-zooinspector/zooInspector.cmd ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @echo off
2
+ @rem Licensed to the Apache Software Foundation (ASF) under one or more
3
+ @rem contributor license agreements. See the NOTICE file distributed with
4
+ @rem this work for additional information regarding copyright ownership.
5
+ @rem The ASF licenses this file to You under the Apache License, Version 2.0
6
+ @rem (the "License"); you may not use this file except in compliance with
7
+ @rem the License. You may obtain a copy of the License at
8
+ @rem
9
+ @rem http://www.apache.org/licenses/LICENSE-2.0
10
+ @rem
11
+ @rem Unless required by applicable law or agreed to in writing, software
12
+ @rem distributed under the License is distributed on an "AS IS" BASIS,
13
+ @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ @rem See the License for the specific language governing permissions and
15
+ @rem limitations under the License.
16
+
17
+ @rem Get the path to the directory containing this script
18
+ SET SCRIPT_DIR=%~dp0
19
+
20
+ @rem Get the path to the uber jar for this tool
21
+ @rem (Requires "mvn install" or "mvn package" be run first)
22
+ set JAVA_LIB=
23
+ for /F %%f in ('dir /b "%SCRIPT_DIR%\target\zookeeper-contrib-zooinspector-*-jar-with-dependencies.jar" 2^>nul') do (
24
+ set JAVA_LIB=%SCRIPT_DIR%target\%%f
25
+ )
26
+ java -jar %JAVA_LIB%
local-test-zookeeper-delta-01/afc-zookeeper/zookeeper-contrib/zookeeper-contrib-zooinspector/zooInspector.sh ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ # Get the path to the directory containing this script
19
+ SCRIPT_DIR=$(dirname "$0")
20
+
21
+ # Get the path to the uber jar for this tool
22
+ # (Requires "mvn install" or "mvn package" be run first)
23
+ JAVA_LIB=`ls ${SCRIPT_DIR}/target/zookeeper-contrib-zooinspector-*-jar-with-dependencies.jar`
24
+
25
+ java -jar "${JAVA_LIB}"