[zookeeper] 02/05: New upstream version 3.4.9
Emmanuel Bourg
ebourg-guest at moszumanska.debian.org
Fri Sep 16 13:18:47 UTC 2016
This is an automated email from the git hooks/post-receive script.
ebourg-guest pushed a commit to branch master
in repository zookeeper.
commit 62523d45b643fe8d1011f3db9799f3a842fda54e
Author: Emmanuel Bourg <ebourg at apache.org>
Date: Fri Sep 16 15:09:37 2016 +0200
New upstream version 3.4.9
---
CHANGES.txt | 67 +
NOTICE.txt | 2 +-
bin/zkCli.cmd | 48 +-
bin/zkEnv.cmd | 98 +-
bin/zkServer.cmd | 48 +-
build.xml | 16 +-
ivy.xml | 2 +-
.../{zookeeper_3.4.8.xml => zookeeper_3.4.9.xml} | 104 +-
src/NOTICE.txt | 2 +-
src/c/README | 7 +-
src/c/config.h.in | 3 +-
src/c/configure.ac | 2 +-
src/c/depcomp | 2 +-
src/c/include/winconfig.h | 6 +-
src/c/include/zookeeper_version.h | 2 +-
src/c/install-sh | 366 +--
src/c/missing | 2 +-
src/c/src/cli.c | 18 +-
src/c/src/zookeeper.c | 7 +-
src/c/zookeeper.sln | 50 +-
src/contrib/build-contrib.xml | 2 +-
src/contrib/zkperl/ZooKeeper.xs | 2 +-
src/contrib/zooinspector/zooInspector.cmd | 34 +-
src/docs/forrest.properties | 1 +
src/docs/src/documentation/conf/cli.xconf | 328 +++
.../documentation/content/xdocs/releasenotes.xml | 2875 --------------------
.../documentation/content/xdocs/zookeeperAdmin.xml | 158 +-
.../content/xdocs/zookeeperObservers.xml | 2 +-
.../content/xdocs/zookeeperProgrammers.xml | 36 +-
.../content/xdocs/zookeeperQuotas.xml | 3 +-
.../content/xdocs/zookeeperStarted.xml | 61 +-
.../{zookeeper_3.4.8.xml => zookeeper_3.4.9.xml} | 104 +-
src/java/main/org/apache/zookeeper/Login.java | 3 +-
.../zookeeper/client/ZooKeeperSaslClient.java | 22 +-
.../main/org/apache/zookeeper/server/DataTree.java | 163 +-
.../zookeeper/server/FinalRequestProcessor.java | 19 +-
.../zookeeper/server/PrepRequestProcessor.java | 4 +-
.../zookeeper/server/ReferenceCountedACLCache.java | 223 ++
.../apache/zookeeper/server/ServerCnxnFactory.java | 4 +
.../zookeeper/server/SyncRequestProcessor.java | 1 -
.../org/apache/zookeeper/server/ZKDatabase.java | 16 +-
.../apache/zookeeper/server/ZooKeeperServer.java | 84 +-
.../server/ZooKeeperServerListenerImpl.java | 45 +
.../zookeeper/server/ZooKeeperServerMain.java | 24 +-
.../server/ZooKeeperServerShutdownHandler.java} | 37 +-
.../zookeeper/server/persistence/FileTxnLog.java | 6 +-
.../apache/zookeeper/server/quorum/Follower.java | 4 +-
.../org/apache/zookeeper/server/quorum/Leader.java | 10 +
.../apache/zookeeper/server/quorum/Learner.java | 4 +
.../apache/zookeeper/server/quorum/Observer.java | 6 +-
.../server/quorum/ObserverZooKeeperServer.java | 2 +-
.../zookeeper/server/quorum/QuorumPeerConfig.java | 23 +-
.../server/quorum/QuorumZooKeeperServer.java | 5 +
.../server/quorum/ReadOnlyZooKeeperServer.java | 7 +-
.../zookeeper/server/upgrade/DataNodeV1.java | 2 +-
.../server/upgrade/UpgradeSnapShotV1.java | 2 +-
src/java/test/org/apache/zookeeper/ZKTestCase.java | 14 +
.../server/ReferenceCountedACLCacheTest.java | 260 ++
.../zookeeper/server/ZooKeeperServerMainTest.java | 62 +
.../server/quorum/QuorumPeerMainTest.java | 129 +
.../server/quorum/QuorumPeerTestBase.java | 5 +
.../test/org/apache/zookeeper/test/ClientBase.java | 4 +-
.../apache/zookeeper/test/ClientPortBindTest.java | 8 +-
.../test/org/apache/zookeeper/test/ClientTest.java | 14 +-
.../zookeeper/test/NonRecoverableErrorTest.java | 183 ++
src/lastRevision.bat | 46 +-
zookeeper-3.4.8.jar.asc | 17 -
zookeeper-3.4.8.jar.md5 | 1 -
zookeeper-3.4.8.jar.sha1 | 1 -
zookeeper-3.4.9.jar.asc | 17 +
zookeeper-3.4.9.jar.md5 | 1 +
zookeeper-3.4.9.jar.sha1 | 1 +
72 files changed, 2231 insertions(+), 3706 deletions(-)
diff --git a/CHANGES.txt b/CHANGES.txt
index d952c0d..40e0428 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,68 @@
+Release 3.4.9 - 2016-08-23
+
+Backward compatible changes:
+
+BUGFIXES:
+
+ ZOOKEEPER-2375: Prevent multiple initialization of login object in each
+ ZooKeeperSaslClient instance (yuemeng via rakeshr)
+
+ ZOOKEEPER-2379: recent commit broke findbugs qabot check
+ (rakeshr via cnauroth)
+
+ ZOOKEEPER-2294 Ant target generate-clover-reports is broken
+ (charlie via phunt)
+
+ ZOOKEEPER-2378 upgrade ivy to recent version (phunt)
+
+ ZOOKEEPER-2373 Licenses section missing from pom file (phunt)
+
+ ZOOKEEPER-2133 zkperl: Segmentation fault if getting a node with
+ null value (Botond Hejj via phunt)
+
+ ZOOKEEPER-2283 traceFile property is not used in the ZooKeeper, it
+ should be removed from documentation (Arshad Mohammad via phunt)
+
+ ZOOKEEPER-2385 Zookeeper trunk build is failing on windows
+ (Arshad Mohammad via phunt)
+
+ ZOOKEEPER-2195 fsync.warningthresholdms in zoo.cfg not working
+ (Biju Nair via phunt)
+
+ ZOOKEEPER-2141 ACL cache in DataTree never removes entries
+ (Adam Milne-Smith via camille)
+
+ ZOOKEEPER-2423: Upgrade Netty version due to security vulnerability
+ (CVE-2014-3488) (Michael Han via phunt)
+
+ ZOOKEEPER-2405: getTGT() in Login.java mishandles confidential
+ information (Michael Han via phunt)
+
+ ZOOKEEPER-2477: documentation should refer to Java cli shell and not
+ C cli shell (Abraham Fine via phunt)
+
+ ZOOKEEPER-1256: ClientPortBindTest is failing on Mac OS X
+ (Camille via phunt)
+
+ ZOOKEEPER-2498: Potential resource leak in C client when processing
+ unexpected / out of order response (Michael Han via rgs)
+
+ Fix command handling in the C client shell (phunt via fpj)
+
+ ZOOKEEPER-2452: Back-port ZOOKEEPER-1460 to 3.4 for IPv6 literal
+ address support. (Abraham Fine via cnauroth)
+
+ ZOOKEEPER-2247: Zookeeper service becomes unavailable when leader
+ fails to write transaction log (Rakesh via fpj)
+
+IMPROVEMENTS:
+
+ ZOOKEEPER-2240 Make the three-node minimum more explicit in
+ documentation and on website (Shawn Heisey and Arshad Mohammad via phunt)
+
+ ZOOKEEPER-2514: Simplify releasenotes creation for 3.4 branch -
+ consistent with newer branches. (phunt via cnauroth)
+
Release 3.4.8 - 2016-02-05
Backward compatible changes:
@@ -31,6 +96,8 @@ BUGFIXES:
ZOOKEEPER-2360: Update commons collections version used by tests/releaseaudit
(phunt via cnauroth)
+ ZOOKEEPER-2243: Supported platforms is completely out of date (cnauroth)
+
Release 3.4.7 - 2015-11-08
Backward compatible changes:
diff --git a/NOTICE.txt b/NOTICE.txt
index d0446a6..7e4c7de 100644
--- a/NOTICE.txt
+++ b/NOTICE.txt
@@ -1,5 +1,5 @@
Apache ZooKeeper
-Copyright 2009-2015 The Apache Software Foundation
+Copyright 2009-2016 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
diff --git a/bin/zkCli.cmd b/bin/zkCli.cmd
index 2feb815..0ffa030 100755
--- a/bin/zkCli.cmd
+++ b/bin/zkCli.cmd
@@ -1,24 +1,24 @@
- at echo off
-REM Licensed to the Apache Software Foundation (ASF) under one or more
-REM contributor license agreements. See the NOTICE file distributed with
-REM this work for additional information regarding copyright ownership.
-REM The ASF licenses this file to You under the Apache License, Version 2.0
-REM (the "License"); you may not use this file except in compliance with
-REM the License. You may obtain a copy of the License at
-REM
-REM http://www.apache.org/licenses/LICENSE-2.0
-REM
-REM Unless required by applicable law or agreed to in writing, software
-REM distributed under the License is distributed on an "AS IS" BASIS,
-REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-REM See the License for the specific language governing permissions and
-REM limitations under the License.
-
-setlocal
-call "%~dp0zkEnv.cmd"
-
-set ZOOMAIN=org.apache.zookeeper.ZooKeeperMain
-call %JAVA% "-Dzookeeper.log.dir=%ZOO_LOG_DIR%" "-Dzookeeper.root.logger=%ZOO_LOG4J_PROP%" -cp "%CLASSPATH%" %ZOOMAIN% %*
-
-endlocal
-
+ at echo off
+REM Licensed to the Apache Software Foundation (ASF) under one or more
+REM contributor license agreements. See the NOTICE file distributed with
+REM this work for additional information regarding copyright ownership.
+REM The ASF licenses this file to You under the Apache License, Version 2.0
+REM (the "License"); you may not use this file except in compliance with
+REM the License. You may obtain a copy of the License at
+REM
+REM http://www.apache.org/licenses/LICENSE-2.0
+REM
+REM Unless required by applicable law or agreed to in writing, software
+REM distributed under the License is distributed on an "AS IS" BASIS,
+REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+REM See the License for the specific language governing permissions and
+REM limitations under the License.
+
+setlocal
+call "%~dp0zkEnv.cmd"
+
+set ZOOMAIN=org.apache.zookeeper.ZooKeeperMain
+call %JAVA% "-Dzookeeper.log.dir=%ZOO_LOG_DIR%" "-Dzookeeper.root.logger=%ZOO_LOG4J_PROP%" -cp "%CLASSPATH%" %ZOOMAIN% %*
+
+endlocal
+
diff --git a/bin/zkEnv.cmd b/bin/zkEnv.cmd
index 3f74683..41eed11 100755
--- a/bin/zkEnv.cmd
+++ b/bin/zkEnv.cmd
@@ -1,49 +1,49 @@
- at echo off
-REM Licensed to the Apache Software Foundation (ASF) under one or more
-REM contributor license agreements. See the NOTICE file distributed with
-REM this work for additional information regarding copyright ownership.
-REM The ASF licenses this file to You under the Apache License, Version 2.0
-REM (the "License"); you may not use this file except in compliance with
-REM the License. You may obtain a copy of the License at
-REM
-REM http://www.apache.org/licenses/LICENSE-2.0
-REM
-REM Unless required by applicable law or agreed to in writing, software
-REM distributed under the License is distributed on an "AS IS" BASIS,
-REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-REM See the License for the specific language governing permissions and
-REM limitations under the License.
-
-set ZOOCFGDIR=%~dp0%..\conf
-set ZOO_LOG_DIR=%~dp0%..
-set ZOO_LOG4J_PROP=INFO,CONSOLE
-
-REM for sanity sake assume Java 1.6
-REM see: http://java.sun.com/javase/6/docs/technotes/tools/windows/java.html
-
-REM add the zoocfg dir to classpath
-set CLASSPATH=%ZOOCFGDIR%
-
-REM make it work in the release
-SET CLASSPATH=%~dp0..\*;%~dp0..\lib\*;%CLASSPATH%
-
-REM make it work for developers
-SET CLASSPATH=%~dp0..\build\classes;%~dp0..\build\lib\*;%CLASSPATH%
-
-set ZOOCFG=%ZOOCFGDIR%\zoo.cfg
-
- at REM setup java environment variables
-
-if not defined JAVA_HOME (
- echo Error: JAVA_HOME is not set.
- goto :eof
-)
-
-set JAVA_HOME=%JAVA_HOME:"=%
-
-if not exist "%JAVA_HOME%"\bin\java.exe (
- echo Error: JAVA_HOME is incorrectly set.
- goto :eof
-)
-
-set JAVA="%JAVA_HOME%"\bin\java
+ at echo off
+REM Licensed to the Apache Software Foundation (ASF) under one or more
+REM contributor license agreements. See the NOTICE file distributed with
+REM this work for additional information regarding copyright ownership.
+REM The ASF licenses this file to You under the Apache License, Version 2.0
+REM (the "License"); you may not use this file except in compliance with
+REM the License. You may obtain a copy of the License at
+REM
+REM http://www.apache.org/licenses/LICENSE-2.0
+REM
+REM Unless required by applicable law or agreed to in writing, software
+REM distributed under the License is distributed on an "AS IS" BASIS,
+REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+REM See the License for the specific language governing permissions and
+REM limitations under the License.
+
+set ZOOCFGDIR=%~dp0%..\conf
+set ZOO_LOG_DIR=%~dp0%..
+set ZOO_LOG4J_PROP=INFO,CONSOLE
+
+REM for sanity sake assume Java 1.6
+REM see: http://java.sun.com/javase/6/docs/technotes/tools/windows/java.html
+
+REM add the zoocfg dir to classpath
+set CLASSPATH=%ZOOCFGDIR%
+
+REM make it work in the release
+SET CLASSPATH=%~dp0..\*;%~dp0..\lib\*;%CLASSPATH%
+
+REM make it work for developers
+SET CLASSPATH=%~dp0..\build\classes;%~dp0..\build\lib\*;%CLASSPATH%
+
+set ZOOCFG=%ZOOCFGDIR%\zoo.cfg
+
+ at REM setup java environment variables
+
+if not defined JAVA_HOME (
+ echo Error: JAVA_HOME is not set.
+ goto :eof
+)
+
+set JAVA_HOME=%JAVA_HOME:"=%
+
+if not exist "%JAVA_HOME%"\bin\java.exe (
+ echo Error: JAVA_HOME is incorrectly set.
+ goto :eof
+)
+
+set JAVA="%JAVA_HOME%"\bin\java
diff --git a/bin/zkServer.cmd b/bin/zkServer.cmd
index 5bca840..6b4cf02 100755
--- a/bin/zkServer.cmd
+++ b/bin/zkServer.cmd
@@ -1,24 +1,24 @@
- at echo off
-REM Licensed to the Apache Software Foundation (ASF) under one or more
-REM contributor license agreements. See the NOTICE file distributed with
-REM this work for additional information regarding copyright ownership.
-REM The ASF licenses this file to You under the Apache License, Version 2.0
-REM (the "License"); you may not use this file except in compliance with
-REM the License. You may obtain a copy of the License at
-REM
-REM http://www.apache.org/licenses/LICENSE-2.0
-REM
-REM Unless required by applicable law or agreed to in writing, software
-REM distributed under the License is distributed on an "AS IS" BASIS,
-REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-REM See the License for the specific language governing permissions and
-REM limitations under the License.
-
-setlocal
-call "%~dp0zkEnv.cmd"
-
-set ZOOMAIN=org.apache.zookeeper.server.quorum.QuorumPeerMain
-echo on
-call %JAVA% "-Dzookeeper.log.dir=%ZOO_LOG_DIR%" "-Dzookeeper.root.logger=%ZOO_LOG4J_PROP%" -cp "%CLASSPATH%" %ZOOMAIN% "%ZOOCFG%" %*
-
-endlocal
+ at echo off
+REM Licensed to the Apache Software Foundation (ASF) under one or more
+REM contributor license agreements. See the NOTICE file distributed with
+REM this work for additional information regarding copyright ownership.
+REM The ASF licenses this file to You under the Apache License, Version 2.0
+REM (the "License"); you may not use this file except in compliance with
+REM the License. You may obtain a copy of the License at
+REM
+REM http://www.apache.org/licenses/LICENSE-2.0
+REM
+REM Unless required by applicable law or agreed to in writing, software
+REM distributed under the License is distributed on an "AS IS" BASIS,
+REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+REM See the License for the specific language governing permissions and
+REM limitations under the License.
+
+setlocal
+call "%~dp0zkEnv.cmd"
+
+set ZOOMAIN=org.apache.zookeeper.server.quorum.QuorumPeerMain
+echo on
+call %JAVA% "-Dzookeeper.log.dir=%ZOO_LOG_DIR%" "-Dzookeeper.root.logger=%ZOO_LOG4J_PROP%" -cp "%CLASSPATH%" %ZOOMAIN% "%ZOOCFG%" %*
+
+endlocal
diff --git a/build.xml b/build.xml
index 8d5573e..8562000 100644
--- a/build.xml
+++ b/build.xml
@@ -30,7 +30,7 @@ xmlns:maven="antlib:org.apache.maven.artifact.ant">
<property environment="env"/>
- <property name="version" value="3.4.8" />
+ <property name="version" value="3.4.9" />
<property name="final.name" value="${name}-${version}"/>
<property name="revision.dir" value="${basedir}/.revision" />
<property name="revision.properties" value="revision.properties" />
@@ -105,7 +105,7 @@ xmlns:maven="antlib:org.apache.maven.artifact.ant">
<property name="contrib.dir" value="${src.dir}/contrib"/>
<property name="recipes.dir" value="${src.dir}/recipes"/>
- <property name="ivy.version" value="2.2.0"/>
+ <property name="ivy.version" value="2.4.0"/>
<property name="ivy.url"
value="http://repo2.maven.org/maven2/org/apache/ivy/ivy" />
<property name="ivy.home" value="${user.home}/.ant" />
@@ -723,7 +723,8 @@ xmlns:maven="antlib:org.apache.maven.artifact.ant">
<checksum file="${dist.maven.dir}/${final.name}-javadoc.jar" algorithm="sha1"/>
<ivy:makepom settingsRef="${ant.project.name}" ivyfile="${basedir}/ivy.xml"
- pomfile="${dist.maven.dir}/${final.name}.pom">
+ pomfile="${dist.maven.dir}/${final.name}.pom"
+ templatefile="${basedir}/src/pom.template">
<mapping conf="default" scope="compile"/>
<mapping conf="test" scope="test"/>
</ivy:makepom>
@@ -830,7 +831,8 @@ xmlns:maven="antlib:org.apache.maven.artifact.ant">
<checksum file="${dist.maven.dir}/${final.name}-javadoc.jar" algorithm="sha1"/>
<ivy:makepom settingsRef="${ant.project.name}" ivyfile="${basedir}/ivy.xml"
- pomfile="${dist.maven.dir}/${name}.pom">
+ pomfile="${dist.maven.dir}/${name}.pom"
+ templatefile="${basedir}/src/pom.template">
<mapping conf="default" scope="compile"/>
<mapping conf="test" scope="test"/>
</ivy:makepom>
@@ -1454,12 +1456,14 @@ xmlns:maven="antlib:org.apache.maven.artifact.ant">
<target name="generate-clover-reports" depends="clover.check, clover">
<mkdir dir="${clover.report.dir}"/>
- <clover-report>
+ <taskdef resource="cloverlib.xml" classpath="${clover.jar}"/>
+
+ <clover-report initString="${clover.db.dir}/zookeeper_coverage.db">
<current outfile="${clover.report.dir}" title="${final.name}">
<format type="html"/>
</current>
</clover-report>
- <clover-report>
+ <clover-report initString="${clover.db.dir}/zookeeper_coverage.db">
<current outfile="${clover.report.dir}/clover.xml" title="${final.name}">
<format type="xml"/>
</current>
diff --git a/ivy.xml b/ivy.xml
index 1cb39cc..95b0e5a 100644
--- a/ivy.xml
+++ b/ivy.xml
@@ -49,7 +49,7 @@
<dependency org="log4j" name="log4j" rev="1.2.16" transitive="false" conf="default"/>
<dependency org="jline" name="jline" rev="0.9.94" transitive="false" conf="default"/>
- <dependency org="io.netty" name="netty" conf="default" rev="3.7.0.Final">
+ <dependency org="io.netty" name="netty" conf="default" rev="3.10.5.Final">
<artifact name="netty" type="jar" conf="default"/>
</dependency>
diff --git a/lib/jdiff/zookeeper_3.4.8.xml b/lib/jdiff/zookeeper_3.4.9.xml
similarity index 97%
rename from lib/jdiff/zookeeper_3.4.8.xml
rename to lib/jdiff/zookeeper_3.4.9.xml
index d787780..85f5d4e 100644
--- a/lib/jdiff/zookeeper_3.4.8.xml
+++ b/lib/jdiff/zookeeper_3.4.9.xml
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<!-- Generated by the JDiff Javadoc doclet -->
<!-- (http://www.jdiff.org) -->
-<!-- on Fri Feb 05 19:46:20 PST 2016 -->
+<!-- on Tue Aug 23 13:09:29 IST 2016 -->
<api
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:noNamespaceSchemaLocation='api.xsd'
- name="zookeeper 3.4.8"
+ name="zookeeper 3.4.9"
jdversion="1.0.9">
-<!-- Command line arguments = -doclet jdiff.JDiff -docletpath /home/rgs/src/zookeeper-svn/build/jdiff/lib/jdiff-1.0.9.jar:/home/rgs/src/zookeeper-svn/build/jdiff/lib/xerces-1.4.4.jar -classpath /home/rgs/src/zookeeper-svn/build/classes:/home/rgs/src/zookeeper-svn/src/java/lib/ivy-2.2.0.jar:/home/rgs/src/zookeeper-svn/build/lib/jline-0.9.94.jar:/home/rgs/src/zookeeper-svn/build/lib/log4j-1.2.16.jar:/home/rgs/src/zookeeper-svn/build/lib/netty-3.7.0.Final.jar:/home/rgs/src/zookeeper-svn/b [...]
+<!-- Command line arguments = -doclet jdiff.JDiff -docletpath /home/sunil/Rakesh/ZKRelease/branch-3.4/build/jdiff/lib/jdiff-1.0.9.jar:/home/sunil/Rakesh/ZKRelease/branch-3.4/build/jdiff/lib/xerces-1.4.4.jar -classpath /home/sunil/Rakesh/ZKRelease/branch-3.4/build/classes:/home/sunil/Rakesh/ZKRelease/branch-3.4/src/java/lib/ivy-2.4.0.jar:/home/sunil/Rakesh/ZKRelease/branch-3.4/build/lib/jline-0.9.94.jar:/home/sunil/Rakesh/ZKRelease/branch-3.4/build/lib/log4j-1.2.16.jar:/home/sunil/Rakes [...]
<package name="org.apache.zookeeper">
<!-- start interface org.apache.zookeeper.AsyncCallback -->
<interface name="AsyncCallback" abstract="true"
@@ -30,7 +30,7 @@
deprecated="not deprecated">
<implements name="org.apache.zookeeper.AsyncCallback"/>
<method name="processResult"
- abstract="true" native="false" synchronized="false"
+ abstract="false" native="false" synchronized="false"
static="false" final="false" visibility="public"
deprecated="not deprecated">
<param name="rc" type="int"/>
@@ -74,7 +74,7 @@
deprecated="not deprecated">
<implements name="org.apache.zookeeper.AsyncCallback"/>
<method name="processResult"
- abstract="true" native="false" synchronized="false"
+ abstract="false" native="false" synchronized="false"
static="false" final="false" visibility="public"
deprecated="not deprecated">
<param name="rc" type="int"/>
@@ -107,7 +107,7 @@
deprecated="not deprecated">
<implements name="org.apache.zookeeper.AsyncCallback"/>
<method name="processResult"
- abstract="true" native="false" synchronized="false"
+ abstract="false" native="false" synchronized="false"
static="false" final="false" visibility="public"
deprecated="not deprecated">
<param name="rc" type="int"/>
@@ -148,7 +148,7 @@
deprecated="not deprecated">
<implements name="org.apache.zookeeper.AsyncCallback"/>
<method name="processResult"
- abstract="true" native="false" synchronized="false"
+ abstract="false" native="false" synchronized="false"
static="false" final="false" visibility="public"
deprecated="not deprecated">
<param name="rc" type="int"/>
@@ -192,7 +192,7 @@
deprecated="not deprecated">
<implements name="org.apache.zookeeper.AsyncCallback"/>
<method name="processResult"
- abstract="true" native="false" synchronized="false"
+ abstract="false" native="false" synchronized="false"
static="false" final="false" visibility="public"
deprecated="not deprecated">
<param name="rc" type="int"/>
@@ -238,7 +238,7 @@
deprecated="not deprecated">
<implements name="org.apache.zookeeper.AsyncCallback"/>
<method name="processResult"
- abstract="true" native="false" synchronized="false"
+ abstract="false" native="false" synchronized="false"
static="false" final="false" visibility="public"
deprecated="not deprecated">
<param name="rc" type="int"/>
@@ -284,7 +284,7 @@
deprecated="not deprecated">
<implements name="org.apache.zookeeper.AsyncCallback"/>
<method name="processResult"
- abstract="true" native="false" synchronized="false"
+ abstract="false" native="false" synchronized="false"
static="false" final="false" visibility="public"
deprecated="not deprecated">
<param name="rc" type="int"/>
@@ -336,7 +336,7 @@
deprecated="not deprecated">
<implements name="org.apache.zookeeper.AsyncCallback"/>
<method name="processResult"
- abstract="true" native="false" synchronized="false"
+ abstract="false" native="false" synchronized="false"
static="false" final="false" visibility="public"
deprecated="not deprecated">
<param name="rc" type="int"/>
@@ -582,7 +582,7 @@
static="false" final="false" visibility="public"
deprecated="not deprecated">
<method name="materialize" return="java.util.Set"
- abstract="true" native="false" synchronized="false"
+ abstract="false" native="false" synchronized="false"
static="false" final="false" visibility="public"
deprecated="not deprecated">
<param name="state" type="org.apache.zookeeper.Watcher.Event.KeeperState"/>
@@ -719,7 +719,7 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="Entry" type="java.lang.String, java.lang.String"
+ <constructor name="Environment.Entry" type="java.lang.String, java.lang.String"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -877,7 +877,7 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="APIErrorException"
+ <constructor name="KeeperException.APIErrorException"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -891,7 +891,7 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="AuthFailedException"
+ <constructor name="KeeperException.AuthFailedException"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -905,11 +905,11 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="BadArgumentsException"
+ <constructor name="KeeperException.BadArgumentsException"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
- <constructor name="BadArgumentsException" type="java.lang.String"
+ <constructor name="KeeperException.BadArgumentsException" type="java.lang.String"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -923,11 +923,11 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="BadVersionException"
+ <constructor name="KeeperException.BadVersionException"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
- <constructor name="BadVersionException" type="java.lang.String"
+ <constructor name="KeeperException.BadVersionException" type="java.lang.String"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -1369,7 +1369,7 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="ConnectionLossException"
+ <constructor name="KeeperException.ConnectionLossException"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -1383,7 +1383,7 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="DataInconsistencyException"
+ <constructor name="KeeperException.DataInconsistencyException"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -1397,11 +1397,11 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="InvalidACLException"
+ <constructor name="KeeperException.InvalidACLException"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
- <constructor name="InvalidACLException" type="java.lang.String"
+ <constructor name="KeeperException.InvalidACLException" type="java.lang.String"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -1415,7 +1415,7 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="InvalidCallbackException"
+ <constructor name="KeeperException.InvalidCallbackException"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -1429,7 +1429,7 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="MarshallingErrorException"
+ <constructor name="KeeperException.MarshallingErrorException"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -1443,7 +1443,7 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="NoAuthException"
+ <constructor name="KeeperException.NoAuthException"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -1457,11 +1457,11 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="NoChildrenForEphemeralsException"
+ <constructor name="KeeperException.NoChildrenForEphemeralsException"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
- <constructor name="NoChildrenForEphemeralsException" type="java.lang.String"
+ <constructor name="KeeperException.NoChildrenForEphemeralsException" type="java.lang.String"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -1475,11 +1475,11 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="NodeExistsException"
+ <constructor name="KeeperException.NodeExistsException"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
- <constructor name="NodeExistsException" type="java.lang.String"
+ <constructor name="KeeperException.NodeExistsException" type="java.lang.String"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -1493,11 +1493,11 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="NoNodeException"
+ <constructor name="KeeperException.NoNodeException"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
- <constructor name="NoNodeException" type="java.lang.String"
+ <constructor name="KeeperException.NoNodeException" type="java.lang.String"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -1511,11 +1511,11 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="NotEmptyException"
+ <constructor name="KeeperException.NotEmptyException"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
- <constructor name="NotEmptyException" type="java.lang.String"
+ <constructor name="KeeperException.NotEmptyException" type="java.lang.String"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -1529,7 +1529,7 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="NotReadOnlyException"
+ <constructor name="KeeperException.NotReadOnlyException"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -1543,7 +1543,7 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="OperationTimeoutException"
+ <constructor name="KeeperException.OperationTimeoutException"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -1557,7 +1557,7 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="RuntimeInconsistencyException"
+ <constructor name="KeeperException.RuntimeInconsistencyException"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -1571,7 +1571,7 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="SessionExpiredException"
+ <constructor name="KeeperException.SessionExpiredException"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -1585,7 +1585,7 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="SessionMovedException"
+ <constructor name="KeeperException.SessionMovedException"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -1599,7 +1599,7 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="SystemErrorException"
+ <constructor name="KeeperException.SystemErrorException"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -1613,7 +1613,7 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="UnimplementedException"
+ <constructor name="KeeperException.UnimplementedException"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -2073,7 +2073,7 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="CheckResult"
+ <constructor name="OpResult.CheckResult"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -2098,7 +2098,7 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="CreateResult" type="java.lang.String"
+ <constructor name="OpResult.CreateResult" type="java.lang.String"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -2130,7 +2130,7 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="DeleteResult"
+ <constructor name="OpResult.DeleteResult"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -2155,7 +2155,7 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="ErrorResult" type="int"
+ <constructor name="OpResult.ErrorResult" type="int"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -2187,7 +2187,7 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="SetDataResult" type="org.apache.zookeeper.data.Stat"
+ <constructor name="OpResult.SetDataResult" type="org.apache.zookeeper.data.Stat"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -2600,7 +2600,7 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="ExitCodeException" type="int, java.lang.String"
+ <constructor name="Shell.ExitCodeException" type="int, java.lang.String"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -2619,19 +2619,19 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="ShellCommandExecutor" type="java.lang.String[]"
+ <constructor name="Shell.ShellCommandExecutor" type="java.lang.String[]"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
- <constructor name="ShellCommandExecutor" type="java.lang.String[], java.io.File"
+ <constructor name="Shell.ShellCommandExecutor" type="java.lang.String[], java.io.File"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
- <constructor name="ShellCommandExecutor" type="java.lang.String[], java.io.File, java.util.Map"
+ <constructor name="Shell.ShellCommandExecutor" type="java.lang.String[], java.io.File, java.util.Map"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
- <constructor name="ShellCommandExecutor" type="java.lang.String[], java.io.File, java.util.Map, long"
+ <constructor name="Shell.ShellCommandExecutor" type="java.lang.String[], java.io.File, java.util.Map, long"
static="false" final="false" visibility="public"
deprecated="not deprecated">
<doc>
@@ -2958,7 +2958,7 @@
static="false" final="false" visibility="public"
deprecated="not deprecated">
<method name="process"
- abstract="true" native="false" synchronized="false"
+ abstract="false" native="false" synchronized="false"
static="false" final="false" visibility="public"
deprecated="not deprecated">
<param name="event" type="org.apache.zookeeper.WatchedEvent"/>
diff --git a/src/NOTICE.txt b/src/NOTICE.txt
index d0446a6..7e4c7de 100644
--- a/src/NOTICE.txt
+++ b/src/NOTICE.txt
@@ -1,5 +1,5 @@
Apache ZooKeeper
-Copyright 2009-2015 The Apache Software Foundation
+Copyright 2009-2016 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
diff --git a/src/c/README b/src/c/README
index 0b31d0a..ea3d5d3 100644
--- a/src/c/README
+++ b/src/c/README
@@ -72,7 +72,12 @@ tar downloaded from Apache please skip to step 2.
other document formats please use "./configure --help"
-USING THE CLIENT
+EXAMPLE/SAMPLE C CLIENT SHELL
+
+NOTE: the ZooKeeper C client shell (cli_st and cli_mt) is meant as a
+example/sample of ZooKeeper C client API usage. It is not a full
+fledged client and not meant for production usage - see the Java
+client shell for a fully featured shell.
You can test your client by running a zookeeper server (see
instructions on the project wiki page on how to run it) and connecting
diff --git a/src/c/config.h.in b/src/c/config.h.in
index 9cf0df6..3b4d161 100644
--- a/src/c/config.h.in
+++ b/src/c/config.h.in
@@ -102,7 +102,8 @@
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
-/* Define to the sub-directory where libtool stores uninstalled libraries. */
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
#undef LT_OBJDIR
/* Name of package */
diff --git a/src/c/configure.ac b/src/c/configure.ac
index 83c6652..be00af9 100644
--- a/src/c/configure.ac
+++ b/src/c/configure.ac
@@ -3,7 +3,7 @@
AC_PREREQ(2.59)
-AC_INIT([zookeeper C client],3.4.8,[user at zookeeper.apache.org],[zookeeper])
+AC_INIT([zookeeper C client],3.4.9,[user at zookeeper.apache.org],[zookeeper])
AC_CONFIG_SRCDIR([src/zookeeper.c])
# Save initial CFLAGS and CXXFLAGS values before AC_PROG_CC and AC_PROG_CXX
diff --git a/src/c/depcomp b/src/c/depcomp
index fc98710..4ebd5b3 100755
--- a/src/c/depcomp
+++ b/src/c/depcomp
@@ -3,7 +3,7 @@
scriptversion=2013-05-30.07; # UTC
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/src/c/include/winconfig.h b/src/c/include/winconfig.h
index 06c377e..ce42b26 100644
--- a/src/c/include/winconfig.h
+++ b/src/c/include/winconfig.h
@@ -117,7 +117,7 @@
#define PACKAGE_NAME "zookeeper C client"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "zookeeper C client 3.4.8 win32"
+#define PACKAGE_STRING "zookeeper C client 3.4.9 win32"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "c-client-src"
@@ -126,7 +126,7 @@
#define PACKAGE_URL ""
/* Define to the version of this package. */
-#define PACKAGE_VERSION "3.4.8"
+#define PACKAGE_VERSION "3.4.9"
/* poll() second argument type */
#define POLL_NFDS_TYPE
@@ -138,7 +138,7 @@
#define TIME_WITH_SYS_TIME
/* Version number of package */
-#define VERSION "3.4.8"
+#define VERSION "3.4.9"
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
diff --git a/src/c/include/zookeeper_version.h b/src/c/include/zookeeper_version.h
index 92eee13..57790c4 100644
--- a/src/c/include/zookeeper_version.h
+++ b/src/c/include/zookeeper_version.h
@@ -24,7 +24,7 @@ extern "C" {
#define ZOO_MAJOR_VERSION 3
#define ZOO_MINOR_VERSION 4
-#define ZOO_PATCH_VERSION 8
+#define ZOO_PATCH_VERSION 9
#ifdef __cplusplus
}
diff --git a/src/c/install-sh b/src/c/install-sh
index 0b0fdcb..377bb86 100755
--- a/src/c/install-sh
+++ b/src/c/install-sh
@@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
-scriptversion=2013-12-25.23; # UTC
+scriptversion=2011-11-20.07; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@@ -41,15 +41,19 @@ scriptversion=2013-12-25.23; # UTC
# This script is compatible with the BSD install script, but was written
# from scratch.
-tab=' '
nl='
'
-IFS=" $tab$nl"
+IFS=" "" $nl"
-# Set DOITPROG to "echo" to test this script.
+# set DOITPROG to echo to test this script
+# Don't use :- since 4.3BSD and earlier shells don't like it.
doit=${DOITPROG-}
-doit_exec=${doit:-exec}
+if test -z "$doit"; then
+ doit_exec=exec
+else
+ doit_exec=$doit
+fi
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
@@ -64,6 +68,17 @@ mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}
+posix_glob='?'
+initialize_posix_glob='
+ test "$posix_glob" != "?" || {
+ if (set -f) 2>/dev/null; then
+ posix_glob=
+ else
+ posix_glob=:
+ fi
+ }
+'
+
posix_mkdir=
# Desired mode of installed file.
@@ -82,7 +97,7 @@ dir_arg=
dst_arg=
copy_on_change=false
-is_target_a_directory=possibly
+no_target_directory=
usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
@@ -122,57 +137,46 @@ while test $# -ne 0; do
-d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2"
- shift;;
+ shift;;
--help) echo "$usage"; exit $?;;
-m) mode=$2
- case $mode in
- *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
- echo "$0: invalid mode: $mode" >&2
- exit 1;;
- esac
- shift;;
+ case $mode in
+ *' '* | *' '* | *'
+'* | *'*'* | *'?'* | *'['*)
+ echo "$0: invalid mode: $mode" >&2
+ exit 1;;
+ esac
+ shift;;
-o) chowncmd="$chownprog $2"
- shift;;
+ shift;;
-s) stripcmd=$stripprog;;
- -t)
- is_target_a_directory=always
- dst_arg=$2
- # Protect names problematic for 'test' and other utilities.
- case $dst_arg in
- -* | [=\(\)!]) dst_arg=./$dst_arg;;
- esac
- shift;;
+ -t) dst_arg=$2
+ # Protect names problematic for 'test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
+ shift;;
- -T) is_target_a_directory=never;;
+ -T) no_target_directory=true;;
--version) echo "$0 $scriptversion"; exit $?;;
- --) shift
- break;;
+ --) shift
+ break;;
- -*) echo "$0: invalid option: $1" >&2
- exit 1;;
+ -*) echo "$0: invalid option: $1" >&2
+ exit 1;;
*) break;;
esac
shift
done
-# We allow the use of options -d and -T together, by making -d
-# take the precedence; this is for compatibility with GNU install.
-
-if test -n "$dir_arg"; then
- if test -n "$dst_arg"; then
- echo "$0: target directory not allowed when installing a directory." >&2
- exit 1
- fi
-fi
-
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
@@ -204,15 +208,6 @@ if test $# -eq 0; then
fi
if test -z "$dir_arg"; then
- if test $# -gt 1 || test "$is_target_a_directory" = always; then
- if test ! -d "$dst_arg"; then
- echo "$0: $dst_arg: Is not a directory." >&2
- exit 1
- fi
- fi
-fi
-
-if test -z "$dir_arg"; then
do_exit='(exit $ret); exit $ret'
trap "ret=129; $do_exit" 1
trap "ret=130; $do_exit" 2
@@ -228,16 +223,16 @@ if test -z "$dir_arg"; then
*[0-7])
if test -z "$stripcmd"; then
- u_plus_rw=
+ u_plus_rw=
else
- u_plus_rw='% 200'
+ u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
- u_plus_rw=
+ u_plus_rw=
else
- u_plus_rw=,u+rw
+ u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
@@ -274,15 +269,41 @@ do
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
if test -d "$dst"; then
- if test "$is_target_a_directory" = never; then
- echo "$0: $dst_arg: Is a directory" >&2
- exit 1
+ if test -n "$no_target_directory"; then
+ echo "$0: $dst_arg: Is a directory" >&2
+ exit 1
fi
dstdir=$dst
dst=$dstdir/`basename "$src"`
dstdir_status=0
else
- dstdir=`dirname "$dst"`
+ # Prefer dirname, but fall back on a substitute if dirname fails.
+ dstdir=`
+ (dirname "$dst") 2>/dev/null ||
+ expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$dst" : 'X\(//\)[^/]' \| \
+ X"$dst" : 'X\(//\)$' \| \
+ X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+ echo X"$dst" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'
+ `
+
test -d "$dstdir"
dstdir_status=$?
fi
@@ -293,74 +314,74 @@ do
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
- # Create intermediate dirs using mode 755 as modified by the umask.
- # This is like FreeBSD 'install' as of 1997-10-28.
- umask=`umask`
- case $stripcmd.$umask in
- # Optimize common cases.
- *[2367][2367]) mkdir_umask=$umask;;
- .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
-
- *[0-7])
- mkdir_umask=`expr $umask + 22 \
- - $umask % 100 % 40 + $umask % 20 \
- - $umask % 10 % 4 + $umask % 2
- `;;
- *) mkdir_umask=$umask,go-w;;
- esac
-
- # With -d, create the new directory with the user-specified mode.
- # Otherwise, rely on $mkdir_umask.
- if test -n "$dir_arg"; then
- mkdir_mode=-m$mode
- else
- mkdir_mode=
- fi
-
- posix_mkdir=false
- case $umask in
- *[123567][0-7][0-7])
- # POSIX mkdir -p sets u+wx bits regardless of umask, which
- # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
- ;;
- *)
- tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
- trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
-
- if (umask $mkdir_umask &&
- exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
- then
- if test -z "$dir_arg" || {
- # Check for POSIX incompatibilities with -m.
- # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
- # other-writable bit of parent directory when it shouldn't.
- # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
- ls_ld_tmpdir=`ls -ld "$tmpdir"`
- case $ls_ld_tmpdir in
- d????-?r-*) different_mode=700;;
- d????-?--*) different_mode=755;;
- *) false;;
- esac &&
- $mkdirprog -m$different_mode -p -- "$tmpdir" && {
- ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
- test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
- }
- }
- then posix_mkdir=:
- fi
- rmdir "$tmpdir/d" "$tmpdir"
- else
- # Remove any dirs left behind by ancient mkdir implementations.
- rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
- fi
- trap '' 0;;
- esac;;
+ # Create intermediate dirs using mode 755 as modified by the umask.
+ # This is like FreeBSD 'install' as of 1997-10-28.
+ umask=`umask`
+ case $stripcmd.$umask in
+ # Optimize common cases.
+ *[2367][2367]) mkdir_umask=$umask;;
+ .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+ *[0-7])
+ mkdir_umask=`expr $umask + 22 \
+ - $umask % 100 % 40 + $umask % 20 \
+ - $umask % 10 % 4 + $umask % 2
+ `;;
+ *) mkdir_umask=$umask,go-w;;
+ esac
+
+ # With -d, create the new directory with the user-specified mode.
+ # Otherwise, rely on $mkdir_umask.
+ if test -n "$dir_arg"; then
+ mkdir_mode=-m$mode
+ else
+ mkdir_mode=
+ fi
+
+ posix_mkdir=false
+ case $umask in
+ *[123567][0-7][0-7])
+ # POSIX mkdir -p sets u+wx bits regardless of umask, which
+ # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+ ;;
+ *)
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+ if (umask $mkdir_umask &&
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+ then
+ if test -z "$dir_arg" || {
+ # Check for POSIX incompatibilities with -m.
+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+ # other-writable bit of parent directory when it shouldn't.
+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+ ls_ld_tmpdir=`ls -ld "$tmpdir"`
+ case $ls_ld_tmpdir in
+ d????-?r-*) different_mode=700;;
+ d????-?--*) different_mode=755;;
+ *) false;;
+ esac &&
+ $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+ ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+ }
+ }
+ then posix_mkdir=:
+ fi
+ rmdir "$tmpdir/d" "$tmpdir"
+ else
+ # Remove any dirs left behind by ancient mkdir implementations.
+ rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+ fi
+ trap '' 0;;
+ esac;;
esac
if
$posix_mkdir && (
- umask $mkdir_umask &&
- $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+ umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
@@ -370,51 +391,53 @@ do
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
- /*) prefix='/';;
- [-=\(\)!]*) prefix='./';;
- *) prefix='';;
+ /*) prefix='/';;
+ [-=\(\)!]*) prefix='./';;
+ *) prefix='';;
esac
+ eval "$initialize_posix_glob"
+
oIFS=$IFS
IFS=/
- set -f
+ $posix_glob set -f
set fnord $dstdir
shift
- set +f
+ $posix_glob set +f
IFS=$oIFS
prefixes=
for d
do
- test X"$d" = X && continue
-
- prefix=$prefix$d
- if test -d "$prefix"; then
- prefixes=
- else
- if $posix_mkdir; then
- (umask=$mkdir_umask &&
- $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
- # Don't fail if two instances are running concurrently.
- test -d "$prefix" || exit 1
- else
- case $prefix in
- *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
- *) qprefix=$prefix;;
- esac
- prefixes="$prefixes '$qprefix'"
- fi
- fi
- prefix=$prefix/
+ test X"$d" = X && continue
+
+ prefix=$prefix$d
+ if test -d "$prefix"; then
+ prefixes=
+ else
+ if $posix_mkdir; then
+ (umask=$mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+ # Don't fail if two instances are running concurrently.
+ test -d "$prefix" || exit 1
+ else
+ case $prefix in
+ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) qprefix=$prefix;;
+ esac
+ prefixes="$prefixes '$qprefix'"
+ fi
+ fi
+ prefix=$prefix/
done
if test -n "$prefixes"; then
- # Don't fail if two instances are running concurrently.
- (umask $mkdir_umask &&
- eval "\$doit_exec \$mkdirprog $prefixes") ||
- test -d "$dstdir" || exit 1
- obsolete_mkdir_used=true
+ # Don't fail if two instances are running concurrently.
+ (umask $mkdir_umask &&
+ eval "\$doit_exec \$mkdirprog $prefixes") ||
+ test -d "$dstdir" || exit 1
+ obsolete_mkdir_used=true
fi
fi
fi
@@ -449,12 +472,15 @@ do
# If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change &&
- old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
- new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
- set -f &&
+ old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
+ new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+
+ eval "$initialize_posix_glob" &&
+ $posix_glob set -f &&
set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 &&
- set +f &&
+ $posix_glob set +f &&
+
test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then
@@ -467,24 +493,24 @@ do
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
{
- # Now remove or move aside any old file at destination location.
- # We try this two ways since rm can't unlink itself on some
- # systems and the destination file might be busy for other
- # reasons. In this case, the final cleanup might fail but the new
- # file should still install successfully.
- {
- test ! -f "$dst" ||
- $doit $rmcmd -f "$dst" 2>/dev/null ||
- { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
- { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
- } ||
- { echo "$0: cannot unlink or rename $dst" >&2
- (exit 1); exit 1
- }
- } &&
-
- # Now rename the file to the real destination.
- $doit $mvcmd "$dsttmp" "$dst"
+ # Now remove or move aside any old file at destination location.
+ # We try this two ways since rm can't unlink itself on some
+ # systems and the destination file might be busy for other
+ # reasons. In this case, the final cleanup might fail but the new
+ # file should still install successfully.
+ {
+ test ! -f "$dst" ||
+ $doit $rmcmd -f "$dst" 2>/dev/null ||
+ { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+ { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+ } ||
+ { echo "$0: cannot unlink or rename $dst" >&2
+ (exit 1); exit 1
+ }
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dst"
}
fi || exit 1
diff --git a/src/c/missing b/src/c/missing
index f62bbae..db98974 100755
--- a/src/c/missing
+++ b/src/c/missing
@@ -3,7 +3,7 @@
scriptversion=2013-10-28.13; # UTC
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
# Originally written by Fran,cois Pinard <pinard at iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
diff --git a/src/c/src/cli.c b/src/c/src/cli.c
index 7b3cd61..ef32a10 100644
--- a/src/c/src/cli.c
+++ b/src/c/src/cli.c
@@ -16,6 +16,14 @@
* limitations under the License.
*/
+/**
+ * cli.c is a example/sample C client shell for ZooKeeper. It contains
+ * basic shell functionality which exercises some of the features of
+ * the ZooKeeper C client API. It is not a full fledged client and is
+ * not meant for production usage - see the Java client shell for a
+ * fully featured shell.
+ */
+
#include <zookeeper.h>
#include <proto.h>
#include <stdlib.h>
@@ -540,7 +548,15 @@ int main(int argc, char **argv) {
}
if (argc > 2) {
if(strncmp("cmd:",argv[2],4)==0){
- strcpy(cmd,argv[2]+4);
+ size_t cmdlen = strlen(argv[2]);
+ if (cmdlen > sizeof(cmd)) {
+ fprintf(stderr,
+ "Command length %zu exceeds max length of %zu\n",
+ cmdlen,
+ sizeof(cmd));
+ return 2;
+ }
+ strncpy(cmd, argv[2]+4, sizeof(cmd));
batchMode=1;
fprintf(stderr,"Batch mode: %s\n",cmd);
}else{
diff --git a/src/c/src/zookeeper.c b/src/c/src/zookeeper.c
index 1ba90af..e9d462e 100644
--- a/src/c/src/zookeeper.c
+++ b/src/c/src/zookeeper.c
@@ -2276,9 +2276,10 @@ int zookeeper_process(zhandle_t *zh, int events)
// put the completion back on the queue (so it gets properly
// signaled and deallocated) and disconnect from the server
queue_completion(&zh->sent_requests,cptr,1);
- return handle_socket_error_msg(zh, __LINE__,ZRUNTIMEINCONSISTENCY,
- "unexpected server response: expected %#x, but received %#x",
- hdr.xid,cptr->xid);
+ return api_epilog(zh,
+ handle_socket_error_msg(zh, __LINE__,ZRUNTIMEINCONSISTENCY,
+ "unexpected server response: expected %#x, but received %#x",
+ hdr.xid,cptr->xid));
}
activateWatcher(zh, cptr->watcher, rc);
diff --git a/src/c/zookeeper.sln b/src/c/zookeeper.sln
index bdf869f..42f41c9 100644
--- a/src/c/zookeeper.sln
+++ b/src/c/zookeeper.sln
@@ -1,25 +1,25 @@
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zookeeper", "zookeeper.vcproj", "{5754FB2B-5EA5-4988-851D-908CA533A626}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Cli", "Cli.vcproj", "{050228F9-070F-4806-A2B5-E6B95D8EC4AF}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {5754FB2B-5EA5-4988-851D-908CA533A626}.Debug|Win32.ActiveCfg = Debug|Win32
- {5754FB2B-5EA5-4988-851D-908CA533A626}.Debug|Win32.Build.0 = Debug|Win32
- {5754FB2B-5EA5-4988-851D-908CA533A626}.Release|Win32.ActiveCfg = Release|Win32
- {5754FB2B-5EA5-4988-851D-908CA533A626}.Release|Win32.Build.0 = Release|Win32
- {050228F9-070F-4806-A2B5-E6B95D8EC4AF}.Debug|Win32.ActiveCfg = Debug|Win32
- {050228F9-070F-4806-A2B5-E6B95D8EC4AF}.Debug|Win32.Build.0 = Debug|Win32
- {050228F9-070F-4806-A2B5-E6B95D8EC4AF}.Release|Win32.ActiveCfg = Release|Win32
- {050228F9-070F-4806-A2B5-E6B95D8EC4AF}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zookeeper", "zookeeper.vcproj", "{5754FB2B-5EA5-4988-851D-908CA533A626}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Cli", "Cli.vcproj", "{050228F9-070F-4806-A2B5-E6B95D8EC4AF}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {5754FB2B-5EA5-4988-851D-908CA533A626}.Debug|Win32.ActiveCfg = Debug|Win32
+ {5754FB2B-5EA5-4988-851D-908CA533A626}.Debug|Win32.Build.0 = Debug|Win32
+ {5754FB2B-5EA5-4988-851D-908CA533A626}.Release|Win32.ActiveCfg = Release|Win32
+ {5754FB2B-5EA5-4988-851D-908CA533A626}.Release|Win32.Build.0 = Release|Win32
+ {050228F9-070F-4806-A2B5-E6B95D8EC4AF}.Debug|Win32.ActiveCfg = Debug|Win32
+ {050228F9-070F-4806-A2B5-E6B95D8EC4AF}.Debug|Win32.Build.0 = Debug|Win32
+ {050228F9-070F-4806-A2B5-E6B95D8EC4AF}.Release|Win32.ActiveCfg = Release|Win32
+ {050228F9-070F-4806-A2B5-E6B95D8EC4AF}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/src/contrib/build-contrib.xml b/src/contrib/build-contrib.xml
index 0e57d08..fab8a5f 100644
--- a/src/contrib/build-contrib.xml
+++ b/src/contrib/build-contrib.xml
@@ -41,7 +41,7 @@
<property name="build.encoding" value="ISO-8859-1"/>
- <property name="ivy.version" value="2.2.0"/>
+ <property name="ivy.version" value="2.4.0"/>
<property name="ivy.url"
value="http://repo2.maven.org/maven2/org/apache/ivy/ivy" />
<property name="ivy.home" value="${user.home}/.ant" />
diff --git a/src/contrib/zkperl/ZooKeeper.xs b/src/contrib/zkperl/ZooKeeper.xs
index f65e076..4b6067b 100644
--- a/src/contrib/zkperl/ZooKeeper.xs
+++ b/src/contrib/zkperl/ZooKeeper.xs
@@ -1713,7 +1713,7 @@ zk_get(zkh, path, ...)
old_watch, new_watch);
}
- if (ret == ZOK) {
+ if (ret == ZOK && buf_len != -1) {
ST(0) = sv_newmortal();
#ifdef SV_HAS_TRAILING_NUL
buf[buf_len] = '\0';
diff --git a/src/contrib/zooinspector/zooInspector.cmd b/src/contrib/zooinspector/zooInspector.cmd
index 0b298a2..4fa3ab2 100644
--- a/src/contrib/zooinspector/zooInspector.cmd
+++ b/src/contrib/zooinspector/zooInspector.cmd
@@ -1,18 +1,18 @@
-#!/bin/sh
-
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
+#!/bin/sh
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
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
\ No newline at end of file
diff --git a/src/docs/forrest.properties b/src/docs/forrest.properties
index 16e4f9f..70cf81d 100644
--- a/src/docs/forrest.properties
+++ b/src/docs/forrest.properties
@@ -45,6 +45,7 @@
#project.status=status.xml
#project.content-dir=src/documentation
+project.configfile=${project.home}/src/documentation/conf/cli.xconf
#project.raw-content-dir=${project.content-dir}/content
#project.conf-dir=${project.content-dir}/conf
#project.sitemap-dir=${project.content-dir}
diff --git a/src/docs/src/documentation/conf/cli.xconf b/src/docs/src/documentation/conf/cli.xconf
new file mode 100644
index 0000000..99eedf5
--- /dev/null
+++ b/src/docs/src/documentation/conf/cli.xconf
@@ -0,0 +1,328 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!--+
+ | This is the Apache Cocoon command line configuration file.
+ | Here you give the command line interface details of where
+ | to find various aspects of your Cocoon installation.
+ |
+ | If you wish, you can also use this file to specify the URIs
+ | that you wish to generate.
+ |
+ | The current configuration information in this file is for
+ | building the Cocoon documentation. Therefore, all links here
+ | are relative to the build context dir, which, in the build.xml
+ | file, is set to ${build.context}
+ |
+ | Options:
+ | verbose: increase amount of information presented
+ | to standard output (default: false)
+ | follow-links: whether linked pages should also be
+ | generated (default: true)
+ | precompile-only: precompile sitemaps and XSP pages, but
+ | do not generate any pages (default: false)
+ | confirm-extensions: check the mime type for the generated page
+ | and adjust filename and links extensions
+ | to match the mime type
+ | (e.g. text/html->.html)
+ |
+ | Note: Whilst using an xconf file to configure the Cocoon
+ | Command Line gives access to more features, the use of
+ | command line parameters is more stable, as there are
+ | currently plans to improve the xconf format to allow
+ | greater flexibility. If you require a stable and
+ | consistent method for accessing the CLI, it is recommended
+ | that you use the command line parameters to configure
+ | the CLI. See documentation at:
+ | http://cocoon.apache.org/2.1/userdocs/offline/
+ | http://wiki.apache.org/cocoon/CommandLine
+ |
+ +-->
+
+<cocoon verbose="true"
+ follow-links="true"
+ precompile-only="false"
+ confirm-extensions="false">
+
+ <!--+
+ | The context directory is usually the webapp directory
+ | containing the sitemap.xmap file.
+ |
+ | The config file is the cocoon.xconf file.
+ |
+ | The work directory is used by Cocoon to store temporary
+ | files and cache files.
+ |
+ | The destination directory is where generated pages will
+ | be written (assuming the 'simple' mapper is used, see
+ | below)
+ +-->
+ <context-dir>.</context-dir>
+ <config-file>WEB-INF/cocoon.xconf</config-file>
+ <work-dir>../tmp/cocoon-work</work-dir>
+ <dest-dir>../site</dest-dir>
+
+ <!--+
+ | A checksum file can be used to store checksums for pages
+ | as they are generated. When the site is next generated,
+ | files will not be written if their checksum has not changed.
+ | This means that it will be easier to detect which files
+ | need to be uploaded to a server, using the timestamp.
+ |
+ | The default path is relative to the core webapp directory.
+ | An asolute path can be used.
+ +-->
+ <!-- <checksums-uri>build/work/checksums</checksums-uri>-->
+
+ <!--+
+ | Broken link reporting options:
+ | Report into a text file, one link per line:
+ | <broken-links type="text" report="filename"/>
+ | Report into an XML file:
+ | <broken-links type="xml" report="filename"/>
+ | Ignore broken links (default):
+ | <broken-links type="none"/>
+ |
+ | Two attributes to this node specify whether a page should
+ | be generated when an error has occured. 'generate' specifies
+ | whether a page should be generated (default: true) and
+ | extension specifies an extension that should be appended
+ | to the generated page's filename (default: none)
+ |
+ | Using this, a quick scan through the destination directory
+ | will show broken links, by their filename extension.
+ +-->
+ <broken-links type="xml"
+ file="../brokenlinks.xml"
+ generate="false"
+ extension=".error"
+ show-referrers="true"/>
+
+ <!--+
+ | Load classes at startup. This is necessary for generating
+ | from sites that use SQL databases and JDBC.
+ | The <load-class> element can be repeated if multiple classes
+ | are needed.
+ +-->
+ <!--
+ <load-class>org.firebirdsql.jdbc.Driver</load-class>
+ -->
+
+ <!--+
+ | Configures logging.
+ | The 'log-kit' parameter specifies the location of the log kit
+ | configuration file (usually called logkit.xconf.
+ |
+ | Logger specifies the logging category (for all logging prior
+ | to other Cocoon logging categories taking over)
+ |
+ | Available log levels are:
+ | DEBUG: prints all level of log messages.
+ | INFO: prints all level of log messages except DEBUG
+ | ones.
+ | WARN: prints all level of log messages except DEBUG
+ | and INFO ones.
+ | ERROR: prints all level of log messages except DEBUG,
+ | INFO and WARN ones.
+ | FATAL_ERROR: prints only log messages of this level
+ +-->
+ <!-- <logging log-kit="WEB-INF/logkit.xconf" logger="cli" level="ERROR" /> -->
+
+ <!--+
+ | Specifies the filename to be appended to URIs that
+ | refer to a directory (i.e. end with a forward slash).
+ +-->
+ <default-filename>index.html</default-filename>
+
+ <!--+
+ | Specifies a user agent string to the sitemap when
+ | generating the site.
+ |
+ | A generic term for a web browser is "user agent". Any
+ | user agent, when connecting to a web server, will provide
+ | a string to identify itself (e.g. as Internet Explorer or
+ | Mozilla). It is possible to have Cocoon serve different
+ | content depending upon the user agent string provided by
+ | the browser. If your site does this, then you may want to
+ | use this <user-agent> entry to provide a 'fake' user agent
+ | to Cocoon, so that it generates the correct version of your
+ | site.
+ |
+ | For most sites, this can be ignored.
+ +-->
+ <!--
+ <user-agent>Cocoon Command Line Environment 2.1</user-agent>
+ -->
+
+ <!--+
+ | Specifies an accept string to the sitemap when generating
+ | the site.
+ | User agents can specify to an HTTP server what types of content
+ | (by mime-type) they are able to receive. E.g. a browser may be
+ | able to handle jpegs, but not pngs. The HTTP accept header
+ | allows the server to take the browser's capabilities into account,
+ | and only send back content that it can handle.
+ |
+ | For most sites, this can be ignored.
+ +-->
+
+ <accept>*/*</accept>
+
+ <!--+
+ | Specifies which URIs should be included or excluded, according
+ | to wildcard patterns.
+ |
+ | These includes/excludes are only relevant when you are following
+ | links. A link URI must match an include pattern (if one is given)
+ | and not match an exclude pattern, if it is to be followed by
+ | Cocoon. It can be useful, for example, where there are links in
+ | your site to pages that are not generated by Cocoon, such as
+ | references to api-documentation.
+ |
+ | By default, all URIs are included. If both include and exclude
+ | patterns are specified, a URI is first checked against the
+ | include patterns, and then against the exclude patterns.
+ |
+ | Multiple patterns can be given, using muliple include or exclude
+ | nodes.
+ |
+ | The order of the elements is not significant, as only the first
+ | successful match of each category is used.
+ |
+ | Currently, only the complete source URI can be matched (including
+ | any URI prefix). Future plans include destination URI matching
+ | and regexp matching. If you have requirements for these, contact
+ | dev at cocoon.apache.org.
+ +-->
+
+ <exclude pattern="**/"/>
+ <exclude pattern="**apidocs**"/>
+ <exclude pattern="api/**"/>
+
+ <!-- ZOOKEEPER-2364 - we build our own release notes separately -->
+ <exclude pattern="releasenotes.**"/>
+
+<!--
+ This is a workaround for FOR-284 "link rewriting broken when
+ linking to xml source views which contain site: links".
+ See the explanation there and in declare-broken-site-links.xsl
+-->
+ <exclude pattern="site:**"/>
+ <exclude pattern="ext:**"/>
+ <exclude pattern="lm:**"/>
+ <exclude pattern="**/site:**"/>
+ <exclude pattern="**/ext:**"/>
+ <exclude pattern="**/lm:**"/>
+
+ <!-- Exclude tokens used in URLs to ASF mirrors (interpreted by a CGI) -->
+ <exclude pattern="[preferred]/**"/>
+ <exclude pattern="[location]"/>
+
+ <!-- <include-links extension=".html"/>-->
+
+ <!--+
+ | <uri> nodes specify the URIs that should be generated, and
+ | where required, what should be done with the generated pages.
+ | They describe the way the URI of the generated file is created
+ | from the source page's URI. There are three ways that a generated
+ | file URI can be created: append, replace and insert.
+ |
+ | The "type" attribute specifies one of (append|replace|insert):
+ |
+ | append:
+ | Append the generated page's URI to the end of the source URI:
+ |
+ | <uri type="append" src-prefix="documents/" src="index.html"
+ | dest="build/dest/"/>
+ |
+ | This means that
+ | (1) the "documents/index.html" page is generated
+ | (2) the file will be written to "build/dest/documents/index.html"
+ |
+ | replace:
+ | Completely ignore the generated page's URI - just
+ | use the destination URI:
+ |
+ | <uri type="replace" src-prefix="documents/" src="index.html"
+ | dest="build/dest/docs.html"/>
+ |
+ | This means that
+ | (1) the "documents/index.html" page is generated
+ | (2) the result is written to "build/dest/docs.html"
+ | (3) this works only for "single" pages - and not when links
+ | are followed
+ |
+ | insert:
+ | Insert generated page's URI into the destination
+ | URI at the point marked with a * (example uses fictional
+ | zip protocol)
+ |
+ | <uri type="insert" src-prefix="documents/" src="index.html"
+ | dest="zip://*.zip/page.html"/>
+ |
+ | This means that
+ | (1)
+ |
+ | In any of these scenarios, if the dest attribute is omitted,
+ | the value provided globally using the <dest-dir> node will
+ | be used instead.
+ +-->
+ <!--
+ <uri type="replace"
+ src-prefix="samples/"
+ src="hello-world/hello.html"
+ dest="build/dest/hello-world.html"/>
+ -->
+
+ <!--+
+ | <uri> nodes can be grouped together in a <uris> node. This
+ | enables a group of URIs to share properties. The following
+ | properties can be set for a group of URIs:
+ | * follow-links: should pages be crawled for links
+ | * confirm-extensions: should file extensions be checked
+ | for the correct mime type
+ | * src-prefix: all source URIs should be
+ | pre-pended with this prefix before
+ | generation. The prefix is not
+ | included when calculating the
+ | destination URI
+ | * dest: the base destination URI to be
+ | shared by all pages in this group
+ | * type: the method to be used to calculate
+ | the destination URI. See above
+ | section on <uri> node for details.
+ |
+ | Each <uris> node can have a name attribute. When a name
+ | attribute has been specified, the -n switch on the command
+ | line can be used to tell Cocoon to only process the URIs
+ | within this URI group. When no -n switch is given, all
+ | <uris> nodes are processed. Thus, one xconf file can be
+ | used to manage multiple sites.
+ +-->
+ <!--
+ <uris name="mirrors" follow-links="false">
+ <uri type="append" src="mirrors.html"/>
+ </uris>
+ -->
+
+ <!--+
+ | File containing URIs (plain text, one per line).
+ +-->
+ <!--
+ <uri-file>uris.txt</uri-file>
+ -->
+</cocoon>
diff --git a/src/docs/src/documentation/content/xdocs/releasenotes.xml b/src/docs/src/documentation/content/xdocs/releasenotes.xml
deleted file mode 100644
index 08257e3..0000000
--- a/src/docs/src/documentation/content/xdocs/releasenotes.xml
+++ /dev/null
@@ -1,2875 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2002-2004 The Apache Software Foundation
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<!DOCTYPE article PUBLIC "-//OASIS//DTD Simplified DocBook XML V1.0//EN"
-"http://www.oasis-open.org/docbook/xml/simple/1.0/sdocbook.dtd">
-<article id="ar_ReleaseNotes">
- <title>ZooKeeper 3.4.5 Release Notes</title>
-
- <articleinfo>
- <legalnotice>
- <para>Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License. You may
- obtain a copy of the License at <ulink
- url="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</ulink>.</para>
-
- <para>Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an "AS IS"
- BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied. See the License for the specific language governing permissions
- and limitations under the License.</para>
- </legalnotice>
- </articleinfo>
-
-<para>
-These release notes include new developer and user facing incompatibilities, features, and major improvements.
-</para>
-
-<itemizedlist>
- <listitem><para><ulink url="#changes">Changes</ulink></para></listitem>
-</itemizedlist>
-<section id="rchanges">
-<title>Changes Since 3.4.4</title>
-<table>
-<title>Changes Since ZooKeeper 3.4.4</title>
-<tgroup cols='2'>
-<colspec colname='c1'/><colspec colname='c2'/>
-<thead>
-<row>
- <entry>Issue</entry>
- <entry>Notes</entry>
-</row>
-</thead>
-<tbody>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1550">
- ZOOKEEPER-1550</ulink>
- </entry>
- <entry>
-ZooKeeperSaslClient does not finish anonymous login on OpenJDK
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1376">
- ZOOKEEPER-1376</ulink>
- </entry>
- <entry>
-zkServer.sh does not correctly check for $SERVER_JVMFLAGS
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1560">
- ZOOKEEPER-1560</ulink>
- </entry>
- <entry>
-Zookeeper client hangs on creation of large nodes
-</entry>
-</row>
-
-</tbody>
-</tgroup>
-</table>
-</section>
-<section id="nchanges">
-<title>Changes Since 3.4.3</title>
-<table>
-<title>Changes Since ZooKeeper 3.4.3</title>
-<tgroup cols='2'>
-<colspec colname='c1'/><colspec colname='c2'/>
-<thead>
-<row>
- <entry>Issue</entry>
- <entry>Notes</entry>
-</row>
-</thead>
-<tbody>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1496">
- ZOOKEEPER-1496</ulink>
- </entry>
- <entry>
-Ephemeral node not getting cleared even after client has exited
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1048">
- ZOOKEEPER-1048</ulink>
- </entry>
- <entry>
-addauth command does not work in cli_mt/cli_st
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1163">
- ZOOKEEPER-1163</ulink>
- </entry>
- <entry>
-Memory leak in zk_hashtable.c:do_insert_watcher_object()
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1210">
- ZOOKEEPER-1210</ulink>
- </entry>
- <entry>
-Can't build ZooKeeper RPM with RPM >
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1236">
- ZOOKEEPER-1236</ulink>
- </entry>
- <entry>
-Security uses proprietary Sun APIs
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1256">
- ZOOKEEPER-1256</ulink>
- </entry>
- <entry>
-ClientPortBindTest is failing on Mac OS X
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1277">
- ZOOKEEPER-1277</ulink>
- </entry>
- <entry>
-servers stop serving when lower 32bits of zxid roll over
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1307">
- ZOOKEEPER-1307</ulink>
- </entry>
- <entry>
-zkCli.sh is exiting when an Invalid ACL exception is thrown from setACL command through client
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1318">
- ZOOKEEPER-1318</ulink>
- </entry>
- <entry>
-In Python binding, get_children (and get and exists, and probably others) with expired session doesn't raise exception properly
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1339">
- ZOOKEEPER-1339</ulink>
- </entry>
- <entry>
-C clien doesn't build with --enable-debug
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1344">
- ZOOKEEPER-1344</ulink>
- </entry>
- <entry>
-ZooKeeper client multi-update command is not considering the Chroot request
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1354">
- ZOOKEEPER-1354</ulink>
- </entry>
- <entry>
-AuthTest.testBadAuthThenSendOtherCommands fails intermittently
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1361">
- ZOOKEEPER-1361</ulink>
- </entry>
- <entry>
-Leader.lead iterates over 'learners' set without proper synchronisation
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1380">
- ZOOKEEPER-1380</ulink>
- </entry>
- <entry>
-zkperl: _zk_release_watch doesn't remove items properly from the watch list
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1384">
- ZOOKEEPER-1384</ulink>
- </entry>
- <entry>
-test-cppunit overrides LD_LIBRARY_PATH and fails if gcc is in non-standard location
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1386">
- ZOOKEEPER-1386</ulink>
- </entry>
- <entry>
-avoid flaky URL redirection in "ant javadoc" : replace "http://java.sun.com/javase/6/docs/api/" with "http://download.oracle.com/javase/6/docs/api/"
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1395">
- ZOOKEEPER-1395</ulink>
- </entry>
- <entry>
-node-watcher double-free redux
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1403">
- ZOOKEEPER-1403</ulink>
- </entry>
- <entry>
-zkCli.sh script quoting issue
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1406">
- ZOOKEEPER-1406</ulink>
- </entry>
- <entry>
-dpkg init scripts don't restart - missing check_priv_sep_dir
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1412">
- ZOOKEEPER-1412</ulink>
- </entry>
- <entry>
-java client watches inconsistently triggered on reconnect
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1419">
- ZOOKEEPER-1419</ulink>
- </entry>
- <entry>
-Leader election never settles for a 5-node cluster
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1427">
- ZOOKEEPER-1427</ulink>
- </entry>
- <entry>
-Writing to local files is done non-atomically
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1431">
- ZOOKEEPER-1431</ulink>
- </entry>
- <entry>
-zkpython: async calls leak memory
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1437">
- ZOOKEEPER-1437</ulink>
- </entry>
- <entry>
-Client uses session before SASL authentication complete
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1463">
- ZOOKEEPER-1463</ulink>
- </entry>
- <entry>
-external inline function is not compatible with C99
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1465">
- ZOOKEEPER-1465</ulink>
- </entry>
- <entry>
-Cluster availability following new leader election takes a long time with large datasets - is correlated to dataset size
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1466">
- ZOOKEEPER-1466</ulink>
- </entry>
- <entry>
-QuorumCnxManager.shutdown missing synchronization
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1471">
- ZOOKEEPER-1471</ulink>
- </entry>
- <entry>
-Jute generates invalid C++ code
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1480">
- ZOOKEEPER-1480</ulink>
- </entry>
- <entry>
-ClientCnxn(1161) can't get the current zk server add, so that - Session 0x for server null, unexpected error
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1483">
- ZOOKEEPER-1483</ulink>
- </entry>
- <entry>
-Fix leader election recipe documentation
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1489">
- ZOOKEEPER-1489</ulink>
- </entry>
- <entry>
-Data loss after truncate on transaction log
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1490">
- ZOOKEEPER-1490</ulink>
- </entry>
- <entry>
-If the configured log directory does not exist zookeeper will not start. Better to create the directory and start
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1493">
- ZOOKEEPER-1493</ulink>
- </entry>
- <entry>
-C Client: zookeeper_process doesn't invoke completion callback if zookeeper_close has been called
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1494">
- ZOOKEEPER-1494</ulink>
- </entry>
- <entry>
-C client: socket leak after receive timeout in zookeeper_interest()
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1496">
- ZOOKEEPER-1496</ulink>
- </entry>
- <entry>
-Ephemeral node not getting cleared even after client has exited
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1501">
- ZOOKEEPER-1501</ulink>
- </entry>
- <entry>
-Nagios plugin always returns OK when it cannot connect to zookeeper
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1514">
- ZOOKEEPER-1514</ulink>
- </entry>
- <entry>
-FastLeaderElection - leader ignores the round information when joining a quorum
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1521">
- ZOOKEEPER-1521</ulink>
- </entry>
- <entry>
-LearnerHandler initLimit/syncLimit problems specifying follower socket timeout limits
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1522">
- ZOOKEEPER-1522</ulink>
- </entry>
- <entry>
-intermittent failures in Zab test due to NPE in recursiveDelete test function
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1536">
- ZOOKEEPER-1536</ulink>
- </entry>
- <entry>
-c client : memory leak in winport.c
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1321">
- ZOOKEEPER-1321</ulink>
- </entry>
- <entry>
-Add number of client connections metric in JMX and srvr
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1377">
- ZOOKEEPER-1377</ulink>
- </entry>
- <entry>
-add support for dumping a snapshot file content (similar to LogFormatter)
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1389">
- ZOOKEEPER-1389</ulink>
- </entry>
- <entry>
-it would be nice if start-foreground used exec $JAVA in order to get rid of the intermediate shell process
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1390">
- ZOOKEEPER-1390</ulink>
- </entry>
- <entry>
-some expensive debug code not protected by a check for debug
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1433">
- ZOOKEEPER-1433</ulink>
- </entry>
- <entry>
-improve ZxidRolloverTest (test seems flakey)
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1454">
- ZOOKEEPER-1454</ulink>
- </entry>
- <entry>
-Document how to run autoreconf if cppunit is installed in a non-standard directory
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1481">
- ZOOKEEPER-1481</ulink>
- </entry>
- <entry>
-allow the C cli to run exists with a watcher
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1497">
- ZOOKEEPER-1497</ulink>
- </entry>
- <entry>
-Allow server-side SASL login with JAAS configuration to be programmatically set (rather than only by reading JAAS configuration file)
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1503">
- ZOOKEEPER-1503</ulink>
- </entry>
- <entry>
-remove redundant JAAS configuration code in SaslAuthTest and SaslAuthFailTest
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1510">
- ZOOKEEPER-1510</ulink>
- </entry>
- <entry>
-Should not log SASL errors for non-secure usage
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1450">
- ZOOKEEPER-1450</ulink>
- </entry>
- <entry>
-Backport ZOOKEEPER-1294 fix to 3.4 and 3.3
-</entry>
-</row>
-</tbody>
-</tgroup>
-</table>
-</section>
-
-<section id="changes">
-<title>Changes Since ZooKeeper 3.4.2</title>
-
-<table>
-<title>Changes Since ZooKeeper 3.4.2</title>
-<tgroup cols='2'>
-<colspec colname='c1'/><colspec colname='c2'/>
-<thead>
-<row>
- <entry>Issue</entry>
- <entry>Notes</entry>
-</row>
-</thead>
-<tbody>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1089">
- ZOOKEEPER-1089</ulink>
- </entry>
-<entry>
-zkServer.sh status does not work due to invalid option of nc.
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1345">
- ZOOKEEPER-1345</ulink>
- </entry>
-<entry>
-Add a .gitignore file with general exclusions and Eclipse project files excluded.
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1343">
- ZOOKEEPER-1343</ulink>
- </entry>
-<entry>
-getEpochToPropose should check if lastAcceptedEpoch is greater or equal than epoch.
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-850">
- ZOOKEEPER-850</ulink>
- </entry>
-<entry>
- replaces log4j with slf4j code (also in contrib for bookkeeper, zooinspector,
- rest,loggraph), added slf4j dependencies into several ivy.xml files.
- You must add slf4j-api-1.6.1.jar and slf4j-log4j12-1.6.1.jar (bridge from sl4j
- to log4j) to the classpath, if not using the standard scripts.
- log4j remains as the final logger yet, there is still work to do:
- remove programmatic access to the log4j api from certain classes
- (which add appenders or configure log4j at runtime), or move them to contrib
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1358">
- ZOOKEEPER-1358</ulink>
- </entry>
-<entry>
-In StaticHostProviderTest.java, testNextDoesNotSleepForZero tests that hostProvider.next(0)
- doesn't sleep by checking that the latency of this call is less than 10sec
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1351">
- ZOOKEEPER-1351</ulink>
- </entry>
-<entry>
-Invalid test verification in MultiTransactionTest.
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-973">
- ZOOKEEPER-973</ulink>
- </entry>
-<entry>
-bind() could fail on Leader because it does not setReuseAddress on its ServerSocket.
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1367">
- ZOOKEEPER-1367</ulink>
- </entry>
-<entry>
- Data inconsistencies and unexpired ephemeral nodes after cluster restart.
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1353">
- ZOOKEEPER-1353</ulink>
- </entry>
-<entry>
- C client test suite fails consistently.
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1373">
- ZOOKEEPER-1373</ulink>
- </entry>
-<entry>
- Hardcoded SASL login context name clashes with Hadoop security
- configuration override.
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1352">
- ZOOKEEPER-1352</ulink>
- </entry>
-<entry>
- server.InvalidSnapshotTest is using connection timeouts that
- are too short.
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1336">
- ZOOKEEPER-1336</ulink>
- </entry>
-<entry>
- javadoc for multi is confusing, references functionality that doesn't
- seem to exis
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1340">
- ZOOKEEPER-1340</ulink>
- </entry>
-<entry>
- multi problem - typical user operations are
- generating ERROR level messages in the server.
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1374">
- ZOOKEEPER-1374</ulink>
- </entry>
-<entry>
- C client multi-threaded test suite fails to compile on ARM architectures.
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1337">
- ZOOKEEPER-1337</ulink>
- </entry>
-<entry>
- multi's "Transaction" class is missing tests.
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1338">
- ZOOKEEPER-1338</ulink>
- </entry>
-<entry>
- class cast exceptions may be thrown by multi ErrorResult class (invalid equals)
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1322">
- ZOOKEEPER-1322</ulink>
- </entry>
-<entry>
-Cleanup/fix logging in Quorum code.
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1327">
- ZOOKEEPER-1327</ulink>
- </entry>
-<entry>
-There are still remnants of hadoop urls.
-</entry>
-</row>
-</tbody>
-</tgroup>
-</table>
-</section>
-
-<section id="changes_3.4.1">
-<title>Changes Since ZooKeeper 3.4.1</title>
-
-<table>
-<title>Changes Since ZooKeeper 3.4.1</title>
-<tgroup cols='2'>
-<colspec colname='c1'/><colspec colname='c2'/>
-<thead>
-<row>
- <entry>Issue</entry>
- <entry>Notes</entry>
-</row>
-</thead>
-<tbody>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1333">
- ZOOKEEPER-1333</ulink>
- </entry>
-<entry>
-NPE in FileTxnSnapLog when restarting a cluster.
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1323">
- ZOOKEEPER-1323</ulink>
- </entry>
-<entry>
-c client doesn't compile on freebsd
-</entry>
-</row>
-</tbody>
-</tgroup>
-</table>
-</section>
-
-<section id="prev_changes">
-<title>Changes Since ZooKeeper 3.4.0</title>
-
-<table>
-<title>Changes Since ZooKeeper 3.4.0</title>
-<tgroup cols='2'>
-<colspec colname='c1'/><colspec colname='c2'/>
-<thead>
-<row>
- <entry>Issue</entry>
- <entry>Notes</entry>
-</row>
-</thead>
-<tbody>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1311">
- ZOOKEEPER-1311</ulink>
- </entry>
-<entry>
-ZooKeeper test jar is broken
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1305">
- ZOOKEEPER-1305</ulink>
- </entry>
-<entry>
-zookeeper.c:prepend_string func can dereference null ptr
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1316">
- ZOOKEEPER-1316</ulink>
- </entry>
-<entry>
-zookeeper_init leaks memory if chroot is just '/'
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1315">
- ZOOKEEPER-1315</ulink>
- </entry>
-<entry>
- zookeeper_init always reports sessionPasswd=hidden
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1317">
- ZOOKEEPER-1317</ulink>
- </entry>
-<entry>
- Possible segfault in zookeeper_init.
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1319">
- ZOOKEEPER-1319</ulink>
- </entry>
-<entry>
- Missing data after restarting+expanding a cluster.
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1269">
- ZOOKEEPER-1269</ulink>
- </entry>
-<entry>
- Multi deserialization issues.
-</entry>
-</row>
-</tbody>
-</tgroup>
-</table>
-</section>
-
-<section id="prevchanges">
-<title>Changes Since ZooKeeper 3.3.0</title>
-
-<table>
-<title>Changes Since ZooKeeper 3.3.0</title>
-<tgroup cols='2'>
-<colspec colname='c1'/><colspec colname='c2'/>
-<thead>
-<row>
- <entry>Issue</entry>
- <entry>Notes</entry>
-</row>
-</thead>
-<tbody>
-<row>
- <entry>
- Sub-Tasks
- </entry>
- <entry>
-
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1239">
- ZOOKEEPER-1239</ulink>
- </entry>
- <entry>
- add logging/stats to identify fsync stalls.
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1208">
- ZOOKEEPER-1208</ulink>
- </entry>
-<entry>
-Ephemeral node not removed after the client session is long gone.
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-784">
- ZOOKEEPER-784</ulink>
- </entry>
- <entry>
- server-side functionality for read-only mode. This is not thoroughly tested.
- Avoid using it in production. This is also at risk of being removed from
- the feature set later.
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-798">
- ZOOKEEPER-798</ulink>
- </entry>
- <entry>
- Fixup loggraph for FLE changes
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-839">
- ZOOKEEPER-839</ulink>
- </entry>
- <entry>
- deleteRecursive does not belong to the other methods
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-908">
- ZOOKEEPER-908</ulink>
- </entry>
- <entry>
- Remove code duplication and inconsistent naming in ClientCnxn.Packet creation
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-909">
- ZOOKEEPER-909</ulink>
- </entry>
- <entry>
- Extract NIO specific code from ClientCnxn
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-966">
- ZOOKEEPER-966</ulink>
- </entry>
- <entry>
- Client side for multi
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-967">
- ZOOKEEPER-967</ulink>
- </entry>
- <entry>
- Server side decoding and function dispatch
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-968">
- ZOOKEEPER-968</ulink>
- </entry>
- <entry>
- Database multi-update
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1042">
- ZOOKEEPER-1042</ulink>
- </entry>
- <entry>
- Generate zookeeper test jar for maven installation
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1081">
- ZOOKEEPER-1081</ulink>
- </entry>
- <entry>
- modify leader/follower code to correctly deal with new leader
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1082">
- ZOOKEEPER-1082</ulink>
- </entry>
- <entry>
- modify leader election to correctly take into account current epoch
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1150">
- ZOOKEEPER-1150</ulink>
- </entry>
- <entry>
- fix for this patch to compile on windows...
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1160">
- ZOOKEEPER-1160</ulink>
- </entry>
- <entry>
- test timeouts are too small
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1201">
- ZOOKEEPER-1201</ulink>
- </entry>
- <entry>
- Clean SaslServerCallbackHandler.java
-</entry>
-</row>
-<row>
- <entry>
- Bug Fixes
- </entry>
- <entry>
-
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1268">
- ZOOKEEPER-1268</ulink>
- </entry>
- <entry>
- problems with read only mode, intermittent test failures and ERRORs in the log.
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1271">
- ZOOKEEPER-1271</ulink>
- </entry>
- <entry>
- testEarlyLeaderAbandonment failing on solaris - clients not retrying connection.
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1192">
- ZOOKEEPER-1192</ulink>
- </entry>
- <entry>
-Leader.waitForEpochAck() checks waitingForNewEpoch instead of checking electionFinished.
-</entry>
-</row>
-
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1246">
- ZOOKEEPER-1246</ulink>
- </entry>
- <entry>
- Dead code in PrepRequestProcessor catch Exception block.
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1264">
- ZOOKEEPER-1264</ulink>
- </entry>
- <entry>
- FollowerResyncConcurrencyTest failing intermittently.
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1270">
- ZOOKEEPER-1270</ulink>
- </entry>
- <entry>
- testEarlyLeaderAbandonment failing intermittently, quorum formed, no serving.
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1291">
- ZOOKEEPER-1291</ulink>
- </entry>
- <entry>
- AcceptedEpoch not updated at leader before it proposes the epoch to followers.
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1282">
- ZOOKEEPER-1282</ulink>
- </entry>
- <entry>
-Learner.java not following Zab 1.0 protocol - setCurrentEpoch should be done upon receipt of NEWLEADER
- (before acking it) and not upon receipt of UPTODATE.
- </entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-335">
- ZOOKEEPER-335</ulink>
- </entry>
- <entry>
- zookeeper servers should commit the new leader txn to their logs.
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-418">
- ZOOKEEPER-418</ulink>
- </entry>
- <entry>
- Need nifty zookeeper browser
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-603">
- ZOOKEEPER-603</ulink>
- </entry>
- <entry>
- zkpython should do a better job of freeing memory under error conditions
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-662">
- ZOOKEEPER-662</ulink>
- </entry>
- <entry>
- Too many CLOSE_WAIT socket state on a server
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-690">
- ZOOKEEPER-690</ulink>
- </entry>
- <entry>
- AsyncTestHammer test fails on hudson.
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-719">
- ZOOKEEPER-719</ulink>
- </entry>
- <entry>
- Add throttling to BookKeeper client
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-720">
- ZOOKEEPER-720</ulink>
- </entry>
- <entry>
- Use zookeeper-{version}-sources.jar instead of zookeeper-{version}-src.jar to publish sources in the Maven repository
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-722">
- ZOOKEEPER-722</ulink>
- </entry>
- <entry>
- zkServer.sh uses sh's builtin echo on BSD, behaves incorrectly.
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-731">
- ZOOKEEPER-731</ulink>
- </entry>
- <entry>
- Zookeeper#delete , #create - async versions miss a verb in the javadoc
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-734">
- ZOOKEEPER-734</ulink>
- </entry>
- <entry>
- QuorumPeerTestBase.java and ZooKeeperServerMainTest.java do not handle windows path correctly
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-735">
- ZOOKEEPER-735</ulink>
- </entry>
- <entry>
- cppunit test testipv6 assumes that the machine is ipv6 enabled.
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-737">
- ZOOKEEPER-737</ulink>
- </entry>
- <entry>
- some 4 letter words may fail with netcat (nc)
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-738">
- ZOOKEEPER-738</ulink>
- </entry>
- <entry>
- zookeeper.jute.h fails to compile with -pedantic
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-741">
- ZOOKEEPER-741</ulink>
- </entry>
- <entry>
- root level create on REST proxy fails
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-742">
- ZOOKEEPER-742</ulink>
- </entry>
- <entry>
- Deallocatng None on writes
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-746">
- ZOOKEEPER-746</ulink>
- </entry>
- <entry>
- learner outputs session id to log in dec (should be hex)
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-749">
- ZOOKEEPER-749</ulink>
- </entry>
- <entry>
- OSGi metadata not included in binary only jar
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-750">
- ZOOKEEPER-750</ulink>
- </entry>
- <entry>
- move maven artifacts into "dist-maven" subdir of the release (package target)
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-758">
- ZOOKEEPER-758</ulink>
- </entry>
- <entry>
- zkpython segfaults on invalid acl with missing key
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-763">
- ZOOKEEPER-763</ulink>
- </entry>
- <entry>
- Deadlock on close w/ zkpython / c client
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-764">
- ZOOKEEPER-764</ulink>
- </entry>
- <entry>
- Observer elected leader due to inconsistent voting view
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-766">
- ZOOKEEPER-766</ulink>
- </entry>
- <entry>
- forrest recipes docs don't mention the lock/queue recipe implementations available in the release
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-769">
- ZOOKEEPER-769</ulink>
- </entry>
- <entry>
- Leader can treat observers as quorum members
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-772">
- ZOOKEEPER-772</ulink>
- </entry>
- <entry>
- zkpython segfaults when watcher from async get children is invoked.
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-774">
- ZOOKEEPER-774</ulink>
- </entry>
- <entry>
- Recipes tests are slightly outdated: they do not compile against JUnit 4.8
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-777">
- ZOOKEEPER-777</ulink>
- </entry>
- <entry>
- setting acl on a non existant node should return no node error
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-782">
- ZOOKEEPER-782</ulink>
- </entry>
- <entry>
- Incorrect C API documentation for Watches
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-783">
- ZOOKEEPER-783</ulink>
- </entry>
- <entry>
- committedLog in ZKDatabase is not properly synchronized
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-787">
- ZOOKEEPER-787</ulink>
- </entry>
- <entry>
- groupId in deployed pom is wrong
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-790">
- ZOOKEEPER-790</ulink>
- </entry>
- <entry>
- Last processed zxid set prematurely while establishing leadership
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-792">
- ZOOKEEPER-792</ulink>
- </entry>
- <entry>
- zkpython memory leak
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-794">
- ZOOKEEPER-794</ulink>
- </entry>
- <entry>
- Callbacks are not invoked when the client is closed
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-795">
- ZOOKEEPER-795</ulink>
- </entry>
- <entry>
- eventThread isn't shutdown after a connection "session expired" event coming
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-796">
- ZOOKEEPER-796</ulink>
- </entry>
- <entry>
- zkServer.sh should support an external PIDFILE variable
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-800">
- ZOOKEEPER-800</ulink>
- </entry>
- <entry>
- zoo_add_auth returns ZOK if zookeeper handle is in ZOO_CLOSED_STATE
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-804">
- ZOOKEEPER-804</ulink>
- </entry>
- <entry>
- c unit tests failing due to "assertion cptr failed"
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-813">
- ZOOKEEPER-813</ulink>
- </entry>
- <entry>
- maven install is broken due to incorrect organisation
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-814">
- ZOOKEEPER-814</ulink>
- </entry>
- <entry>
- monitoring scripts are missing apache license headers
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-820">
- ZOOKEEPER-820</ulink>
- </entry>
- <entry>
- update c unit tests to ensure "zombie" java server processes don't cause failure
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-822">
- ZOOKEEPER-822</ulink>
- </entry>
- <entry>
- Leader election taking a long time to complete
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-831">
- ZOOKEEPER-831</ulink>
- </entry>
- <entry>
- BookKeeper: Throttling improved for reads
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-844">
- ZOOKEEPER-844</ulink>
- </entry>
- <entry>
- handle auth failure in java client
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-846">
- ZOOKEEPER-846</ulink>
- </entry>
- <entry>
- zookeeper client doesn't shut down cleanly on the close call
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-854">
- ZOOKEEPER-854</ulink>
- </entry>
- <entry>
- BookKeeper does not compile due to changes in the ZooKeeper code
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-855">
- ZOOKEEPER-855</ulink>
- </entry>
- <entry>
- clientPortBindAddress should be clientPortAddress
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-861">
- ZOOKEEPER-861</ulink>
- </entry>
- <entry>
- Missing the test SSL certificate used for running junit tests.
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-867">
- ZOOKEEPER-867</ulink>
- </entry>
- <entry>
- ClientTest is failing on hudson - fd cleanup
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-870">
- ZOOKEEPER-870</ulink>
- </entry>
- <entry>
- Zookeeper trunk build broken.
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-874">
- ZOOKEEPER-874</ulink>
- </entry>
- <entry>
- FileTxnSnapLog.restore does not call listener
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-880">
- ZOOKEEPER-880</ulink>
- </entry>
- <entry>
- QuorumCnxManager$SendWorker grows without bounds
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-881">
- ZOOKEEPER-881</ulink>
- </entry>
- <entry>
- ZooKeeperServer.loadData loads database twice
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-882">
- ZOOKEEPER-882</ulink>
- </entry>
- <entry>
- Startup loads last transaction from snapshot
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-884">
- ZOOKEEPER-884</ulink>
- </entry>
- <entry>
- Remove LedgerSequence references from BookKeeper documentation and comments in tests
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-888">
- ZOOKEEPER-888</ulink>
- </entry>
- <entry>
- c-client / zkpython: Double free corruption on node watcher
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-893">
- ZOOKEEPER-893</ulink>
- </entry>
- <entry>
- ZooKeeper high cpu usage when invalid requests
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-897">
- ZOOKEEPER-897</ulink>
- </entry>
- <entry>
- C Client seg faults during close
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-898">
- ZOOKEEPER-898</ulink>
- </entry>
- <entry>
- C Client might not cleanup correctly during close
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-902">
- ZOOKEEPER-902</ulink>
- </entry>
- <entry>
- Fix findbug issue in trunk "Malicious code vulnerability"
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-904">
- ZOOKEEPER-904</ulink>
- </entry>
- <entry>
- super digest is not actually acting as a full superuser
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-913">
- ZOOKEEPER-913</ulink>
- </entry>
- <entry>
- Version parser fails to parse "3.3.2-dev" from build.xml.
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-917">
- ZOOKEEPER-917</ulink>
- </entry>
- <entry>
- Leader election selected incorrect leader
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-919">
- ZOOKEEPER-919</ulink>
- </entry>
- <entry>
- Ephemeral nodes remains in one of ensemble after deliberate SIGKILL
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-921">
- ZOOKEEPER-921</ulink>
- </entry>
- <entry>
- zkPython incorrectly checks for existence of required ACL elements
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-937">
- ZOOKEEPER-937</ulink>
- </entry>
- <entry>
- test -e not available on solaris /bin/sh
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-957">
- ZOOKEEPER-957</ulink>
- </entry>
- <entry>
- zkCleanup.sh doesn't do anything
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-958">
- ZOOKEEPER-958</ulink>
- </entry>
- <entry>
- Flag to turn off autoconsume in hedwig c++ client
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-961">
- ZOOKEEPER-961</ulink>
- </entry>
- <entry>
- Watch recovery after disconnection when connection string contains a prefix
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-962">
- ZOOKEEPER-962</ulink>
- </entry>
- <entry>
- leader/follower coherence issue when follower is receiving a DIFF
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-963">
- ZOOKEEPER-963</ulink>
- </entry>
- <entry>
- Make Forrest work with JDK6
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-965">
- ZOOKEEPER-965</ulink>
- </entry>
- <entry>
- Need a multi-update command to allow multiple znodes to be updated safely
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-975">
- ZOOKEEPER-975</ulink>
- </entry>
- <entry>
- new peer goes in LEADING state even if ensemble is online
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-976">
- ZOOKEEPER-976</ulink>
- </entry>
- <entry>
- ZooKeeper startup script doesn't use JAVA_HOME
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-981">
- ZOOKEEPER-981</ulink>
- </entry>
- <entry>
- Hang in zookeeper_close() in the multi-threaded C client
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-983">
- ZOOKEEPER-983</ulink>
- </entry>
- <entry>
- running zkServer.sh start remotely using ssh hangs
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-985">
- ZOOKEEPER-985</ulink>
- </entry>
- <entry>
- Test BookieRecoveryTest fails on trunk.
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1006">
- ZOOKEEPER-1006</ulink>
- </entry>
- <entry>
- QuorumPeer "Address already in use" -- regression in 3.3.3
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1007">
- ZOOKEEPER-1007</ulink>
- </entry>
- <entry>
- iarchive leak in C client
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1013">
- ZOOKEEPER-1013</ulink>
- </entry>
- <entry>
- zkServer.sh usage message should mention all startup options
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1027">
- ZOOKEEPER-1027</ulink>
- </entry>
- <entry>
- chroot not transparent in zoo_create()
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1028">
- ZOOKEEPER-1028</ulink>
- </entry>
- <entry>
- In python bindings, zookeeper.set2() should return a stat dict but instead returns None
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1033">
- ZOOKEEPER-1033</ulink>
- </entry>
- <entry>
- c client should install includes into INCDIR/zookeeper, not INCDIR/c-client-src
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1034">
- ZOOKEEPER-1034</ulink>
- </entry>
- <entry>
- perl bindings should automatically find the zookeeper c-client headers
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1046">
- ZOOKEEPER-1046</ulink>
- </entry>
- <entry>
- Creating a new sequential node results in a ZNODEEXISTS error
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1049">
- ZOOKEEPER-1049</ulink>
- </entry>
- <entry>
- Session expire/close flooding renders heartbeats to delay significantly
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1051">
- ZOOKEEPER-1051</ulink>
- </entry>
- <entry>
- SIGPIPE in Zookeeper 0.3.* when send'ing after cluster disconnection
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1052">
- ZOOKEEPER-1052</ulink>
- </entry>
- <entry>
- Findbugs warning in QuorumPeer.ResponderThread.run()
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1055">
- ZOOKEEPER-1055</ulink>
- </entry>
- <entry>
- check for duplicate ACLs in addACL() and create()
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1058">
- ZOOKEEPER-1058</ulink>
- </entry>
- <entry>
- fix typo in opToString for getData
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1059">
- ZOOKEEPER-1059</ulink>
- </entry>
- <entry>
- stat command isses on non-existing node causes NPE
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1060">
- ZOOKEEPER-1060</ulink>
- </entry>
- <entry>
- QuorumPeer takes a long time to shutdown
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1061">
- ZOOKEEPER-1061</ulink>
- </entry>
- <entry>
- Zookeeper stop fails if start called twice
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1063">
- ZOOKEEPER-1063</ulink>
- </entry>
- <entry>
- Dubious synchronization in Zookeeper and ClientCnxnSocketNIO classes
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1068">
- ZOOKEEPER-1068</ulink>
- </entry>
- <entry>
- Documentation and default config suggest incorrect location for Zookeeper state
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1069">
- ZOOKEEPER-1069</ulink>
- </entry>
- <entry>
- Calling shutdown() on a QuorumPeer too quickly can lead to a corrupt log
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1073">
- ZOOKEEPER-1073</ulink>
- </entry>
- <entry>
- address a documentation issue in ZOOKEEPER-1030
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1074">
- ZOOKEEPER-1074</ulink>
- </entry>
- <entry>
- zkServer.sh is missing nohup/sleep, which are necessary for remote invocation
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1076">
- ZOOKEEPER-1076</ulink>
- </entry>
- <entry>
- some quorum tests are unnecessarily extending QuorumBase
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1083">
- ZOOKEEPER-1083</ulink>
- </entry>
- <entry>
- Javadoc for WatchedEvent not being generated
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1086">
- ZOOKEEPER-1086</ulink>
- </entry>
- <entry>
- zookeeper test jar has non mavenised dependency.
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1087">
- ZOOKEEPER-1087</ulink>
- </entry>
- <entry>
- ForceSync VM arguement not working when set to "no"
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1088">
- ZOOKEEPER-1088</ulink>
- </entry>
- <entry>
- delQuota does not remove the quota node and subesquent setquota calls for that path will fail
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1090">
- ZOOKEEPER-1090</ulink>
- </entry>
- <entry>
- Race condition while taking snapshot can lead to not restoring data tree correctly
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1091">
- ZOOKEEPER-1091</ulink>
- </entry>
- <entry>
- when the chrootPath of ClientCnxn is not null and the Watches of zooKeeper is not null and the method primeConnection(SelectionKey k) of ClientCnxn Occurred again for some reason ,then the wrong watcher clientPath is sended to server
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1097">
- ZOOKEEPER-1097</ulink>
- </entry>
- <entry>
- Quota is not correctly rehydrated on snapshot reload
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1101">
- ZOOKEEPER-1101</ulink>
- </entry>
- <entry>
- Upload zookeeper-test maven artifacts to maven repository.
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1108">
- ZOOKEEPER-1108</ulink>
- </entry>
- <entry>
- Various bugs in zoo_add_auth in C
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1109">
- ZOOKEEPER-1109</ulink>
- </entry>
- <entry>
- Zookeeper service is down when SyncRequestProcessor meets any exception.
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1111">
- ZOOKEEPER-1111</ulink>
- </entry>
- <entry>
- JMXEnv uses System.err instead of logging
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1119">
- ZOOKEEPER-1119</ulink>
- </entry>
- <entry>
- zkServer stop command incorrectly reading comment lines in zoo.cfg
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1124">
- ZOOKEEPER-1124</ulink>
- </entry>
- <entry>
- Multiop submitted to non-leader always fails due to timeout
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1136">
- ZOOKEEPER-1136</ulink>
- </entry>
- <entry>
- NEW_LEADER should be queued not sent to match the Zab 1.0 protocol on the twiki
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1138">
- ZOOKEEPER-1138</ulink>
- </entry>
- <entry>
- release audit failing for a number of new files
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1139">
- ZOOKEEPER-1139</ulink>
- </entry>
- <entry>
- jenkins is reporting two warnings, fix these
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1140">
- ZOOKEEPER-1140</ulink>
- </entry>
- <entry>
- server shutdown is not stopping threads
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1141">
- ZOOKEEPER-1141</ulink>
- </entry>
- <entry>
- zkpython fails tests under python 2.4
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1142">
- ZOOKEEPER-1142</ulink>
- </entry>
- <entry>
- incorrect stat output
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1144">
- ZOOKEEPER-1144</ulink>
- </entry>
- <entry>
- ZooKeeperServer not starting on leader due to a race condition
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1145">
- ZOOKEEPER-1145</ulink>
- </entry>
- <entry>
- ObserverTest.testObserver fails at particular point after several runs of ant junt.run -Dtestcase
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1146">
- ZOOKEEPER-1146</ulink>
- </entry>
- <entry>
- significant regression in client (c/python) performance
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1152">
- ZOOKEEPER-1152</ulink>
- </entry>
- <entry>
- Exceptions thrown from handleAuthentication can cause buffer corruption issues in NIOServer
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1154">
- ZOOKEEPER-1154</ulink>
- </entry>
- <entry>
- Data inconsistency when the node(s) with the highest zxid is not present at the time of leader election
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1156">
- ZOOKEEPER-1156</ulink>
- </entry>
- <entry>
- Log truncation truncating log too much - can cause data loss
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1165">
- ZOOKEEPER-1165</ulink>
- </entry>
- <entry>
- better eclipse support in tests
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1168">
- ZOOKEEPER-1168</ulink>
- </entry>
- <entry>
- ZooKeeper fails to run with IKVM
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1171">
- ZOOKEEPER-1171</ulink>
- </entry>
- <entry>
- fix build for java 7
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1174">
- ZOOKEEPER-1174</ulink>
- </entry>
- <entry>
- FD leak when network unreachable
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1181">
- ZOOKEEPER-1181</ulink>
- </entry>
- <entry>
- Fix problems with Kerberos TGT renewal
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1185">
- ZOOKEEPER-1185</ulink>
- </entry>
- <entry>
- Send AuthFailed event to client if SASL authentication fails
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1189">
- ZOOKEEPER-1189</ulink>
- </entry>
- <entry>
- For an invalid snapshot file(less than 10bytes size) RandomAccessFile stream is leaking.
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1190">
- ZOOKEEPER-1190</ulink>
- </entry>
- <entry>
- ant package is not including many of the bin scripts in the package (zkServer.sh for example)
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1195">
- ZOOKEEPER-1195</ulink>
- </entry>
- <entry>
- SASL authorizedID being incorrectly set: should use getHostName() rather than getServiceName()
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1203">
- ZOOKEEPER-1203</ulink>
- </entry>
- <entry>
- Zookeeper systest is missing Junit Classes
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1206">
- ZOOKEEPER-1206</ulink>
- </entry>
- <entry>
- Sequential node creation does not use always use digits in node name given certain Locales.
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1212">
- ZOOKEEPER-1212</ulink>
- </entry>
- <entry>
- zkServer.sh stop action is not conformat with LSB para 20.2 Init Script Actions
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1237">
- ZOOKEEPER-1237</ulink>
- </entry>
- <entry>
- ERRORs being logged when queued responses are sent after socket has closed.
-</entry>
-</row>
-<row>
- <entry>
- Improvements
- </entry>
- <entry>
-
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-494">
- ZOOKEEPER-494</ulink>
- </entry>
- <entry>
- zookeeper should install include headers in /usr/local/include/zookeeper
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-500">
- ZOOKEEPER-500</ulink>
- </entry>
- <entry>
- Async methods shouldnt throw exceptions
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-631">
- ZOOKEEPER-631</ulink>
- </entry>
- <entry>
- zkpython's C code could do with a style clean-up
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-636">
- ZOOKEEPER-636</ulink>
- </entry>
- <entry>
- configure.ac has instructions which override the contents of CFLAGS and CXXFLAGS.
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-724">
- ZOOKEEPER-724</ulink>
- </entry>
- <entry>
- Improve junit test integration - log harness information
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-733">
- ZOOKEEPER-733</ulink>
- </entry>
- <entry>
- use netty to handle client connections
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-765">
- ZOOKEEPER-765</ulink>
- </entry>
- <entry>
- Add python example script
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-773">
- ZOOKEEPER-773</ulink>
- </entry>
- <entry>
- Log visualisation
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-788">
- ZOOKEEPER-788</ulink>
- </entry>
- <entry>
- Add server id to message logs
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-789">
- ZOOKEEPER-789</ulink>
- </entry>
- <entry>
- Improve FLE log messages
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-797">
- ZOOKEEPER-797</ulink>
- </entry>
- <entry>
- c client source with AI_ADDRCONFIG cannot be compiled with early glibc
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-809">
- ZOOKEEPER-809</ulink>
- </entry>
- <entry>
- Improved REST Interface
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-821">
- ZOOKEEPER-821</ulink>
- </entry>
- <entry>
- Add ZooKeeper version information to zkpython
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-853">
- ZOOKEEPER-853</ulink>
- </entry>
- <entry>
- Make zookeeper.is_unrecoverable return True or False and not an integer
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-862">
- ZOOKEEPER-862</ulink>
- </entry>
- <entry>
- Hedwig created ledgers with hardcoded Bookkeeper ensemble and quorum size. Make these a server config parameter instead.
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-864">
- ZOOKEEPER-864</ulink>
- </entry>
- <entry>
- Hedwig C++ client improvements
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-891">
- ZOOKEEPER-891</ulink>
- </entry>
- <entry>
- Allow non-numeric version strings
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-905">
- ZOOKEEPER-905</ulink>
- </entry>
- <entry>
- enhance zkServer.sh for easier zookeeper automation-izing
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-926">
- ZOOKEEPER-926</ulink>
- </entry>
- <entry>
- Fork Hadoop common's test-patch.sh and modify for Zookeeper
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-977">
- ZOOKEEPER-977</ulink>
- </entry>
- <entry>
- passing null for path_buffer in zoo_create
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-980">
- ZOOKEEPER-980</ulink>
- </entry>
- <entry>
- allow configuration parameters for log4j.properties
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-993">
- ZOOKEEPER-993</ulink>
- </entry>
- <entry>
- Code improvements
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-997">
- ZOOKEEPER-997</ulink>
- </entry>
- <entry>
- ZkClient ignores command if there are any space in front of it
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1018">
- ZOOKEEPER-1018</ulink>
- </entry>
- <entry>
- The connection permutation in get_addrs uses a weak and inefficient shuffle
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1025">
- ZOOKEEPER-1025</ulink>
- </entry>
- <entry>
- zkCli is overly sensitive to to spaces.
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1030">
- ZOOKEEPER-1030</ulink>
- </entry>
- <entry>
- Increase default for maxClientCnxns
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1094">
- ZOOKEEPER-1094</ulink>
- </entry>
- <entry>
- Small improvements to LeaderElection and Vote classes
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1095">
- ZOOKEEPER-1095</ulink>
- </entry>
- <entry>
- Simple leader election recipe
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1103">
- ZOOKEEPER-1103</ulink>
- </entry>
- <entry>
- In QuorumTest, use the same "for ( .. try { break } catch { } )" pattern in testFollowersStartAfterLeaders as in testSessionMove.
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1104">
- ZOOKEEPER-1104</ulink>
- </entry>
- <entry>
- CLONE - In QuorumTest, use the same "for ( .. try { break } catch { } )" pattern in testFollowersStartAfterLeaders as in testSessionMove.
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1143">
- ZOOKEEPER-1143</ulink>
- </entry>
- <entry>
- quorum send & recv workers are missing thread names
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1153">
- ZOOKEEPER-1153</ulink>
- </entry>
- <entry>
- Deprecate AuthFLE and LE
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1166">
- ZOOKEEPER-1166</ulink>
- </entry>
- <entry>
- Please add a few svn:ignore properties
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1169">
- ZOOKEEPER-1169</ulink>
- </entry>
- <entry>
- Fix compiler (eclipse) warnings in (generated) jute code
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1243">
- ZOOKEEPER-1243</ulink>
- </entry>
- <entry>
- New 4lw for short simple monitoring ldck
-</entry>
-</row>
-<row>
- <entry>
- Features
- </entry>
- <entry>
-
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-464">
- ZOOKEEPER-464</ulink>
- </entry>
- <entry>
- Need procedure to garbage collect ledgers
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-465">
- ZOOKEEPER-465</ulink>
- </entry>
- <entry>
- Ledger size in bytes
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-546">
- ZOOKEEPER-546</ulink>
- </entry>
- <entry>
- add "diskless" ensemble support
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-712">
- ZOOKEEPER-712</ulink>
- </entry>
- <entry>
- Bookie recovery
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-729">
- ZOOKEEPER-729</ulink>
- </entry>
- <entry>
- Recursively delete a znode - zkCli.sh rmr /node
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-744">
- ZOOKEEPER-744</ulink>
- </entry>
- <entry>
- Add monitoring four-letter word
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-747">
- ZOOKEEPER-747</ulink>
- </entry>
- <entry>
- Add C# generation to Jute
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-775">
- ZOOKEEPER-775</ulink>
- </entry>
- <entry>
- A large scale pub/sub system
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-799">
- ZOOKEEPER-799</ulink>
- </entry>
- <entry>
- Add tools and recipes for monitoring as a contrib
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-808">
- ZOOKEEPER-808</ulink>
- </entry>
- <entry>
- Web-based Administrative Interface
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-859">
- ZOOKEEPER-859</ulink>
- </entry>
- <entry>
- Native Windows version of C client
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-938">
- ZOOKEEPER-938</ulink>
- </entry>
- <entry>
- Support Kerberos authentication of clients.
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-992">
- ZOOKEEPER-992</ulink>
- </entry>
- <entry>
- MT Native Version of Windows C Client
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-999">
- ZOOKEEPER-999</ulink>
- </entry>
- <entry>
- Create an package integration project
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1012">
- ZOOKEEPER-1012</ulink>
- </entry>
- <entry>
- support distinct JVMFLAGS for zookeeper server in zkServer.sh and zookeeper client in zkCli.sh
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1020">
- ZOOKEEPER-1020</ulink>
- </entry>
- <entry>
- Implement function in C client to determine which host you're currently connected to.
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1107">
- ZOOKEEPER-1107</ulink>
- </entry>
- <entry>
- automating log and snapshot cleaning
-</entry>
-</row>
-<row>
- <entry>
- Tasks
- </entry>
- <entry>
-
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-754">
- ZOOKEEPER-754</ulink>
- </entry>
- <entry>
- numerous misspellings "succesfully"
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-1149">
- ZOOKEEPER-1149</ulink>
- </entry>
- <entry>
- users cannot migrate from 3.4->3.3->3.4 server code against a single datadir
-</entry>
-</row>
-<row>
- <entry>
- Tests
- </entry>
- <entry>
-
-</entry>
-</row>
-<row>
- <entry>
- <ulink url="https://issues.apache.org/jira/browse/ZOOKEEPER-239">
- ZOOKEEPER-239</ulink>
- </entry>
- <entry>
- ZooKeeper System Tests
-</entry>
-</row>
-
-</tbody></tgroup></table>
-
-</section>
-</article>
-
diff --git a/src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml b/src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml
index 98d265e..5aefa9a 100644
--- a/src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml
+++ b/src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml
@@ -74,29 +74,90 @@
<section id="sc_supportedPlatforms">
<title>Supported Platforms</title>
+ <para>ZooKeeper consists of multiple components. Some components are
+ supported broadly, and other components are supported only on a smaller
+ set of platforms.</para>
+
<itemizedlist>
<listitem>
- <para>GNU/Linux is supported as a development and production
- platform for both server and client.</para>
- </listitem>
- <listitem>
- <para>Sun Solaris is supported as a development and production
- platform for both server and client.</para>
+ <para><emphasis role="bold">Client</emphasis> is the Java client
+ library, used by applications to connect to a ZooKeeper ensemble.
+ </para>
</listitem>
<listitem>
- <para>FreeBSD is supported as a development and production
- platform for clients only. Java NIO selector support in
- the FreeBSD JVM is broken.</para>
+ <para><emphasis role="bold">Server</emphasis> is the Java server
+ that runs on the ZooKeeper ensemble nodes.</para>
</listitem>
<listitem>
- <para>Win32 is supported as a <emphasis>development
- platform</emphasis> only for both server and client.</para>
+ <para><emphasis role="bold">Native Client</emphasis> is a client
+ implemented in C, similar to the Java client, used by applications
+ to connect to a ZooKeeper ensemble.</para>
</listitem>
<listitem>
- <para>MacOSX is supported as a <emphasis>development
- platform</emphasis> only for both server and client.</para>
+ <para><emphasis role="bold">Contrib</emphasis> refers to multiple
+ optional add-on components.</para>
</listitem>
</itemizedlist>
+
+ <para>The following matrix describes the level of support committed for
+ running each component on different operating system platforms.</para>
+
+ <table>
+ <title>Support Matrix</title>
+ <tgroup cols="5" align="left" colsep="1" rowsep="1">
+ <thead>
+ <row>
+ <entry>Operating System</entry>
+ <entry>Client</entry>
+ <entry>Server</entry>
+ <entry>Native Client</entry>
+ <entry>Contrib</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>GNU/Linux</entry>
+ <entry>Development and Production</entry>
+ <entry>Development and Production</entry>
+ <entry>Development and Production</entry>
+ <entry>Development and Production</entry>
+ </row>
+ <row>
+ <entry>Solaris</entry>
+ <entry>Development and Production</entry>
+ <entry>Development and Production</entry>
+ <entry>Not Supported</entry>
+ <entry>Not Supported</entry>
+ </row>
+ <row>
+ <entry>FreeBSD</entry>
+ <entry>Development and Production</entry>
+ <entry>Development and Production</entry>
+ <entry>Not Supported</entry>
+ <entry>Not Supported</entry>
+ </row>
+ <row>
+ <entry>Windows</entry>
+ <entry>Development and Production</entry>
+ <entry>Development and Production</entry>
+ <entry>Not Supported</entry>
+ <entry>Not Supported</entry>
+ </row>
+ <row>
+ <entry>Mac OS X</entry>
+ <entry>Development Only</entry>
+ <entry>Development Only</entry>
+ <entry>Not Supported</entry>
+ <entry>Not Supported</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>For any operating system not explicitly mentioned as supported in
+ the matrix, components may or may not work. The ZooKeeper community
+ will fix obvious bugs that are reported for other platforms, but there
+ is no full support.</para>
</section>
<section id="sc_requiredSoftware">
@@ -124,7 +185,28 @@
only handle the failure of a single machine; if two machines fail, the
remaining two machines do not constitute a majority. However, with five
machines ZooKeeper can handle the failure of two machines. </para>
-
+ <note>
+ <para>
+ As mentioned in the
+ <ulink url="zookeeperStarted.html">ZooKeeper Getting Started Guide</ulink>
+ , a minimum of three servers are required for a fault tolerant
+ clustered setup, and it is strongly recommended that you have an
+ odd number of servers.
+ </para>
+ <para>Usually three servers is more than enough for a production
+ install, but for maximum reliability during maintenance, you may
+ wish to install five servers. With three servers, if you perform
+ maintenance on one of them, you are vulnerable to a failure on one
+ of the other two servers during that maintenance. If you have five
+ of them running, you can take one down for maintenance, and know
+ that you're still OK if one of the other four suddenly fails.
+ </para>
+ <para>Your redundancy considerations should include all aspects of
+ your environment. If you have three ZooKeeper servers, but their
+ network cables are all plugged into the same network switch, then
+ the failure of that switch will take down your entire ensemble.
+ </para>
+ </note>
<para>Here are the steps to setting a server that will be part of an
ensemble. These steps should be performed on every host in the
ensemble:</para>
@@ -219,34 +301,10 @@ server.3=zoo3:2888:3888</programlisting>
<listitem>
<para>Test your deployment by connecting to the hosts:</para>
- <itemizedlist>
- <listitem>
- <para>In Java, you can run the following command to execute
- simple operations:</para>
-
- <para><computeroutput>$ java -cp zookeeper.jar:lib/slf4j-api-1.6.1.jar:lib/slf4j-log4j12-1.6.1.jar:lib/log4j-1.2.15.jar:conf:src/java/lib/jline-0.9.94.jar \
- org.apache.zookeeper.ZooKeeperMain -server 127.0.0.1:2181</computeroutput></para>
- </listitem>
-
- <listitem>
- <para>In C, you can compile either the single threaded client or
- the multithreaded client: or n the c subdirectory in the
- ZooKeeper sources. This compiles the single threaded
- client:</para>
-
- <para><computeroutput>$ make cli_st</computeroutput></para>
+ <para>In Java, you can run the following command to execute
+ simple operations:</para>
- <para>And this compiles the mulithreaded client:</para>
-
- <para><computeroutput>$ make cli_mt</computeroutput></para>
- </listitem>
- </itemizedlist>
-
- <para>Running either program gives you a shell in which to execute
- simple file-system-like operations. To connect to ZooKeeper with the
- multithreaded client, for example, you would run:</para>
-
- <para><computeroutput>$ cli_mt 127.0.0.1:2181</computeroutput></para>
+ <para><computeroutput>$ bin/zkCli.sh -server 127.0.0.1:2181</computeroutput></para>
</listitem>
</orderedlist>
</section>
@@ -715,22 +773,6 @@ server.3=zoo3:2888:3888</programlisting>
</varlistentry>
<varlistentry>
- <term>traceFile</term>
-
- <listitem>
- <para>(Java system property: <emphasis
- role="bold">requestTraceFile</emphasis>)</para>
-
- <para>If this option is defined, requests will be will logged to
- a trace file named traceFile.year.month.day. Use of this option
- provides useful debugging information, but will impact
- performance. (Note: The system property has no zookeeper prefix,
- and the configuration variable name is different from the system
- property. Yes - it's not consistent, and it's annoying.)</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
<term>maxClientCnxns</term>
<listitem>
<para>(No Java system property)</para>
@@ -787,7 +829,7 @@ server.3=zoo3:2888:3888</programlisting>
<term>fsync.warningthresholdms</term>
<listitem>
<para>(Java system property: <emphasis
- role="bold">fsync.warningthresholdms</emphasis>)</para>
+ role="bold">zookeeper.fsync.warningthresholdms</emphasis>)</para>
<para><emphasis role="bold">New in 3.3.4:</emphasis> A
warning message will be output to the log whenever an
diff --git a/src/docs/src/documentation/content/xdocs/zookeeperObservers.xml b/src/docs/src/documentation/content/xdocs/zookeeperObservers.xml
index 99f8025..3955f3d 100644
--- a/src/docs/src/documentation/content/xdocs/zookeeperObservers.xml
+++ b/src/docs/src/documentation/content/xdocs/zookeeperObservers.xml
@@ -102,7 +102,7 @@
to add an Observer to your ZooKeeper cluster. Now you can connect to it as
though it were an ordinary Follower. Try it out, by running:</para>
<programlisting>
- bin/zkCli.sh -server localhost:2181
+ $ bin/zkCli.sh -server localhost:2181
</programlisting>
<para>
where localhost:2181 is the hostname and port number of the Observer as
diff --git a/src/docs/src/documentation/content/xdocs/zookeeperProgrammers.xml b/src/docs/src/documentation/content/xdocs/zookeeperProgrammers.xml
index b75cc85..f6d50b6 100644
--- a/src/docs/src/documentation/content/xdocs/zookeeperProgrammers.xml
+++ b/src/docs/src/documentation/content/xdocs/zookeeperProgrammers.xml
@@ -942,7 +942,7 @@
<note><para>This is a very simple example which is intended to show
how to interact with ZooKeeper ACLs
specifically. See <filename>.../trunk/src/c/src/cli.c</filename>
- for an example of a proper C client implementation</para>
+ for an example of a C client implementation</para>
</note>
<programlisting>
@@ -1406,31 +1406,7 @@ authProvider.2=com.f.MyAuth2
</section>
<section>
- <title>Using the C Client</title>
-
- <para>You can test your client by running a ZooKeeper server (see
- instructions on the project wiki page on how to run it) and connecting
- to it using one of the cli applications that were built as part of the
- installation procedure. cli_mt (multithreaded, built against
- zookeeper_mt library) is shown in this example, but you could also use
- cli_st (singlethreaded, built against zookeeper_st library):</para>
-
- <para><command>$ cli_mt zookeeper_host:9876</command></para>
-
- <para>This is a client application that gives you a shell for
- executing simple ZooKeeper commands. Once successfully started
- and connected to the server it displays a shell prompt. You
- can now enter ZooKeeper commands. For example, to create a
- node:</para>
-
- <para><command>> create /my_new_node</command></para>
-
- <para>To verify that the node's been created:</para>
-
- <para><command>> ls /</command></para>
-
- <para>You should see a list of node who are children of the root node
- "/".</para>
+ <title>Building Your Own C Client</title>
<para>In order to be able to use the ZooKeeper API in your application
you have to remember to</para>
@@ -1452,10 +1428,10 @@ authProvider.2=com.f.MyAuth2
</listitem>
</orderedlist>
- <para>Refer to <xref linkend="ch_programStructureWithExample"/>
- for examples of usage in Java and C.
- <emphasis>[tbd]</emphasis>
- </para>
+ <note><para>
+ See <filename>.../trunk/src/c/src/cli.c</filename>
+ for an example of a C client implementation</para>
+ </note>
</section>
</section>
</section>
diff --git a/src/docs/src/documentation/content/xdocs/zookeeperQuotas.xml b/src/docs/src/documentation/content/xdocs/zookeeperQuotas.xml
index 3be4c3f..7668e6a 100644
--- a/src/docs/src/documentation/content/xdocs/zookeeperQuotas.xml
+++ b/src/docs/src/documentation/content/xdocs/zookeeperQuotas.xml
@@ -43,8 +43,7 @@
ZooKeeper prints <emphasis>WARN</emphasis> messages if users exceed the quota assigned to them. The messages
are printed in the log of the ZooKeeper.
</para>
- <para><computeroutput>$java -cp zookeeper.jar:src/java/lib/log4j-1.2.15.jar/conf:src/java/lib/jline-0.9.94.jar \
- org.apache.zookeeper.ZooKeeperMain -server host:port</computeroutput></para>
+ <para><computeroutput>$ bin/zkCli.sh -server host:port</computeroutput></para>
<para> The above command gives you a command line option of using quotas.</para>
<section>
<title>Setting Quotas</title>
diff --git a/src/docs/src/documentation/content/xdocs/zookeeperStarted.xml b/src/docs/src/documentation/content/xdocs/zookeeperStarted.xml
index cd20b63..70c227f 100644
--- a/src/docs/src/documentation/content/xdocs/zookeeperStarted.xml
+++ b/src/docs/src/documentation/content/xdocs/zookeeperStarted.xml
@@ -164,39 +164,10 @@ clientPort=2181
<section id="sc_ConnectingToZooKeeper">
<title>Connecting to ZooKeeper</title>
- <para>Once ZooKeeper is running, you have several options for connection
- to it:</para>
+ <programlisting>$ bin/zkCli.sh -server 127.0.0.1:2181</programlisting>
- <itemizedlist>
- <listitem>
- <para><emphasis role="bold">Java</emphasis>: Use</para>
-
- <programlisting>bin/zkCli.sh -server 127.0.0.1:2181</programlisting>
-
- <para>This lets you perform simple, file-like operations.</para>
- </listitem>
-
- <listitem>
- <para><emphasis role="bold">C</emphasis>: compile cli_mt
- (multi-threaded) or cli_st (single-threaded) by running
- <command>make cli_mt</command> or <command>make
- cli_st</command> in
- the <emphasis role="bold">src/c</emphasis> subdirectory in
- the ZooKeeper sources. See the README contained within
- <emphasis role="bold">src/c</emphasis> for full details.</para>
+ <para>This lets you perform simple, file-like operations.</para>
- <para>You can run the program
- from <emphasis role="bold">src/c</emphasis> using:</para>
-
- <programlisting>LD_LIBRARY_PATH=. cli_mt 127.0.0.1:2181</programlisting>
-
- <para>or</para>
-
- <programlisting>LD_LIBRARY_PATH=. cli_st 127.0.0.1:2181</programlisting>
- <para>This will give you a simple shell to execute file
- system like operations on ZooKeeper.</para>
- </listitem>
- </itemizedlist>
<para>Once you have connected, you should see something like:
</para>
<programlisting>
@@ -341,8 +312,25 @@ numChildren = 0
ZooKeeper in replicated mode. A replicated group of servers in the same
application is called a <emphasis>quorum</emphasis>, and in replicated
mode, all servers in the quorum have copies of the same configuration
- file. The file is similar to the one used in standalone mode, but with a
- few differences. Here is an example:</para>
+ file.</para>
+ <note>
+ <para>
+ For replicated mode, a minimum of three servers are required,
+ and it is strongly recommended that you have an odd number of
+ servers. If you only have two servers, then you are in a
+ situation where if one of them fails, there are not enough
+ machines to form a majority quorum. Two servers is inherently
+ <emphasis role="bold">less</emphasis>
+ stable than a single server, because there are two single
+ points of failure.
+ </para>
+ </note>
+ <para>
+ The required
+ <emphasis role="bold">conf/zoo.cfg</emphasis>
+ file for replicated mode is similar to the one used in standalone
+ mode, but with a few differences. Here is an example:
+ </para>
<programlisting>
tickTime=2000
@@ -395,6 +383,13 @@ server.3=zoo3:2888:3888
(in the above replicated example, running on a
single <emphasis>localhost</emphasis>, you would still have
three config files).</para>
+ <para>Please be aware that setting up multiple servers on a single
+ machine will not create any redundancy. If something were to
+ happen which caused the machine to die, all of the zookeeper
+ servers would be offline. Full redundancy requires that each
+ server have its own machine. It must be a completely separate
+ physical server. Multiple virtual machines on the same physical
+ host are still vulnerable to the complete failure of that host.</para>
</note>
</section>
diff --git a/src/java/lib/jdiff/zookeeper_3.4.8.xml b/src/java/lib/jdiff/zookeeper_3.4.9.xml
similarity index 97%
rename from src/java/lib/jdiff/zookeeper_3.4.8.xml
rename to src/java/lib/jdiff/zookeeper_3.4.9.xml
index d787780..85f5d4e 100644
--- a/src/java/lib/jdiff/zookeeper_3.4.8.xml
+++ b/src/java/lib/jdiff/zookeeper_3.4.9.xml
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<!-- Generated by the JDiff Javadoc doclet -->
<!-- (http://www.jdiff.org) -->
-<!-- on Fri Feb 05 19:46:20 PST 2016 -->
+<!-- on Tue Aug 23 13:09:29 IST 2016 -->
<api
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:noNamespaceSchemaLocation='api.xsd'
- name="zookeeper 3.4.8"
+ name="zookeeper 3.4.9"
jdversion="1.0.9">
-<!-- Command line arguments = -doclet jdiff.JDiff -docletpath /home/rgs/src/zookeeper-svn/build/jdiff/lib/jdiff-1.0.9.jar:/home/rgs/src/zookeeper-svn/build/jdiff/lib/xerces-1.4.4.jar -classpath /home/rgs/src/zookeeper-svn/build/classes:/home/rgs/src/zookeeper-svn/src/java/lib/ivy-2.2.0.jar:/home/rgs/src/zookeeper-svn/build/lib/jline-0.9.94.jar:/home/rgs/src/zookeeper-svn/build/lib/log4j-1.2.16.jar:/home/rgs/src/zookeeper-svn/build/lib/netty-3.7.0.Final.jar:/home/rgs/src/zookeeper-svn/b [...]
+<!-- Command line arguments = -doclet jdiff.JDiff -docletpath /home/sunil/Rakesh/ZKRelease/branch-3.4/build/jdiff/lib/jdiff-1.0.9.jar:/home/sunil/Rakesh/ZKRelease/branch-3.4/build/jdiff/lib/xerces-1.4.4.jar -classpath /home/sunil/Rakesh/ZKRelease/branch-3.4/build/classes:/home/sunil/Rakesh/ZKRelease/branch-3.4/src/java/lib/ivy-2.4.0.jar:/home/sunil/Rakesh/ZKRelease/branch-3.4/build/lib/jline-0.9.94.jar:/home/sunil/Rakesh/ZKRelease/branch-3.4/build/lib/log4j-1.2.16.jar:/home/sunil/Rakes [...]
<package name="org.apache.zookeeper">
<!-- start interface org.apache.zookeeper.AsyncCallback -->
<interface name="AsyncCallback" abstract="true"
@@ -30,7 +30,7 @@
deprecated="not deprecated">
<implements name="org.apache.zookeeper.AsyncCallback"/>
<method name="processResult"
- abstract="true" native="false" synchronized="false"
+ abstract="false" native="false" synchronized="false"
static="false" final="false" visibility="public"
deprecated="not deprecated">
<param name="rc" type="int"/>
@@ -74,7 +74,7 @@
deprecated="not deprecated">
<implements name="org.apache.zookeeper.AsyncCallback"/>
<method name="processResult"
- abstract="true" native="false" synchronized="false"
+ abstract="false" native="false" synchronized="false"
static="false" final="false" visibility="public"
deprecated="not deprecated">
<param name="rc" type="int"/>
@@ -107,7 +107,7 @@
deprecated="not deprecated">
<implements name="org.apache.zookeeper.AsyncCallback"/>
<method name="processResult"
- abstract="true" native="false" synchronized="false"
+ abstract="false" native="false" synchronized="false"
static="false" final="false" visibility="public"
deprecated="not deprecated">
<param name="rc" type="int"/>
@@ -148,7 +148,7 @@
deprecated="not deprecated">
<implements name="org.apache.zookeeper.AsyncCallback"/>
<method name="processResult"
- abstract="true" native="false" synchronized="false"
+ abstract="false" native="false" synchronized="false"
static="false" final="false" visibility="public"
deprecated="not deprecated">
<param name="rc" type="int"/>
@@ -192,7 +192,7 @@
deprecated="not deprecated">
<implements name="org.apache.zookeeper.AsyncCallback"/>
<method name="processResult"
- abstract="true" native="false" synchronized="false"
+ abstract="false" native="false" synchronized="false"
static="false" final="false" visibility="public"
deprecated="not deprecated">
<param name="rc" type="int"/>
@@ -238,7 +238,7 @@
deprecated="not deprecated">
<implements name="org.apache.zookeeper.AsyncCallback"/>
<method name="processResult"
- abstract="true" native="false" synchronized="false"
+ abstract="false" native="false" synchronized="false"
static="false" final="false" visibility="public"
deprecated="not deprecated">
<param name="rc" type="int"/>
@@ -284,7 +284,7 @@
deprecated="not deprecated">
<implements name="org.apache.zookeeper.AsyncCallback"/>
<method name="processResult"
- abstract="true" native="false" synchronized="false"
+ abstract="false" native="false" synchronized="false"
static="false" final="false" visibility="public"
deprecated="not deprecated">
<param name="rc" type="int"/>
@@ -336,7 +336,7 @@
deprecated="not deprecated">
<implements name="org.apache.zookeeper.AsyncCallback"/>
<method name="processResult"
- abstract="true" native="false" synchronized="false"
+ abstract="false" native="false" synchronized="false"
static="false" final="false" visibility="public"
deprecated="not deprecated">
<param name="rc" type="int"/>
@@ -582,7 +582,7 @@
static="false" final="false" visibility="public"
deprecated="not deprecated">
<method name="materialize" return="java.util.Set"
- abstract="true" native="false" synchronized="false"
+ abstract="false" native="false" synchronized="false"
static="false" final="false" visibility="public"
deprecated="not deprecated">
<param name="state" type="org.apache.zookeeper.Watcher.Event.KeeperState"/>
@@ -719,7 +719,7 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="Entry" type="java.lang.String, java.lang.String"
+ <constructor name="Environment.Entry" type="java.lang.String, java.lang.String"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -877,7 +877,7 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="APIErrorException"
+ <constructor name="KeeperException.APIErrorException"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -891,7 +891,7 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="AuthFailedException"
+ <constructor name="KeeperException.AuthFailedException"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -905,11 +905,11 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="BadArgumentsException"
+ <constructor name="KeeperException.BadArgumentsException"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
- <constructor name="BadArgumentsException" type="java.lang.String"
+ <constructor name="KeeperException.BadArgumentsException" type="java.lang.String"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -923,11 +923,11 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="BadVersionException"
+ <constructor name="KeeperException.BadVersionException"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
- <constructor name="BadVersionException" type="java.lang.String"
+ <constructor name="KeeperException.BadVersionException" type="java.lang.String"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -1369,7 +1369,7 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="ConnectionLossException"
+ <constructor name="KeeperException.ConnectionLossException"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -1383,7 +1383,7 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="DataInconsistencyException"
+ <constructor name="KeeperException.DataInconsistencyException"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -1397,11 +1397,11 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="InvalidACLException"
+ <constructor name="KeeperException.InvalidACLException"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
- <constructor name="InvalidACLException" type="java.lang.String"
+ <constructor name="KeeperException.InvalidACLException" type="java.lang.String"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -1415,7 +1415,7 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="InvalidCallbackException"
+ <constructor name="KeeperException.InvalidCallbackException"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -1429,7 +1429,7 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="MarshallingErrorException"
+ <constructor name="KeeperException.MarshallingErrorException"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -1443,7 +1443,7 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="NoAuthException"
+ <constructor name="KeeperException.NoAuthException"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -1457,11 +1457,11 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="NoChildrenForEphemeralsException"
+ <constructor name="KeeperException.NoChildrenForEphemeralsException"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
- <constructor name="NoChildrenForEphemeralsException" type="java.lang.String"
+ <constructor name="KeeperException.NoChildrenForEphemeralsException" type="java.lang.String"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -1475,11 +1475,11 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="NodeExistsException"
+ <constructor name="KeeperException.NodeExistsException"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
- <constructor name="NodeExistsException" type="java.lang.String"
+ <constructor name="KeeperException.NodeExistsException" type="java.lang.String"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -1493,11 +1493,11 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="NoNodeException"
+ <constructor name="KeeperException.NoNodeException"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
- <constructor name="NoNodeException" type="java.lang.String"
+ <constructor name="KeeperException.NoNodeException" type="java.lang.String"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -1511,11 +1511,11 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="NotEmptyException"
+ <constructor name="KeeperException.NotEmptyException"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
- <constructor name="NotEmptyException" type="java.lang.String"
+ <constructor name="KeeperException.NotEmptyException" type="java.lang.String"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -1529,7 +1529,7 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="NotReadOnlyException"
+ <constructor name="KeeperException.NotReadOnlyException"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -1543,7 +1543,7 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="OperationTimeoutException"
+ <constructor name="KeeperException.OperationTimeoutException"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -1557,7 +1557,7 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="RuntimeInconsistencyException"
+ <constructor name="KeeperException.RuntimeInconsistencyException"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -1571,7 +1571,7 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="SessionExpiredException"
+ <constructor name="KeeperException.SessionExpiredException"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -1585,7 +1585,7 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="SessionMovedException"
+ <constructor name="KeeperException.SessionMovedException"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -1599,7 +1599,7 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="SystemErrorException"
+ <constructor name="KeeperException.SystemErrorException"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -1613,7 +1613,7 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="UnimplementedException"
+ <constructor name="KeeperException.UnimplementedException"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -2073,7 +2073,7 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="CheckResult"
+ <constructor name="OpResult.CheckResult"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -2098,7 +2098,7 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="CreateResult" type="java.lang.String"
+ <constructor name="OpResult.CreateResult" type="java.lang.String"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -2130,7 +2130,7 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="DeleteResult"
+ <constructor name="OpResult.DeleteResult"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -2155,7 +2155,7 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="ErrorResult" type="int"
+ <constructor name="OpResult.ErrorResult" type="int"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -2187,7 +2187,7 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="SetDataResult" type="org.apache.zookeeper.data.Stat"
+ <constructor name="OpResult.SetDataResult" type="org.apache.zookeeper.data.Stat"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -2600,7 +2600,7 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="ExitCodeException" type="int, java.lang.String"
+ <constructor name="Shell.ExitCodeException" type="int, java.lang.String"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
@@ -2619,19 +2619,19 @@
abstract="false"
static="true" final="false" visibility="public"
deprecated="not deprecated">
- <constructor name="ShellCommandExecutor" type="java.lang.String[]"
+ <constructor name="Shell.ShellCommandExecutor" type="java.lang.String[]"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
- <constructor name="ShellCommandExecutor" type="java.lang.String[], java.io.File"
+ <constructor name="Shell.ShellCommandExecutor" type="java.lang.String[], java.io.File"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
- <constructor name="ShellCommandExecutor" type="java.lang.String[], java.io.File, java.util.Map"
+ <constructor name="Shell.ShellCommandExecutor" type="java.lang.String[], java.io.File, java.util.Map"
static="false" final="false" visibility="public"
deprecated="not deprecated">
</constructor>
- <constructor name="ShellCommandExecutor" type="java.lang.String[], java.io.File, java.util.Map, long"
+ <constructor name="Shell.ShellCommandExecutor" type="java.lang.String[], java.io.File, java.util.Map, long"
static="false" final="false" visibility="public"
deprecated="not deprecated">
<doc>
@@ -2958,7 +2958,7 @@
static="false" final="false" visibility="public"
deprecated="not deprecated">
<method name="process"
- abstract="true" native="false" synchronized="false"
+ abstract="false" native="false" synchronized="false"
static="false" final="false" visibility="public"
deprecated="not deprecated">
<param name="event" type="org.apache.zookeeper.WatchedEvent"/>
diff --git a/src/java/main/org/apache/zookeeper/Login.java b/src/java/main/org/apache/zookeeper/Login.java
index a214c9c..aaa220c 100644
--- a/src/java/main/org/apache/zookeeper/Login.java
+++ b/src/java/main/org/apache/zookeeper/Login.java
@@ -317,7 +317,8 @@ public class Login {
for(KerberosTicket ticket: tickets) {
KerberosPrincipal server = ticket.getServer();
if (server.getName().equals("krbtgt/" + server.getRealm() + "@" + server.getRealm())) {
- LOG.debug("Found tgt " + ticket + ".");
+ LOG.debug("Client principal is \"" + ticket.getClient().getName() + "\".");
+ LOG.debug("Server principal is \"" + ticket.getServer().getName() + "\".");
return ticket;
}
}
diff --git a/src/java/main/org/apache/zookeeper/client/ZooKeeperSaslClient.java b/src/java/main/org/apache/zookeeper/client/ZooKeeperSaslClient.java
index dbc1080..21ef0fa 100644
--- a/src/java/main/org/apache/zookeeper/client/ZooKeeperSaslClient.java
+++ b/src/java/main/org/apache/zookeeper/client/ZooKeeperSaslClient.java
@@ -64,6 +64,7 @@ public class ZooKeeperSaslClient {
public static final String LOGIN_CONTEXT_NAME_KEY = "zookeeper.sasl.clientconfig";
public static final String ENABLE_CLIENT_SASL_KEY = "zookeeper.sasl.client";
public static final String ENABLE_CLIENT_SASL_DEFAULT = "true";
+ private static volatile boolean initializedLogin = false;
/**
* Returns true if the SASL client is enabled. By default, the client
@@ -214,17 +215,22 @@ public class ZooKeeperSaslClient {
}
}
- synchronized private SaslClient createSaslClient(final String servicePrincipal,
+ private SaslClient createSaslClient(final String servicePrincipal,
final String loginContext) throws LoginException {
try {
- if (login == null) {
- if (LOG.isDebugEnabled()) {
- LOG.debug("JAAS loginContext is: " + loginContext);
+ if (!initializedLogin) {
+ synchronized (ZooKeeperSaslClient.class) {
+ if (login == null) {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("JAAS loginContext is: " + loginContext);
+ }
+ // note that the login object is static: it's shared amongst all zookeeper-related connections.
+ // in order to ensure the login is initialized only once, it must be synchronized the code snippet.
+ login = new Login(loginContext, new ClientCallbackHandler(null));
+ login.startThreadIfNeeded();
+ initializedLogin = true;
+ }
}
- // note that the login object is static: it's shared amongst all zookeeper-related connections.
- // createSaslClient() must be declared synchronized so that login is initialized only once.
- login = new Login(loginContext, new ClientCallbackHandler(null));
- login.startThreadIfNeeded();
}
Subject subject = login.getSubject();
SaslClient saslClient;
diff --git a/src/java/main/org/apache/zookeeper/server/DataTree.java b/src/java/main/org/apache/zookeeper/server/DataTree.java
index 47ef6e2..25f2975 100644
--- a/src/java/main/org/apache/zookeeper/server/DataTree.java
+++ b/src/java/main/org/apache/zookeeper/server/DataTree.java
@@ -22,16 +22,13 @@ import java.io.IOException;
import java.io.PrintWriter;
import java.nio.ByteBuffer;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.Collection;
-import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
-import org.apache.jute.Index;
import org.apache.jute.InputArchive;
import org.apache.jute.OutputArchive;
import org.apache.jute.Record;
@@ -45,12 +42,12 @@ import org.apache.zookeeper.Watcher;
import org.apache.zookeeper.Watcher.Event;
import org.apache.zookeeper.Watcher.Event.EventType;
import org.apache.zookeeper.Watcher.Event.KeeperState;
-import org.apache.zookeeper.ZooDefs.Ids;
import org.apache.zookeeper.ZooDefs.OpCode;
import org.apache.zookeeper.common.PathTrie;
import org.apache.zookeeper.data.ACL;
import org.apache.zookeeper.data.Stat;
import org.apache.zookeeper.data.StatPersisted;
+import org.apache.zookeeper.server.upgrade.DataNodeV1;
import org.apache.zookeeper.txn.CheckVersionTxn;
import org.apache.zookeeper.txn.CreateTxn;
import org.apache.zookeeper.txn.DeleteTxn;
@@ -116,23 +113,7 @@ public class DataTree {
private final Map<Long, HashSet<String>> ephemerals =
new ConcurrentHashMap<Long, HashSet<String>>();
- /**
- * this is map from longs to acl's. It saves acl's being stored for each
- * datanode.
- */
- public final Map<Long, List<ACL>> longKeyMap =
- new HashMap<Long, List<ACL>>();
-
- /**
- * this a map from acls to long.
- */
- public final Map<List<ACL>, Long> aclKeyMap =
- new HashMap<List<ACL>, Long>();
-
- /**
- * these are the number of acls that we have in the datatree
- */
- protected long aclIndex = 0;
+ private final ReferenceCountedACLCache aclCache = new ReferenceCountedACLCache();
@SuppressWarnings("unchecked")
public HashSet<String> getEphemerals(long sessionId) {
@@ -151,74 +132,6 @@ public class DataTree {
return ephemerals;
}
- private long incrementIndex() {
- return ++aclIndex;
- }
-
- /**
- * compare two list of acls. if there elements are in the same order and the
- * same size then return true else return false
- *
- * @param lista
- * the list to be compared
- * @param listb
- * the list to be compared
- * @return true if and only if the lists are of the same size and the
- * elements are in the same order in lista and listb
- */
- private boolean listACLEquals(List<ACL> lista, List<ACL> listb) {
- if (lista.size() != listb.size()) {
- return false;
- }
- for (int i = 0; i < lista.size(); i++) {
- ACL a = lista.get(i);
- ACL b = listb.get(i);
- if (!a.equals(b)) {
- return false;
- }
- }
- return true;
- }
-
- /**
- * converts the list of acls to a list of longs.
- *
- * @param acls
- * @return a list of longs that map to the acls
- */
- public synchronized Long convertAcls(List<ACL> acls) {
- if (acls == null)
- return -1L;
- // get the value from the map
- Long ret = aclKeyMap.get(acls);
- // could not find the map
- if (ret != null)
- return ret;
- long val = incrementIndex();
- longKeyMap.put(val, acls);
- aclKeyMap.put(acls, val);
- return val;
- }
-
- /**
- * converts a list of longs to a list of acls.
- *
- * @param longVal
- * the list of longs
- * @return a list of ACLs that map to longs
- */
- public synchronized List<ACL> convertLong(Long longVal) {
- if (longVal == null)
- return null;
- if (longVal == -1L)
- return Ids.OPEN_ACL_UNSAFE;
- List<ACL> acls = longKeyMap.get(longVal);
- if (acls == null) {
- LOG.error("ERROR: ACL not available for long " + longVal);
- throw new RuntimeException("Failed to fetch acls for " + longVal);
- }
- return acls;
- }
public Collection<Long> getSessions() {
return ephemerals.keySet();
@@ -484,7 +397,7 @@ public class DataTree {
}
parent.stat.setCversion(parentCVersion);
parent.stat.setPzxid(zxid);
- Long longval = convertAcls(acl);
+ Long longval = aclCache.convertAcls(acl);
DataNode child = new DataNode(parent, data, longval, stat);
parent.addChild(childName);
nodes.put(path, child);
@@ -544,6 +457,9 @@ public class DataTree {
throw new KeeperException.NoNodeException();
}
nodes.remove(path);
+ synchronized (node) {
+ aclCache.removeUsage(node.acl);
+ }
DataNode parent = nodes.get(parentName);
if (parent == null) {
throw new KeeperException.NoNodeException();
@@ -706,8 +622,9 @@ public class DataTree {
throw new KeeperException.NoNodeException();
}
synchronized (n) {
+ aclCache.removeUsage(n.acl);
n.stat.setAversion(version);
- n.acl = convertAcls(acl);
+ n.acl = aclCache.convertAcls(acl);
n.copyStat(stat);
return stat;
}
@@ -722,10 +639,26 @@ public class DataTree {
}
synchronized (n) {
n.copyStat(stat);
- return new ArrayList<ACL>(convertLong(n.acl));
+ return new ArrayList<ACL>(aclCache.convertLong(n.acl));
}
}
+ public List<ACL> getACL(DataNode node) {
+ synchronized (node) {
+ return aclCache.convertLong(node.acl);
+ }
+ }
+
+ public Long getACL(DataNodeV1 oldDataNode) {
+ synchronized (oldDataNode) {
+ return aclCache.convertAcls(oldDataNode.acl);
+ }
+ }
+
+ public int aclCacheSize() {
+ return aclCache.size();
+ }
+
static public class ProcessTxnResult {
public long clientId;
@@ -1142,46 +1075,9 @@ public class DataTree {
public boolean initialized = false;
- private void deserializeList(Map<Long, List<ACL>> longKeyMap,
- InputArchive ia) throws IOException {
- int i = ia.readInt("map");
- while (i > 0) {
- Long val = ia.readLong("long");
- if (aclIndex < val) {
- aclIndex = val;
- }
- List<ACL> aclList = new ArrayList<ACL>();
- Index j = ia.startVector("acls");
- while (!j.done()) {
- ACL acl = new ACL();
- acl.deserialize(ia, "acl");
- aclList.add(acl);
- j.incr();
- }
- longKeyMap.put(val, aclList);
- aclKeyMap.put(aclList, val);
- i--;
- }
- }
-
- private synchronized void serializeList(Map<Long, List<ACL>> longKeyMap,
- OutputArchive oa) throws IOException {
- oa.writeInt(longKeyMap.size(), "map");
- Set<Map.Entry<Long, List<ACL>>> set = longKeyMap.entrySet();
- for (Map.Entry<Long, List<ACL>> val : set) {
- oa.writeLong(val.getKey(), "long");
- List<ACL> aclList = val.getValue();
- oa.startVector(aclList, "acls");
- for (ACL acl : aclList) {
- acl.serialize(oa, "acl");
- }
- oa.endVector(aclList, "acls");
- }
- }
-
public void serialize(OutputArchive oa, String tag) throws IOException {
scount = 0;
- serializeList(longKeyMap, oa);
+ aclCache.serialize(oa);
serializeNode(oa, new StringBuilder(""));
// / marks end of stream
// we need to check if clear had been called in between the snapshot.
@@ -1191,7 +1087,7 @@ public class DataTree {
}
public void deserialize(InputArchive ia, String tag) throws IOException {
- deserializeList(longKeyMap, ia);
+ aclCache.deserialize(ia);
nodes.clear();
pTrie.clear();
String path = ia.readString("path");
@@ -1199,6 +1095,9 @@ public class DataTree {
DataNode node = new DataNode();
ia.readRecord(node, "node");
nodes.put(path, node);
+ synchronized (node) {
+ aclCache.addUsage(node.acl);
+ }
int lastSlash = path.lastIndexOf('/');
if (lastSlash == -1) {
root = node;
@@ -1228,6 +1127,8 @@ public class DataTree {
// update the quotas - create path trie
// and also update the stat nodes
setupQuota();
+
+ aclCache.purgeUnused();
}
/**
diff --git a/src/java/main/org/apache/zookeeper/server/FinalRequestProcessor.java b/src/java/main/org/apache/zookeeper/server/FinalRequestProcessor.java
index e3cfc4b..7278064 100644
--- a/src/java/main/org/apache/zookeeper/server/FinalRequestProcessor.java
+++ b/src/java/main/org/apache/zookeeper/server/FinalRequestProcessor.java
@@ -281,11 +281,7 @@ public class FinalRequestProcessor implements RequestProcessor {
if (n == null) {
throw new KeeperException.NoNodeException();
}
- Long aclL;
- synchronized(n) {
- aclL = n.acl;
- }
- PrepRequestProcessor.checkACL(zks, zks.getZKDatabase().convertLong(aclL),
+ PrepRequestProcessor.checkACL(zks, zks.getZKDatabase().aclForNode(n),
ZooDefs.Perms.READ,
request.authInfo);
Stat stat = new Stat();
@@ -327,12 +323,7 @@ public class FinalRequestProcessor implements RequestProcessor {
if (n == null) {
throw new KeeperException.NoNodeException();
}
- Long aclG;
- synchronized(n) {
- aclG = n.acl;
-
- }
- PrepRequestProcessor.checkACL(zks, zks.getZKDatabase().convertLong(aclG),
+ PrepRequestProcessor.checkACL(zks, zks.getZKDatabase().aclForNode(n),
ZooDefs.Perms.READ,
request.authInfo);
List<String> children = zks.getZKDatabase().getChildren(
@@ -351,11 +342,7 @@ public class FinalRequestProcessor implements RequestProcessor {
if (n == null) {
throw new KeeperException.NoNodeException();
}
- Long aclG;
- synchronized(n) {
- aclG = n.acl;
- }
- PrepRequestProcessor.checkACL(zks, zks.getZKDatabase().convertLong(aclG),
+ PrepRequestProcessor.checkACL(zks, zks.getZKDatabase().aclForNode(n),
ZooDefs.Perms.READ,
request.authInfo);
List<String> children = zks.getZKDatabase().getChildren(
diff --git a/src/java/main/org/apache/zookeeper/server/PrepRequestProcessor.java b/src/java/main/org/apache/zookeeper/server/PrepRequestProcessor.java
index 0b95e9d..fe02b8f 100644
--- a/src/java/main/org/apache/zookeeper/server/PrepRequestProcessor.java
+++ b/src/java/main/org/apache/zookeeper/server/PrepRequestProcessor.java
@@ -150,15 +150,13 @@ public class PrepRequestProcessor extends ZooKeeperCriticalThread implements
if (lastChange == null) {
DataNode n = zks.getZKDatabase().getNode(path);
if (n != null) {
- Long acl;
Set<String> children;
synchronized(n) {
- acl = n.acl;
children = n.getChildren();
}
lastChange = new ChangeRecord(-1, path, n.stat,
children != null ? children.size() : 0,
- zks.getZKDatabase().convertLong(acl));
+ zks.getZKDatabase().aclForNode(n));
}
}
}
diff --git a/src/java/main/org/apache/zookeeper/server/ReferenceCountedACLCache.java b/src/java/main/org/apache/zookeeper/server/ReferenceCountedACLCache.java
new file mode 100644
index 0000000..486b845
--- /dev/null
+++ b/src/java/main/org/apache/zookeeper/server/ReferenceCountedACLCache.java
@@ -0,0 +1,223 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.zookeeper.server;
+
+import org.apache.jute.Index;
+import org.apache.jute.InputArchive;
+import org.apache.jute.OutputArchive;
+import org.apache.zookeeper.ZooDefs;
+import org.apache.zookeeper.data.ACL;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicLong;
+
+public class ReferenceCountedACLCache {
+ private static final Logger LOG = LoggerFactory.getLogger(ReferenceCountedACLCache.class);
+
+ final Map<Long, List<ACL>> longKeyMap =
+ new HashMap<Long, List<ACL>>();
+
+ final Map<List<ACL>, Long> aclKeyMap =
+ new HashMap<List<ACL>, Long>();
+
+ final Map<Long, AtomicLongWithEquals> referenceCounter =
+ new HashMap<Long, AtomicLongWithEquals>();
+ private static final long OPEN_UNSAFE_ACL_ID = -1L;
+
+ /**
+ * these are the number of acls that we have in the datatree
+ */
+ long aclIndex = 0;
+
+ /**
+ * converts the list of acls to a long.
+ * Increments the reference counter for this ACL.
+ * @param acls
+ * @return a long that map to the acls
+ */
+ public synchronized Long convertAcls(List<ACL> acls) {
+ if (acls == null)
+ return OPEN_UNSAFE_ACL_ID;
+
+ // get the value from the map
+ Long ret = aclKeyMap.get(acls);
+ if (ret == null) {
+ ret = incrementIndex();
+ longKeyMap.put(ret, acls);
+ aclKeyMap.put(acls, ret);
+ }
+
+ addUsage(ret);
+
+ return ret;
+ }
+
+ /**
+ * converts a long to a list of acls.
+ *
+ * @param longVal
+ * @return a list of ACLs that map to the long
+ */
+ public synchronized List<ACL> convertLong(Long longVal) {
+ if (longVal == null)
+ return null;
+ if (longVal == OPEN_UNSAFE_ACL_ID)
+ return ZooDefs.Ids.OPEN_ACL_UNSAFE;
+ List<ACL> acls = longKeyMap.get(longVal);
+ if (acls == null) {
+ LOG.error("ERROR: ACL not available for long " + longVal);
+ throw new RuntimeException("Failed to fetch acls for " + longVal);
+ }
+ return acls;
+ }
+
+ private long incrementIndex() {
+ return ++aclIndex;
+ }
+
+ public synchronized void deserialize(InputArchive ia) throws IOException {
+ clear();
+ int i = ia.readInt("map");
+ while (i > 0) {
+ Long val = ia.readLong("long");
+ if (aclIndex < val) {
+ aclIndex = val;
+ }
+ List<ACL> aclList = new ArrayList<ACL>();
+ Index j = ia.startVector("acls");
+ while (!j.done()) {
+ ACL acl = new ACL();
+ acl.deserialize(ia, "acl");
+ aclList.add(acl);
+ j.incr();
+ }
+ longKeyMap.put(val, aclList);
+ aclKeyMap.put(aclList, val);
+ referenceCounter.put(val, new AtomicLongWithEquals(0));
+ i--;
+ }
+ }
+
+ public synchronized void serialize(OutputArchive oa) throws IOException {
+ oa.writeInt(longKeyMap.size(), "map");
+ Set<Map.Entry<Long, List<ACL>>> set = longKeyMap.entrySet();
+ for (Map.Entry<Long, List<ACL>> val : set) {
+ oa.writeLong(val.getKey(), "long");
+ List<ACL> aclList = val.getValue();
+ oa.startVector(aclList, "acls");
+ for (ACL acl : aclList) {
+ acl.serialize(oa, "acl");
+ }
+ oa.endVector(aclList, "acls");
+ }
+ }
+
+ public int size() {
+ return aclKeyMap.size();
+ }
+
+ private void clear() {
+ aclKeyMap.clear();
+ longKeyMap.clear();
+ referenceCounter.clear();
+ }
+
+ public synchronized void addUsage(Long acl) {
+ if (acl == OPEN_UNSAFE_ACL_ID) {
+ return;
+ }
+
+ if (!longKeyMap.containsKey(acl)) {
+ LOG.info("Ignoring acl " + acl + " as it does not exist in the cache");
+ return;
+ }
+
+ AtomicLong count = referenceCounter.get(acl);
+ if (count == null) {
+ referenceCounter.put(acl, new AtomicLongWithEquals(1));
+ } else {
+ count.incrementAndGet();
+ }
+ }
+
+ public synchronized void removeUsage(Long acl) {
+ if (acl == OPEN_UNSAFE_ACL_ID) {
+ return;
+ }
+
+ if (!longKeyMap.containsKey(acl)) {
+ LOG.info("Ignoring acl " + acl + " as it does not exist in the cache");
+ return;
+ }
+
+ long newCount = referenceCounter.get(acl).decrementAndGet();
+ if (newCount <= 0) {
+ referenceCounter.remove(acl);
+ aclKeyMap.remove(longKeyMap.get(acl));
+ longKeyMap.remove(acl);
+ }
+ }
+
+ public synchronized void purgeUnused() {
+ Iterator<Map.Entry<Long, AtomicLongWithEquals>> refCountIter = referenceCounter.entrySet().iterator();
+ while (refCountIter.hasNext()) {
+ Map.Entry<Long, AtomicLongWithEquals> entry = refCountIter.next();
+ if (entry.getValue().get() <= 0) {
+ Long acl = entry.getKey();
+ aclKeyMap.remove(longKeyMap.get(acl));
+ longKeyMap.remove(acl);
+ refCountIter.remove();
+ }
+ }
+ }
+
+ private static class AtomicLongWithEquals extends AtomicLong {
+
+ private static final long serialVersionUID = 3355155896813725462L;
+
+ public AtomicLongWithEquals(long i) {
+ super(i);
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ return equals((AtomicLongWithEquals) o);
+ }
+
+ public boolean equals(AtomicLongWithEquals that) {
+ return get() == that.get();
+ }
+
+ @Override
+ public int hashCode() {
+ return 31 * Long.valueOf(get()).hashCode();
+ }
+ }
+}
diff --git a/src/java/main/org/apache/zookeeper/server/ServerCnxnFactory.java b/src/java/main/org/apache/zookeeper/server/ServerCnxnFactory.java
index 9b7fd87..cf417f8 100644
--- a/src/java/main/org/apache/zookeeper/server/ServerCnxnFactory.java
+++ b/src/java/main/org/apache/zookeeper/server/ServerCnxnFactory.java
@@ -63,6 +63,10 @@ public abstract class ServerCnxnFactory {
}
}
+ ZooKeeperServer getZooKeeperServer() {
+ return zkServer;
+ }
+
public abstract void closeSession(long sessionId);
public abstract void configure(InetSocketAddress addr,
diff --git a/src/java/main/org/apache/zookeeper/server/SyncRequestProcessor.java b/src/java/main/org/apache/zookeeper/server/SyncRequestProcessor.java
index 41aa390..f622b24 100644
--- a/src/java/main/org/apache/zookeeper/server/SyncRequestProcessor.java
+++ b/src/java/main/org/apache/zookeeper/server/SyncRequestProcessor.java
@@ -182,7 +182,6 @@ public class SyncRequestProcessor extends ZooKeeperCriticalThread implements Req
} catch (Throwable t) {
handleException(this.getName(), t);
running = false;
- System.exit(11);
}
LOG.info("SyncRequestProcessor exited!");
}
diff --git a/src/java/main/org/apache/zookeeper/server/ZKDatabase.java b/src/java/main/org/apache/zookeeper/server/ZKDatabase.java
index 4c29dea..72357b7 100644
--- a/src/java/main/org/apache/zookeeper/server/ZKDatabase.java
+++ b/src/java/main/org/apache/zookeeper/server/ZKDatabase.java
@@ -267,7 +267,10 @@ public class ZKDatabase {
}
}
-
+
+ public List<ACL> aclForNode(DataNode n) {
+ return dataTree.getACL(n);
+ }
/**
* remove a cnxn from the datatree
* @param cnxn the cnxn to remove from the datatree
@@ -350,15 +353,6 @@ public class ZKDatabase {
}
/**
- * convert from long to the acl entry
- * @param aclL the long for which to get the acl
- * @return the acl corresponding to this long entry
- */
- public List<ACL> convertLong(Long aclL) {
- return dataTree.convertLong(aclL);
- }
-
- /**
* get data and stat for a path
* @param path the path being queried
* @param stat the stat for this path
@@ -422,7 +416,7 @@ public class ZKDatabase {
* @return the acl size of the datatree
*/
public int getAclSize() {
- return dataTree.longKeyMap.size();
+ return dataTree.aclCacheSize();
}
/**
diff --git a/src/java/main/org/apache/zookeeper/server/ZooKeeperServer.java b/src/java/main/org/apache/zookeeper/server/ZooKeeperServer.java
index da8b64a..62ac466 100644
--- a/src/java/main/org/apache/zookeeper/server/ZooKeeperServer.java
+++ b/src/java/main/org/apache/zookeeper/server/ZooKeeperServer.java
@@ -114,8 +114,8 @@ public class ZooKeeperServer implements SessionExpirer, ServerStats.Provider {
protected RequestProcessor firstProcessor;
protected volatile State state = State.INITIAL;
- enum State {
- INITIAL, RUNNING, SHUTDOWN;
+ protected enum State {
+ INITIAL, RUNNING, SHUTDOWN, ERROR;
}
/**
@@ -133,8 +133,8 @@ public class ZooKeeperServer implements SessionExpirer, ServerStats.Provider {
private ServerCnxnFactory serverCnxnFactory;
private final ServerStats serverStats;
-
- private final ZooKeeperServerListener listener = new ZooKeeperServerListenerImpl();
+ private final ZooKeeperServerListener listener;
+ private ZooKeeperServerShutdownHandler zkShutdownHandler;
void removeCnxn(ServerCnxn cnxn) {
zkDb.removeCnxn(cnxn);
@@ -149,6 +149,7 @@ public class ZooKeeperServer implements SessionExpirer, ServerStats.Provider {
*/
public ZooKeeperServer() {
serverStats = new ServerStats(this);
+ listener = new ZooKeeperServerListenerImpl(this);
}
/**
@@ -166,7 +167,9 @@ public class ZooKeeperServer implements SessionExpirer, ServerStats.Provider {
this.tickTime = tickTime;
this.minSessionTimeout = minSessionTimeout;
this.maxSessionTimeout = maxSessionTimeout;
-
+
+ listener = new ZooKeeperServerListenerImpl(this);
+
LOG.info("Created server with tickTime " + tickTime
+ " minSessionTimeout " + getMinSessionTimeout()
+ " maxSessionTimeout " + getMaxSessionTimeout()
@@ -417,7 +420,7 @@ public class ZooKeeperServer implements SessionExpirer, ServerStats.Provider {
registerJMX();
- state = State.RUNNING;
+ setState(State.RUNNING);
notifyAll();
}
@@ -434,20 +437,6 @@ public class ZooKeeperServer implements SessionExpirer, ServerStats.Provider {
return listener;
}
- /**
- * Default listener implementation, which will do a graceful shutdown on
- * notification
- */
- private class ZooKeeperServerListenerImpl implements
- ZooKeeperServerListener {
-
- @Override
- public void notifyStopping(String threadName, int exitCode) {
- LOG.info("Thread {} exits, error code {}", threadName, exitCode);
- shutdown();
- }
- }
-
protected void createSessionTracker() {
sessionTracker = new SessionTrackerImpl(this, zkDb.getSessionWithTimeOuts(),
tickTime, 1, getZooKeeperServerListener());
@@ -457,19 +446,58 @@ public class ZooKeeperServer implements SessionExpirer, ServerStats.Provider {
((SessionTrackerImpl)sessionTracker).start();
}
+ /**
+ * Sets the state of ZooKeeper server. After changing the state, it notifies
+ * the server state change to a registered shutdown handler, if any.
+ * <p>
+ * The following are the server state transitions:
+ * <li>During startup the server will be in the INITIAL state.</li>
+ * <li>After successfully starting, the server sets the state to RUNNING.
+ * </li>
+ * <li>The server transitions to the ERROR state if it hits an internal
+ * error. {@link ZooKeeperServerListenerImpl} notifies any critical resource
+ * error events, e.g., SyncRequestProcessor not being able to write a txn to
+ * disk.</li>
+ * <li>During shutdown the server sets the state to SHUTDOWN, which
+ * corresponds to the server not running.</li>
+ *
+ * @param state new server state.
+ */
+ protected void setState(State state) {
+ this.state = state;
+ // Notify server state changes to the registered shutdown handler, if any.
+ if (zkShutdownHandler != null) {
+ zkShutdownHandler.handle(state);
+ } else {
+ LOG.error("ZKShutdownHandler is not registered, so ZooKeeper server "
+ + "won't take any action on ERROR or SHUTDOWN server state changes");
+ }
+ }
+
+ /**
+ * This can be used while shutting down the server to see whether the server
+ * is already shutdown or not.
+ *
+ * @return true if the server is running or server hits an error, false
+ * otherwise.
+ */
+ protected boolean canShutdown() {
+ return state == State.RUNNING || state == State.ERROR;
+ }
+
public boolean isRunning() {
return state == State.RUNNING;
}
public synchronized void shutdown() {
- if (!isRunning()) {
+ if (!canShutdown()) {
LOG.debug("ZooKeeper server is not running, so not proceeding to shutdown!");
return;
}
LOG.info("shutting down");
// new RuntimeException("Calling shutdown").printStackTrace();
- state = State.SHUTDOWN;
+ setState(State.SHUTDOWN);
// Since sessionTracker and syncThreads poll we just have to
// set running to false and they will detect it during the poll
// interval.
@@ -1040,5 +1068,15 @@ public class ZooKeeperServer implements SessionExpirer, ServerStats.Provider {
return rc;
}
-
+ /**
+ * This method is used to register the ZooKeeperServerShutdownHandler to get
+ * server's error or shutdown state change notifications.
+ * {@link ZooKeeperServerShutdownHandler#handle(State)} will be called for
+ * every server state changes {@link #setState(State)}.
+ *
+ * @param zkShutdownHandler shutdown handler
+ */
+ void registerServerShutdownHandler(ZooKeeperServerShutdownHandler zkShutdownHandler) {
+ this.zkShutdownHandler = zkShutdownHandler;
+ }
}
diff --git a/src/java/main/org/apache/zookeeper/server/ZooKeeperServerListenerImpl.java b/src/java/main/org/apache/zookeeper/server/ZooKeeperServerListenerImpl.java
new file mode 100644
index 0000000..08f4934
--- /dev/null
+++ b/src/java/main/org/apache/zookeeper/server/ZooKeeperServerListenerImpl.java
@@ -0,0 +1,45 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.zookeeper.server;
+
+import org.apache.zookeeper.server.ZooKeeperServer.State;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Default listener implementation, which will be used to notify internal
+ * errors. For example, if some critical thread has stopped due to fatal errors,
+ * then it will get notifications and will change the state of ZooKeeper server
+ * to ERROR representing an error status.
+ */
+class ZooKeeperServerListenerImpl implements ZooKeeperServerListener {
+ private static final Logger LOG = LoggerFactory
+ .getLogger(ZooKeeperServerListenerImpl.class);
+
+ private final ZooKeeperServer zkServer;
+
+ ZooKeeperServerListenerImpl(ZooKeeperServer zkServer) {
+ this.zkServer = zkServer;
+ }
+
+ @Override
+ public void notifyStopping(String threadName, int exitCode) {
+ LOG.info("Thread {} exits, error code {}", threadName, exitCode);
+ zkServer.setState(State.ERROR);
+ }
+}
diff --git a/src/java/main/org/apache/zookeeper/server/ZooKeeperServerMain.java b/src/java/main/org/apache/zookeeper/server/ZooKeeperServerMain.java
index c7eb9d6..612d227 100644
--- a/src/java/main/org/apache/zookeeper/server/ZooKeeperServerMain.java
+++ b/src/java/main/org/apache/zookeeper/server/ZooKeeperServerMain.java
@@ -20,6 +20,7 @@ package org.apache.zookeeper.server;
import java.io.File;
import java.io.IOException;
+import java.util.concurrent.CountDownLatch;
import javax.management.JMException;
@@ -99,7 +100,12 @@ public class ZooKeeperServerMain {
// so rather than spawning another thread, we will just call
// run() in this thread.
// create a file logger url from the command line args
- ZooKeeperServer zkServer = new ZooKeeperServer();
+ final ZooKeeperServer zkServer = new ZooKeeperServer();
+ // Registers shutdown handler which will be used to know the
+ // server error or shutdown state changes.
+ final CountDownLatch shutdownLatch = new CountDownLatch(1);
+ zkServer.registerServerShutdownHandler(
+ new ZooKeeperServerShutdownHandler(shutdownLatch));
txnLog = new FileTxnSnapLog(new File(config.dataLogDir), new File(
config.dataDir));
@@ -111,8 +117,13 @@ public class ZooKeeperServerMain {
cnxnFactory.configure(config.getClientPortAddress(),
config.getMaxClientCnxns());
cnxnFactory.startup(zkServer);
+ // Watch status of ZooKeeper server. It will do a graceful shutdown
+ // if the server is not running or hits an internal error.
+ shutdownLatch.await();
+ shutdown();
+
cnxnFactory.join();
- if (zkServer.isRunning()) {
+ if (zkServer.canShutdown()) {
zkServer.shutdown();
}
} catch (InterruptedException e) {
@@ -129,6 +140,13 @@ public class ZooKeeperServerMain {
* Shutdown the serving instance
*/
protected void shutdown() {
- cnxnFactory.shutdown();
+ if (cnxnFactory != null) {
+ cnxnFactory.shutdown();
+ }
+ }
+
+ // VisibleForTesting
+ ServerCnxnFactory getCnxnFactory() {
+ return cnxnFactory;
}
}
diff --git a/src/c/include/zookeeper_version.h b/src/java/main/org/apache/zookeeper/server/ZooKeeperServerShutdownHandler.java
similarity index 50%
copy from src/c/include/zookeeper_version.h
copy to src/java/main/org/apache/zookeeper/server/ZooKeeperServerShutdownHandler.java
index 92eee13..499cacb 100644
--- a/src/c/include/zookeeper_version.h
+++ b/src/java/main/org/apache/zookeeper/server/ZooKeeperServerShutdownHandler.java
@@ -15,19 +15,32 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#ifndef ZOOKEEPER_VERSION_H_
-#define ZOOKEEPER_VERSION_H_
+package org.apache.zookeeper.server;
-#ifdef __cplusplus
-extern "C" {
-#endif
+import java.util.concurrent.CountDownLatch;
-#define ZOO_MAJOR_VERSION 3
-#define ZOO_MINOR_VERSION 4
-#define ZOO_PATCH_VERSION 8
+import org.apache.zookeeper.server.ZooKeeperServer.State;
-#ifdef __cplusplus
-}
-#endif
+/**
+ * ZooKeeper server shutdown handler which will be used to handle ERROR or
+ * SHUTDOWN server state transitions, which in turn releases the associated
+ * shutdown latch.
+ */
+class ZooKeeperServerShutdownHandler {
+ private final CountDownLatch shutdownLatch;
-#endif /* ZOOKEEPER_VERSION_H_ */
+ ZooKeeperServerShutdownHandler(CountDownLatch shutdownLatch) {
+ this.shutdownLatch = shutdownLatch;
+ }
+
+ /**
+ * This will be invoked when the server transition to a new server state.
+ *
+ * @param state new server state
+ */
+ void handle(State state) {
+ if (state == State.ERROR || state == State.SHUTDOWN) {
+ shutdownLatch.countDown();
+ }
+ }
+}
diff --git a/src/java/main/org/apache/zookeeper/server/persistence/FileTxnLog.java b/src/java/main/org/apache/zookeeper/server/persistence/FileTxnLog.java
index 7456f74..b1682c3 100644
--- a/src/java/main/org/apache/zookeeper/server/persistence/FileTxnLog.java
+++ b/src/java/main/org/apache/zookeeper/server/persistence/FileTxnLog.java
@@ -111,7 +111,11 @@ public class FileTxnLog implements TxnLog {
LOG.warn(size + " is not a valid value for preAllocSize");
}
}
- fsyncWarningThresholdMS = Long.getLong("fsync.warningthresholdms", 1000);
+ /** Local variable to read fsync.warningthresholdms into */
+ Long fsyncWarningThreshold;
+ if ((fsyncWarningThreshold = Long.getLong("zookeeper.fsync.warningthresholdms")) == null)
+ fsyncWarningThreshold = Long.getLong("fsync.warningthresholdms", 1000);
+ fsyncWarningThresholdMS = fsyncWarningThreshold;
}
long lastZxidSeen;
diff --git a/src/java/main/org/apache/zookeeper/server/quorum/Follower.java b/src/java/main/org/apache/zookeeper/server/quorum/Follower.java
index 2aeb0c3..043a522 100644
--- a/src/java/main/org/apache/zookeeper/server/quorum/Follower.java
+++ b/src/java/main/org/apache/zookeeper/server/quorum/Follower.java
@@ -18,11 +18,9 @@
package org.apache.zookeeper.server.quorum;
-import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.net.InetSocketAddress;
-import org.apache.jute.BinaryInputArchive;
import org.apache.jute.Record;
import org.apache.zookeeper.server.util.SerializeUtils;
import org.apache.zookeeper.server.util.ZxidUtils;
@@ -81,7 +79,7 @@ public class Follower extends Learner{
}
syncWithLeader(newEpochZxid);
QuorumPacket qp = new QuorumPacket();
- while (self.isRunning()) {
+ while (this.isRunning()) {
readPacket(qp);
processPacket(qp);
}
diff --git a/src/java/main/org/apache/zookeeper/server/quorum/Leader.java b/src/java/main/org/apache/zookeeper/server/quorum/Leader.java
index 40c6748..c83d352 100644
--- a/src/java/main/org/apache/zookeeper/server/quorum/Leader.java
+++ b/src/java/main/org/apache/zookeeper/server/quorum/Leader.java
@@ -471,6 +471,12 @@ public class Leader {
f.ping();
}
+ // check leader running status
+ if (!this.isRunning()) {
+ shutdown("Unexpected internal error");
+ return;
+ }
+
if (!tickSkip && !self.getQuorumVerifier().containsQuorum(syncedSet)) {
//if (!tickSkip && syncedCount < self.quorumPeers.size() / 2) {
// Lost quorum, shutdown
@@ -1055,4 +1061,8 @@ public class Leader {
return "UNKNOWN";
}
}
+
+ private boolean isRunning() {
+ return self.isRunning() && zk.isRunning();
+ }
}
diff --git a/src/java/main/org/apache/zookeeper/server/quorum/Learner.java b/src/java/main/org/apache/zookeeper/server/quorum/Learner.java
index c73a8ee..647b8a2 100644
--- a/src/java/main/org/apache/zookeeper/server/quorum/Learner.java
+++ b/src/java/main/org/apache/zookeeper/server/quorum/Learner.java
@@ -549,4 +549,8 @@ public class Learner {
zk.shutdown();
}
}
+
+ boolean isRunning() {
+ return self.isRunning() && zk.isRunning();
+ }
}
diff --git a/src/java/main/org/apache/zookeeper/server/quorum/Observer.java b/src/java/main/org/apache/zookeeper/server/quorum/Observer.java
index 33b0379..e53f6f2 100644
--- a/src/java/main/org/apache/zookeeper/server/quorum/Observer.java
+++ b/src/java/main/org/apache/zookeeper/server/quorum/Observer.java
@@ -18,11 +18,9 @@
package org.apache.zookeeper.server.quorum;
-import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.net.InetSocketAddress;
-import org.apache.jute.BinaryInputArchive;
import org.apache.jute.Record;
import org.apache.zookeeper.server.ObserverBean;
import org.apache.zookeeper.server.Request;
@@ -68,10 +66,10 @@ public class Observer extends Learner{
try {
connectToLeader(addr);
long newLeaderZxid = registerWithLeader(Leader.OBSERVERINFO);
-
+
syncWithLeader(newLeaderZxid);
QuorumPacket qp = new QuorumPacket();
- while (self.isRunning()) {
+ while (this.isRunning()) {
readPacket(qp);
processPacket(qp);
}
diff --git a/src/java/main/org/apache/zookeeper/server/quorum/ObserverZooKeeperServer.java b/src/java/main/org/apache/zookeeper/server/quorum/ObserverZooKeeperServer.java
index a9276ea..f024948 100644
--- a/src/java/main/org/apache/zookeeper/server/quorum/ObserverZooKeeperServer.java
+++ b/src/java/main/org/apache/zookeeper/server/quorum/ObserverZooKeeperServer.java
@@ -140,7 +140,7 @@ public class ObserverZooKeeperServer extends LearnerZooKeeperServer {
@Override
public synchronized void shutdown() {
- if (!isRunning()) {
+ if (!canShutdown()) {
LOG.debug("ZooKeeper server is not running, so not proceeding to shutdown!");
return;
}
diff --git a/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java b/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java
index 8ae820d..0924ef6 100644
--- a/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java
+++ b/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java
@@ -92,6 +92,27 @@ public class QuorumPeerConfig {
}
}
+ private static String[] splitWithLeadingHostname(String s)
+ throws ConfigException
+ {
+ /* Does it start with an IPv6 literal? */
+ if (s.startsWith("[")) {
+ int i = s.indexOf("]:");
+ if (i < 0) {
+ throw new ConfigException(s + " starts with '[' but has no matching ']:'");
+ }
+
+ String[] sa = s.substring(i + 2).split(":");
+ String[] nsa = new String[sa.length + 1];
+ nsa[0] = s.substring(1, i);
+ System.arraycopy(sa, 0, nsa, 1, sa.length);
+
+ return nsa;
+ } else {
+ return s.split(":");
+ }
+ }
+
/**
* Parse a ZooKeeper configuration file
* @param path the patch of the configuration file
@@ -179,7 +200,7 @@ public class QuorumPeerConfig {
} else if (key.startsWith("server.")) {
int dot = key.indexOf('.');
long sid = Long.parseLong(key.substring(dot + 1));
- String parts[] = value.split(":");
+ String parts[] = splitWithLeadingHostname(value);
if ((parts.length != 2) && (parts.length != 3) && (parts.length !=4)) {
LOG.error(value
+ " does not have the form host:port or host:port:port " +
diff --git a/src/java/main/org/apache/zookeeper/server/quorum/QuorumZooKeeperServer.java b/src/java/main/org/apache/zookeeper/server/quorum/QuorumZooKeeperServer.java
index 32096a7..93088dd 100644
--- a/src/java/main/org/apache/zookeeper/server/quorum/QuorumZooKeeperServer.java
+++ b/src/java/main/org/apache/zookeeper/server/quorum/QuorumZooKeeperServer.java
@@ -57,4 +57,9 @@ public abstract class QuorumZooKeeperServer extends ZooKeeperServer {
pwriter.print("peerType=");
pwriter.println(self.getLearnerType().ordinal());
}
+
+ @Override
+ protected void setState(State state) {
+ this.state = state;
+ }
}
diff --git a/src/java/main/org/apache/zookeeper/server/quorum/ReadOnlyZooKeeperServer.java b/src/java/main/org/apache/zookeeper/server/quorum/ReadOnlyZooKeeperServer.java
index af1b678..c9950cc 100644
--- a/src/java/main/org/apache/zookeeper/server/quorum/ReadOnlyZooKeeperServer.java
+++ b/src/java/main/org/apache/zookeeper/server/quorum/ReadOnlyZooKeeperServer.java
@@ -91,6 +91,11 @@ public class ReadOnlyZooKeeperServer extends QuorumZooKeeperServer {
}
@Override
+ protected void setState(State state) {
+ this.state = state;
+ }
+
+ @Override
protected void unregisterJMX() {
// unregister from JMX
try {
@@ -131,7 +136,7 @@ public class ReadOnlyZooKeeperServer extends QuorumZooKeeperServer {
@Override
public synchronized void shutdown() {
- if (!isRunning()) {
+ if (!canShutdown()) {
LOG.debug("ZooKeeper server is not running, so not proceeding to shutdown!");
return;
}
diff --git a/src/java/main/org/apache/zookeeper/server/upgrade/DataNodeV1.java b/src/java/main/org/apache/zookeeper/server/upgrade/DataNodeV1.java
index 6156d99..8c4fda0 100644
--- a/src/java/main/org/apache/zookeeper/server/upgrade/DataNodeV1.java
+++ b/src/java/main/org/apache/zookeeper/server/upgrade/DataNodeV1.java
@@ -73,7 +73,7 @@ public class DataNodeV1 implements Record {
byte data[];
- List<ACL> acl;
+ public List<ACL> acl;
public StatPersistedV1 stat;
diff --git a/src/java/main/org/apache/zookeeper/server/upgrade/UpgradeSnapShotV1.java b/src/java/main/org/apache/zookeeper/server/upgrade/UpgradeSnapShotV1.java
index aecc4d2..dcbd313 100644
--- a/src/java/main/org/apache/zookeeper/server/upgrade/UpgradeSnapShotV1.java
+++ b/src/java/main/org/apache/zookeeper/server/upgrade/UpgradeSnapShotV1.java
@@ -268,7 +268,7 @@ public class UpgradeSnapShotV1 implements UpgradeSnapShot {
DataNodeV1 oldDataNode) {
StatPersisted stat = convertStat(oldDataNode.stat);
DataNode dataNode = new DataNode(parent, oldDataNode.data,
- dt.convertAcls(oldDataNode.acl), stat);
+ dt.getACL(oldDataNode), stat);
dataNode.setChildren(oldDataNode.children);
return dataNode;
}
diff --git a/src/java/test/org/apache/zookeeper/ZKTestCase.java b/src/java/test/org/apache/zookeeper/ZKTestCase.java
index b721cfc..97e2db6 100644
--- a/src/java/test/org/apache/zookeeper/ZKTestCase.java
+++ b/src/java/test/org/apache/zookeeper/ZKTestCase.java
@@ -18,6 +18,7 @@
package org.apache.zookeeper;
+import org.junit.Assume;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.junit.Rule;
@@ -26,6 +27,10 @@ import org.junit.rules.TestWatchman;
import org.junit.runner.RunWith;
import org.junit.runners.model.FrameworkMethod;
+import java.io.IOException;
+import java.net.Inet6Address;
+import java.net.InetAddress;
+
/**
* Base class for a non-parameterized ZK test.
*
@@ -67,4 +72,13 @@ public class ZKTestCase {
};
+ protected void assumeIPv6Available() {
+ try {
+ InetAddress address = Inet6Address.getByName("0:0:0:0:0:0:0:1");
+ Assume.assumeTrue(address.isReachable(1000));
+ } catch (IOException exception) {
+ Assume.assumeTrue(false);
+ }
+ }
+
}
diff --git a/src/java/test/org/apache/zookeeper/server/ReferenceCountedACLCacheTest.java b/src/java/test/org/apache/zookeeper/server/ReferenceCountedACLCacheTest.java
new file mode 100644
index 0000000..076657b
--- /dev/null
+++ b/src/java/test/org/apache/zookeeper/server/ReferenceCountedACLCacheTest.java
@@ -0,0 +1,260 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.zookeeper.server;
+
+import org.apache.jute.BinaryInputArchive;
+import org.apache.jute.BinaryOutputArchive;
+import org.apache.zookeeper.ZooDefs;
+import org.apache.zookeeper.data.ACL;
+import org.apache.zookeeper.data.Id;
+import org.junit.Test;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import static org.junit.Assert.*;
+
+public class ReferenceCountedACLCacheTest {
+ @Test
+ public void testSameACLGivesSameID() {
+ List<ACL> testACL = createACL("myid");
+
+ ReferenceCountedACLCache cache = new ReferenceCountedACLCache();
+ Long aclId = cache.convertAcls(testACL);
+
+ List<ACL> testACL2 = createACL("myid");
+
+ assertEquals(aclId, cache.convertAcls(testACL2));
+ }
+
+ @Test
+ public void testWhetherOrderingMatters() {
+ List<ACL> testACL = new ArrayList<ACL>();
+ testACL.add(new ACL(ZooDefs.Perms.READ, new Id("scheme", "ro")));
+ testACL.add(new ACL(ZooDefs.Perms.WRITE, new Id("scheme", "rw")));
+
+ ReferenceCountedACLCache cache = new ReferenceCountedACLCache();
+ Long aclId = cache.convertAcls(testACL);
+
+ List<ACL> testACL2 = new ArrayList<ACL>();
+ testACL2.add(new ACL(ZooDefs.Perms.WRITE, new Id("scheme", "rw")));
+ testACL2.add(new ACL(ZooDefs.Perms.READ, new Id("scheme", "ro")));
+
+ assertFalse(aclId.equals(cache.convertAcls(testACL2)));
+ }
+
+ @Test
+ public void testBidirectionality() {
+ List<ACL> testACL = createACL("myid");
+
+ ReferenceCountedACLCache cache = new ReferenceCountedACLCache();
+ Long aclId = cache.convertAcls(testACL);
+
+ assertEquals(testACL, cache.convertLong(aclId));
+ }
+
+ @Test
+ public void testCacheSize() {
+ List<ACL> testACL = createACL("myid");
+
+ ReferenceCountedACLCache cache = new ReferenceCountedACLCache();
+ Long aclId = cache.convertAcls(testACL);
+ assertEquals(1, cache.size());
+
+ List<ACL> testACL2 = createACL("myid");
+
+ assertEquals(aclId, cache.convertAcls(testACL2));
+ assertEquals(1, cache.size());
+
+ List<ACL> testACL3 = createACL("differentId");
+
+ Long aclId3 = cache.convertAcls(testACL3);
+ assertFalse(aclId3.equals(aclId));
+ assertEquals(2, cache.size());
+ }
+
+ @Test
+ public void testAddThenRemove() {
+ List<ACL> testACL = createACL("myid");
+
+ ReferenceCountedACLCache cache = new ReferenceCountedACLCache();
+ Long aclId = cache.convertAcls(testACL);
+ assertEquals(1, cache.size());
+
+ cache.removeUsage(aclId);
+ assertEquals(0, cache.size());
+ }
+
+ @Test
+ public void testMultipleAddsAndRemove() {
+ List<ACL> testACL = createACL("myid");
+
+ ReferenceCountedACLCache cache = new ReferenceCountedACLCache();
+ Long aclId = cache.convertAcls(testACL);
+ assertEquals(1, cache.size());
+
+ cache.convertAcls(testACL);
+ assertEquals(1, cache.size());
+
+ List<ACL> testACL2 = createACL("anotherId");
+ cache.convertAcls(testACL2);
+
+ cache.removeUsage(aclId);
+ assertEquals(2, cache.size());
+ cache.removeUsage(aclId);
+ assertEquals(1, cache.size());
+
+ Long newId = cache.convertAcls(testACL);
+ assertFalse(aclId.equals(newId));
+ }
+
+ @Test
+ public void testAddUsage() {
+ List<ACL> testACL = createACL("myid");
+
+ ReferenceCountedACLCache cache = new ReferenceCountedACLCache();
+ Long aclId = cache.convertAcls(testACL);
+ assertEquals(1, cache.size());
+
+ cache.addUsage(aclId);
+ assertEquals(1, cache.size());
+
+ cache.removeUsage(aclId);
+ assertEquals(1, cache.size());
+ cache.removeUsage(aclId);
+ assertEquals(0, cache.size());
+ }
+
+ @Test
+ public void testAddNonExistentUsage() {
+ ReferenceCountedACLCache cache = new ReferenceCountedACLCache();
+ cache.addUsage(1L);
+
+ assertEquals(0, cache.size());
+ /*
+ On startup, it's possible that we'll try calling addUsage of an ID not in the cache. This is safe to ignore
+ as it'll be added later when we traverse the tranlog. See discussion here:
+ http://mail-archives.apache.org/mod_mbox/zookeeper-user/201507.mbox/%3CCAB5oV2_ujhvBA1sEkCG2WRakPjCy%2BNR10620WK2G1GGgmEO44g%40mail.gmail.com%3E
+
+ This test makes sure that we don't add the ID to the cache in this case as that would result in dupes later
+ and consequently incorrect counts and entries that will never be cleaned out.
+ */
+ }
+
+ @Test
+ public void testSerializeDeserialize() throws IOException {
+ ReferenceCountedACLCache cache = new ReferenceCountedACLCache();
+
+ List<ACL> acl1 = createACL("one");
+ List<ACL> acl2 = createACL("two");
+ List<ACL> acl3 = createACL("three");
+ List<ACL> acl4 = createACL("four");
+ List<ACL> acl5 = createACL("five");
+
+ Long aclId1 = convertACLsNTimes(cache, acl1, 1);
+ Long aclId2 = convertACLsNTimes(cache, acl2, 2);
+ Long aclId3 = convertACLsNTimes(cache, acl3, 3);
+ Long aclId4 = convertACLsNTimes(cache, acl4, 4);
+ Long aclId5 = convertACLsNTimes(cache, acl5, 5);
+
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ BinaryOutputArchive archive = BinaryOutputArchive.getArchive(baos);
+ cache.serialize(archive);
+
+ BinaryInputArchive inArchive = BinaryInputArchive.getArchive(new ByteArrayInputStream(baos.toByteArray()));
+ ReferenceCountedACLCache deserializedCache = new ReferenceCountedACLCache();
+ deserializedCache.deserialize(inArchive);
+ callAddUsageNTimes(deserializedCache, aclId1, 1);
+ callAddUsageNTimes(deserializedCache, aclId2, 2);
+ callAddUsageNTimes(deserializedCache, aclId3, 3);
+ callAddUsageNTimes(deserializedCache, aclId4, 4);
+ callAddUsageNTimes(deserializedCache, aclId5, 5);
+
+ assertCachesEqual(cache, deserializedCache);
+ }
+
+ private void assertCachesEqual(ReferenceCountedACLCache expected, ReferenceCountedACLCache actual){
+ assertEquals(expected.aclIndex, actual.aclIndex);
+ assertEquals(expected.aclKeyMap, actual.aclKeyMap);
+ assertEquals(expected.longKeyMap, actual.longKeyMap);
+ assertEquals(expected.referenceCounter, actual.referenceCounter);
+ }
+
+ @Test
+ public void testPurgeUnused() throws IOException {
+ ReferenceCountedACLCache cache = new ReferenceCountedACLCache();
+
+ List<ACL> acl1 = createACL("one");
+ List<ACL> acl2 = createACL("two");
+ List<ACL> acl3 = createACL("three");
+ List<ACL> acl4 = createACL("four");
+ List<ACL> acl5 = createACL("five");
+
+ Long aclId1 = convertACLsNTimes(cache, acl1, 1);
+ Long aclId2 = convertACLsNTimes(cache, acl2, 2);
+ Long aclId3 = convertACLsNTimes(cache, acl3, 3);
+ Long aclId4 = convertACLsNTimes(cache, acl4, 4);
+ Long aclId5 = convertACLsNTimes(cache, acl5, 5);
+
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ BinaryOutputArchive archive = BinaryOutputArchive.getArchive(baos);
+ cache.serialize(archive);
+
+ BinaryInputArchive inArchive = BinaryInputArchive.getArchive(new ByteArrayInputStream(baos.toByteArray()));
+ ReferenceCountedACLCache deserializedCache = new ReferenceCountedACLCache();
+ deserializedCache.deserialize(inArchive);
+ callAddUsageNTimes(deserializedCache, aclId1, 1);
+ callAddUsageNTimes(deserializedCache, aclId2, 2);
+ deserializedCache.purgeUnused();
+
+ assertEquals(2, deserializedCache.size());
+ assertEquals(aclId1, deserializedCache.convertAcls(acl1));
+ assertEquals(aclId2, deserializedCache.convertAcls(acl2));
+ assertFalse(acl3.equals(deserializedCache.convertAcls(acl3)));
+ assertFalse(acl4.equals(deserializedCache.convertAcls(acl4)));
+ assertFalse(acl5.equals(deserializedCache.convertAcls(acl5)));
+ }
+
+ private void callAddUsageNTimes(ReferenceCountedACLCache deserializedCache, Long aclId, int num) {
+ for (int i = 0; i < num; i++) {
+ deserializedCache.addUsage(aclId);
+ }
+ }
+
+ private Long convertACLsNTimes(ReferenceCountedACLCache cache, List<ACL> acl, int num) {
+ if (num <= 0) {
+ return -1L;
+ }
+
+ for (int i = 0; i < num -1; i++) {
+ cache.convertAcls(acl);
+ }
+
+ return cache.convertAcls(acl);
+ }
+
+ private List<ACL> createACL(String id) {
+ List<ACL> acl1 = new ArrayList<ACL>();
+ acl1.add(new ACL(ZooDefs.Perms.ADMIN, new Id("scheme", id)));
+ return acl1;
+ }
+}
\ No newline at end of file
diff --git a/src/java/test/org/apache/zookeeper/server/ZooKeeperServerMainTest.java b/src/java/test/org/apache/zookeeper/server/ZooKeeperServerMainTest.java
index 8efbd02..fcb7889 100644
--- a/src/java/test/org/apache/zookeeper/server/ZooKeeperServerMainTest.java
+++ b/src/java/test/org/apache/zookeeper/server/ZooKeeperServerMainTest.java
@@ -19,6 +19,7 @@
package org.apache.zookeeper.server;
import static org.apache.zookeeper.test.ClientBase.CONNECTION_TIMEOUT;
+import static org.junit.Assert.fail;
import java.io.File;
import java.io.FileWriter;
@@ -127,6 +128,10 @@ public class ZooKeeperServerMainTest extends ZKTestCase implements Watcher {
throw new IOException("Failed to delete file: " + f);
}
}
+
+ ServerCnxnFactory getCnxnFactory() {
+ return main.getCnxnFactory();
+ }
}
public static class TestZKSMain extends ZooKeeperServerMain {
@@ -136,6 +141,63 @@ public class ZooKeeperServerMainTest extends ZKTestCase implements Watcher {
}
/**
+ * Test case for https://issues.apache.org/jira/browse/ZOOKEEPER-2247.
+ * Test to verify that even after non recoverable error (error while
+ * writing transaction log) on ZooKeeper service will be available
+ */
+ @Test(timeout = 30000)
+ public void testNonRecoverableError() throws Exception {
+ ClientBase.setupTestEnv();
+
+ final int CLIENT_PORT = PortAssignment.unique();
+
+ MainThread main = new MainThread(CLIENT_PORT, true);
+ main.start();
+
+ Assert.assertTrue("waiting for server being up",
+ ClientBase.waitForServerUp("127.0.0.1:" + CLIENT_PORT,
+ CONNECTION_TIMEOUT));
+
+
+ ZooKeeper zk = new ZooKeeper("127.0.0.1:" + CLIENT_PORT,
+ ClientBase.CONNECTION_TIMEOUT, this);
+
+ zk.create("/foo1", "foobar".getBytes(), Ids.OPEN_ACL_UNSAFE,
+ CreateMode.PERSISTENT);
+ Assert.assertEquals(new String(zk.getData("/foo1", null, null)), "foobar");
+
+ // inject problem in server
+ ZooKeeperServer zooKeeperServer = main.getCnxnFactory()
+ .getZooKeeperServer();
+ FileTxnSnapLog snapLog = zooKeeperServer.getTxnLogFactory();
+ FileTxnSnapLog fileTxnSnapLogWithError = new FileTxnSnapLog(
+ snapLog.getDataDir(), snapLog.getSnapDir()) {
+ @Override
+ public void commit() throws IOException {
+ throw new IOException("Input/output error");
+ }
+ };
+ ZKDatabase newDB = new ZKDatabase(fileTxnSnapLogWithError);
+ zooKeeperServer.setZKDatabase(newDB);
+
+ try {
+ // do create operation, so that injected IOException is thrown
+ zk.create("/foo2", "foobar".getBytes(), Ids.OPEN_ACL_UNSAFE,
+ CreateMode.PERSISTENT);
+ fail("IOException is expected as error is injected in transaction log commit funtionality");
+ } catch (Exception e) {
+ // do nothing
+ }
+ zk.close();
+ Assert.assertTrue("waiting for server down",
+ ClientBase.waitForServerDown("127.0.0.1:" + CLIENT_PORT,
+ ClientBase.CONNECTION_TIMEOUT));
+ fileTxnSnapLogWithError.close();
+ main.shutdown();
+ main.deleteDirs();
+ }
+
+ /**
* Verify the ability to start a standalone server instance.
*/
@Test
diff --git a/src/java/test/org/apache/zookeeper/server/quorum/QuorumPeerMainTest.java b/src/java/test/org/apache/zookeeper/server/quorum/QuorumPeerMainTest.java
index 2bf36ba..5ea92cb 100644
--- a/src/java/test/org/apache/zookeeper/server/quorum/QuorumPeerMainTest.java
+++ b/src/java/test/org/apache/zookeeper/server/quorum/QuorumPeerMainTest.java
@@ -458,6 +458,135 @@ public class QuorumPeerMainTest extends QuorumPeerTestBase {
Assert.assertTrue("complains about host", found);
}
+ @Test
+ public void testValidIpv6AddressInQuorum() throws Exception {
+ assumeIPv6Available();
+
+ ClientBase.setupTestEnv();
+
+ // setup the logger to capture all logs
+ Layout layout =
+ Logger.getRootLogger().getAppender("CONSOLE").getLayout();
+ ByteArrayOutputStream os = new ByteArrayOutputStream();
+ WriterAppender appender = new WriterAppender(layout, os);
+ appender.setImmediateFlush(true);
+ appender.setThreshold(Level.INFO);
+ Logger qlogger = Logger.getLogger("org.apache.zookeeper.server.quorum");
+ qlogger.addAppender(appender);
+
+ try {
+ final int CLIENT_PORT_QP1 = PortAssignment.unique();
+ final int CLIENT_PORT_QP2 = PortAssignment.unique();
+
+ String quorumCfgSection =
+ "server.1=127.0.0.1:" + PortAssignment.unique()
+ + ":" + PortAssignment.unique()
+ + "\nserver.2=[0:0:0:0:0:0:0:1]:" + PortAssignment.unique()
+ + ":" + PortAssignment.unique();
+
+ MainThread q1 = new MainThread(1, CLIENT_PORT_QP1, quorumCfgSection);
+ MainThread q2 = new MainThread(2, CLIENT_PORT_QP2, quorumCfgSection);
+
+ q1.start();
+ q2.start();
+
+ Assert.assertTrue("waiting for server 1 being up",
+ ClientBase.waitForServerUp("127.0.0.1:" + CLIENT_PORT_QP1,
+ ClientBase.CONNECTION_TIMEOUT));
+
+ Assert.assertTrue("waiting for server 2 being up",
+ ClientBase.waitForServerUp("[0:0:0:0:0:0:0:1]:" + CLIENT_PORT_QP1,
+ ClientBase.CONNECTION_TIMEOUT));
+
+ q1.shutdown();
+ q2.shutdown();
+
+ Assert.assertTrue("waiting for server 1 down",
+ ClientBase.waitForServerDown("127.0.0.1:" + CLIENT_PORT_QP1,
+ ClientBase.CONNECTION_TIMEOUT));
+
+ Assert.assertTrue("waiting for server 2 down",
+ ClientBase.waitForServerDown("[0:0:0:0:0:0:0:1]:" + CLIENT_PORT_QP1,
+ ClientBase.CONNECTION_TIMEOUT));
+
+ } finally {
+ qlogger.removeAppender(appender);
+ }
+
+ os.close();
+ LineNumberReader r = new LineNumberReader(new StringReader(os.toString()));
+ String line;
+ boolean found = false;
+ Pattern p =
+ Pattern.compile(".*Resolved hostname: 0:0:0:0:0:0:0:1.*");
+ while ((line = r.readLine()) != null) {
+ found = p.matcher(line).matches();
+ if (found) {
+ break;
+ }
+ }
+ Assert.assertTrue("IPv6 address resolved", found);
+ }
+
+ @Test
+ public void testInvalidIpv6AddressInQuorum() throws Exception {
+ assumeIPv6Available();
+
+ ClientBase.setupTestEnv();
+
+ // setup the logger to capture all logs
+ Layout layout =
+ Logger.getRootLogger().getAppender("CONSOLE").getLayout();
+ ByteArrayOutputStream os = new ByteArrayOutputStream();
+ WriterAppender appender = new WriterAppender(layout, os);
+ appender.setImmediateFlush(true);
+ appender.setThreshold(Level.INFO);
+ Logger qlogger = Logger.getLogger("org.apache.zookeeper.server.quorum");
+ qlogger.addAppender(appender);
+
+ try {
+ final int CLIENT_PORT_QP1 = PortAssignment.unique();
+
+ String quorumCfgSection =
+ "server.1=127.0.0.1:" + PortAssignment.unique()
+ + ":" + PortAssignment.unique()
+ + "\nserver.2=[0:0:0:0:0:0:0:1:" + PortAssignment.unique()
+ + ":" + PortAssignment.unique();
+
+ MainThread q1 = new MainThread(1, CLIENT_PORT_QP1, quorumCfgSection);
+ q1.start();
+
+ boolean isup =
+ ClientBase.waitForServerUp("127.0.0.1:" + CLIENT_PORT_QP1,
+ 30000);
+
+ Assert.assertFalse("Server never came up", isup);
+
+ q1.shutdown();
+
+ Assert.assertTrue("waiting for server 1 down",
+ ClientBase.waitForServerDown("127.0.0.1:" + CLIENT_PORT_QP1,
+ ClientBase.CONNECTION_TIMEOUT));
+
+ } finally {
+ qlogger.removeAppender(appender);
+ }
+
+ os.close();
+ LineNumberReader r = new LineNumberReader(new StringReader(os.toString()));
+ String line;
+ boolean found = false;
+ Pattern p =
+ Pattern.compile(".*QuorumPeerConfig\\$ConfigException.*");
+ while ((line = r.readLine()) != null) {
+ found = p.matcher(line).matches();
+ if (found) {
+ break;
+ }
+ }
+ Assert.assertTrue("complains about configuration", found);
+ }
+
/**
* Verify handling of inconsistent peer type
*/
diff --git a/src/java/test/org/apache/zookeeper/server/quorum/QuorumPeerTestBase.java b/src/java/test/org/apache/zookeeper/server/quorum/QuorumPeerTestBase.java
index ef552db..85817b2 100644
--- a/src/java/test/org/apache/zookeeper/server/quorum/QuorumPeerTestBase.java
+++ b/src/java/test/org/apache/zookeeper/server/quorum/QuorumPeerTestBase.java
@@ -146,5 +146,10 @@ public class QuorumPeerTestBase extends ZKTestCase implements Watcher {
ClientBase.recursiveDelete(main.quorumPeer.getTxnFactory()
.getDataDir());
}
+
+ public QuorumPeer getQuorumPeer() {
+ return main.quorumPeer;
+ }
+
}
}
diff --git a/src/java/test/org/apache/zookeeper/test/ClientBase.java b/src/java/test/org/apache/zookeeper/test/ClientBase.java
index 3dedec2..fdcfac4 100644
--- a/src/java/test/org/apache/zookeeper/test/ClientBase.java
+++ b/src/java/test/org/apache/zookeeper/test/ClientBase.java
@@ -71,7 +71,9 @@ public abstract class ClientBase extends ZKTestCase {
static final File BASETEST =
new File(System.getProperty("build.test.dir", "build"));
- protected String hostPort = "127.0.0.1:" + PortAssignment.unique();
+ protected int port = PortAssignment.unique();
+ protected String hostPort = "127.0.0.1:" + port;
+ protected String ipv6HostPort = "[0:0:0:0:0:0:0:1]:" + port;
protected int maxCnxns = 0;
protected ServerCnxnFactory serverFactory = null;
protected File tmpDir = null;
diff --git a/src/java/test/org/apache/zookeeper/test/ClientPortBindTest.java b/src/java/test/org/apache/zookeeper/test/ClientPortBindTest.java
index bf83f14..22f9dde 100644
--- a/src/java/test/org/apache/zookeeper/test/ClientPortBindTest.java
+++ b/src/java/test/org/apache/zookeeper/test/ClientPortBindTest.java
@@ -60,8 +60,12 @@ public class ClientPortBindTest extends ZKTestCase implements Watcher {
NetworkInterface i = intfs.nextElement();
if (i.isLoopback()) {
Enumeration<InetAddress> addrs = i.getInetAddresses();
- if (addrs.hasMoreElements()) {
- bindAddress = addrs.nextElement().getHostAddress();
+ while (addrs.hasMoreElements()) {
+ InetAddress a = addrs.nextElement();
+ if(a.isLoopbackAddress()) {
+ bindAddress = a.getHostAddress();
+ break;
+ }
}
}
}
diff --git a/src/java/test/org/apache/zookeeper/test/ClientTest.java b/src/java/test/org/apache/zookeeper/test/ClientTest.java
index d37041d..b2a1394 100644
--- a/src/java/test/org/apache/zookeeper/test/ClientTest.java
+++ b/src/java/test/org/apache/zookeeper/test/ClientTest.java
@@ -93,14 +93,22 @@ public class ClientTest extends ClientBase {
public void testClientwithoutWatcherObj() throws IOException,
InterruptedException, KeeperException
{
- performClientTest(false);
+ performClientTest(false, hostPort);
}
@Test
public void testClientWithWatcherObj() throws IOException,
InterruptedException, KeeperException
{
- performClientTest(true);
+ performClientTest(true, hostPort);
+ }
+
+ @Test
+ public void testClientWithIPv6Address() throws IOException,
+ InterruptedException, KeeperException
+ {
+ assumeIPv6Available();
+ performClientTest(true, ipv6HostPort);
}
/** Exercise the testable functions, verify tostring, etc... */
@@ -310,7 +318,7 @@ public class ClientTest extends ClientBase {
}
}
- private void performClientTest(boolean withWatcherObj)
+ private void performClientTest(boolean withWatcherObj, String hostPort)
throws IOException, InterruptedException, KeeperException
{
ZooKeeper zk = null;
diff --git a/src/java/test/org/apache/zookeeper/test/NonRecoverableErrorTest.java b/src/java/test/org/apache/zookeeper/test/NonRecoverableErrorTest.java
new file mode 100644
index 0000000..133d920
--- /dev/null
+++ b/src/java/test/org/apache/zookeeper/test/NonRecoverableErrorTest.java
@@ -0,0 +1,183 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.zookeeper.test;
+
+import static org.apache.zookeeper.test.ClientBase.CONNECTION_TIMEOUT;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
+
+import java.io.IOException;
+import java.util.UUID;
+
+import org.apache.zookeeper.CreateMode;
+import org.apache.zookeeper.PortAssignment;
+import org.apache.zookeeper.ZooDefs.Ids;
+import org.apache.zookeeper.ZooKeeper;
+import org.apache.zookeeper.server.ZKDatabase;
+import org.apache.zookeeper.server.persistence.FileTxnSnapLog;
+import org.apache.zookeeper.server.quorum.QuorumPeer;
+import org.apache.zookeeper.server.quorum.QuorumPeer.ServerState;
+import org.apache.zookeeper.server.quorum.QuorumPeerTestBase;
+import org.apache.zookeeper.test.ClientBase.CountdownWatcher;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * This class tests the non-recoverable error behavior of quorum server.
+ */
+public class NonRecoverableErrorTest extends QuorumPeerTestBase {
+ private static final String NODE_PATH = "/noLeaderIssue";
+
+ /**
+ * Test case for https://issues.apache.org/jira/browse/ZOOKEEPER-2247.
+ * Test to verify that even after non recoverable error (error while
+ * writing transaction log), ZooKeeper is still available.
+ */
+ @Test(timeout = 30000)
+ public void testZooKeeperServiceAvailableOnLeader() throws Exception {
+ int SERVER_COUNT = 3;
+ final int clientPorts[] = new int[SERVER_COUNT];
+ StringBuilder sb = new StringBuilder();
+ String server;
+
+ for (int i = 0; i < SERVER_COUNT; i++) {
+ clientPorts[i] = PortAssignment.unique();
+ server = "server." + i + "=127.0.0.1:" + PortAssignment.unique()
+ + ":" + PortAssignment.unique();
+ sb.append(server + "\n");
+ }
+ String currentQuorumCfgSection = sb.toString();
+ MainThread mt[] = new MainThread[SERVER_COUNT];
+
+ for (int i = 0; i < SERVER_COUNT; i++) {
+ mt[i] = new MainThread(i, clientPorts[i], currentQuorumCfgSection);
+ mt[i].start();
+ }
+
+ // ensure server started
+ for (int i = 0; i < SERVER_COUNT; i++) {
+ Assert.assertTrue("waiting for server " + i + " being up",
+ ClientBase.waitForServerUp("127.0.0.1:" + clientPorts[i],
+ CONNECTION_TIMEOUT));
+ }
+
+ CountdownWatcher watcher = new CountdownWatcher();
+ ZooKeeper zk = new ZooKeeper("127.0.0.1:" + clientPorts[0],
+ ClientBase.CONNECTION_TIMEOUT, watcher);
+ watcher.waitForConnected(ClientBase.CONNECTION_TIMEOUT);
+
+ String data = "originalData";
+ zk.create(NODE_PATH, data.getBytes(), Ids.OPEN_ACL_UNSAFE,
+ CreateMode.PERSISTENT);
+
+ // get information of current leader
+ QuorumPeer leader = getLeaderQuorumPeer(mt);
+ assertNotNull("Leader must have been elected by now", leader);
+
+ // inject problem in leader
+ FileTxnSnapLog snapLog = leader.getActiveServer().getTxnLogFactory();
+ FileTxnSnapLog fileTxnSnapLogWithError = new FileTxnSnapLog(
+ snapLog.getDataDir(), snapLog.getSnapDir()) {
+ @Override
+ public void commit() throws IOException {
+ throw new IOException("Input/output error");
+ }
+ };
+ ZKDatabase originalZKDatabase = leader.getActiveServer()
+ .getZKDatabase();
+ long leaderCurrentEpoch = leader.getCurrentEpoch();
+
+ ZKDatabase newDB = new ZKDatabase(fileTxnSnapLogWithError);
+ leader.getActiveServer().setZKDatabase(newDB);
+
+ try {
+ // do create operation, so that injected IOException is thrown
+ zk.create(uniqueZnode(), data.getBytes(), Ids.OPEN_ACL_UNSAFE,
+ CreateMode.PERSISTENT);
+ fail("IOException is expected due to error injected to transaction log commit");
+ } catch (Exception e) {
+ // do nothing
+ }
+
+ // resetting watcher so that this watcher can be again used to ensure
+ // that the zkClient is able to re-establish connection with the
+ // newly elected zookeeper quorum.
+ watcher.reset();
+ waitForNewLeaderElection(leader, leaderCurrentEpoch);
+
+ // ensure server started, give enough time, so that new leader election
+ // takes place
+ for (int i = 0; i < SERVER_COUNT; i++) {
+ Assert.assertTrue("waiting for server " + i + " being up",
+ ClientBase.waitForServerUp("127.0.0.1:" + clientPorts[i],
+ CONNECTION_TIMEOUT));
+ }
+
+ // revert back the error
+ leader.getActiveServer().setZKDatabase(originalZKDatabase);
+
+ // verify that now ZooKeeper service is up and running
+ leader = getLeaderQuorumPeer(mt);
+ assertNotNull("New leader must have been elected by now", leader);
+
+ String uniqueNode = uniqueZnode();
+ watcher.waitForConnected(ClientBase.CONNECTION_TIMEOUT);
+ String createNode = zk.create(uniqueNode, data.getBytes(),
+ Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
+ // if node is created successfully then it means that ZooKeeper service
+ // is available
+ assertEquals("Failed to create znode", uniqueNode, createNode);
+ zk.close();
+ // stop all severs
+ for (int i = 0; i < SERVER_COUNT; i++) {
+ mt[i].shutdown();
+ }
+ }
+
+ private void waitForNewLeaderElection(QuorumPeer peer,
+ long leaderCurrentEpoch) throws IOException, InterruptedException {
+ LOG.info("Waiting for new LE cycle..");
+ int count = 100; // giving a grace period of 10seconds
+ while (count > 0) {
+ if (leaderCurrentEpoch == peer.getCurrentEpoch()) {
+ Thread.sleep(100);
+ }
+ count--;
+ }
+ Assert.assertTrue("New LE cycle must have triggered",
+ leaderCurrentEpoch != peer.getCurrentEpoch());
+ }
+
+ private QuorumPeer getLeaderQuorumPeer(MainThread[] mt) {
+ for (int i = mt.length - 1; i >= 0; i--) {
+ QuorumPeer quorumPeer = mt[i].getQuorumPeer();
+ if (null != quorumPeer
+ && ServerState.LEADING == quorumPeer.getPeerState()) {
+ return quorumPeer;
+ }
+ }
+ return null;
+ }
+
+ private String uniqueZnode() {
+ UUID randomUUID = UUID.randomUUID();
+ String node = NODE_PATH + "/" + randomUUID.toString();
+ return node;
+ }
+}
diff --git a/src/lastRevision.bat b/src/lastRevision.bat
index 08f4a21..e31a6b9 100644
--- a/src/lastRevision.bat
+++ b/src/lastRevision.bat
@@ -1,23 +1,23 @@
-echo off
-rem Licensed to the Apache Software Foundation (ASF) under one
-rem or more contributor license agreements. See the NOTICE file
-rem distributed with this work for additional information
-rem regarding copyright ownership. The ASF licenses this file
-rem to you under the Apache License, Version 2.0 (the
-rem "License"); you may not use this file except in compliance
-rem with the License. You may obtain a copy of the License at
-rem
-rem http://www.apache.org/licenses/LICENSE-2.0
-rem
-rem Unless required by applicable law or agreed to in writing, software
-rem distributed under the License is distributed on an "AS IS" BASIS,
-rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-rem See the License for the specific language governing permissions and
-rem limitations under the License.
-
-rem Find the current revision, store it in a file, for DOS
-svn info | findstr Revision > %1
-
-For /F "tokens=1,2 delims= " %%a In (%1) Do (
- echo lastRevision=%%b> %1
-)
+echo off
+rem Licensed to the Apache Software Foundation (ASF) under one
+rem or more contributor license agreements. See the NOTICE file
+rem distributed with this work for additional information
+rem regarding copyright ownership. The ASF licenses this file
+rem to you under the Apache License, Version 2.0 (the
+rem "License"); you may not use this file except in compliance
+rem with the License. You may obtain a copy of the License at
+rem
+rem http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing, software
+rem distributed under the License is distributed on an "AS IS" BASIS,
+rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+rem See the License for the specific language governing permissions and
+rem limitations under the License.
+
+rem Find the current revision, store it in a file, for DOS
+svn info | findstr Revision > %1
+
+For /F "tokens=1,2 delims= " %%a In (%1) Do (
+ echo lastRevision=%%b> %1
+)
diff --git a/zookeeper-3.4.8.jar.asc b/zookeeper-3.4.8.jar.asc
deleted file mode 100644
index 2b20a31..0000000
--- a/zookeeper-3.4.8.jar.asc
+++ /dev/null
@@ -1,17 +0,0 @@
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v2
-
-iQIcBAABCAAGBQJWtW2EAAoJEL47a5OSvC8rGNsQAI3unsPcalFW+nt6tzMdlrVc
-kW5fcDGS/7UB/0pZBwAeFb6RDNe1ENgJO9JwjYB3+SxZQOOrVIsX1CYhpwtUMn4l
-Yq2+mMvfAJEIISOSc/wm1j6luQDDTiYuxRERVIuCL3K+eeddlqdN7ZiF3ml8Rghc
-Q6CHsM8wGi7l3F6es3Peuw7SGxkDW8DdNpuHJQF2jq0BWykNpho+FBX/zHLUzNda
-bykvcWQ1pF+6aLzzf2Fue7Ouf530EtM9cTCSXnLBTqkAe1M7oLLb2j33vQ/AtLGf
-Ax9IkFhHuQTZbwzLZX/NGZ4vAtHBAfSBVGd9TQqH0r9lPRgF6BjPptEPXrU/+Wmv
-A7eNzRMSNJPvqL6GLvCJiroo44KIQ8D+UPeledG3luZeUULJ24y8B1NhGWohUu/6
-GmEcdgjrn1KpAQj4RdLRYBUNtayxivgZc6wa/jSOQ3FEDnFOcKSkD6PuqD3a4kX4
-Pg8lH9a3wiWRlpH2YP8J8KhhMsneVlLk4qI70/9BJJsiPDmnO1W1YntjGdT/bip8
-9TPhwacFK05RO3uAiLc4A2IikGtfD8ynolXJ9Vrhq7x0h2skjpdJHxOfbpgHHkbG
-TDEzlY47snXEtwDuP4CJ0W1IkMywKRzdERmWdvUFcRAlyHpb0u1jC8FHjwe+TQt7
-XGemUvKs3DsSmbFgB+Fq
-=Qm/S
------END PGP SIGNATURE-----
diff --git a/zookeeper-3.4.8.jar.md5 b/zookeeper-3.4.8.jar.md5
deleted file mode 100644
index 8ef18c3..0000000
--- a/zookeeper-3.4.8.jar.md5
+++ /dev/null
@@ -1 +0,0 @@
-a0d8b8eb92a6fd54418eee0346a4cbb5
diff --git a/zookeeper-3.4.8.jar.sha1 b/zookeeper-3.4.8.jar.sha1
deleted file mode 100644
index 0f0b3f4..0000000
--- a/zookeeper-3.4.8.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-f27ceddbab3fde83797ca17e3cfee26a251afc00
diff --git a/zookeeper-3.4.9.jar.asc b/zookeeper-3.4.9.jar.asc
new file mode 100644
index 0000000..0256d61
--- /dev/null
+++ b/zookeeper-3.4.9.jar.asc
@@ -0,0 +1,17 @@
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1
+
+iQIcBAABAgAGBQJXu/58AAoJEPXOyzy16b0tF4kP/1l5+u3RsUGETQmiPKGRgaqp
+Aznx8rcbh4MpU+1sXj/XZBRmYTEVnylIH3gIHryfl40+OwdYBcLJ5KcRUBYrpga/
+wELvusafv9MIjmWXj47MblmGJMCP6KWnSPZL0S8Zxa6Dohe7Z+ZWyoXNSvdIBbHZ
+lrDAiMHDILvKaloo7h5yDeadxxBlwzRArhoC5q717frgrNQXvmg1YUwbgWaYYLyF
+yQXStA2jdmlaaiOlU045URBMPwhw+t9trxkiCgD/k/JpouSkqhlbDbjGx9330Mbz
+QKQUZY+6D1XF7E9HDwnhVdZHMwsgoOioptyck3I70a3DQYXGlp2uwdaGay9T5o3n
+y5P0xek5l6k29JD5S9NBMGEK8XrxmWAQFnMcQFouQbWmeGDKF0Aks8Ad78GuH7hj
+d1sWjsD7ZRNAyNdrStl/qhLa+2ycpHeSMOrKS+6xtclKofSB9L3c6tE+Gs5+n0ao
+QXtrglAxwEWb/KfhCdfW7kSp2TR5aswRd1SDW04MI2NhcpGN068/hMeTQBw0dOCW
+6r0oJh0fpxTV/78hE3islbyOdsarUA2axyoEoo5C5gkJjPV7yLiFBn8oqpmOR4I+
+NcJTf1/pHL6Q+gVRztZOAoMSDmr/p8J2STMK+pWPH4MuOCp6alC399i0A3dEKX4W
+TeUIZssMk3fUiHASo9EP
+=wyRd
+-----END PGP SIGNATURE-----
diff --git a/zookeeper-3.4.9.jar.md5 b/zookeeper-3.4.9.jar.md5
new file mode 100644
index 0000000..3c8d842
--- /dev/null
+++ b/zookeeper-3.4.9.jar.md5
@@ -0,0 +1 @@
+596d53448b98abeb50278c4181d10219
diff --git a/zookeeper-3.4.9.jar.sha1 b/zookeeper-3.4.9.jar.sha1
new file mode 100644
index 0000000..724523c
--- /dev/null
+++ b/zookeeper-3.4.9.jar.sha1
@@ -0,0 +1 @@
+a93d1909d78a9fa251844938f7a857a380c377e9
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/zookeeper.git
More information about the pkg-java-commits
mailing list