svn commit: r1034003 - in /hadoop/zookeeper/trunk: CHANGES.txt src/java/main/org/apache/zookeeper/ClientCnxn.java src/java/main/org/apache/zookeeper/ClientCnxnSocket.java src/java/main/org/apache/zook

2010-11-11 Thread phunt
Author: phunt
Date: Thu Nov 11 17:11:55 2010
New Revision: 1034003

URL: http://svn.apache.org/viewvc?rev=1034003view=rev
Log:
ZOOKEEPER-908. Remove code duplication and inconsistent naming in 
ClientCnxn.Packet creation

Modified:
hadoop/zookeeper/trunk/CHANGES.txt
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/ClientCnxn.java

hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/ClientCnxnSocket.java

hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/ClientCnxnSocketNIO.java

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=1034003r1=1034002r2=1034003view=diff
==
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Thu Nov 11 17:11:55 2010
@@ -196,6 +196,9 @@ IMPROVEMENTS:
   ZOOKEEPER-909. Extract NIO specific code from ClientCnxn
   (Thomas Koch via phunt)
 
+  ZOOKEEPER-908. Remove code duplication and inconsistent naming in
+  ClientCnxn.Packet creation (Thomas Koch via phunt)
+
 NEW FEATURES:
   ZOOKEEPER-729. Java client API to recursively delete a subtree.
   (Kay Kay via henry)

Modified: 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/ClientCnxn.java
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/ClientCnxn.java?rev=1034003r1=1034002r2=1034003view=diff
==
--- hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/ClientCnxn.java 
(original)
+++ hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/ClientCnxn.java 
Thu Nov 11 17:11:55 2010
@@ -194,7 +194,13 @@ public class ClientCnxn {
  * This class allows us to pass the headers and the relevant records 
around.
  */
 static class Packet {
-RequestHeader header;
+RequestHeader requestHeader;
+
+ReplyHeader replyHeader;
+
+Record request;
+
+Record response;
 
 ByteBuffer bb;
 
@@ -203,12 +209,6 @@ public class ClientCnxn {
 /** Servers's view of the path (may differ due to chroot) **/
 String serverPath;
 
-ReplyHeader replyHeader;
-
-Record request;
-
-Record response;
-
 boolean finished;
 
 AsyncCallback cb;
@@ -217,33 +217,33 @@ public class ClientCnxn {
 
 WatchRegistration watchRegistration;
 
-Packet(RequestHeader header, ReplyHeader replyHeader, Record record,
-Record response, ByteBuffer bb,
-WatchRegistration watchRegistration) {
-this.header = header;
+Packet(RequestHeader requestHeader, ReplyHeader replyHeader, Record 
request,
+Record response, WatchRegistration watchRegistration) {
+this.requestHeader = requestHeader;
 this.replyHeader = replyHeader;
-this.request = record;
+this.request = request;
 this.response = response;
-if (bb != null) {
-this.bb = bb;
-} else {
-try {
-ByteArrayOutputStream baos = new ByteArrayOutputStream();
-BinaryOutputArchive boa = BinaryOutputArchive
-.getArchive(baos);
-boa.writeInt(-1, len); // We'll fill this in later
-header.serialize(boa, header);
-if (record != null) {
-record.serialize(boa, request);
-}
-baos.close();
-this.bb = ByteBuffer.wrap(baos.toByteArray());
-this.bb.putInt(this.bb.capacity() - 4);
-this.bb.rewind();
-} catch (IOException e) {
-LOG.warn(Ignoring unexpected exception, e);
-}
+
+try {
+ByteArrayOutputStream baos = new ByteArrayOutputStream();
+BinaryOutputArchive boa = BinaryOutputArchive.getArchive(baos);
+boa.writeInt(-1, len); // We'll fill this in later
+if (requestHeader != null) {
+requestHeader.serialize(boa, header);
+}
+if (request instanceof ConnectRequest) {
+request.serialize(boa, connect);
+} else if (request != null) {
+request.serialize(boa, request);
+}
+baos.close();
+this.bb = ByteBuffer.wrap(baos.toByteArray());
+this.bb.putInt(this.bb.capacity() - 4);
+this.bb.rewind();
+} catch (IOException e) {
+LOG.warn(Ignoring unexpected exception, e);
 }
+
 this.watchRegistration = watchRegistration;
 }
 
@@ -255,7 +255,7 @@ public class ClientCnxn {
 sb.append( serverPath

svn commit: r1034275 - in /hadoop/zookeeper/site: author/src/documentation/content/xdocs/ publish/

2010-11-11 Thread phunt
Author: phunt
Date: Fri Nov 12 06:12:00 2010
New Revision: 1034275

URL: http://svn.apache.org/viewvc?rev=1034275view=rev
Log:
Updated site for release 3.3.2.

Modified:
hadoop/zookeeper/site/author/src/documentation/content/xdocs/releases.xml
hadoop/zookeeper/site/author/src/documentation/content/xdocs/site.xml
hadoop/zookeeper/site/publish/credits.html
hadoop/zookeeper/site/publish/index.html
hadoop/zookeeper/site/publish/irc.html
hadoop/zookeeper/site/publish/issue_tracking.html
hadoop/zookeeper/site/publish/linkmap.html
hadoop/zookeeper/site/publish/linkmap.pdf
hadoop/zookeeper/site/publish/mailing_lists.html
hadoop/zookeeper/site/publish/releases.html
hadoop/zookeeper/site/publish/releases.pdf
hadoop/zookeeper/site/publish/version_control.html

Modified: 
hadoop/zookeeper/site/author/src/documentation/content/xdocs/releases.xml
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/site/author/src/documentation/content/xdocs/releases.xml?rev=1034275r1=1034274r2=1034275view=diff
==
--- hadoop/zookeeper/site/author/src/documentation/content/xdocs/releases.xml 
(original)
+++ hadoop/zookeeper/site/author/src/documentation/content/xdocs/releases.xml 
Fri Nov 12 06:12:00 2010
@@ -36,6 +36,15 @@
   titleNews/title
 
   section
+title11 Nov, 2010: release 3.3.2 available /title
+pThis release contains a number of critical bug fixes./p
+pSee the a 
href=http://hadoop.apache.org/zookeeper/docs/r3.3.2/releasenotes.html;ZooKeeper
 3.3.2 Release Notes/a for details.  
+   Alternatively, you can look at the
+   a 
href=http://issues.apache.org/jira/browse/ZOOKEEPER?report=com.atlassian.jira.plugin.system.project:changelog-panel;
+   Jira issue log for all releases/a./p
+  /section
+
+  section
 title17 May, 2010: release 3.3.1 available /title
 pThis release contains a number of critical bug fixes./p
 pSee the a 
href=http://hadoop.apache.org/zookeeper/docs/r3.3.1/releasenotes.html;ZooKeeper
 3.3.1 Release Notes/a for details.  

Modified: hadoop/zookeeper/site/author/src/documentation/content/xdocs/site.xml
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/site/author/src/documentation/content/xdocs/site.xml?rev=1034275r1=1034274r2=1034275view=diff
==
--- hadoop/zookeeper/site/author/src/documentation/content/xdocs/site.xml 
(original)
+++ hadoop/zookeeper/site/author/src/documentation/content/xdocs/site.xml Fri 
Nov 12 06:12:00 2010
@@ -31,6 +31,7 @@ See http://forrest.apache.org/docs/linki
 r3.2.2   label=Release 3.2.2 href=ext:docs/r3.2.2/ /
 r3.3.0   label=Release 3.3.0 href=ext:docs/r3.3.0/ /
 r3.3.1   label=Release 3.3.1 href=ext:docs/r3.3.1/ /
+r3.3.2   label=Release 3.3.2 href=ext:docs/r3.3.2/ /
   /docs
 
   resources label=Developers
@@ -64,6 +65,7 @@ See http://forrest.apache.org/docs/linki
   r3.2.2 href=r3.2.2//
   r3.3.0 href=r3.3.0//
   r3.3.1 href=r3.3.1//
+  r3.3.2 href=r3.3.2//
 /docs
   /external-refs
  

Modified: hadoop/zookeeper/site/publish/credits.html
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/site/publish/credits.html?rev=1034275r1=1034274r2=1034275view=diff
==
--- hadoop/zookeeper/site/publish/credits.html (original)
+++ hadoop/zookeeper/site/publish/credits.html Fri Nov 12 06:12:00 2010
@@ -137,6 +137,9 @@ document.write(Last Published:  + docu
 div class=menuitem
 a href=http://hadoop.apache.org/zookeeper/docs/r3.3.1/;Release 3.3.1/a
 /div
+div class=menuitem
+a href=http://hadoop.apache.org/zookeeper/docs/r3.3.2/;Release 3.3.2/a
+/div
 /div
 div onclick=SwitchMenu('menu_1.3', 'skin/') id=menu_1.3Title 
class=menutitleDevelopers/div
 div id=menu_1.3 class=menuitemgroup

Modified: hadoop/zookeeper/site/publish/index.html
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/site/publish/index.html?rev=1034275r1=1034274r2=1034275view=diff
==
--- hadoop/zookeeper/site/publish/index.html (original)
+++ hadoop/zookeeper/site/publish/index.html Fri Nov 12 06:12:00 2010
@@ -137,6 +137,9 @@ document.write(Last Published:  + docu
 div class=menuitem
 a href=http://hadoop.apache.org/zookeeper/docs/r3.3.1/;Release 3.3.1/a
 /div
+div class=menuitem
+a href=http://hadoop.apache.org/zookeeper/docs/r3.3.2/;Release 3.3.2/a
+/div
 /div
 div onclick=SwitchMenu('menu_1.3', 'skin/') id=menu_1.3Title 
class=menutitleDevelopers/div
 div id=menu_1.3 class=menuitemgroup

Modified: hadoop/zookeeper/site/publish/irc.html
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/site/publish/irc.html?rev=1034275r1=1034274r2=1034275view=diff

svn commit: r1033826 - in /hadoop/zookeeper/tags: release-3.3.2-rc0/ release-3.3.2/

2010-11-10 Thread phunt
Author: phunt
Date: Thu Nov 11 07:21:52 2010
New Revision: 1033826

URL: http://svn.apache.org/viewvc?rev=1033826view=rev
Log:
ZooKeeper 3.3.2 release.

Added:
hadoop/zookeeper/tags/release-3.3.2/
  - copied from r1033825, hadoop/zookeeper/tags/release-3.3.2-rc0/
Removed:
hadoop/zookeeper/tags/release-3.3.2-rc0/



svn commit: r1031438 - in /hadoop/zookeeper/branches/branch-3.3: ./ docs/ docs/skin/images/ src/c/ src/c/include/ src/docs/src/documentation/content/xdocs/

2010-11-04 Thread phunt
Author: phunt
Date: Fri Nov  5 05:28:40 2010
New Revision: 1031438

URL: http://svn.apache.org/viewvc?rev=1031438view=rev
Log:
Preparing for release 3.3.2

Modified:
hadoop/zookeeper/branches/branch-3.3/CHANGES.txt
hadoop/zookeeper/branches/branch-3.3/build.xml
hadoop/zookeeper/branches/branch-3.3/docs/releasenotes.html
hadoop/zookeeper/branches/branch-3.3/docs/releasenotes.pdf

hadoop/zookeeper/branches/branch-3.3/docs/skin/images/rc-b-l-15-1body-2menu-3menu.png

hadoop/zookeeper/branches/branch-3.3/docs/skin/images/rc-b-r-15-1body-2menu-3menu.png

hadoop/zookeeper/branches/branch-3.3/docs/skin/images/rc-b-r-5-1header-2tab-selected-3tab-selected.png

hadoop/zookeeper/branches/branch-3.3/docs/skin/images/rc-t-l-5-1header-2searchbox-3searchbox.png

hadoop/zookeeper/branches/branch-3.3/docs/skin/images/rc-t-l-5-1header-2tab-selected-3tab-selected.png

hadoop/zookeeper/branches/branch-3.3/docs/skin/images/rc-t-l-5-1header-2tab-unselected-3tab-unselected.png

hadoop/zookeeper/branches/branch-3.3/docs/skin/images/rc-t-r-15-1body-2menu-3menu.png

hadoop/zookeeper/branches/branch-3.3/docs/skin/images/rc-t-r-5-1header-2searchbox-3searchbox.png

hadoop/zookeeper/branches/branch-3.3/docs/skin/images/rc-t-r-5-1header-2tab-selected-3tab-selected.png

hadoop/zookeeper/branches/branch-3.3/docs/skin/images/rc-t-r-5-1header-2tab-unselected-3tab-unselected.png
hadoop/zookeeper/branches/branch-3.3/src/c/configure.ac
hadoop/zookeeper/branches/branch-3.3/src/c/include/zookeeper_version.h

hadoop/zookeeper/branches/branch-3.3/src/docs/src/documentation/content/xdocs/releasenotes.xml

Modified: hadoop/zookeeper/branches/branch-3.3/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.3/CHANGES.txt?rev=1031438r1=1031437r2=1031438view=diff
==
--- hadoop/zookeeper/branches/branch-3.3/CHANGES.txt (original)
+++ hadoop/zookeeper/branches/branch-3.3/CHANGES.txt Fri Nov  5 05:28:40 2010
@@ -1,5 +1,4 @@
-Branch 3.3
-
+Release 3.3.2 - 2010-11-04
 Backward compatible changes:
 
 BUGFIXES:

Modified: hadoop/zookeeper/branches/branch-3.3/build.xml
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.3/build.xml?rev=1031438r1=1031437r2=1031438view=diff
==
--- hadoop/zookeeper/branches/branch-3.3/build.xml (original)
+++ hadoop/zookeeper/branches/branch-3.3/build.xml Fri Nov  5 05:28:40 2010
@@ -24,7 +24,7 @@
 
 property environment=env/
 
-property name=version value=3.3.1 /
+property name=version value=3.3.2 /
 property name=final.name value=${name}-${version}/
 property name=revision.dir value=${basedir}/.revision /
 property name=revision.properties value=revision.properties /

Modified: hadoop/zookeeper/branches/branch-3.3/docs/releasenotes.html
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.3/docs/releasenotes.html?rev=1031438r1=1031437r2=1031438view=diff
==
--- hadoop/zookeeper/branches/branch-3.3/docs/releasenotes.html (original)
+++ hadoop/zookeeper/branches/branch-3.3/docs/releasenotes.html Fri Nov  5 
05:28:40 2010
@@ -5,7 +5,7 @@
 meta content=Apache Forrest name=Generator
 meta name=Forrest-version content=0.8
 meta name=Forrest-skin-name content=pelt
-titleZooKeeper 3.3.1 Release Notes/title
+titleZooKeeper 3.3.2 Release Notes/title
 link type=text/css href=skin/basic.css rel=stylesheet
 link media=screen type=text/css href=skin/screen.css rel=stylesheet
 link media=print type=text/css href=skin/print.css rel=stylesheet
@@ -202,11 +202,11 @@ document.write(Last Published:  + docu
 a class=dida href=releasenotes.pdfimg alt=PDF -icon 
src=skin/images/pdfdoc.gif class=skinbr
 PDF/a
 /div
-h1ZooKeeper 3.3.1 Release Notes/h1
+h1ZooKeeper 3.3.2 Release Notes/h1
 div id=minitoc-area
 ul class=minitoc
 li
-a href=#changesChanges Since ZooKeeper 3.3.0/a
+a href=#changesChanges Since ZooKeeper 3.3.1/a
 /li
 /ul
 /div
@@ -228,12 +228,12 @@ later./p
 
 
 a name=N10013/aa name=changes/a
-h2 class=h3Changes Since ZooKeeper 3.3.0/h2
+h2 class=h3Changes Since ZooKeeper 3.3.1/h2
 div class=section
 table class=ForrestTable cellspacing=1 cellpadding=4
-captionChanges Since ZooKeeper 3.3.0/caption
+captionChanges Since ZooKeeper 3.3.1/caption
 
-titleChanges Since ZooKeeper 3.3.0/title
+titleChanges Since ZooKeeper 3.3.1/title
 
 
 tr
@@ -254,111 +254,120 @@ later./p
 
 
 tr
-tda 
href=https://issues.apache.org/jira/browse/ZOOKEEPER-720;ZOOKEEPER-720/a/tdtd
 Use zookeeper-{version}-sources.jar instead of 
zookeeper-{version}-src.jar to publish sources in the Maven repository
-/td
+tda 
href=https://issues.apache.org/jira/browse/ZOOKEEPER-732;ZOOKEEPER-732/a/tdtd
 Improper translation of error into Python exception - Release Comment: Client

svn commit: r1031439 - /hadoop/zookeeper/tags/release-3.3.2-rc0/

2010-11-04 Thread phunt
Author: phunt
Date: Fri Nov  5 05:30:14 2010
New Revision: 1031439

URL: http://svn.apache.org/viewvc?rev=1031439view=rev
Log:
ZooKeeper 3.3.2-rc0 release.

Added:
hadoop/zookeeper/tags/release-3.3.2-rc0/
  - copied from r1031438, hadoop/zookeeper/branches/branch-3.3/



svn commit: r1025629 - in /hadoop/zookeeper/trunk: CHANGES.txt src/c/src/zookeeper.c

2010-10-20 Thread phunt
Author: phunt
Date: Wed Oct 20 16:25:04 2010
New Revision: 1025629

URL: http://svn.apache.org/viewvc?rev=1025629view=rev
Log:
ZOOKEEPER-804. c unit tests failing due to assertion cptr failed (second 
patch)

Modified:
hadoop/zookeeper/trunk/CHANGES.txt
hadoop/zookeeper/trunk/src/c/src/zookeeper.c

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=1025629r1=1025628r2=1025629view=diff
==
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Wed Oct 20 16:25:04 2010
@@ -125,6 +125,9 @@ BUGFIXES: 
   ZOOKEEPER-893. ZooKeeper high cpu usage when invalid requests
   (Thijs Terlouw via phunt)
 
+  ZOOKEEPER-804. c unit tests failing due to assertion cptr failed
+  (second try - Jared Cantwell via phunt)
+
 IMPROVEMENTS:
   ZOOKEEPER-724. Improve junit test integration - log harness information 
   (phunt via mahadev)

Modified: hadoop/zookeeper/trunk/src/c/src/zookeeper.c
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/c/src/zookeeper.c?rev=1025629r1=1025628r2=1025629view=diff
==
--- hadoop/zookeeper/trunk/src/c/src/zookeeper.c (original)
+++ hadoop/zookeeper/trunk/src/c/src/zookeeper.c Wed Oct 20 16:25:04 2010
@@ -1956,7 +1956,7 @@ int zookeeper_process(zhandle_t *zh, int
 destroy_completion_entry(cptr);
 cptr = NULL;
 }
-return ZINVALIDSTATE;
+return api_epilog(zh,ZINVALIDSTATE);
 }
 assert(cptr);
 /* The requests are going to come back in order */




svn commit: r1025670 - in /hadoop/zookeeper/trunk: CHANGES.txt src/c/tests/zkServer.sh

2010-10-20 Thread phunt
Author: phunt
Date: Wed Oct 20 18:41:03 2010
New Revision: 1025670

URL: http://svn.apache.org/viewvc?rev=1025670view=rev
Log:
ZOOKEEPER-820. update c unit tests to ensure zombie java server processes 
dont cause failure

Modified:
hadoop/zookeeper/trunk/CHANGES.txt
hadoop/zookeeper/trunk/src/c/tests/zkServer.sh

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=1025670r1=1025669r2=1025670view=diff
==
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Wed Oct 20 18:41:03 2010
@@ -128,6 +128,9 @@ BUGFIXES: 
   ZOOKEEPER-804. c unit tests failing due to assertion cptr failed
   (second try - Jared Cantwell via phunt)
 
+  ZOOKEEPER-820. update c unit tests to ensure zombie java server
+  processes don't cause failure (Michi Mutsuzaki via phunt)
+
 IMPROVEMENTS:
   ZOOKEEPER-724. Improve junit test integration - log harness information 
   (phunt via mahadev)

Modified: hadoop/zookeeper/trunk/src/c/tests/zkServer.sh
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/c/tests/zkServer.sh?rev=1025670r1=1025669r2=1025670view=diff
==
--- hadoop/zookeeper/trunk/src/c/tests/zkServer.sh (original)
+++ hadoop/zookeeper/trunk/src/c/tests/zkServer.sh Wed Oct 20 18:41:03 2010
@@ -16,6 +16,9 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+# This is the port where zookeeper server runs on.
+ZOOPORT=22181
+
 if [ x$1 == x ]
 then
 echo USAGE: $0 startClean|start|stop hostPorts
@@ -60,6 +63,18 @@ $KILL -9 $pid
 rm -f ${base_dir}/build/tmp/zk.pid
 fi
 
+# [ZOOKEEPER-820] If lsof command is present, look for a process listening
+# on ZOOPORT and kill it. 
+which lsof  /dev/null
+if [ $? -eq 0  ]
+then
+pid=`lsof -i :$ZOOPORT | grep LISTEN | awk '{print $2}'`
+if [ -n $pid ]
+then
+$KILL -9 $pid
+fi
+fi
+
 if [ x${base_dir} == x ]
 then
 zk_base=../../
@@ -92,12 +107,12 @@ start|startClean)
 if [ x${base_dir} == x ]
 then
 mkdir -p /tmp/zkdata
-java -cp $CLASSPATH org.apache.zookeeper.server.ZooKeeperServerMain 
22181 /tmp/zkdata 3000 $ZKMAXCNXNS  /tmp/zk.log 
+java -cp $CLASSPATH org.apache.zookeeper.server.ZooKeeperServerMain 
$ZOOPORT /tmp/zkdata 3000 $ZKMAXCNXNS  /tmp/zk.log 
 pid=$!
 echo -n $!  /tmp/zk.pid
 else
 mkdir -p ${base_dir}/build/tmp/zkdata
-java -cp $CLASSPATH org.apache.zookeeper.server.ZooKeeperServerMain 
22181 ${base_dir}/build/tmp/zkdata 3000 $ZKMAXCNXNS  
${base_dir}/build/tmp/zk.log 
+java -cp $CLASSPATH org.apache.zookeeper.server.ZooKeeperServerMain 
$ZOOPORT ${base_dir}/build/tmp/zkdata 3000 $ZKMAXCNXNS  
${base_dir}/build/tmp/zk.log 
 pid=$!
 echo -n $pid  ${base_dir}/build/tmp/zk.pid
 fi
@@ -105,14 +120,15 @@ start|startClean)
 # wait max 120 seconds for server to be ready to server clients
 # this handles testing on slow hosts
 success=false
-for i in {1..40}
+for i in {1..120}
 do
 if ps -p $pid  /dev/null
 then
-if java -cp $CLASSPATH org.apache.zookeeper.ZooKeeperMain 
-server localhost:22181 ls /  /dev/null 21
+java -cp $CLASSPATH org.apache.zookeeper.ZooKeeperMain -server 
localhost:$ZOOPORT ls /  /dev/null 21
+if [ $? -ne 0  ]
 then
 # server not up yet - wait
-sleep 5
+sleep 1
 else
 # server is up and serving client connections
 success=true




svn commit: r1025802 - in /hadoop/zookeeper/branches/branch-3.3: CHANGES.txt src/java/main/org/apache/zookeeper/ClientCnxn.java src/java/test/org/apache/zookeeper/test/SessionTest.java

2010-10-20 Thread phunt
Author: phunt
Date: Thu Oct 21 00:45:45 2010
New Revision: 1025802

URL: http://svn.apache.org/viewvc?rev=1025802view=rev
Log:
ZOOKEEPER-794. Callbacks are not invoked when the client is closed

Modified:
hadoop/zookeeper/branches/branch-3.3/CHANGES.txt

hadoop/zookeeper/branches/branch-3.3/src/java/main/org/apache/zookeeper/ClientCnxn.java

hadoop/zookeeper/branches/branch-3.3/src/java/test/org/apache/zookeeper/test/SessionTest.java

Modified: hadoop/zookeeper/branches/branch-3.3/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.3/CHANGES.txt?rev=1025802r1=1025801r2=1025802view=diff
==
--- hadoop/zookeeper/branches/branch-3.3/CHANGES.txt (original)
+++ hadoop/zookeeper/branches/branch-3.3/CHANGES.txt Thu Oct 21 00:45:45 2010
@@ -50,6 +50,9 @@ BUGFIXES:
   ZOOKEEPER-820. update c unit tests to ensure zombie java server
   processes don't cause failure (Michi Mutsuzaki via phunt)
 
+  ZOOKEEPER-794. Callbacks are not invoked when the client is closed
+  (Alexis Midon via phunt)
+
 IMPROVEMENTS:
 
   ZOOKEEPER-789. Improve FLE log messages (flavio via phunt)

Modified: 
hadoop/zookeeper/branches/branch-3.3/src/java/main/org/apache/zookeeper/ClientCnxn.java
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.3/src/java/main/org/apache/zookeeper/ClientCnxn.java?rev=1025802r1=1025801r2=1025802view=diff
==
--- 
hadoop/zookeeper/branches/branch-3.3/src/java/main/org/apache/zookeeper/ClientCnxn.java
 (original)
+++ 
hadoop/zookeeper/branches/branch-3.3/src/java/main/org/apache/zookeeper/ClientCnxn.java
 Thu Oct 21 00:45:45 2010
@@ -454,6 +454,9 @@ public class ClientCnxn {
  */
 private volatile KeeperState sessionState = KeeperState.Disconnected;
 
+   private volatile boolean wasKilled = false;
+   private volatile boolean isRunning = false;
+
 EventThread() {
 super(makeThreadName(-EventThread));
 setUncaughtExceptionHandler(uncaughtExceptionHandler);
@@ -476,9 +479,16 @@ public class ClientCnxn {
 waitingEvents.add(pair);
 }
 
-public void queuePacket(Packet packet) {
-waitingEvents.add(packet);
-}
+   public void queuePacket(Packet packet) {
+  if (wasKilled) {
+ synchronized (waitingEvents) {
+if (isRunning) waitingEvents.add(packet);
+else processEvent(packet);
+ }
+  } else {
+ waitingEvents.add(packet);
+  }
+   }
 
 public void queueEventOfDeath() {
 waitingEvents.add(eventOfDeath);
@@ -486,119 +496,131 @@ public class ClientCnxn {
 
 @Override
 public void run() {
-try {
-while (true) {
-Object event = waitingEvents.take();
-try {
-if (event == eventOfDeath) {
-return;
-}
-
-if (event instanceof WatcherSetEventPair) {
-// each watcher will process the event
-WatcherSetEventPair pair = (WatcherSetEventPair) 
event;
-for (Watcher watcher : pair.watchers) {
-try {
-watcher.process(pair.event);
-} catch (Throwable t) {
-LOG.error(Error while calling watcher , 
t);
-}
-}
-} else {
-Packet p = (Packet) event;
-int rc = 0;
-String clientPath = p.clientPath;
-if (p.replyHeader.getErr() != 0) {
-rc = p.replyHeader.getErr();
-}
-if (p.cb == null) {
-LOG.warn(Somehow a null cb got to 
EventThread!);
-} else if (p.response instanceof ExistsResponse
-|| p.response instanceof SetDataResponse
-|| p.response instanceof SetACLResponse) {
-StatCallback cb = (StatCallback) p.cb;
-if (rc == 0) {
-if (p.response instanceof ExistsResponse) {
-cb.processResult(rc, clientPath, p.ctx,
-((ExistsResponse) p.response)
-.getStat());
-} else if (p.response instanceof 
SetDataResponse

svn commit: r1024438 - in /hadoop/zookeeper/trunk: CHANGES.txt src/java/main/org/apache/zookeeper/server/quorum/QuorumCnxManager.java src/java/test/org/apache/zookeeper/test/CnxManagerTest.java

2010-10-19 Thread phunt
Author: phunt
Date: Tue Oct 19 22:32:09 2010
New Revision: 1024438

URL: http://svn.apache.org/viewvc?rev=1024438view=rev
Log:
ZOOKEEPER-893. ZooKeeper high cpu usage when invalid requests

Modified:
hadoop/zookeeper/trunk/CHANGES.txt

hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumCnxManager.java

hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/CnxManagerTest.java

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=1024438r1=1024437r2=1024438view=diff
==
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Tue Oct 19 22:32:09 2010
@@ -110,14 +110,20 @@ BUGFIXES: 
   ZOOKEEPER-822. Leader election taking a long time to complete
   (Vishal K via phunt)
 
-  ZOOKEEPER-866. Hedwig Server stays in disconnected state when connection 
to ZK dies but gets reconnected (erwin tam via breed)
+  ZOOKEEPER-866. Hedwig Server stays in disconnected state when
+  connection to ZK dies but gets reconnected (erwin tam via breed)
 
-  ZOOKEEPER-881. ZooKeeperServer.loadData loads database twice (jared cantwell 
via breed)
+  ZOOKEEPER-881. ZooKeeperServer.loadData loads database twice
+  (jared cantwell via breed)
 
   ZOOKEEPER-855. clientPortBindAddress should be clientPortAddress
   (Jared Cantwell via fpj)
 
-  ZOOKEEPER-888. c-client / zkpython: Double free corruption on node watcher 
(Austin Shoemaker via henryr)
+  ZOOKEEPER-888. c-client / zkpython: Double free corruption on
+  node watcher (Austin Shoemaker via henryr)
+
+  ZOOKEEPER-893. ZooKeeper high cpu usage when invalid requests
+  (Thijs Terlouw via phunt)
 
 IMPROVEMENTS:
   ZOOKEEPER-724. Improve junit test integration - log harness information 

Modified: 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumCnxManager.java
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumCnxManager.java?rev=1024438r1=1024437r2=1024438view=diff
==
--- 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumCnxManager.java
 (original)
+++ 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumCnxManager.java
 Tue Oct 19 22:32:09 2010
@@ -673,28 +673,33 @@ public class QuorumCnxManager {
 }
 msgLength.position(0);
 int length = msgLength.getInt();
+if(length = 0) {
+throw new IOException(Invalid packet length: + 
length);
+}
 /**
  * Allocates a new ByteBuffer to receive the message
  */
-if (length  0) {
-if (length  PACKETMAXSIZE) {
-throw new IOException(Invalid packet of length  
+ length);
-}
-byte[] msgArray = new byte[length];
-ByteBuffer message = ByteBuffer.wrap(msgArray);
-int numbytes = 0;
-while (message.hasRemaining()) {
-numbytes += channel.read(message);
-}
-message.position(0);
-synchronized (recvQueue) {
-recvQueue
-.put(new Message(message.duplicate(), 
sid));
+if (length  PACKETMAXSIZE) {
+throw new IOException(Invalid packet of length  + 
length);
+}
+byte[] msgArray = new byte[length];
+ByteBuffer message = ByteBuffer.wrap(msgArray);
+int numbytes = 0;
+int temp_numbytes = 0;
+while (message.hasRemaining()) {
+temp_numbytes = channel.read(message); 
+if(temp_numbytes  0) {
+throw new IOException(Channel eof before end);
 }
-msgLength.position(0);
+numbytes += temp_numbytes;
+}
+message.position(0);
+synchronized (recvQueue) {
+recvQueue
+.put(new Message(message.duplicate(), sid));
 }
+msgLength.position(0);
 }
-
 } catch (Exception e) {
 LOG.warn(Connection broken for id  + sid + , my id =  + 
 self.getId() + , error =  + e);

Modified: 
hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/CnxManagerTest.java
URL: 
http://svn.apache.org/viewvc/hadoop

svn commit: r1022635 - /hadoop/zookeeper/branches/ZOOKEEPER-823/

2010-10-14 Thread phunt
Author: phunt
Date: Thu Oct 14 18:16:39 2010
New Revision: 1022635

URL: http://svn.apache.org/viewvc?rev=1022635view=rev
Log:
Branching for the Netty client patch, trying to get it onto hudson for testing

Added:
hadoop/zookeeper/branches/ZOOKEEPER-823/
  - copied from r1022634, hadoop/zookeeper/trunk/



svn commit: r1022642 [2/2] - in /hadoop/zookeeper/branches/ZOOKEEPER-823: ./ src/docs/src/documentation/content/xdocs/ src/java/main/org/apache/zookeeper/ src/java/main/org/apache/zookeeper/server/ sr

2010-10-14 Thread phunt
Added: 
hadoop/zookeeper/branches/ZOOKEEPER-823/src/java/test/org/apache/zookeeper/ThreadUtil.java
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/ZOOKEEPER-823/src/java/test/org/apache/zookeeper/ThreadUtil.java?rev=1022642view=auto
==
--- 
hadoop/zookeeper/branches/ZOOKEEPER-823/src/java/test/org/apache/zookeeper/ThreadUtil.java
 (added)
+++ 
hadoop/zookeeper/branches/ZOOKEEPER-823/src/java/test/org/apache/zookeeper/ThreadUtil.java
 Thu Oct 14 18:45:47 2010
@@ -0,0 +1,70 @@
+package org.apache.zookeeper;
+
+import java.lang.management.ManagementFactory;
+import java.lang.management.ThreadMXBean;
+import java.util.ArrayList;
+import java.util.List;
+
+public class ThreadUtil {
+
+public static ThreadGroup getRootThreadGroup() {
+ThreadGroup threadGroup = Thread.currentThread().getThreadGroup();
+ThreadGroup parentThreadGroup;
+while ( null != (parentThreadGroup = threadGroup.getParent()) ){
+threadGroup = parentThreadGroup;  
+}
+return threadGroup;
+}
+
+public static Thread[] getAllThreads() {
+final ThreadGroup root = getRootThreadGroup();
+int arraySize = ManagementFactory.getThreadMXBean().getThreadCount();
+int returnedThreads = 0;
+Thread[] threads;
+do {
+arraySize *= 2;
+threads = new Thread[arraySize];
+returnedThreads = root.enumerate( threads, true );
+} while ( returnedThreads = arraySize );
+return java.util.Arrays.copyOf( threads, returnedThreads );
+}
+
+public static ListThread getThreadsFiltered(String pattern) {
+Thread[] allThreads = getAllThreads();
+ArrayListThread filteredThreads = new ArrayListThread();
+
+ 
+for(int i=0;iallThreads.length;++i){
+Thread currentThread = allThreads[i];
+if(currentThread.getName().contains(pattern)){
+filteredThreads.add(currentThread);
+}
+}
+return filteredThreads;
+}
+
+public static ListThread getThreadsFiltered(String pattern, Thread 
exclude){
+ListThread filteredThreads = getThreadsFiltered(pattern);
+filteredThreads.remove(exclude);
+return filteredThreads;
+}
+
+public static String formatThread(Thread thread){
+StringBuilder out = new StringBuilder();
+out.append(Name: )
+   .append(thread.getName())
+   .append( State: )
+   .append(thread.getState())
+   .append( Prio: )
+   .append(thread.getPriority())
+   .append(\nTrace:\n);
+
+StackTraceElement[] trace = thread.getStackTrace();
+
+for(int i=0;itrace.length;++i){
+out.append(trace[i]).append(\n);
+}
+   
+return out.toString();
+}
+}

Modified: 
hadoop/zookeeper/branches/ZOOKEEPER-823/src/java/test/org/apache/zookeeper/test/AsyncHammerTest.java
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/ZOOKEEPER-823/src/java/test/org/apache/zookeeper/test/AsyncHammerTest.java?rev=1022642r1=1022641r2=1022642view=diff
==
--- 
hadoop/zookeeper/branches/ZOOKEEPER-823/src/java/test/org/apache/zookeeper/test/AsyncHammerTest.java
 (original)
+++ 
hadoop/zookeeper/branches/ZOOKEEPER-823/src/java/test/org/apache/zookeeper/test/AsyncHammerTest.java
 Thu Oct 14 18:45:47 2010
@@ -181,7 +181,7 @@ public class AsyncHammerTest extends ZKT
 LOG.info(Stopping hammers);
 for (int i = 0; i  hammers.length; i++) {
 hammers[i].interrupt();
-verifyThreadTerminated(hammers[i], 6);
+verifyThreadTerminated(hammers[i], i, 6);
 Assert.assertFalse(hammers[i].failed);
 }
 
@@ -210,7 +210,7 @@ public class AsyncHammerTest extends ZKT
 bang = false;
 for (int i = 0; i  hammers.length; i++) {
 hammers[i].interrupt();
-verifyThreadTerminated(hammers[i], 6);
+verifyThreadTerminated(hammers[i], i, 6);
 }
 // before restart
 qb.verifyRootOfAllServersMatch(qb.hostPort);

Modified: 
hadoop/zookeeper/branches/ZOOKEEPER-823/src/java/test/org/apache/zookeeper/test/ClientBase.java
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/ZOOKEEPER-823/src/java/test/org/apache/zookeeper/test/ClientBase.java?rev=1022642r1=1022641r2=1022642view=diff
==
--- 
hadoop/zookeeper/branches/ZOOKEEPER-823/src/java/test/org/apache/zookeeper/test/ClientBase.java
 (original)
+++ 
hadoop/zookeeper/branches/ZOOKEEPER-823/src/java/test/org/apache/zookeeper/test/ClientBase.java
 Thu Oct 14 18:45:47 2010
@@ -43,6 +43,7 @@ import org.apache.log4j.Priority;
 import 

svn commit: r1005123 - in /hadoop/zookeeper/trunk: CHANGES.txt src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml src/java/main/org/apache/zookeeper/server/quorum/QuorumCnxManager.java src/ja

2010-10-06 Thread phunt
Author: phunt
Date: Wed Oct  6 17:01:53 2010
New Revision: 1005123

URL: http://svn.apache.org/viewvc?rev=1005123view=rev
Log:
ZOOKEEPER-822. Leader election taking a long time to complete

Modified:
hadoop/zookeeper/trunk/CHANGES.txt

hadoop/zookeeper/trunk/src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml

hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumCnxManager.java

hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/CnxManagerTest.java

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=1005123r1=1005122r2=1005123view=diff
==
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Wed Oct  6 17:01:53 2010
@@ -107,6 +107,9 @@ BUGFIXES: 
   ZOOKEEPER-844. handle auth failure in java client
   (Camille Fournier via phunt)
 
+  ZOOKEEPER-822. Leader election taking a long time to complete
+  (Vishal K via phunt)
+
 IMPROVEMENTS:
   ZOOKEEPER-724. Improve junit test integration - log harness information 
   (phunt via mahadev)

Modified: 
hadoop/zookeeper/trunk/src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml?rev=1005123r1=1005122r2=1005123view=diff
==
--- 
hadoop/zookeeper/trunk/src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml
 (original)
+++ 
hadoop/zookeeper/trunk/src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml
 Wed Oct  6 17:01:53 2010
@@ -919,6 +919,23 @@ server.3=zoo3:2888:3888/programlisting
   /para
 /listitem
   /varlistentry
+  
+  varlistentry
+termcnxTimeout/term
+
+listitem
+  para(Java system property: zookeeper.emphasis
+  role=boldcnxTimeout/emphasis)/para
+
+  paraSets the timeout value for opening connections for leader 
election notifications. 
+  Only applicable if you are using electionAlg 3. 
+  /para
+
+  note
+paraDefault value is 5 seconds./para
+  /note
+/listitem
+  /varlistentry
 /variablelist
 para/para
   /section

Modified: 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumCnxManager.java
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumCnxManager.java?rev=1005123r1=1005122r2=1005123view=diff
==
--- 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumCnxManager.java
 (original)
+++ 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumCnxManager.java
 Wed Oct  6 17:01:53 2010
@@ -35,7 +35,7 @@ import org.apache.log4j.Logger;
 
 /**
  * This class implements a connection manager for leader election using TCP. It
- * maintains one coonection for every pair of servers. The tricky part is to
+ * maintains one connection for every pair of servers. The tricky part is to
  * guarantee that there is exactly one connection for every pair of servers 
that
  * are operating correctly and that can communicate over the network.
  * 
@@ -75,6 +75,12 @@ public class QuorumCnxManager {
 private long observerCounter = -1;
 
 /*
+ * Connection time out value in milliseconds 
+ */
+
+private int cnxTO = 5000;
+
+/*
  * Local IP address
  */
 final QuorumPeer self;
@@ -118,6 +124,11 @@ public class QuorumCnxManager {
 this.senderWorkerMap = new ConcurrentHashMapLong, SendWorker();
 this.lastMessageSent = new ConcurrentHashMapLong, ByteBuffer();
 
+String cnxToValue = System.getProperty(zookeeper.cnxTimeout);
+if(cnxToValue != null){
+this.cnxTO = new Integer(cnxToValue); 
+}
+
 this.self = self;
 
 // Starts listener thread that waits for connection requests 
@@ -131,9 +142,12 @@ public class QuorumCnxManager {
  */
 public void testInitiateConnection(long sid) throws Exception {
 SocketChannel channel;
-LOG.debug(Opening channel to server   + sid);
-channel = SocketChannel
-.open(self.getVotingView().get(sid).electionAddr);
+if(LOG.isDebugEnabled()){
+LOG.debug(Opening channel to server   + sid);
+}
+
+channel = SocketChannel.open();
+channel.socket().connect(self.getVotingView().get(sid).electionAddr, 
cnxTO);
 channel.socket().setTcpNoDelay(true);
 initiateConnection(channel, sid);
 }
@@ -173,11 +187,11 @@ public class QuorumCnxManager

svn commit: r1005124 - in /hadoop/zookeeper/branches/branch-3.3: ./ src/docs/src/documentation/content/xdocs/ src/java/main/org/apache/zookeeper/server/quorum/ src/java/test/org/apache/zookeeper/test/

2010-10-06 Thread phunt
Author: phunt
Date: Wed Oct  6 17:02:16 2010
New Revision: 1005124

URL: http://svn.apache.org/viewvc?rev=1005124view=rev
Log:
ZOOKEEPER-822. Leader election taking a long time to complete

Modified:
hadoop/zookeeper/branches/branch-3.3/CHANGES.txt

hadoop/zookeeper/branches/branch-3.3/src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml

hadoop/zookeeper/branches/branch-3.3/src/java/main/org/apache/zookeeper/server/quorum/QuorumCnxManager.java

hadoop/zookeeper/branches/branch-3.3/src/java/test/org/apache/zookeeper/test/CnxManagerTest.java

Modified: hadoop/zookeeper/branches/branch-3.3/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.3/CHANGES.txt?rev=1005124r1=1005123r2=1005124view=diff
==
--- hadoop/zookeeper/branches/branch-3.3/CHANGES.txt (original)
+++ hadoop/zookeeper/branches/branch-3.3/CHANGES.txt Wed Oct  6 17:02:16 2010
@@ -32,6 +32,9 @@ BUGFIXES:
   ZOOKEEPER-844. handle auth failure in java client
   (Camille Fournier via phunt)
 
+  ZOOKEEPER-822. Leader election taking a long time to complete
+  (Vishal K via phunt)
+
 IMPROVEMENTS:
 
   ZOOKEEPER-789. Improve FLE log messages (flavio via phunt)

Modified: 
hadoop/zookeeper/branches/branch-3.3/src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.3/src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml?rev=1005124r1=1005123r2=1005124view=diff
==
--- 
hadoop/zookeeper/branches/branch-3.3/src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml
 (original)
+++ 
hadoop/zookeeper/branches/branch-3.3/src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml
 Wed Oct  6 17:02:16 2010
@@ -919,6 +919,23 @@ server.3=zoo3:2888:3888/programlisting
   /para
 /listitem
   /varlistentry
+  
+  varlistentry
+termcnxTimeout/term
+
+listitem
+  para(Java system property: zookeeper.emphasis
+  role=boldcnxTimeout/emphasis)/para
+
+  paraSets the timeout value for opening connections for leader 
election notifications. 
+  Only applicable if you are using electionAlg 3.
+  /para
+
+  note
+paraDefault value is 5 seconds./para
+  /note
+/listitem
+  /varlistentry
 /variablelist
 para/para
   /section

Modified: 
hadoop/zookeeper/branches/branch-3.3/src/java/main/org/apache/zookeeper/server/quorum/QuorumCnxManager.java
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.3/src/java/main/org/apache/zookeeper/server/quorum/QuorumCnxManager.java?rev=1005124r1=1005123r2=1005124view=diff
==
--- 
hadoop/zookeeper/branches/branch-3.3/src/java/main/org/apache/zookeeper/server/quorum/QuorumCnxManager.java
 (original)
+++ 
hadoop/zookeeper/branches/branch-3.3/src/java/main/org/apache/zookeeper/server/quorum/QuorumCnxManager.java
 Wed Oct  6 17:02:16 2010
@@ -35,7 +35,7 @@ import org.apache.log4j.Logger;
 
 /**
  * This class implements a connection manager for leader election using TCP. It
- * maintains one coonection for every pair of servers. The tricky part is to
+ * maintains one connection for every pair of servers. The tricky part is to
  * guarantee that there is exactly one connection for every pair of servers 
that
  * are operating correctly and that can communicate over the network.
  * 
@@ -75,6 +75,12 @@ public class QuorumCnxManager {
 private long observerCounter = -1;
 
 /*
+ * Connection time out value in milliseconds 
+ */
+
+private int cnxTO = 5000;
+
+/*
  * Local IP address
  */
 final QuorumPeer self;
@@ -118,6 +124,11 @@ public class QuorumCnxManager {
 this.senderWorkerMap = new ConcurrentHashMapLong, SendWorker();
 this.lastMessageSent = new ConcurrentHashMapLong, ByteBuffer();
 
+String cnxToValue = System.getProperty(zookeeper.cnxTimeout);
+if(cnxToValue != null){
+this.cnxTO = new Integer(cnxToValue); 
+}
+
 this.self = self;
 
 // Starts listener thread that waits for connection requests 
@@ -131,9 +142,12 @@ public class QuorumCnxManager {
  */
 public void testInitiateConnection(long sid) throws Exception {
 SocketChannel channel;
-LOG.debug(Opening channel to server   + sid);
-channel = SocketChannel
-.open(self.getVotingView().get(sid).electionAddr);
+if(LOG.isDebugEnabled()){
+LOG.debug(Opening channel to server   + sid);
+}
+
+channel = SocketChannel.open();
+channel.socket().connect(self.getVotingView().get(sid

svn commit: r979473 - /hadoop/zookeeper/branches/branch-3.3/build.xml

2010-07-26 Thread phunt
Author: phunt
Date: Mon Jul 26 22:21:46 2010
New Revision: 979473

URL: http://svn.apache.org/viewvc?rev=979473view=rev
Log:
fixed version string in build.xml to be consistent with prior releases

Modified:
hadoop/zookeeper/branches/branch-3.3/build.xml

Modified: hadoop/zookeeper/branches/branch-3.3/build.xml
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.3/build.xml?rev=979473r1=979472r2=979473view=diff
==
--- hadoop/zookeeper/branches/branch-3.3/build.xml (original)
+++ hadoop/zookeeper/branches/branch-3.3/build.xml Mon Jul 26 22:21:46 2010
@@ -24,7 +24,7 @@
 
 property environment=env/
 
-property name=version value=3.3.2-dev /
+property name=version value=3.3.1 /
 property name=final.name value=${name}-${version}/
 property name=revision.dir value=${basedir}/.revision /
 property name=revision.properties value=revision.properties /




svn commit: r963957 - in /hadoop/zookeeper/trunk: ./ src/contrib/monitoring/ src/contrib/monitoring/cacti/ src/contrib/monitoring/ganglia/ src/contrib/monitoring/nagios/

2010-07-14 Thread phunt
Author: phunt
Date: Wed Jul 14 06:39:32 2010
New Revision: 963957

URL: http://svn.apache.org/viewvc?rev=963957view=rev
Log:
ZOOKEEPER-799. Add tools and recipes for monitoring as a contrib

Added:
hadoop/zookeeper/trunk/src/contrib/monitoring/
hadoop/zookeeper/trunk/src/contrib/monitoring/JMX-RESOURCES
hadoop/zookeeper/trunk/src/contrib/monitoring/README
hadoop/zookeeper/trunk/src/contrib/monitoring/cacti/
hadoop/zookeeper/trunk/src/contrib/monitoring/cacti/README
hadoop/zookeeper/trunk/src/contrib/monitoring/check_zookeeper.py   (with 
props)
hadoop/zookeeper/trunk/src/contrib/monitoring/ganglia/
hadoop/zookeeper/trunk/src/contrib/monitoring/ganglia/README
hadoop/zookeeper/trunk/src/contrib/monitoring/ganglia/Screenshot.png   
(with props)
hadoop/zookeeper/trunk/src/contrib/monitoring/ganglia/modpython.conf
hadoop/zookeeper/trunk/src/contrib/monitoring/ganglia/zookeeper.pyconf
hadoop/zookeeper/trunk/src/contrib/monitoring/ganglia/zookeeper_ganglia.py
hadoop/zookeeper/trunk/src/contrib/monitoring/nagios/
hadoop/zookeeper/trunk/src/contrib/monitoring/nagios/README.txt
hadoop/zookeeper/trunk/src/contrib/monitoring/nagios/Screenshot-1.png   
(with props)
hadoop/zookeeper/trunk/src/contrib/monitoring/nagios/Screenshot.png   (with 
props)
hadoop/zookeeper/trunk/src/contrib/monitoring/nagios/hostgroups.cfg
hadoop/zookeeper/trunk/src/contrib/monitoring/nagios/services.cfg
hadoop/zookeeper/trunk/src/contrib/monitoring/nagios/zookeeper.cfg
hadoop/zookeeper/trunk/src/contrib/monitoring/test.py   (with props)
Modified:
hadoop/zookeeper/trunk/CHANGES.txt

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=963957r1=963956r2=963957view=diff
==
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Wed Jul 14 06:39:32 2010
@@ -33,7 +33,7 @@ BUGFIXES: 
   do not handle windows path correctly (Vishal K via phunt)
 
   ZOOKEEPER-754. numerous misspellings succesfully
-  (Savu Andrei via phunt)
+  (Andrei Savu via phunt)
 
   ZOOKEEPER-749. OSGi metadata not included in binary only jar (phunt
   via henryr)
@@ -97,10 +97,14 @@ NEW FEATURES:
 
   ZOOKEEPER-773. Log visualisation (Ivan Kelly via phunt)
 
-  ZOOKEEPER-744. Add monitoring four-letter word (Savu Andrei via phunt)
+  ZOOKEEPER-744. Add monitoring four-letter word (Andrei Savu via phunt)
 
   ZOOKEEPER-712. Bookie recovery. (erwin tam via breed)
 
+  ZOOKEEPER-799. Add tools and recipes for monitoring as a contrib
+  (Andrei Savu via phunt)
+
+
 Release 3.3.0 - 2010-03-24
 
 Non-backward compatible changes:

Added: hadoop/zookeeper/trunk/src/contrib/monitoring/JMX-RESOURCES
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/contrib/monitoring/JMX-RESOURCES?rev=963957view=auto
==
--- hadoop/zookeeper/trunk/src/contrib/monitoring/JMX-RESOURCES (added)
+++ hadoop/zookeeper/trunk/src/contrib/monitoring/JMX-RESOURCES Wed Jul 14 
06:39:32 2010
@@ -0,0 +1,38 @@
+
+Resources for monitoring ZooKeeper using JMX
+
+
+JMX/REST Bridge  
+---
+
+http://code.google.com/p/polarrose-jmx-rest-bridge/ 
+
+Simple Java Web Application that exposes JMX servers through HTTP. This was 
written so that external tools can easily query JMX attributes of Java 
applications. More specifically, this was written to allow Cacti to generate 
fancy graphs of ActiveMQ instances.
+
+JMXetric
+
+
+http://code.google.com/p/jmxetric/
+
+JMXetric is a 100% java, configurable JVM agent that periodically polls MBean 
attributes and reports their values to Ganglia.
+
+jmxquery
+
+
+http://code.google.com/p/jmxquery/
+
+a plugin for nagios to check jmx
+
+check_jmx
+-
+
+http://exchange.nagios.org/directory/Plugins/Java-Applications-and-Servers/check_jmx/details
+
+
+jmx2snmp
+
+
+http://github.com/tcurdt/jmx2snmp
+
+Expose application JMX properties via SNMP
+

Added: hadoop/zookeeper/trunk/src/contrib/monitoring/README
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/contrib/monitoring/README?rev=963957view=auto
==
--- hadoop/zookeeper/trunk/src/contrib/monitoring/README (added)
+++ hadoop/zookeeper/trunk/src/contrib/monitoring/README Wed Jul 14 06:39:32 
2010
@@ -0,0 +1,79 @@
+
+Tools and Recipes for ZooKeeper Monitoring
+--
+
+How To Monitor
+--
+
+A ZooKeeper cluster can be monitored in two ways:
+ 1. by using the 'mntr' 4letterword command
+ 2. by using JMX to query the MBeans 
+
+This repo contains tools and recipes for monitoring ZooKeeper using the first 
method. 
+
+Check the file JMX-RESOURCE for some links to resources

svn commit: r961026 - in /hadoop/zookeeper/trunk: CHANGES.txt bin/zkServer.sh

2010-07-06 Thread phunt
Author: phunt
Date: Tue Jul  6 21:50:25 2010
New Revision: 961026

URL: http://svn.apache.org/viewvc?rev=961026view=rev
Log:
ZOOKEEPER-796. zkServer.sh should support an external PIDFILE variable

Modified:
hadoop/zookeeper/trunk/CHANGES.txt
hadoop/zookeeper/trunk/bin/zkServer.sh

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=961026r1=961025r2=961026view=diff
==
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Tue Jul  6 21:50:25 2010
@@ -61,6 +61,9 @@ BUGFIXES: 
   ZOOKEEPER-636. configure.ac has instructions which override the contents of
   CFLAGS and CXXFLAGS. (Maxim P. Dementiev via phunt)
 
+  ZOOKEEPER-796. zkServer.sh should support an external PIDFILE variable
+  (Alex Newman via phunt)
+
 IMPROVEMENTS:
   ZOOKEEPER-724. Improve junit test integration - log harness information 
   (phunt via mahadev)

Modified: hadoop/zookeeper/trunk/bin/zkServer.sh
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/bin/zkServer.sh?rev=961026r1=961025r2=961026view=diff
==
--- hadoop/zookeeper/trunk/bin/zkServer.sh (original)
+++ hadoop/zookeeper/trunk/bin/zkServer.sh Tue Jul  6 21:50:25 2010
@@ -69,7 +69,9 @@ fi
 
 echo Using config: $ZOOCFG
 
-ZOOPIDFILE=$(grep dataDir $ZOOCFG | sed -e 's/.*=//')/zookeeper_server.pid
+if [ -z $ZOOPIDFILE ]
+then ZOOPIDFILE=$(grep dataDir $ZOOCFG | sed -e 
's/.*=//')/zookeeper_server.pid
+fi
 
 
 case $1 in




svn commit: r960673 - in /hadoop/zookeeper/trunk: CHANGES.txt src/java/main/org/apache/zookeeper/server/quorum/FastLeaderElection.java

2010-07-05 Thread phunt
Author: phunt
Date: Mon Jul  5 19:50:05 2010
New Revision: 960673

URL: http://svn.apache.org/viewvc?rev=960673view=rev
Log:
ZOOKEEPER-789. Improve FLE log messages

Modified:
hadoop/zookeeper/trunk/CHANGES.txt

hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/FastLeaderElection.java

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=960673r1=960672r2=960673view=diff
==
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Mon Jul  5 19:50:05 2010
@@ -74,6 +74,8 @@ IMPROVEMENTS:
   ZOOKEEPER-788: Add server id to message logs
   (Ivan Kelly via flavio)
 
+  ZOOKEEPER-789. Improve FLE log messages (flavio via phunt)
+
 NEW FEATURES:
   ZOOKEEPER-729. Java client API to recursively delete a subtree.
   (Kay Kay via henry)

Modified: 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/FastLeaderElection.java
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/FastLeaderElection.java?rev=960673r1=960672r2=960673view=diff
==
--- 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/FastLeaderElection.java
 (original)
+++ 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/FastLeaderElection.java
 Mon Jul  5 19:50:05 2010
@@ -35,11 +35,11 @@ import org.apache.zookeeper.server.quoru
 
 
 /**
- * Implementation of leader election using TCP. It uses an object of the class 
+ * Implementation of leader election using TCP. It uses an object of the class
  * QuorumCnxManager to manage connections. Otherwise, the algorithm is 
push-based
- * as with the other UDP implementations. 
- * 
- * There are a few parameters that can be tuned to change its behavior. First, 
+ * as with the other UDP implementations.
+ *
+ * There are a few parameters that can be tuned to change its behavior. First,
  * finalizeWait determines the amount of time to wait until deciding upon a 
leader.
  * This is part of the leader election algorithm.
  */
@@ -56,30 +56,30 @@ public class FastLeaderElection implemen
 final static int finalizeWait = 200;
 
 
-   /**
-* Upper bound on the amount of time between two consecutive
-* notification checks. This impacts the amount of time to get
-* the system up again after long partitions. Currently 60 seconds. 
-*/
-   
+/**
+ * Upper bound on the amount of time between two consecutive
+ * notification checks. This impacts the amount of time to get
+ * the system up again after long partitions. Currently 60 seconds.
+ */
+
 final static int maxNotificationInterval = 6;
-
-   /**
-* Connection manager. Fast leader election uses TCP for 
-* communication between peers, and QuorumCnxManager manages
-* such connections. 
-*/
-   
-   QuorumCnxManager manager;
-
-   
-   /**
-* Notifications are messages that let other peers know that
-* a given peer has changed its vote, either because it has
-* joined leader election or because it learned of another 
-* peer with higher zxid or same zxid and higher server id
-*/
-   
+
+/**
+ * Connection manager. Fast leader election uses TCP for
+ * communication between peers, and QuorumCnxManager manages
+ * such connections.
+ */
+
+QuorumCnxManager manager;
+
+
+/**
+ * Notifications are messages that let other peers know that
+ * a given peer has changed its vote, either because it has
+ * joined leader election or because it learned of another
+ * peer with higher zxid or same zxid and higher server id
+ */
+
 static public class Notification {
 /*
  * Proposed leader
@@ -100,7 +100,7 @@ public class FastLeaderElection implemen
  * current state of sender
  */
 QuorumPeer.ServerState state;
-
+
 /*
  * Address of sender
  */
@@ -113,22 +113,22 @@ public class FastLeaderElection implemen
  * of reception of notification.
  */
 static public class ToSend {
-   static enum mType {crequest, challenge, notification, ack}
-
-ToSend(mType type, 
-   long leader, 
-   long zxid, 
-   long epoch, 
-   ServerState state,
-   long sid) {
-
-   this.leader = leader;
-   this.zxid = zxid;
-   this.epoch = epoch;
-   this.state = state;
-   this.sid = sid;
+static enum mType {crequest, challenge, notification, ack}
+
+ToSend(mType type,
+long leader

svn commit: r960675 - in /hadoop/zookeeper/branches/branch-3.3: CHANGES.txt src/java/main/org/apache/zookeeper/server/quorum/FastLeaderElection.java

2010-07-05 Thread phunt
Author: phunt
Date: Mon Jul  5 19:53:05 2010
New Revision: 960675

URL: http://svn.apache.org/viewvc?rev=960675view=rev
Log:
ZOOKEEPER-789. Improve FLE log messages

Modified:
hadoop/zookeeper/branches/branch-3.3/CHANGES.txt

hadoop/zookeeper/branches/branch-3.3/src/java/main/org/apache/zookeeper/server/quorum/FastLeaderElection.java

Modified: hadoop/zookeeper/branches/branch-3.3/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.3/CHANGES.txt?rev=960675r1=960674r2=960675view=diff
==
--- hadoop/zookeeper/branches/branch-3.3/CHANGES.txt (original)
+++ hadoop/zookeeper/branches/branch-3.3/CHANGES.txt Mon Jul  5 19:53:05 2010
@@ -1,3 +1,14 @@
+Branch 3.3
+
+Backward compatible changes:
+
+BUGFIXES:
+
+IMPROVEMENTS:
+
+  ZOOKEEPER-789. Improve FLE log messages (flavio via phunt)
+
+
 Release 3.3.1 - 2010-05-11
 Backward compatible changes:
 

Modified: 
hadoop/zookeeper/branches/branch-3.3/src/java/main/org/apache/zookeeper/server/quorum/FastLeaderElection.java
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.3/src/java/main/org/apache/zookeeper/server/quorum/FastLeaderElection.java?rev=960675r1=960674r2=960675view=diff
==
--- 
hadoop/zookeeper/branches/branch-3.3/src/java/main/org/apache/zookeeper/server/quorum/FastLeaderElection.java
 (original)
+++ 
hadoop/zookeeper/branches/branch-3.3/src/java/main/org/apache/zookeeper/server/quorum/FastLeaderElection.java
 Mon Jul  5 19:53:05 2010
@@ -35,11 +35,11 @@ import org.apache.zookeeper.server.quoru
 
 
 /**
- * Implementation of leader election using TCP. It uses an object of the class 
+ * Implementation of leader election using TCP. It uses an object of the class
  * QuorumCnxManager to manage connections. Otherwise, the algorithm is 
push-based
- * as with the other UDP implementations. 
- * 
- * There are a few parameters that can be tuned to change its behavior. First, 
+ * as with the other UDP implementations.
+ *
+ * There are a few parameters that can be tuned to change its behavior. First,
  * finalizeWait determines the amount of time to wait until deciding upon a 
leader.
  * This is part of the leader election algorithm.
  */
@@ -56,30 +56,30 @@ public class FastLeaderElection implemen
 final static int finalizeWait = 200;
 
 
-   /**
-* Upper bound on the amount of time between two consecutive
-* notification checks. This impacts the amount of time to get
-* the system up again after long partitions. Currently 60 seconds. 
-*/
-   
+/**
+ * Upper bound on the amount of time between two consecutive
+ * notification checks. This impacts the amount of time to get
+ * the system up again after long partitions. Currently 60 seconds.
+ */
+
 final static int maxNotificationInterval = 6;
-
-   /**
-* Connection manager. Fast leader election uses TCP for 
-* communication between peers, and QuorumCnxManager manages
-* such connections. 
-*/
-   
-   QuorumCnxManager manager;
-
-   
-   /**
-* Notifications are messages that let other peers know that
-* a given peer has changed its vote, either because it has
-* joined leader election or because it learned of another 
-* peer with higher zxid or same zxid and higher server id
-*/
-   
+
+/**
+ * Connection manager. Fast leader election uses TCP for
+ * communication between peers, and QuorumCnxManager manages
+ * such connections.
+ */
+
+QuorumCnxManager manager;
+
+
+/**
+ * Notifications are messages that let other peers know that
+ * a given peer has changed its vote, either because it has
+ * joined leader election or because it learned of another
+ * peer with higher zxid or same zxid and higher server id
+ */
+
 static public class Notification {
 /*
  * Proposed leader
@@ -100,7 +100,7 @@ public class FastLeaderElection implemen
  * current state of sender
  */
 QuorumPeer.ServerState state;
-
+
 /*
  * Address of sender
  */
@@ -113,22 +113,22 @@ public class FastLeaderElection implemen
  * of reception of notification.
  */
 static public class ToSend {
-   static enum mType {crequest, challenge, notification, ack}
-
-ToSend(mType type, 
-   long leader, 
-   long zxid, 
-   long epoch, 
-   ServerState state,
-   long sid) {
-
-   this.leader = leader;
-   this.zxid = zxid;
-   this.epoch = epoch;
-   this.state = state;
-   this.sid = sid;
+static enum mType {crequest, challenge, notification

svn commit: r960676 - in /hadoop/zookeeper/trunk: CHANGES.txt src/contrib/loggraph/src/java/org/apache/zookeeper/graph/JsonGenerator.java

2010-07-05 Thread phunt
Author: phunt
Date: Mon Jul  5 19:57:43 2010
New Revision: 960676

URL: http://svn.apache.org/viewvc?rev=960676view=rev
Log:
ZOOKEEPER-798. Fixup loggraph for FLE changes

Modified:
hadoop/zookeeper/trunk/CHANGES.txt

hadoop/zookeeper/trunk/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/JsonGenerator.java

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=960676r1=960675r2=960676view=diff
==
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Mon Jul  5 19:57:43 2010
@@ -76,6 +76,8 @@ IMPROVEMENTS:
 
   ZOOKEEPER-789. Improve FLE log messages (flavio via phunt)
 
+  ZOOKEEPER-798. Fixup loggraph for FLE changes (Ivan Kelly via phunt)
+
 NEW FEATURES:
   ZOOKEEPER-729. Java client API to recursively delete a subtree.
   (Kay Kay via henry)

Modified: 
hadoop/zookeeper/trunk/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/JsonGenerator.java
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/JsonGenerator.java?rev=960676r1=960675r2=960676view=diff
==
--- 
hadoop/zookeeper/trunk/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/JsonGenerator.java
 (original)
+++ 
hadoop/zookeeper/trunk/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/JsonGenerator.java
 Mon Jul  5 19:57:43 2010
@@ -76,7 +76,7 @@ public class JsonGenerator {
 
Pattern stateChangeP = Pattern.compile(- (LOOKING|FOLLOWING|LEADING));
Pattern newElectionP = Pattern.compile(New election. My id =  (\\d+), 
Proposed zxid = (\\d+));
-   Pattern receivedProposalP = Pattern.compile(Notification: \\d+, 
(\\d+), (\\d+), \\d+, [^,]*, [^,]*, (\\d+));//, LOOKING, LOOKING, 2
+   Pattern receivedProposalP = Pattern.compile(Notification: (\\d+) 
\\(n.leader\\), (\\d+) \\(n.zxid\\), (\\d+) \\(n.round\\), .+ \\(n.state\\), 
(\\d+) \\(n.sid\\), .+ \\(my state\\));
Pattern exceptionP = Pattern.compile(xception);

root = new JSONObject();
@@ -151,10 +151,10 @@ public class JsonGenerator {
}
} else if ((m = 
receivedProposalP.matcher(e.getEntry())).find()) {
// Pattern.compile(Notification: \\d+, (\\d+), (\\d+), 
\\d+, [^,]*, [^,]*, (\\d+));//, LOOKING, LOOKING, 2
-   int src = Integer.valueOf(m.group(3));
-   long zxid = Long.valueOf(m.group(1));
+   int src = Integer.valueOf(m.group(4));
+   long zxid = Long.valueOf(m.group(2));
int dst = e.getNode();
-   long epoch2 = Long.valueOf(m.group(2));
+   long epoch2 = Long.valueOf(m.group(3));

int count = (int)zxid;//  0xL;
int epoch = (int)Long.rotateRight(zxid, 32);//  32;
@@ -169,9 +169,6 @@ public class JsonGenerator {
leader = 0;
}

-   //  System.out.println(src: +src+ dst: +dst+  zxid: 
+zxid);
-   
-   //  System.out.println(cur);
if (src != dst) {
JSONObject msg = new JSONObject();
msg.put(type, delivermessage);




svn commit: r960686 - in /hadoop/zookeeper/trunk: CHANGES.txt src/c/src/zookeeper.c

2010-07-05 Thread phunt
Author: phunt
Date: Mon Jul  5 20:32:03 2010
New Revision: 960686

URL: http://svn.apache.org/viewvc?rev=960686view=rev
Log:
ZOOKEEPER-797 c client source with AI_ADDRCONFIG cannot be compiled with early 
glibc

Modified:
hadoop/zookeeper/trunk/CHANGES.txt
hadoop/zookeeper/trunk/src/c/src/zookeeper.c

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=960686r1=960685r2=960686view=diff
==
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Mon Jul  5 20:32:03 2010
@@ -78,6 +78,9 @@ IMPROVEMENTS:
 
   ZOOKEEPER-798. Fixup loggraph for FLE changes (Ivan Kelly via phunt)
 
+  ZOOKEEPER-797 c client source with AI_ADDRCONFIG cannot be compiled with
+  early glibc (Qian Ye via phunt)
+
 NEW FEATURES:
   ZOOKEEPER-729. Java client API to recursively delete a subtree.
   (Kay Kay via henry)

Modified: hadoop/zookeeper/trunk/src/c/src/zookeeper.c
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/c/src/zookeeper.c?rev=960686r1=960685r2=960686view=diff
==
--- hadoop/zookeeper/trunk/src/c/src/zookeeper.c (original)
+++ hadoop/zookeeper/trunk/src/c/src/zookeeper.c Mon Jul  5 20:32:03 2010
@@ -545,6 +545,7 @@ int getaddrs(zhandle_t *zh)
 //bug in getaddrinfo implementation when it returns
 //EAI_BADFLAGS or EAI_ADDRFAMILY with AF_UNSPEC and 
 // ai_flags as AI_ADDRCONFIG
+#ifdef AI_ADDRCONFIG
 if ((hints.ai_flags == AI_ADDRCONFIG)  
 ((rc ==EAI_BADFLAGS) || (rc == EAI_ADDRFAMILY))) {
 //reset ai_flags to null
@@ -552,6 +553,7 @@ int getaddrs(zhandle_t *zh)
 //retry getaddrinfo
 rc = getaddrinfo(host, port_spec, hints, res0);
 }
+#endif
 if (rc != 0) {
 errno = getaddrinfo_errno(rc);
 LOG_ERROR((getaddrinfo: %s\n, strerror(errno)));




svn commit: r958096 - in /hadoop/zookeeper/trunk: CHANGES.txt conf/log4j.properties src/contrib/loggraph/src/java/org/apache/zookeeper/graph/Log4JSource.java src/java/main/org/apache/zookeeper/server/

2010-06-25 Thread phunt
Author: phunt
Date: Fri Jun 25 20:08:12 2010
New Revision: 958096

URL: http://svn.apache.org/viewvc?rev=958096view=rev
Log:
ZOOKEEPER-778: Add server id to message logs

Modified:
hadoop/zookeeper/trunk/CHANGES.txt
hadoop/zookeeper/trunk/conf/log4j.properties

hadoop/zookeeper/trunk/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/Log4JSource.java

hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=958096r1=958095r2=958096view=diff
==
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Fri Jun 25 20:08:12 2010
@@ -68,12 +68,15 @@ IMPROVEMENTS:
   ZOOKEEPER-766. forrest recipes docs don't mention the lock/queue recipe
   implementations available in the release (phunt via mahadev)
 
-  ZOOKEEPER-769: Leader can treat observers as quorum members (Sergey
-  Doroshenko via henryr)
+  ZOOKEEPER-769: Leader can treat observers as quorum members
+  (Sergey Doroshenko via henryr)
+
+  ZOOKEEPER-788: Add server id to message logs
+  (Ivan Kelly via flavio)
 
 NEW FEATURES:
-  ZOOKEEPER-729. Java client API to recursively delete a subtree. (Kay
-  Kay via henry)
+  ZOOKEEPER-729. Java client API to recursively delete a subtree.
+  (Kay Kay via henry)
 
   ZOOKEEPER-747. Add C# generation to Jute (Eric Hauser via phunt)
 

Modified: hadoop/zookeeper/trunk/conf/log4j.properties
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/conf/log4j.properties?rev=958096r1=958095r2=958096view=diff
==
--- hadoop/zookeeper/trunk/conf/log4j.properties (original)
+++ hadoop/zookeeper/trunk/conf/log4j.properties Fri Jun 25 20:08:12 2010
@@ -19,7 +19,7 @@ log4j.rootLogger=INFO, CONSOLE
 log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
 log4j.appender.CONSOLE.Threshold=INFO
 log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
-log4j.appender.CONSOLE.layout.ConversionPattern=%d{ISO8601} - %-5p 
[%t:%c...@%l] - %m%n
+log4j.appender.CONSOLE.layout.ConversionPattern=%d{ISO8601} [myid:%X{myid}] - 
%-5p [%t:%c...@%l] - %m%n
 
 #
 # Add ROLLINGFILE to rootLogger to get log file output
@@ -34,7 +34,7 @@ log4j.appender.ROLLINGFILE.MaxFileSize=1
 #log4j.appender.ROLLINGFILE.MaxBackupIndex=10
 
 log4j.appender.ROLLINGFILE.layout=org.apache.log4j.PatternLayout
-log4j.appender.ROLLINGFILE.layout.ConversionPattern=%d{ISO8601} - %-5p 
[%t:%c...@%l] - %m%n
+log4j.appender.ROLLINGFILE.layout.ConversionPattern=%d{ISO8601} 
[myid:%X{myid}] - %-5p [%t:%c...@%l] - %m%n
 
 
 #
@@ -46,4 +46,4 @@ log4j.appender.TRACEFILE.File=zookeeper_
 
 log4j.appender.TRACEFILE.layout=org.apache.log4j.PatternLayout
 ### Notice we are including log4j's NDC here (%x)
-log4j.appender.TRACEFILE.layout.ConversionPattern=%d{ISO8601} - %-5p 
[%t:%c...@%l][%x] - %m%n
+log4j.appender.TRACEFILE.layout.ConversionPattern=%d{ISO8601} [myid:%X{myid}] 
- %-5p [%t:%c...@%l][%x] - %m%n

Modified: 
hadoop/zookeeper/trunk/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/Log4JSource.java
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/Log4JSource.java?rev=958096r1=958095r2=958096view=diff
==
--- 
hadoop/zookeeper/trunk/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/Log4JSource.java
 (original)
+++ 
hadoop/zookeeper/trunk/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/Log4JSource.java
 Fri Jun 25 20:08:12 2010
@@ -282,7 +282,7 @@ public class Log4JSource implements LogS
File f = new File(file);
RandomAccessFileReader in = new RandomAccessFileReader(f);
SimpleDateFormat dateformat = new SimpleDateFormat(DATE_FORMAT);
-   Pattern idp = 
Pattern.compile(Notification:\\s+\\d+,\\s+\\d+,\\s+\\d+,\\s+(\\d+));// 1, 
My\\s+id\\s+=\\s+(\\d+));
+   Pattern idp = Pattern.compile(\\[myid:(\\d+)\\]);
 
long lastFp = in.getPosition();
String line = in.readLine();

Modified: 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java?rev=958096r1=958095r2=958096view=diff
==
--- 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java
 (original)
+++ 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java
 Fri Jun 25 20:08:12 2010
@@ -32,6 +32,8 @@ import java.util.Properties;
 import java.util.Map.Entry;
 
 import org.apache.log4j.Logger;
+import org.apache.log4j.MDC;
+
 import

svn commit: r953041 [4/6] - in /hadoop/zookeeper/trunk: ./ src/contrib/loggraph/ src/contrib/loggraph/bin/ src/contrib/loggraph/src/ src/contrib/loggraph/src/java/ src/contrib/loggraph/src/java/org/ s

2010-06-09 Thread phunt
Added: 
hadoop/zookeeper/trunk/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/loggraph.ui.js
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/loggraph.ui.js?rev=953041view=auto
==
--- 
hadoop/zookeeper/trunk/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/loggraph.ui.js
 (added)
+++ 
hadoop/zookeeper/trunk/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/loggraph.ui.js
 Wed Jun  9 15:26:22 2010
@@ -0,0 +1,377 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * License); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// Opens a window to load files into the engine
+LogGraph.fileSelector = function(callback) {
+var self = this;   
+this.callback = callback;
+this.selectedFiles = new Array();
+
+var divTag = document.createElement(div);
+divTag.id = fileSelector + Math.round(Math.random()*10);
+// divTag.className = popUp;
+divTag.className = selector fileSelector;
+document.body.appendChild(divTag);
+
+YUI().use('dd-drag', function(Y) {
+   //Selector of the node to make draggable
+   var dd = new Y.DD.Drag({
+   node: '#' + divTag.id
+   });   
+   });
+
+var list = document.createElement(ul);
+divTag.appendChild(list);
+var selectedList = document.createElement(selectedlist);
+divTag.appendChild(selectedList);
+
+var clearanchor = document.createElement(span);
+clearanchor.innerHTML = Remove All;
+clearanchor.className = actionbutton;
+clearanchor.style.cssFloat = right;
+clearanchor.onclick = function () {
+   self.selectedFiles = new Array();
+   self.updateSelectedList();
+};
+divTag.appendChild(clearanchor);
+
+var doneanchor = document.createElement(span);
+doneanchor.innerHTML = Process Files;
+doneanchor.className = actionbutton;
+doneanchor.style.cssFloat = left;
+doneanchor.onclick = function () {
+   self.callback(self.selectedFiles);
+   document.body.removeChild(divTag);
+   delete divTag;
+};
+divTag.appendChild(doneanchor);
+
+var cancelanchor = document.createElement(span);
+cancelanchor.innerHTML = Cancel;
+cancelanchor.className = actionbutton;
+cancelanchor.style.cssFloat = left;
+cancelanchor.onclick = function () {
+   document.body.removeChild(divTag);
+   delete divTag;
+};
+divTag.appendChild(cancelanchor);
+
+this.createFileListItem = function (file) {
+   var li = document.createElement(li);
+   var a = document.createElement(a);
+   if (file.type == D) {
+   a.innerHTML = file.file + /;
+   a.onclick = function () { self.updateList(file.path); };
+   } else {
+   a.innerHTML = file.file;
+   a.onclick = function () { self.addSelectedFile(file.path); };
+   }
+   
+   a.fullpath = file.path;;
+   li.appendChild(a);
+   return li;
+};
+
+this.addSelectedFile = function (file) {
+   if (this.selectedFiles.indexOf(file) == -1) {
+   this.selectedFiles.push(file);
+   this.updateSelectedList();
+   }
+};
+
+this.removeSelectedFile = function (file) {
+   this.selectedFiles = this.selectedFiles.filter(function(f) { return 
!(file == f); });
+   this.updateSelectedList();
+};
+
+this.createSelectedListItem = function (file) {
+   var li = document.createElement(li);
+   var a = document.createElement(a);
+   li.className = selectedFile;
+   a.onclick = function () { self.removeSelectedFile(file); };
+   a.innerHTML = file;
+   li.appendChild(a);
+   return li;
+};
+
+this.updateSelectedList = function () {
+   while (selectedList.firstChild) { 
selectedList.removeChild(selectedList.firstChild); }
+   
+   for (var i in this.selectedFiles) {
+   var f = this.selectedFiles[i];
+   selectedList.appendChild(this.createSelectedListItem(f));
+   }
+};
+
+this.updateList = function (base) {
+   while (list.firstChild) 

svn commit: r953041 [6/6] - in /hadoop/zookeeper/trunk: ./ src/contrib/loggraph/ src/contrib/loggraph/bin/ src/contrib/loggraph/src/ src/contrib/loggraph/src/java/ src/contrib/loggraph/src/java/org/ s

2010-06-09 Thread phunt
Added: 
hadoop/zookeeper/trunk/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/yui-min.js
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/yui-min.js?rev=953041view=auto
==
--- 
hadoop/zookeeper/trunk/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/yui-min.js
 (added)
+++ 
hadoop/zookeeper/trunk/src/contrib/loggraph/web/org/apache/zookeeper/graph/resources/yui-min.js
 Wed Jun  9 15:26:22 2010
@@ -0,0 +1,12 @@
+/*
+Copyright (c) 2010, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.com/yui/license.html
+version: 3.1.0
+build: 2026
+*/
+if(typeof YUI===undefined){var YUI=function(F,E,D,C,A){var 
B=this,J=arguments,I,G=J.length,H=(typeof 
YUI_config!==undefined)YUI_config;if(!(B instanceof YUI)){return new 
YUI(F,E,D,C,A);}else{B._init();if(H){B._config(H);}for(I=0;IG;I++){B._config(J[I]);}B._setup();return
 B;}};}(function(){var 
L,B,M=3.1.0,K=http://yui.yahooapis.com/,P=yui3-js-enabled,I=function(){},G=Array.prototype.slice,N={io.xdrReady:1,io.xdrResponse:1,SWF.eventHandler:1},F=(typeof
 
window!=undefined),E=(F)?window:null,R=(F)?E.document:null,D=RR.documentElement,A=DD.className,C={},H=new
 
Date().getTime(),J=function(V,U,T,S){if(VV.addEventListener){V.addEventListener(U,T,S);}else{if(VV.attachEvent){V.attachEvent(on+U,T);}}},Q=function(V,U,T,S){if(VV.removeEventListener){V.removeEventListener(U,T,S);}else{if(VV.detachEvent){V.detachEvent(on+U,T);}}},O=function(){YUI.Env.windowLoaded=true;YUI.Env.DOMReady=true;if(F){Q(window,load,O);}};if(DA.indexOf(P)==-1){if(A){A+=
 ;
 
}A+=P;D.className=A;}if(M.indexOf(@)-1){M=3.0.0;}YUI.prototype={_config:function(Y){Y=Y||{};var
 T,V,W,U=this.config,X=U.modules,S=U.groups;for(V in 
Y){T=Y[V];if(XV==modules){for(W in 
T){X[W]=T[W];}}else{if(SV==groups){for(W in 
T){S[W]=T[W];}}else{if(V==win){U[V]=T.contentWindow||T;U.doc=U[V].document;}else{U[V]=T;},_init:function(){var
 
U,V=this,S=YUI.Env,T=V.Env;V.version=M;if(!T){V.Env={mods:{},base:K,cdn:K+M+/build/,bootstrapped:false,_idx:0,_used:{},_attached:{},_yidx:0,_uidx:0,_guidp:y,_loaded:{},getBase:function(c,a){var
 
W,X,Z,d,Y;X=(RR.getElementsByTagName(script))||[];for(Z=0;ZX.length;Z=Z+1){d=X[Z].src;if(d){Y=d.match(c);W=YY[1];if(W){U=Y[2];Y=d.match(a);if(YY[3]){W=Y[1]+Y[3];}break;}}}return
 
W||T.cdn;}};T=V.Env;T._loaded[M]={};if(SV!==YUI){T._yidx=++S._yidx;T._guidp=(yui_+M+_+T._yidx+_+H).replace(/\./g,_);}V.id=V.stamp(V);C[V.id]=V;}V.constructor=YUI;V.config=V.config||{win:E,doc:R,debug:true,useBrowserConsole:true,throwFail
 
:true,bootstrap:true,fetchCSS:true};V.config.base=YUI.config.base||V.Env.getBase(/^(.*)yui\/yui([\.\-].*)js(\?.*)?$/,/^(.*\?)(.*\)(.*)yui\/yui[\.\-].*js(\?.*)?$/);V.config.loaderPath=YUI.config.loaderPath||loader/loader+(U||-min.)+js;},_setup:function(X){var
 
T,W=this,S=[],V=YUI.Env.mods,U=W.config.core||[get,intl-base,loader,yui-log,yui-later,yui-throttle];for(T=0;TU.length;T++){if(V[U[T]]){S.push(U[T]);}}W.use(yui-base);W.use.apply(W,S);},applyTo:function(Y,X,U){if(!(X
 in N)){this.log(X+: applyTo not allowed,warn,yui);return null;}var 
T=C[Y],W,S,V;if(T){W=X.split(.);S=T;for(V=0;VW.length;V=V+1){S=S[W[V]];if(!S){this.log(applyTo
 not found: +X,warn,yui);}}return S.apply(T,U);}return 
null;},add:function(T,V,S,U){U=U||{};YUI.Env.mods[T]={name:T,fn:V,version:S,details:U};return
 this;},_attach:function(S,W){var 
Y,V,b,T,a,U,c=YUI.Env.mods,X=this.Env._attached,Z=S.length;for(Y=0;YZ;Y++){V=S[Y];b=c[V];if(!X[V]b){X[V]=true;T=b.details;a=T.requi
 
res;U=T.use;if(a){this._attach(this.Array(a));}if(b.fn){b.fn(this,V);}if(U){this._attach(this.Array(U));,use:function(){if(!this.Array){this._attach([yui-base]);}var
 
i,c,j,T=this,k=YUI.Env,U=G.call(arguments,0),V=k.mods,S=T.Env,Z=S._used,g=k._loaderQueue,m=U[0],W=U[U.length-1],b=T.Array,l=T.config,a=l.bootstrap,h=[],e=[],X=l.fetchCSS,f=function(o){e.push(o);if(Z[o]){return;}var
 
Y=V[o],p,n;if(Y){Z[o]=true;p=Y.details.requires;n=Y.details.use;}else{if(!k._loaded[M][o]){h.push(o);}else{Z[o]=true;}}if(p){b.each(b(p),f);}if(n){b.each(b(n),f);}},d=function(q){var
 o=q||{success:true,msg:not 
dynamic},p,n,Y,r=o.data;T._loading=false;if(r){Y=h.concat();h=[];T.Array.each(r,f);n=h.length;if(n){if(h.sort().join()==Y.sort().join()){n=false;}}}if(nr){p=r.concat();p.push(function(){T._attach(r);if(W){W(T,o);}});T._loading=false;T.use.apply(T,p);}else{if(r){T._attach(r);}if(W){W(T,o);}}if(T._useQueueT._useQueue.size()!T._loading){T.use.apply(T,T._useQueue.next());}};if(T._loadi
 ng){T._useQueue=T._useQueue||new T.Queue();T._useQueue.add(U);return 
T;}if(typeof 
W===function){U.pop();}else{W=null;}if(m===*){U=T.Object.keys(V);}if(T.Loader){c=new
 

svn commit: r942165 - /hadoop/zookeeper/tags/release-3.3.1-rc0/

2010-05-07 Thread phunt
Author: phunt
Date: Fri May  7 18:13:04 2010
New Revision: 942165

URL: http://svn.apache.org/viewvc?rev=942165view=rev
Log:
ZooKeeper 3.3.1-rc0 release.

Added:
hadoop/zookeeper/tags/release-3.3.1-rc0/
  - copied from r942163, hadoop/zookeeper/branches/branch-3.3/



svn commit: r941796 [1/2] - in /hadoop/zookeeper/branches/branch-3.3: ./ docs/ src/c/ src/c/include/ src/contrib/zooinspector/ src/docs/src/documentation/content/xdocs/

2010-05-06 Thread phunt
Author: phunt
Date: Thu May  6 16:34:59 2010
New Revision: 941796

URL: http://svn.apache.org/viewvc?rev=941796view=rev
Log:
Preparing for release 3.3.1

Modified:
hadoop/zookeeper/branches/branch-3.3/CHANGES.txt
hadoop/zookeeper/branches/branch-3.3/build.xml
hadoop/zookeeper/branches/branch-3.3/docs/releasenotes.html
hadoop/zookeeper/branches/branch-3.3/docs/releasenotes.pdf
hadoop/zookeeper/branches/branch-3.3/src/c/configure.ac
hadoop/zookeeper/branches/branch-3.3/src/c/include/zookeeper_version.h
hadoop/zookeeper/branches/branch-3.3/src/contrib/zooinspector/README.txt
hadoop/zookeeper/branches/branch-3.3/src/contrib/zooinspector/build.xml

hadoop/zookeeper/branches/branch-3.3/src/contrib/zooinspector/zooInspector-dev.sh

hadoop/zookeeper/branches/branch-3.3/src/contrib/zooinspector/zooInspector.cmd

hadoop/zookeeper/branches/branch-3.3/src/contrib/zooinspector/zooInspector.sh

hadoop/zookeeper/branches/branch-3.3/src/docs/src/documentation/content/xdocs/releasenotes.xml

Modified: hadoop/zookeeper/branches/branch-3.3/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.3/CHANGES.txt?rev=941796r1=941795r2=941796view=diff
==
--- hadoop/zookeeper/branches/branch-3.3/CHANGES.txt (original)
+++ hadoop/zookeeper/branches/branch-3.3/CHANGES.txt Thu May  6 16:34:59 2010
@@ -1,4 +1,4 @@
-Release 3.3.1 - 2010-04-08
+Release 3.3.1 - 2010-05-11
 Backward compatible changes:
 
 BUGFIXES:
@@ -46,6 +46,7 @@ BUGFIXES:
 
   ZOOKEEPER-766. forrest recipes docs don't mention the lock/queue recipe
   implementations available in the release (phunt via mahadev)
+
 Release 3.3.0 - 2010-03-24
 
 Non-backward compatible changes:

Modified: hadoop/zookeeper/branches/branch-3.3/build.xml
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.3/build.xml?rev=941796r1=941795r2=941796view=diff
==
--- hadoop/zookeeper/branches/branch-3.3/build.xml (original)
+++ hadoop/zookeeper/branches/branch-3.3/build.xml Thu May  6 16:34:59 2010
@@ -24,7 +24,7 @@
 
 property environment=env/
 
-property name=version value=3.3.0 /
+property name=version value=3.3.2-dev /
 property name=final.name value=${name}-${version}/
 property name=revision.dir value=${basedir}/.revision /
 property name=revision.properties value=revision.properties /

Modified: hadoop/zookeeper/branches/branch-3.3/docs/releasenotes.html
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.3/docs/releasenotes.html?rev=941796r1=941795r2=941796view=diff
==
--- hadoop/zookeeper/branches/branch-3.3/docs/releasenotes.html (original)
+++ hadoop/zookeeper/branches/branch-3.3/docs/releasenotes.html Thu May  6 
16:34:59 2010
@@ -5,7 +5,7 @@
 meta content=Apache Forrest name=Generator
 meta name=Forrest-version content=0.8
 meta name=Forrest-skin-name content=pelt
-titleZooKeeper 3.3.0 Release Notes/title
+titleZooKeeper 3.3.1 Release Notes/title
 link type=text/css href=skin/basic.css rel=stylesheet
 link media=screen type=text/css href=skin/screen.css rel=stylesheet
 link media=print type=text/css href=skin/print.css rel=stylesheet
@@ -202,11 +202,11 @@ document.write(Last Published:  + docu
 a class=dida href=releasenotes.pdfimg alt=PDF -icon 
src=skin/images/pdfdoc.gif class=skinbr
 PDF/a
 /div
-h1ZooKeeper 3.3.0 Release Notes/h1
+h1ZooKeeper 3.3.1 Release Notes/h1
 div id=minitoc-area
 ul class=minitoc
 li
-a href=#changesChanges Since ZooKeeper 3.2/a
+a href=#changesChanges Since ZooKeeper 3.3.0/a
 /li
 /ul
 /div
@@ -228,12 +228,12 @@ later./p
 
 
 a name=N10013/aa name=changes/a
-h2 class=h3Changes Since ZooKeeper 3.2/h2
+h2 class=h3Changes Since ZooKeeper 3.3.0/h2
 div class=section
 table class=ForrestTable cellspacing=1 cellpadding=4
-captionChanges Since ZooKeeper 3.2/caption
+captionChanges Since ZooKeeper 3.3.0/caption
 
-titleChanges Since ZooKeeper 3.2/title
+titleChanges Since ZooKeeper 3.3.0/title
 
 
 tr
@@ -247,944 +247,101 @@ later./p
 
 tr
   
-tdSub-task/td
-  td/td
-
-/tr
-
-tr
-tda 
href=https://issues.apache.org/jira/browse/ZOOKEEPER-397;ZOOKEEPER-397/a/tdtd
 mainline tests conversion
-/td
-/tr
-
-
-
-tr
-  
-tdBug/td
-  td/td
-
-/tr
-
-
-tr
-tda 
href=https://issues.apache.org/jira/browse/ZOOKEEPER-3;ZOOKEEPER-3/a/tdtd
  syncLimit has slightly different comments in the class header, and 
gt; inline with the variable.
-/td
-/tr
-
-tr
-tda 
href=https://issues.apache.org/jira/browse/ZOOKEEPER-59;ZOOKEEPER-59/a/tdtd
 Synchronized block in NIOServerCnxn
-/td
-/tr
-
-tr
-tda 
href=https://issues.apache.org/jira/browse/ZOOKEEPER-86;ZOOKEEPER-86/a/tdtd
 intermittent test failure of org.apache.zookeeper.test.AsyncTest
-/td
-/tr
-
-tr
-tda 
href=https

svn commit: r940640 - in /hadoop/zookeeper/trunk: ./ src/java/main/org/apache/jute/compiler/

2010-05-03 Thread phunt
Author: phunt
Date: Mon May  3 21:49:49 2010
New Revision: 940640

URL: http://svn.apache.org/viewvc?rev=940640view=rev
Log:
ZOOKEEPER-747. Add C# generation to Jute

Added:

hadoop/zookeeper/trunk/src/java/main/org/apache/jute/compiler/CSharpGenerator.java
Modified:
hadoop/zookeeper/trunk/CHANGES.txt
hadoop/zookeeper/trunk/src/java/main/org/apache/jute/compiler/JBoolean.java
hadoop/zookeeper/trunk/src/java/main/org/apache/jute/compiler/JBuffer.java
hadoop/zookeeper/trunk/src/java/main/org/apache/jute/compiler/JByte.java
hadoop/zookeeper/trunk/src/java/main/org/apache/jute/compiler/JCompType.java
hadoop/zookeeper/trunk/src/java/main/org/apache/jute/compiler/JDouble.java
hadoop/zookeeper/trunk/src/java/main/org/apache/jute/compiler/JField.java
hadoop/zookeeper/trunk/src/java/main/org/apache/jute/compiler/JFile.java
hadoop/zookeeper/trunk/src/java/main/org/apache/jute/compiler/JFloat.java
hadoop/zookeeper/trunk/src/java/main/org/apache/jute/compiler/JInt.java
hadoop/zookeeper/trunk/src/java/main/org/apache/jute/compiler/JLong.java
hadoop/zookeeper/trunk/src/java/main/org/apache/jute/compiler/JMap.java
hadoop/zookeeper/trunk/src/java/main/org/apache/jute/compiler/JRecord.java
hadoop/zookeeper/trunk/src/java/main/org/apache/jute/compiler/JString.java
hadoop/zookeeper/trunk/src/java/main/org/apache/jute/compiler/JType.java
hadoop/zookeeper/trunk/src/java/main/org/apache/jute/compiler/JVector.java

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=940640r1=940639r2=940640view=diff
==
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Mon May  3 21:49:49 2010
@@ -52,6 +52,8 @@ NEW FEATURES:
   ZOOKEEPER-729. Java client API to recursively delete a subtree. (Kay
   Kay via henry)
 
+  ZOOKEEPER-747. Add C# generation to Jute (Eric Hauser via phunt)
+
 Release 3.3.0 - 2010-03-24
 
 Non-backward compatible changes:

Added: 
hadoop/zookeeper/trunk/src/java/main/org/apache/jute/compiler/CSharpGenerator.java
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/java/main/org/apache/jute/compiler/CSharpGenerator.java?rev=940640view=auto
==
--- 
hadoop/zookeeper/trunk/src/java/main/org/apache/jute/compiler/CSharpGenerator.java
 (added)
+++ 
hadoop/zookeeper/trunk/src/java/main/org/apache/jute/compiler/CSharpGenerator.java
 Mon May  3 21:49:49 2010
@@ -0,0 +1,53 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * License); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jute.compiler;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+
+public class CSharpGenerator {
+private ArrayListJRecord mRecList;
+private final File outputDirectory;
+
+/** Creates a new instance of CSharpGenerator
+ *
+ * @param name possibly full pathname to the file
+ * @param ilist included files (as JFile)
+ * @param rlist List of records defined within this file
+ * @param outputDirectory
+ */
+CSharpGenerator(String name, ArrayListJFile ilist, ArrayListJRecord 
rlist,
+File outputDirectory)
+ {
+this.outputDirectory = outputDirectory;
+mRecList = rlist;
+}
+
+/**
+ * Generate C# code. This method only creates the requested file(s)
+ * and spits-out file-level elements (such as include statements etc.)
+ * record-level code is generated by JRecord.
+ */
+void genCode() throws IOException {
+for (JRecord rec : mRecList) {
+rec.genCsharpCode(outputDirectory);
+}
+}
+}

Modified: 
hadoop/zookeeper/trunk/src/java/main/org/apache/jute/compiler/JBoolean.java
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/java/main/org/apache/jute/compiler/JBoolean.java?rev=940640r1=940639r2=940640view=diff
==
--- hadoop/zookeeper/trunk/src/java/main/org/apache/jute/compiler/JBoolean.java 
(original)
+++ hadoop/zookeeper/trunk/src/java/main/org/apache/jute/compiler

svn commit: r925362 - in /hadoop/zookeeper/trunk: ./ docs/ src/c/ src/c/include/ src/docs/src/documentation/content/xdocs/

2010-03-19 Thread phunt
Author: phunt
Date: Fri Mar 19 18:13:34 2010
New Revision: 925362

URL: http://svn.apache.org/viewvc?rev=925362view=rev
Log:
Preparing for 3.4.0 development

Modified:
hadoop/zookeeper/trunk/CHANGES.txt
hadoop/zookeeper/trunk/build.xml
hadoop/zookeeper/trunk/docs/bookkeeperConfig.html
hadoop/zookeeper/trunk/docs/bookkeeperOverview.html
hadoop/zookeeper/trunk/docs/bookkeeperProgrammer.html
hadoop/zookeeper/trunk/docs/bookkeeperStarted.html
hadoop/zookeeper/trunk/docs/bookkeeperStream.html
hadoop/zookeeper/trunk/docs/index.html
hadoop/zookeeper/trunk/docs/javaExample.html
hadoop/zookeeper/trunk/docs/linkmap.html
hadoop/zookeeper/trunk/docs/recipes.html
hadoop/zookeeper/trunk/docs/releasenotes.html
hadoop/zookeeper/trunk/docs/zookeeperAdmin.html
hadoop/zookeeper/trunk/docs/zookeeperHierarchicalQuorums.html
hadoop/zookeeper/trunk/docs/zookeeperInternals.html
hadoop/zookeeper/trunk/docs/zookeeperJMX.html
hadoop/zookeeper/trunk/docs/zookeeperObservers.html
hadoop/zookeeper/trunk/docs/zookeeperOver.html
hadoop/zookeeper/trunk/docs/zookeeperProgrammers.html
hadoop/zookeeper/trunk/docs/zookeeperQuotas.html
hadoop/zookeeper/trunk/docs/zookeeperStarted.html
hadoop/zookeeper/trunk/docs/zookeeperTutorial.html
hadoop/zookeeper/trunk/src/c/configure.ac
hadoop/zookeeper/trunk/src/c/include/zookeeper_version.h
hadoop/zookeeper/trunk/src/docs/src/documentation/content/xdocs/tabs.xml

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=925362r1=925361r2=925362view=diff
==
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Fri Mar 19 18:13:34 2010
@@ -1,3 +1,18 @@
+Trunk
+
+Non-backward compatible changes:
+
+BUGFIXES: 
+
+Backward compatible changes:
+
+BUGFIXES: 
+
+IMPROVEMENTS:
+
+NEW FEATURES:
+
+
 Release 3.3.0 - 2010-03-24
 
 Non-backward compatible changes:

Modified: hadoop/zookeeper/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/build.xml?rev=925362r1=925361r2=925362view=diff
==
--- hadoop/zookeeper/trunk/build.xml (original)
+++ hadoop/zookeeper/trunk/build.xml Fri Mar 19 18:13:34 2010
@@ -24,7 +24,7 @@
 
 property environment=env/
 
-property name=version value=3.3.0 /
+property name=version value=3.4.0 /
 property name=final.name value=${name}-${version}/
 property name=revision.dir value=${basedir}/.revision /
 property name=revision.properties value=revision.properties /

Modified: hadoop/zookeeper/trunk/docs/bookkeeperConfig.html
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/docs/bookkeeperConfig.html?rev=925362r1=925361r2=925362view=diff
==
--- hadoop/zookeeper/trunk/docs/bookkeeperConfig.html (original)
+++ hadoop/zookeeper/trunk/docs/bookkeeperConfig.html Fri Mar 19 18:13:34 2010
@@ -67,7 +67,7 @@
 a class=unselected href=http://wiki.apache.org/hadoop/ZooKeeper;Wiki/a
 /li
 li class=current
-a class=selected href=index.htmlZooKeeper 3.3 Documentation/a
+a class=selected href=index.htmlZooKeeper 3.4 Documentation/a
 /li
 /ul
 !--+

Modified: hadoop/zookeeper/trunk/docs/bookkeeperOverview.html
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/docs/bookkeeperOverview.html?rev=925362r1=925361r2=925362view=diff
==
--- hadoop/zookeeper/trunk/docs/bookkeeperOverview.html (original)
+++ hadoop/zookeeper/trunk/docs/bookkeeperOverview.html Fri Mar 19 18:13:34 2010
@@ -67,7 +67,7 @@
 a class=unselected href=http://wiki.apache.org/hadoop/ZooKeeper;Wiki/a
 /li
 li class=current
-a class=selected href=index.htmlZooKeeper 3.3 Documentation/a
+a class=selected href=index.htmlZooKeeper 3.4 Documentation/a
 /li
 /ul
 !--+

Modified: hadoop/zookeeper/trunk/docs/bookkeeperProgrammer.html
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/docs/bookkeeperProgrammer.html?rev=925362r1=925361r2=925362view=diff
==
--- hadoop/zookeeper/trunk/docs/bookkeeperProgrammer.html (original)
+++ hadoop/zookeeper/trunk/docs/bookkeeperProgrammer.html Fri Mar 19 18:13:34 
2010
@@ -67,7 +67,7 @@
 a class=unselected href=http://wiki.apache.org/hadoop/ZooKeeper;Wiki/a
 /li
 li class=current
-a class=selected href=index.htmlZooKeeper 3.3 Documentation/a
+a class=selected href=index.htmlZooKeeper 3.4 Documentation/a
 /li
 /ul
 !--+

Modified: hadoop/zookeeper/trunk/docs/bookkeeperStarted.html
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/docs/bookkeeperStarted.html?rev=925362r1=925361r2=925362view=diff

svn commit: r890456 - in /hadoop/zookeeper/site: author/src/documentation/content/xdocs/ publish/

2009-12-14 Thread phunt
Author: phunt
Date: Mon Dec 14 19:47:03 2009
New Revision: 890456

URL: http://svn.apache.org/viewvc?rev=890456view=rev
Log:
Updated site for releases 3.1.2 and 3.2.2.

Modified:
hadoop/zookeeper/site/author/src/documentation/content/xdocs/releases.xml
hadoop/zookeeper/site/author/src/documentation/content/xdocs/site.xml
hadoop/zookeeper/site/publish/credits.html
hadoop/zookeeper/site/publish/index.html
hadoop/zookeeper/site/publish/irc.html
hadoop/zookeeper/site/publish/issue_tracking.html
hadoop/zookeeper/site/publish/linkmap.html
hadoop/zookeeper/site/publish/linkmap.pdf
hadoop/zookeeper/site/publish/mailing_lists.html
hadoop/zookeeper/site/publish/releases.html
hadoop/zookeeper/site/publish/releases.pdf
hadoop/zookeeper/site/publish/version_control.html

Modified: 
hadoop/zookeeper/site/author/src/documentation/content/xdocs/releases.xml
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/site/author/src/documentation/content/xdocs/releases.xml?rev=890456r1=890455r2=890456view=diff
==
--- hadoop/zookeeper/site/author/src/documentation/content/xdocs/releases.xml 
(original)
+++ hadoop/zookeeper/site/author/src/documentation/content/xdocs/releases.xml 
Mon Dec 14 19:47:03 2009
@@ -36,6 +36,24 @@
   titleNews/title
 
   section
+title14 December, 2009: release 3.2.2 available /title
+pThis release contains a number of critical bug fixes./p
+pSee the a 
href=http://hadoop.apache.org/zookeeper/docs/r3.2.2/releasenotes.html;ZooKeeper
 3.2.2 Release Notes/a for details.  
+   Alternatively, you can look at the
+   a 
href=http://issues.apache.org/jira/browse/ZOOKEEPER?report=com.atlassian.jira.plugin.system.project:changelog-panel;
+   Jira issue log for all releases/a./p
+  /section
+
+  section
+title14 December, 2009: release 3.1.2 available /title
+pThis release contains a number of critical bug fixes./p
+pSee the a 
href=http://hadoop.apache.org/zookeeper/docs/r3.1.2/releasenotes.html;ZooKeeper
 3.1.2 Release Notes/a for details.  
+   Alternatively, you can look at the
+   a 
href=http://issues.apache.org/jira/browse/ZOOKEEPER?report=com.atlassian.jira.plugin.system.project:changelog-panel;
+   Jira issue log for all releases/a./p
+  /section
+
+  section
 title4 September, 2009: release 3.2.1 available /title
 pThis release contains a number of critical bug fixes./p
 pSee the a 
href=http://hadoop.apache.org/zookeeper/docs/r3.2.1/releasenotes.html;ZooKeeper
 3.2.1 Release Notes/a for details.  

Modified: hadoop/zookeeper/site/author/src/documentation/content/xdocs/site.xml
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/site/author/src/documentation/content/xdocs/site.xml?rev=890456r1=890455r2=890456view=diff
==
--- hadoop/zookeeper/site/author/src/documentation/content/xdocs/site.xml 
(original)
+++ hadoop/zookeeper/site/author/src/documentation/content/xdocs/site.xml Mon 
Dec 14 19:47:03 2009
@@ -26,7 +26,9 @@
 
   docs label=Documentation 
 r3.1.1   label=Release 3.1.1 href=ext:docs/r3.1.1/ /
+r3.1.2   label=Release 3.1.2 href=ext:docs/r3.1.2/ /
 r3.2.1   label=Release 3.2.1 href=ext:docs/r3.2.1/ /
+r3.2.2   label=Release 3.2.2 href=ext:docs/r3.2.2/ /
   /docs
 
   resources label=Developers
@@ -54,8 +56,10 @@
   r3.0.1 href=r3.0.1//
   r3.1.0 href=r3.1.0//
   r3.1.1 href=r3.1.1//
+  r3.1.2 href=r3.1.2//
   r3.2.0 href=r3.2.0//
   r3.2.1 href=r3.2.1//
+  r3.2.2 href=r3.2.2//
 /docs
   /external-refs
  

Modified: hadoop/zookeeper/site/publish/credits.html
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/site/publish/credits.html?rev=890456r1=890455r2=890456view=diff
==
--- hadoop/zookeeper/site/publish/credits.html (original)
+++ hadoop/zookeeper/site/publish/credits.html Mon Dec 14 19:47:03 2009
@@ -123,8 +123,14 @@
 a href=http://hadoop.apache.org/zookeeper/docs/r3.1.1/;Release 3.1.1/a
 /div
 div class=menuitem
+a href=http://hadoop.apache.org/zookeeper/docs/r3.1.2/;Release 3.1.2/a
+/div
+div class=menuitem
 a href=http://hadoop.apache.org/zookeeper/docs/r3.2.1/;Release 3.2.1/a
 /div
+div class=menuitem
+a href=http://hadoop.apache.org/zookeeper/docs/r3.2.2/;Release 3.2.2/a
+/div
 /div
 div onclick=SwitchMenu('menu_1.3', 'skin/') id=menu_1.3Title 
class=menutitleDevelopers/div
 div id=menu_1.3 class=menuitemgroup

Modified: hadoop/zookeeper/site/publish/index.html
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/site/publish/index.html?rev=890456r1=890455r2=890456view=diff
==
--- hadoop/zookeeper/site/publish/index.html (original

svn commit: r889987 - in /hadoop/zookeeper/tags: release-3.1.2-rc1/ release-3.1.2/

2009-12-12 Thread phunt
Author: phunt
Date: Sat Dec 12 21:50:28 2009
New Revision: 889987

URL: http://svn.apache.org/viewvc?rev=889987view=rev
Log:
ZooKeeper 3.1.2 release.

Added:
hadoop/zookeeper/tags/release-3.1.2/
  - copied from r889986, hadoop/zookeeper/tags/release-3.1.2-rc1/
Removed:
hadoop/zookeeper/tags/release-3.1.2-rc1/



svn commit: r889988 - in /hadoop/zookeeper/tags: release-3.2.2-rc1/ release-3.2.2/

2009-12-12 Thread phunt
Author: phunt
Date: Sat Dec 12 21:50:58 2009
New Revision: 889988

URL: http://svn.apache.org/viewvc?rev=889988view=rev
Log:
ZooKeeper 3.2.2 release.

Added:
hadoop/zookeeper/tags/release-3.2.2/
  - copied from r889987, hadoop/zookeeper/tags/release-3.2.2-rc1/
Removed:
hadoop/zookeeper/tags/release-3.2.2-rc1/



svn commit: r888573 - in /hadoop/zookeeper/branches/branch-3.1: CHANGES.txt docs/releasenotes.html docs/releasenotes.pdf src/docs/src/documentation/content/xdocs/releasenotes.xml

2009-12-08 Thread phunt
Author: phunt
Date: Tue Dec  8 21:05:13 2009
New Revision: 888573

URL: http://svn.apache.org/viewvc?rev=888573view=rev
Log:
Preparing for release 3.1.2

Modified:
hadoop/zookeeper/branches/branch-3.1/CHANGES.txt
hadoop/zookeeper/branches/branch-3.1/docs/releasenotes.html
hadoop/zookeeper/branches/branch-3.1/docs/releasenotes.pdf

hadoop/zookeeper/branches/branch-3.1/src/docs/src/documentation/content/xdocs/releasenotes.xml

Modified: hadoop/zookeeper/branches/branch-3.1/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.1/CHANGES.txt?rev=888573r1=888572r2=888573view=diff
==
--- hadoop/zookeeper/branches/branch-3.1/CHANGES.txt (original)
+++ hadoop/zookeeper/branches/branch-3.1/CHANGES.txt Tue Dec  8 21:05:13 2009
@@ -1,4 +1,4 @@
-Release 3.1.2 - 2009-11-27
+Release 3.1.2 - 2009-12-11
 
 Backward compatibile changes:
 
@@ -10,8 +10,8 @@
   ZOOKEEPER-582. ZooKeeper can revert to old data when a snapshot is created
   outside of normal processing (ben reed and mahadev via mahadev)
 
-  ZOOKEEPER-597. ZOOKEEPER-597. ASyncHammerTest is failing intermittently on
-  hudson trunk. (pat, ben and mahadev)
+  ZOOKEEPER-597. ASyncHammerTest is failing intermittently on hudson trunk.
+  (phunt, ben and mahadev)
 
   ZOOKEEPER-611. hudson build failiure (mahadev)
 

Modified: hadoop/zookeeper/branches/branch-3.1/docs/releasenotes.html
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.1/docs/releasenotes.html?rev=888573r1=888572r2=888573view=diff
==
--- hadoop/zookeeper/branches/branch-3.1/docs/releasenotes.html (original)
+++ hadoop/zookeeper/branches/branch-3.1/docs/releasenotes.html Tue Dec  8 
21:05:13 2009
@@ -254,6 +254,18 @@
 
 /tr
 
+tr
+tda 
href=https://issues.apache.org/jira/browse/ZOOKEEPER-597;ZOOKEEPER-597/a/tdtdASyncHammerTest
 is failing intermittently on hudson trunk.
+/td
+
+/tr
+
+tr
+tda 
href=https://issues.apache.org/jira/browse/ZOOKEEPER-611;ZOOKEEPER-611/a/tdtdhudson
 build failiure
+/td
+
+/tr
+
 
 /table
 /div

Modified: hadoop/zookeeper/branches/branch-3.1/docs/releasenotes.pdf
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.1/docs/releasenotes.pdf?rev=888573r1=888572r2=888573view=diff
==
Binary files - no diff available.

Modified: 
hadoop/zookeeper/branches/branch-3.1/src/docs/src/documentation/content/xdocs/releasenotes.xml
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.1/src/docs/src/documentation/content/xdocs/releasenotes.xml?rev=888573r1=888572r2=888573view=diff
==
--- 
hadoop/zookeeper/branches/branch-3.1/src/docs/src/documentation/content/xdocs/releasenotes.xml
 (original)
+++ 
hadoop/zookeeper/branches/branch-3.1/src/docs/src/documentation/content/xdocs/releasenotes.xml
 Tue Dec  8 21:05:13 2009
@@ -77,6 +77,12 @@
 rowentryulink 
url=https://issues.apache.org/jira/browse/ZOOKEEPER-562;ZOOKEEPER-562/ulink/entryentryc
 client can flood server with pings if tcp send queue filled 
 /entry
 /row
+rowentryulink 
url=https://issues.apache.org/jira/browse/ZOOKEEPER-597;ZOOKEEPER-597/ulink/entryentryASyncHammerTest
 is failing intermittently on hudson trunk.
+/entry
+/row
+rowentryulink 
url=https://issues.apache.org/jira/browse/ZOOKEEPER-611;ZOOKEEPER-611/ulink/entryentryhudson
 build failiure
+/entry
+/row
 
 /tbody/tgroup/table
 




svn commit: r888574 - /hadoop/zookeeper/tags/release-3.1.2-rc1/

2009-12-08 Thread phunt
Author: phunt
Date: Tue Dec  8 21:08:42 2009
New Revision: 888574

URL: http://svn.apache.org/viewvc?rev=888574view=rev
Log:
ZooKeeper 3.1.2-rc1 release.

Added:
hadoop/zookeeper/tags/release-3.1.2-rc1/
  - copied from r888573, hadoop/zookeeper/branches/branch-3.1/



svn commit: r883531 - in /hadoop/zookeeper/branches/branch-3.1: CHANGES.txt build.xml docs/releasenotes.html docs/releasenotes.pdf src/c/configure.ac src/c/include/zookeeper_version.h src/docs/src/doc

2009-11-23 Thread phunt
Author: phunt
Date: Mon Nov 23 22:53:58 2009
New Revision: 883531

URL: http://svn.apache.org/viewvc?rev=883531view=rev
Log:
Preparing for release 3.1.2

Modified:
hadoop/zookeeper/branches/branch-3.1/CHANGES.txt
hadoop/zookeeper/branches/branch-3.1/build.xml
hadoop/zookeeper/branches/branch-3.1/docs/releasenotes.html
hadoop/zookeeper/branches/branch-3.1/docs/releasenotes.pdf
hadoop/zookeeper/branches/branch-3.1/src/c/configure.ac
hadoop/zookeeper/branches/branch-3.1/src/c/include/zookeeper_version.h

hadoop/zookeeper/branches/branch-3.1/src/docs/src/documentation/content/xdocs/releasenotes.xml

Modified: hadoop/zookeeper/branches/branch-3.1/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.1/CHANGES.txt?rev=883531r1=883530r2=883531view=diff
==
--- hadoop/zookeeper/branches/branch-3.1/CHANGES.txt (original)
+++ hadoop/zookeeper/branches/branch-3.1/CHANGES.txt Mon Nov 23 22:53:58 2009
@@ -1,4 +1,4 @@
-Release 3.1.2 - 2009-11-24
+Release 3.1.2 - 2009-11-27
 
 Backward compatibile changes:
 

Modified: hadoop/zookeeper/branches/branch-3.1/build.xml
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.1/build.xml?rev=883531r1=883530r2=883531view=diff
==
--- hadoop/zookeeper/branches/branch-3.1/build.xml (original)
+++ hadoop/zookeeper/branches/branch-3.1/build.xml Mon Nov 23 22:53:58 2009
@@ -24,7 +24,7 @@
 
 property environment=env/
 
-property name=version value=3.1.1 /
+property name=version value=3.1.2 /
 property name=final.name value=${name}-${version}/
 property name=revision.dir value=${basedir}/.revision /
 property name=revision.properties value=revision.properties /

Modified: hadoop/zookeeper/branches/branch-3.1/docs/releasenotes.html
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.1/docs/releasenotes.html?rev=883531r1=883530r2=883531view=diff
==
--- hadoop/zookeeper/branches/branch-3.1/docs/releasenotes.html (original)
+++ hadoop/zookeeper/branches/branch-3.1/docs/releasenotes.html Mon Nov 23 
22:53:58 2009
@@ -5,7 +5,7 @@
 meta content=Apache Forrest name=Generator
 meta name=Forrest-version content=0.8
 meta name=Forrest-skin-name content=pelt
-titleZooKeeper 3.1.1 Release Notes/title
+titleZooKeeper 3.1.2 Release Notes/title
 link type=text/css href=skin/basic.css rel=stylesheet
 link media=screen type=text/css href=skin/screen.css rel=stylesheet
 link media=print type=text/css href=skin/print.css rel=stylesheet
@@ -184,11 +184,11 @@
 a class=dida href=releasenotes.pdfimg alt=PDF -icon 
src=skin/images/pdfdoc.gif class=skinbr
 PDF/a
 /div
-h1ZooKeeper 3.1.1 Release Notes/h1
+h1ZooKeeper 3.1.2 Release Notes/h1
 div id=minitoc-area
 ul class=minitoc
 li
-a href=#changesChanges Since ZooKeeper 3.1.0/a
+a href=#changesChanges Since ZooKeeper 3.1.1/a
 /li
 /ul
 /div
@@ -216,12 +216,12 @@
 
 
 a name=N10016/aa name=changes/a
-h2 class=h3Changes Since ZooKeeper 3.1.0/h2
+h2 class=h3Changes Since ZooKeeper 3.1.1/h2
 div class=section
 table class=ForrestTable cellspacing=1 cellpadding=4
-captionChanges Since ZooKeeper 3.1.0/caption
+captionChanges Since ZooKeeper 3.1.1/caption
 
-titleChanges Since ZooKeeper 3.1.0/title
+titleChanges Since ZooKeeper 3.1.1/title
 
 
 tr
@@ -236,91 +236,20 @@
 
 tr
   
-tdImprovement/td
-  td/td
-
-/tr
-
-tr
-
-tda 
href=https://issues.apache.org/jira/browse/ZOOKEEPER-279;ZOOKEEPER-279/a/tdtd
 Allow specialization of quorum config parsing (e.g. variable expansion 
in zoo.cfg)
-/td
-
-/tr
-
-
-tr
-  
 tdBug/td
   td/td
 
 /tr
 
 tr
-tda 
href=https://issues.apache.org/jira/browse/ZOOKEEPER-281;ZOOKEEPER-281/a/tdtd
 autoreconf fails for /zookeeper-3.0.1/src/c/
-/td
-
-/tr
-
-tr
-
-tda 
href=https://issues.apache.org/jira/browse/ZOOKEEPER-309;ZOOKEEPER-309/a/tdtd
 core dump using zoo_get_acl() 
-/td
-
-/tr
-
-tr
-
-tda 
href=https://issues.apache.org/jira/browse/ZOOKEEPER-313;ZOOKEEPER-313/a/tdtd
 Problem with successive leader failures when no client is connected 
-/td
-
-/tr
-
-tr
-
-tda 
href=https://issues.apache.org/jira/browse/ZOOKEEPER-319;ZOOKEEPER-319/a/tdtd
 add locking around auth info in zhandle_t
-/td
-
-/tr
-
-tr
-
-tda 
href=https://issues.apache.org/jira/browse/ZOOKEEPER-320;ZOOKEEPER-320/a/tdtd
 call auth completion in free_completions()
-/td
-
-/tr
-
-tr
-
-tda 
href=https://issues.apache.org/jira/browse/ZOOKEEPER-326;ZOOKEEPER-326/a/tdtd
 standalone server ignores tickTime configuration
-/td
-
-/tr
-
-tr
-
-tda 
href=https://issues.apache.org/jira/browse/ZOOKEEPER-330;ZOOKEEPER-330/a/tdtd
 zookeeper standalone server does not startup with just a port and 
datadir.
+tda 
href=https://issues.apache.org

svn commit: r883532 - /hadoop/zookeeper/tags/release-3.1.2-rc0/

2009-11-23 Thread phunt
Author: phunt
Date: Mon Nov 23 22:56:57 2009
New Revision: 883532

URL: http://svn.apache.org/viewvc?rev=883532view=rev
Log:
ZooKeeper 3.1.2-rc0 release.

Added:
hadoop/zookeeper/tags/release-3.1.2-rc0/
  - copied from r883531, hadoop/zookeeper/branches/branch-3.1/



svn commit: r883558 - /hadoop/zookeeper/tags/release-3.2.2-rc0/

2009-11-23 Thread phunt
Author: phunt
Date: Tue Nov 24 00:21:55 2009
New Revision: 883558

URL: http://svn.apache.org/viewvc?rev=883558view=rev
Log:
ZooKeeper 3.2.2-rc0 release.

Added:
hadoop/zookeeper/tags/release-3.2.2-rc0/
  - copied from r883557, hadoop/zookeeper/branches/branch-3.2/



svn commit: r882695 - in /hadoop/zookeeper/branches/branch-3.2: CHANGES.txt docs/zookeeperProgrammers.html docs/zookeeperProgrammers.pdf src/docs/src/documentation/content/xdocs/zookeeperProgrammers.x

2009-11-20 Thread phunt
Author: phunt
Date: Fri Nov 20 19:45:08 2009
New Revision: 882695

URL: http://svn.apache.org/viewvc?rev=882695view=rev
Log:
ZOOKEEPER-576. docs need to be updated for session moved exception and how to 
handle it

Modified:
hadoop/zookeeper/branches/branch-3.2/CHANGES.txt
hadoop/zookeeper/branches/branch-3.2/docs/zookeeperProgrammers.html
hadoop/zookeeper/branches/branch-3.2/docs/zookeeperProgrammers.pdf

hadoop/zookeeper/branches/branch-3.2/src/docs/src/documentation/content/xdocs/zookeeperProgrammers.xml

Modified: hadoop/zookeeper/branches/branch-3.2/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.2/CHANGES.txt?rev=882695r1=882694r2=882695view=diff
==
--- hadoop/zookeeper/branches/branch-3.2/CHANGES.txt (original)
+++ hadoop/zookeeper/branches/branch-3.2/CHANGES.txt Fri Nov 20 19:45:08 2009
@@ -29,6 +29,8 @@
 
   ZOOKEEPER-585. Update README for zkpython in 3.2.2 (henry robinson via phunt)
 
+  ZOOKEEPER-576. docs need to be updated for session moved exception and how
+  to handle it (breed via phunt)
 
 Release 3.2.1 - 2009-08-27
 

Modified: hadoop/zookeeper/branches/branch-3.2/docs/zookeeperProgrammers.html
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.2/docs/zookeeperProgrammers.html?rev=882695r1=882694r2=882695view=diff
==
--- hadoop/zookeeper/branches/branch-3.2/docs/zookeeperProgrammers.html 
(original)
+++ hadoop/zookeeper/branches/branch-3.2/docs/zookeeperProgrammers.html Fri Nov 
20 19:45:08 2009
@@ -864,10 +864,23 @@
 /li
 
 /ol
+p 
+strongAdded in 3.2.0 -- SessionMovedException/strong. There is an internal
+  exception that is generally not seen by clients called the 
SessionMovedException.
+  This exception occurs because a request was received on a connection for 
a session
+  which has be reestablished on a different server. The normal cause of 
this error is
+  a client that sends a request to a server, but the network packet gets 
delayed, so
+  the client times out and connects to a new server. When the delayed 
packet arrives at
+  the first server, the old server detects that the session has moved and 
sends back
+  the SESSION_MOVED error. Clients normally do not see this error since 
they do not read
+  from those old connections. (Old connections are usually closed.) One 
situation in which this
+  error can be seen is when two clients try to reestablish the same 
connection using
+  a saved session id and password. One of the clients will reestablish the 
connection
+  and the second client will get the SessionMovedException./p
 /div
 
   
-a name=N101D9/aa name=ch_zkWatches/a
+a name=N101DF/aa name=ch_zkWatches/a
 h2 class=h3ZooKeeper Watches/h2
 div class=section
 pAll of the read operations in ZooKeeper - stronggetData()/strong, 
stronggetChildren()/strong, and strongexists()/strong - have the option 
of setting a watch as a
@@ -950,7 +963,7 @@
 general this all occurs transparently. There is one case where a watch
 may be missed: a watch for the existance of a znode not yet created will
 be missed if the znode is created and deleted while disconnected./p
-a name=N1020F/aa name=sc_WatchGuarantees/a
+a name=N10215/aa name=sc_WatchGuarantees/a
 h3 class=h4What ZooKeeper Guarantees about Watches/h3
 pWith regard to watches, ZooKeeper maintains these
   guarantees:/p
@@ -985,7 +998,7 @@
 /li
   
 /ul
-a name=N10234/aa name=sc_WatchRememberThese/a
+a name=N1023A/aa name=sc_WatchRememberThese/a
 h3 class=h4Things to Remember about Watches/h3
 ul
 
@@ -1044,7 +1057,7 @@
 /div
 
   
-a name=N10260/aa name=sc_ZooKeeperAccessControl/a
+a name=N10266/aa name=sc_ZooKeeperAccessControl/a
 h2 class=h3ZooKeeper access control using ACLs/h2
 div class=section
 pZooKeeper uses ACLs to control access to its znodes (the
@@ -1079,7 +1092,7 @@
 example, the pair em(ip:19.22.0.0/16, READ)/em
 gives the emREAD/em permission to any clients with
 an IP address that starts with 19.22./p
-a name=N10293/aa name=sc_ACLPermissions/a
+a name=N10299/aa name=sc_ACLPermissions/a
 h3 class=h4ACL Permissions/h3
 pZooKeeper supports the following permissions:/p
 ul
@@ -1135,7 +1148,7 @@
   node, but nothing more. (The problem is, if you want to call
   zoo_exists() on a node that doesn't exist, there is no
   permission to check.)/p
-a name=N102E9/aa name=sc_BuiltinACLSchemes/a
+a name=N102EF/aa name=sc_BuiltinACLSchemes/a
 h4Builtin ACL Schemes/h4
 pZooKeeeper has the following built in schemes:/p
 ul
@@ -1184,7 +1197,7 @@
 
   
 /ul
-a name=N1032D/aa name=ZooKeeper+C+client+API/a
+a name=N10333/aa name=ZooKeeper+C+client+API/a
 h4ZooKeeper C client API/h4
 pThe following constants are provided by the ZooKeeper C
   library:/p
@@ -1406,7 +1419,7 @@
 /div
 
   
-a name=N10444/aa name

svn commit: r882696 - in /hadoop/zookeeper/trunk: CHANGES.txt docs/zookeeperProgrammers.html docs/zookeeperProgrammers.pdf src/docs/src/documentation/content/xdocs/zookeeperProgrammers.xml

2009-11-20 Thread phunt
Author: phunt
Date: Fri Nov 20 19:47:03 2009
New Revision: 882696

URL: http://svn.apache.org/viewvc?rev=882696view=rev
Log:
ZOOKEEPER-576. docs need to be updated for session moved exception and how to 
handle it

Modified:
hadoop/zookeeper/trunk/CHANGES.txt
hadoop/zookeeper/trunk/docs/zookeeperProgrammers.html
hadoop/zookeeper/trunk/docs/zookeeperProgrammers.pdf

hadoop/zookeeper/trunk/src/docs/src/documentation/content/xdocs/zookeeperProgrammers.xml

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=882696r1=882695r2=882696view=diff
==
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Fri Nov 20 19:47:03 2009
@@ -127,6 +127,9 @@
   ZOOKEEPER-3. syncLimit has slightly different comments in the class header,
   and  inline with the variable. (mahadev via breed)
 
+  ZOOKEEPER-576. docs need to be updated for session moved exception and how
+  to handle it (breed via phunt)
+
 IMPROVEMENTS:
   ZOOKEEPER-473. cleanup junit tests to eliminate false positives due to
   socket reuse and failure to close client (phunt via mahadev)

Modified: hadoop/zookeeper/trunk/docs/zookeeperProgrammers.html
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/docs/zookeeperProgrammers.html?rev=882696r1=882695r2=882696view=diff
==
--- hadoop/zookeeper/trunk/docs/zookeeperProgrammers.html (original)
+++ hadoop/zookeeper/trunk/docs/zookeeperProgrammers.html Fri Nov 20 19:47:03 
2009
@@ -867,10 +867,23 @@
 /li
 
 /ol
+p 
+strongAdded in 3.2.0 -- SessionMovedException/strong. There is an internal
+  exception that is generally not seen by clients called the 
SessionMovedException.
+  This exception occurs because a request was received on a connection for 
a session
+  which has be reestablished on a different server. The normal cause of 
this error is
+  a client that sends a request to a server, but the network packet gets 
delayed, so
+  the client times out and connects to a new server. When the delayed 
packet arrives at
+  the first server, the old server detects that the session has moved and 
sends back
+  the SESSION_MOVED error. Clients normally do not see this error since 
they do not read
+  from those old connections. (Old connections are usually closed.) One 
situation in which this
+  error can be seen is when two clients try to reestablish the same 
connection using
+  a saved session id and password. One of the clients will reestablish the 
connection
+  and the second client will get the SessionMovedException./p
 /div
 
   
-a name=N101D9/aa name=ch_zkWatches/a
+a name=N101DF/aa name=ch_zkWatches/a
 h2 class=h3ZooKeeper Watches/h2
 div class=section
 pAll of the read operations in ZooKeeper - stronggetData()/strong, 
stronggetChildren()/strong, and strongexists()/strong - have the option 
of setting a watch as a
@@ -953,7 +966,7 @@
 general this all occurs transparently. There is one case where a watch
 may be missed: a watch for the existance of a znode not yet created will
 be missed if the znode is created and deleted while disconnected./p
-a name=N1020F/aa name=sc_WatchGuarantees/a
+a name=N10215/aa name=sc_WatchGuarantees/a
 h3 class=h4What ZooKeeper Guarantees about Watches/h3
 pWith regard to watches, ZooKeeper maintains these
   guarantees:/p
@@ -988,7 +1001,7 @@
 /li
   
 /ul
-a name=N10234/aa name=sc_WatchRememberThese/a
+a name=N1023A/aa name=sc_WatchRememberThese/a
 h3 class=h4Things to Remember about Watches/h3
 ul
 
@@ -1047,7 +1060,7 @@
 /div
 
   
-a name=N10260/aa name=sc_ZooKeeperAccessControl/a
+a name=N10266/aa name=sc_ZooKeeperAccessControl/a
 h2 class=h3ZooKeeper access control using ACLs/h2
 div class=section
 pZooKeeper uses ACLs to control access to its znodes (the
@@ -1082,7 +1095,7 @@
 example, the pair em(ip:19.22.0.0/16, READ)/em
 gives the emREAD/em permission to any clients with
 an IP address that starts with 19.22./p
-a name=N10293/aa name=sc_ACLPermissions/a
+a name=N10299/aa name=sc_ACLPermissions/a
 h3 class=h4ACL Permissions/h3
 pZooKeeper supports the following permissions:/p
 ul
@@ -1138,7 +1151,7 @@
   node, but nothing more. (The problem is, if you want to call
   zoo_exists() on a node that doesn't exist, there is no
   permission to check.)/p
-a name=N102E9/aa name=sc_BuiltinACLSchemes/a
+a name=N102EF/aa name=sc_BuiltinACLSchemes/a
 h4Builtin ACL Schemes/h4
 pZooKeeeper has the following built in schemes:/p
 ul
@@ -1187,7 +1200,7 @@
 
   
 /ul
-a name=N1032D/aa name=ZooKeeper+C+client+API/a
+a name=N10333/aa name=ZooKeeper+C+client+API/a
 h4ZooKeeper C client API/h4
 pThe following constants are provided by the ZooKeeper C
   library:/p
@@ -1409,7 +1422,7 @@
 /div
 
   
-a name=N10444

svn commit: r882300 - in /hadoop/zookeeper/branches/branch-3.1: CHANGES.txt src/c/src/zookeeper.c src/c/tests/TestOperations.cc

2009-11-19 Thread phunt
Author: phunt
Date: Thu Nov 19 21:19:44 2009
New Revision: 882300

URL: http://svn.apache.org/viewvc?rev=882300view=rev
Log:
ZOOKEEPER-562. c client can flood server with pings if tcp send queue filled.

Modified:
hadoop/zookeeper/branches/branch-3.1/CHANGES.txt
hadoop/zookeeper/branches/branch-3.1/src/c/src/zookeeper.c
hadoop/zookeeper/branches/branch-3.1/src/c/tests/TestOperations.cc

Modified: hadoop/zookeeper/branches/branch-3.1/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.1/CHANGES.txt?rev=882300r1=882299r2=882300view=diff
==
--- hadoop/zookeeper/branches/branch-3.1/CHANGES.txt (original)
+++ hadoop/zookeeper/branches/branch-3.1/CHANGES.txt Thu Nov 19 21:19:44 2009
@@ -1,3 +1,13 @@
+Release 3.1.2 - 2009-11-24
+
+Backward compatibile changes:
+
+BUGFIXES:
+  
+  ZOOKEEPER-562. c client can flood server with pings if tcp send queue
+  filled. (ben reed via mahadev)
+
+
 Release 3.1.1 - 2009-03-17
 
 Backward compatibile changes:

Modified: hadoop/zookeeper/branches/branch-3.1/src/c/src/zookeeper.c
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.1/src/c/src/zookeeper.c?rev=882300r1=882299r2=882300view=diff
==
--- hadoop/zookeeper/branches/branch-3.1/src/c/src/zookeeper.c (original)
+++ hadoop/zookeeper/branches/branch-3.1/src/c/src/zookeeper.c Thu Nov 19 
21:19:44 2009
@@ -1181,7 +1181,7 @@
 // a PING
 if (zh-state==ZOO_CONNECTED_STATE) {
 send_to = zh-recv_timeout/3 - idle_send;
-if (send_to = 0) {
+if (send_to = 0  zh-sent_requests.head==0) {
 //LOG_DEBUG((Sending PING to %s (exceeded idle by %dms),
 //format_current_endpoint_info(zh),-send_to));
 int rc=send_ping(zh);

Modified: hadoop/zookeeper/branches/branch-3.1/src/c/tests/TestOperations.cc
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.1/src/c/tests/TestOperations.cc?rev=882300r1=882299r2=882300view=diff
==
--- hadoop/zookeeper/branches/branch-3.1/src/c/tests/TestOperations.cc 
(original)
+++ hadoop/zookeeper/branches/branch-3.1/src/c/tests/TestOperations.cc Thu Nov 
19 21:19:44 2009
@@ -265,6 +265,27 @@
 // only one ping so far?
 CPPUNIT_ASSERT_EQUAL(1,zkServer.pingCount_);
 CPPUNIT_ASSERT(timeMock==zh-last_recv);
+
+// Round 4
+// make sure that a ping is not sent if something is outstanding
+AsyncGetOperationCompletion res1;
+rc=zoo_aget(zh,/x/y/1,0,asyncCompletion,res1);
+CPPUNIT_ASSERT_EQUAL((int)ZOK,rc);
+rc=zookeeper_interest(zh,fd,interest,tv);
+CPPUNIT_ASSERT_EQUAL((int)ZOK,rc);
+timeMock.tick(tv);  
+rc=zookeeper_interest(zh,fd,interest,tv);
+CPPUNIT_ASSERT_EQUAL((int)ZOK,rc);
+rc=zookeeper_process(zh,interest);
+CPPUNIT_ASSERT_EQUAL((int)ZNOTHING,rc);
+rc=zookeeper_interest(zh,fd,interest,tv);
+CPPUNIT_ASSERT_EQUAL((int)ZOK,rc);
+// pseudo-sleep for a short while (10 ms)
+timeMock.millitick(10);
+rc=zookeeper_process(zh,interest);
+CPPUNIT_ASSERT_EQUAL((int)ZNOTHING,rc);
+// only one ping so far?
+CPPUNIT_ASSERT_EQUAL(1,zkServer.pingCount_);
 }
 
 // simulate a watch arriving right before a ping is due
@@ -332,6 +353,7 @@
 
 // queue up a request; keep it pending (as if the server is busy or 
has died)
 AsyncGetOperationCompletion res1;
+zkServer.addOperationResponse(new ZooGetResponse(2,1));
 int rc=zoo_aget(zh,/x/y/1,0,asyncCompletion,res1);
 
 int fd=0;
@@ -344,7 +366,7 @@
 CPPUNIT_ASSERT_EQUAL((int)ZOK,rc);
 // no delay -- the socket is writable
 rc=zookeeper_process(zh,interest);
-CPPUNIT_ASSERT_EQUAL((int)ZNOTHING,rc); // ZNOTHING -- no response yet
+CPPUNIT_ASSERT_EQUAL((int)ZOK,rc); 
 
 // Round 2.
 // what's next?




svn commit: r882313 - /hadoop/zookeeper/trunk/CHANGES.txt

2009-11-19 Thread phunt
Author: phunt
Date: Thu Nov 19 21:52:48 2009
New Revision: 882313

URL: http://svn.apache.org/viewvc?rev=882313view=rev
Log:
ZOOKEEPER-570. AsyncHammerTest is broken, callbacks need to validate rc 
parameter

Modified:
hadoop/zookeeper/trunk/CHANGES.txt

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=882313r1=882312r2=882313view=diff
==
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Thu Nov 19 21:52:48 2009
@@ -112,16 +112,20 @@
   ZOOKEEPER-567. javadoc for getchildren2 needs to mention new in 3.3.0
   (phunt via breed)
 
-  ZOOKEEPER-547. Sanity check in QuorumCnxn Manager and quorum communication 
port.
-  (mahadev via breed)
+  ZOOKEEPER-547. Sanity check in QuorumCnxn Manager and quorum communication
+  port. (mahadev via breed)
 
-  ZOOKEEPER-532. java compiler should be target Java 1.5 (hiram chirino and 
phunt via breed)
+  ZOOKEEPER-532. java compiler should be target Java 1.5
+  (hiram chirino and phunt via breed)
 
-  ZOOKEEPER-519. Followerhandler should close the socket if it gets an 
exception on a write.
-  (mahadev via breed)
+  ZOOKEEPER-519. Followerhandler should close the socket if it gets an 
exception
+  on a write. (mahadev via breed)
 
-  ZOOKEEPER-3. syncLimit has slightly different comments in the class header, 
and  inline with the variable.
-  (mahadev via breed)
+  ZOOKEEPER-570. AsyncHammerTest is broken, callbacks need to validate rc
+  parameter (phunt via breed)
+
+  ZOOKEEPER-3. syncLimit has slightly different comments in the class header,
+  and  inline with the variable. (mahadev via breed)
 
 IMPROVEMENTS:
   ZOOKEEPER-473. cleanup junit tests to eliminate false positives due to




svn commit: r882327 - in /hadoop/zookeeper/branches/branch-3.2: CHANGES.txt src/contrib/zkpython/src/c/zookeeper.c src/contrib/zkpython/src/test/connection_test.py

2009-11-19 Thread phunt
Author: phunt
Date: Thu Nov 19 22:12:53 2009
New Revision: 882327

URL: http://svn.apache.org/viewvc?rev=882327view=rev
Log:
ZOOKEEPER-541. zkpython limited to 256 handles

Modified:
hadoop/zookeeper/branches/branch-3.2/CHANGES.txt
hadoop/zookeeper/branches/branch-3.2/src/contrib/zkpython/src/c/zookeeper.c

hadoop/zookeeper/branches/branch-3.2/src/contrib/zkpython/src/test/connection_test.py

Modified: hadoop/zookeeper/branches/branch-3.2/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.2/CHANGES.txt?rev=882327r1=882326r2=882327view=diff
==
--- hadoop/zookeeper/branches/branch-3.2/CHANGES.txt (original)
+++ hadoop/zookeeper/branches/branch-3.2/CHANGES.txt Thu Nov 19 22:12:53 2009
@@ -13,6 +13,11 @@
   ZOOKEEPER-510. zkpython lumps all exceptions as IOError, needs specialized
   exceptions for KeeperException types (henry  pat via mahadev)
 
+  ZOOKEEPER-540. zkpython needs better tracking of handle validity
+  (henry via phunt)
+
+  ZOOKEEPER-541. zkpython limited to 256 handles (henry robinson via phunt)
+
   ZOOKEEPER-562. c client can flood server with pings if tcp send queue
   filled. (ben reed via mahadev)
 

Modified: 
hadoop/zookeeper/branches/branch-3.2/src/contrib/zkpython/src/c/zookeeper.c
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.2/src/contrib/zkpython/src/c/zookeeper.c?rev=882327r1=882326r2=882327view=diff
==
--- hadoop/zookeeper/branches/branch-3.2/src/contrib/zkpython/src/c/zookeeper.c 
(original)
+++ hadoop/zookeeper/branches/branch-3.2/src/contrib/zkpython/src/c/zookeeper.c 
Thu Nov 19 22:12:53 2009
@@ -19,11 +19,7 @@
 #include Python.h
 #include zookeeper.h
 #include assert.h
-
-#define MAX_ZHANDLES 256
-static zhandle_t* zhandles[MAX_ZHANDLES];
-static int num_zhandles = 0;
-
+   
 //
 // EXCEPTIONS
 PyObject *ZooKeeperException = NULL;
@@ -122,7 +118,73 @@
 // the global watchers for each connection - but they're 
 // inaccessible without pulling in zk_adaptor.h, which I'm
 // trying to avoid. 
-static pywatcher_t *watchers[MAX_ZHANDLES];
+static pywatcher_t **watchers;
+
+// We keep an array of zhandles available for use.
+// When a zhandle is correctly closed, the C client
+// frees the memory so we set the zhandles[i] entry to NULL.
+// This entry can then be re-used 
+static zhandle_t** zhandles = NULL;
+static int num_zhandles = 0;
+static int max_zhandles = 0;
+#define REAL_MAX_ZHANDLES 32768
+
+// Allocates an initial zhandle and watcher array
+void init_zhandles(int num) {
+   zhandles = malloc(sizeof(zhandle_t*)*num);
+   watchers = malloc(sizeof(pywatcher_t*)*num);
+   max_zhandles = num;
+   num_zhandles = 0;
+   memset(zhandles, 0, sizeof(zhandle_t*)*max_zhandles);
+}
+
+// Note that the following zhandle functions are not 
+// thread-safe. The C-Python runtime does not seem to
+// pre-empt a thread that is in a C module, so there's
+// no need for synchronisation. 
+
+// Doubles the size of the zhandle / watcher array
+// Returns 0 if the new array would be = REAL_MAX_ZHANDLES
+// in size. 
+int resize_zhandles() {
+   zhandle_t **tmp = zhandles;
+   pywatcher_t ** wtmp = watchers;
+   if (max_zhandles = REAL_MAX_ZHANDLES  1) {
+   return -1;
+   }
+   max_zhandles *= 2;
+   zhandles = malloc(sizeof(zhandle_t*)*max_zhandles);
+   memset(zhandles, 0, sizeof(zhandle_t*)*max_zhandles);
+   memcpy(zhandles, tmp, sizeof(zhandle_t*)*max_zhandles/2);
+
+   watchers = malloc(sizeof(pywatcher_t*)*max_zhandles);
+   memset(watchers, 0, sizeof(pywatcher_t*)*max_zhandles);
+   memcpy(watchers, wtmp, sizeof(pywatcher_t*)*max_zhandles/2);
+
+   free(wtmp);
+   free(tmp);
+   return 0;
+}
+
+// Find a free zhandle - this is expensive, but we 
+// expect it to be infrequently called.
+// There are optimisations that can be made if this turns out
+// to be problematic. 
+// Returns -1 if no free handle is found.
+unsigned int next_zhandle() {
+   int i = 0;
+   for (i=0;imax_zhandles;++i) {
+   if (zhandles[i] == NULL) {
+   num_zhandles++;
+   return i;
+   }
+   }
+
+   return -1;
+}
+
+/
+// Pywatcher funcs
 
 pywatcher_t *create_pywatcher(int zh, PyObject* cb, int permanent)
 {
@@ -248,11 +310,16 @@
   clientid_t cid;
   cid.client_id = -1;
   const char *passwd;
+   int handle = next_zhandle();
+   if (handle == -1) {
+   resize_zhandles();
+   handle = next_zhandle();
+   }
 
-  if (num_zhandles = MAX_ZHANDLES) {
-PyErr_SetString( ZooKeeperException, Too many ZooKeeper handles created, 
max is 256 );
-return NULL;
-  }
+   if (handle == -1

svn commit: r830838 - in /hadoop/zookeeper/trunk: CHANGES.txt src/recipes/build-recipes.xml

2009-10-28 Thread phunt
Author: phunt
Date: Thu Oct 29 04:02:02 2009
New Revision: 830838

URL: http://svn.apache.org/viewvc?rev=830838view=rev
Log:
ZOOKEEPER-563. ant test for recipes is broken.

Modified:
hadoop/zookeeper/trunk/CHANGES.txt
hadoop/zookeeper/trunk/src/recipes/build-recipes.xml

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=830838r1=830837r2=830838view=diff
==
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Thu Oct 29 04:02:02 2009
@@ -94,6 +94,8 @@
   (henry robinson via phunt)
 
   ZOOKEEPER-512. FLE election fails to elect leader (flavio via mahadev)
+
+  ZOOKEEPER-563. ant test for recipes is broken. (mahadev via phunt)
  
 IMPROVEMENTS:
   ZOOKEEPER-473. cleanup junit tests to eliminate false positives due to

Modified: hadoop/zookeeper/trunk/src/recipes/build-recipes.xml
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/recipes/build-recipes.xml?rev=830838r1=830837r2=830838view=diff
==
--- hadoop/zookeeper/trunk/src/recipes/build-recipes.xml (original)
+++ hadoop/zookeeper/trunk/src/recipes/build-recipes.xml Thu Oct 29 04:02:02 
2009
@@ -51,6 +51,9 @@
 fileset dir=${zk.root}/build/lib
   include name=**/*.jar /
 /fileset
+fileset dir=${zk.root}/build/test/lib
+  include name=**/*.jar/
+/fileset
 fileset dir=${zk.root}/src/java/lib
   include name=**/*.jar /
 /fileset




svn commit: r826787 - in /hadoop/zookeeper/trunk: ./ src/contrib/zkpython/src/c/ src/contrib/zkpython/src/test/

2009-10-19 Thread phunt
Author: phunt
Date: Mon Oct 19 19:42:17 2009
New Revision: 826787

URL: http://svn.apache.org/viewvc?rev=826787view=rev
Log:
zkpython can segfault when statting a deleted node

Added:
hadoop/zookeeper/trunk/src/contrib/zkpython/src/test/async_test.py   (with 
props)
hadoop/zookeeper/trunk/src/contrib/zkpython/src/test/callback_test.py   
(with props)
Modified:
hadoop/zookeeper/trunk/CHANGES.txt
hadoop/zookeeper/trunk/src/contrib/zkpython/src/c/zookeeper.c
hadoop/zookeeper/trunk/src/contrib/zkpython/src/test/get_set_test.py
hadoop/zookeeper/trunk/src/contrib/zkpython/src/test/zktestbase.py

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=826787r1=826786r2=826787view=diff
==
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Mon Oct 19 19:42:17 2009
@@ -89,6 +89,9 @@
   exceptions for KeeperException types (henry  pat via mahadev)
 
   ZOOKEEPER-541. zkpython limited to 256 handles (henry robinson via phunt)
+
+  ZOOKEEPER-554. zkpython can segfault when statting a deleted node
+  (henry robinson via phunt)
  
 IMPROVEMENTS:
   ZOOKEEPER-473. cleanup junit tests to eliminate false positives due to

Modified: hadoop/zookeeper/trunk/src/contrib/zkpython/src/c/zookeeper.c
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/contrib/zkpython/src/c/zookeeper.c?rev=826787r1=826786r2=826787view=diff
==
--- hadoop/zookeeper/trunk/src/contrib/zkpython/src/c/zookeeper.c (original)
+++ hadoop/zookeeper/trunk/src/contrib/zkpython/src/c/zookeeper.c Mon Oct 19 
19:42:17 2009
@@ -203,6 +203,9 @@
 
 PyObject *build_stat( const struct Stat *stat )
 {
+   if (stat == NULL) { 
+   return Py_None;
+   }
   return Py_BuildValue( {s:K, s:K, s:K, s:K,
s:i, s:i, s:i, s:K,
s:i, s:i, s:K},

Added: hadoop/zookeeper/trunk/src/contrib/zkpython/src/test/async_test.py
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/contrib/zkpython/src/test/async_test.py?rev=826787view=auto
==
--- hadoop/zookeeper/trunk/src/contrib/zkpython/src/test/async_test.py (added)
+++ hadoop/zookeeper/trunk/src/contrib/zkpython/src/test/async_test.py Mon Oct 
19 19:42:17 2009
@@ -0,0 +1,33 @@
+#!/usr/bin/python
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# License); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an AS IS BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import zookeeper, zktestbase, unittest, threading
+
+class AsyncTest(zktestbase.TestBase):
+Test whether async works
+# to do: startup and teardown via scripts?
+def setUp( self ):
+zktestbase.TestBase.setUp(self)
+
+def test_async(self):
+self.assertEqual(self.connected, True)
+ret = zookeeper.async(self.handle, /)
+self.assertEqual(ret, zookeeper.OK, async failed)
+
+if __name__ == '__main__':
+unittest.main()

Propchange: hadoop/zookeeper/trunk/src/contrib/zkpython/src/test/async_test.py
--
svn:eol-style = native

Added: hadoop/zookeeper/trunk/src/contrib/zkpython/src/test/callback_test.py
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/contrib/zkpython/src/test/callback_test.py?rev=826787view=auto
==
--- hadoop/zookeeper/trunk/src/contrib/zkpython/src/test/callback_test.py 
(added)
+++ hadoop/zookeeper/trunk/src/contrib/zkpython/src/test/callback_test.py Mon 
Oct 19 19:42:17 2009
@@ -0,0 +1,155 @@
+#!/usr/bin/python
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# License); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless

svn commit: r824981 - /hadoop/zookeeper/trunk/src/contrib/zkpython/src/c/zookeeper.c

2009-10-13 Thread phunt
Author: phunt
Date: Wed Oct 14 00:10:13 2009
New Revision: 824981

URL: http://svn.apache.org/viewvc?rev=824981view=rev
Log:
ZOOKEEPER-510. zkpython lumps all exceptions as IOError, needs specialized 
exceptions for KeeperException types (applying the incremental patch)

Modified:
hadoop/zookeeper/trunk/src/contrib/zkpython/src/c/zookeeper.c

Modified: hadoop/zookeeper/trunk/src/contrib/zkpython/src/c/zookeeper.c
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/contrib/zkpython/src/c/zookeeper.c?rev=824981r1=824980r2=824981view=diff
==
--- hadoop/zookeeper/trunk/src/contrib/zkpython/src/c/zookeeper.c (original)
+++ hadoop/zookeeper/trunk/src/contrib/zkpython/src/c/zookeeper.c Wed Oct 14 
00:10:13 2009
@@ -1114,6 +1114,7 @@
 
 
 #define ADD_EXCEPTION(x) x = PyErr_NewException(zookeeper.#x, 
ZooKeeperException, NULL); \
+   Py_INCREF(x); \
   PyModule_AddObject(module, #x, x);
 
 
@@ -1126,8 +1127,8 @@
  PyExc_Exception,
  NULL);
 
-  PyModule_AddObject(module, ZooKeeperException, ZooKeeperException);
-  
+   PyModule_AddObject(module, ZooKeeperException, ZooKeeperException);
+  Py_INCREF(ZooKeeperException);
 
   ADD_INTCONSTANT(PERM_READ);
   ADD_INTCONSTANT(PERM_WRITE);




svn commit: r811523 - in /hadoop/zookeeper/tags: release-3.2.1-rc0/ release-3.2.1/

2009-09-04 Thread phunt
Author: phunt
Date: Fri Sep  4 19:20:24 2009
New Revision: 811523

URL: http://svn.apache.org/viewvc?rev=811523view=rev
Log:
ZooKeeper 3.2.1 release.

Added:
hadoop/zookeeper/tags/release-3.2.1/
  - copied from r811522, hadoop/zookeeper/tags/release-3.2.1-rc0/
Removed:
hadoop/zookeeper/tags/release-3.2.1-rc0/



svn commit: r808557 - in /hadoop/zookeeper/trunk: CHANGES.txt src/java/main/org/apache/zookeeper/server/quorum/Leader.java

2009-08-27 Thread phunt
Author: phunt
Date: Thu Aug 27 18:07:52 2009
New Revision: 808557

URL: http://svn.apache.org/viewvc?rev=808557view=rev
Log:
ZOOKEEPER-518. DEBUG message for outstanding proposals in leader should be 
moved to trace.

Modified:
hadoop/zookeeper/trunk/CHANGES.txt

hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/Leader.java

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=808557r1=808556r2=808557view=diff
==
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Thu Aug 27 18:07:52 2009
@@ -68,6 +68,9 @@
   ZOOKEEPER-508. proposals and commits for DIFF and Truncate messages from the
   leader to the followers is buggy. (mahadev and ben via mahadev)
 
+  ZOOKEEPER-518. DEBUG message for outstanding proposals in leader should be
+   moved to trace. (phunt)
+
 IMPROVEMENTS:
   ZOOKEEPER-473. cleanup junit tests to eliminate false positives due to
   socket reuse and failure to close client (phunt via mahadev)

Modified: 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/Leader.java
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/Leader.java?rev=808557r1=808556r2=808557view=diff
==
--- 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/Leader.java
 (original)
+++ 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/Leader.java
 Thu Aug 27 18:07:52 2009
@@ -410,14 +410,14 @@
 synchronized public void processAck(long sid, long zxid, SocketAddress 
followerAddr) {
 boolean first = true;
 
-if (LOG.isDebugEnabled()) {
-LOG.debug(Ack zxid: 0x + Long.toHexString(zxid));
+if (LOG.isTraceEnabled()) {
+LOG.trace(Ack zxid: 0x + Long.toHexString(zxid));
 for (Proposal p : outstandingProposals.values()) {
 long packetZxid = p.packet.getZxid();
-LOG.debug(outstanding proposal: 0x
+LOG.trace(outstanding proposal: 0x
 + Long.toHexString(packetZxid));
 }
-LOG.debug(outstanding proposals all);
+LOG.trace(outstanding proposals all);
 }
 
 if (outstandingProposals.size() == 0) {




svn commit: r808558 - in /hadoop/zookeeper/branches/branch-3.2: CHANGES.txt src/java/main/org/apache/zookeeper/server/quorum/Leader.java

2009-08-27 Thread phunt
Author: phunt
Date: Thu Aug 27 18:08:23 2009
New Revision: 808558

URL: http://svn.apache.org/viewvc?rev=808558view=rev
Log:
ZOOKEEPER-518. DEBUG message for outstanding proposals in leader should be 
moved to trace.

Modified:
hadoop/zookeeper/branches/branch-3.2/CHANGES.txt

hadoop/zookeeper/branches/branch-3.2/src/java/main/org/apache/zookeeper/server/quorum/Leader.java

Modified: hadoop/zookeeper/branches/branch-3.2/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.2/CHANGES.txt?rev=808558r1=808557r2=808558view=diff
==
--- hadoop/zookeeper/branches/branch-3.2/CHANGES.txt (original)
+++ hadoop/zookeeper/branches/branch-3.2/CHANGES.txt Thu Aug 27 18:08:23 2009
@@ -64,6 +64,9 @@
   ZOOKEEPER-508. proposals and commits for DIFF and Truncate messages from the 
   leader to followers is buggy. (mahadev and ben via mahadev)
 
+  ZOOKEEPER-518. DEBUG message for outstanding proposals in leader should be
+   moved to trace. (phunt)
+
 IMPROVEMENTS:
 
 NEW FEATURES:

Modified: 
hadoop/zookeeper/branches/branch-3.2/src/java/main/org/apache/zookeeper/server/quorum/Leader.java
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.2/src/java/main/org/apache/zookeeper/server/quorum/Leader.java?rev=808558r1=808557r2=808558view=diff
==
--- 
hadoop/zookeeper/branches/branch-3.2/src/java/main/org/apache/zookeeper/server/quorum/Leader.java
 (original)
+++ 
hadoop/zookeeper/branches/branch-3.2/src/java/main/org/apache/zookeeper/server/quorum/Leader.java
 Thu Aug 27 18:08:23 2009
@@ -410,14 +410,14 @@
 synchronized public void processAck(long sid, long zxid, SocketAddress 
followerAddr) {
 boolean first = true;
 
-if (LOG.isDebugEnabled()) {
-LOG.debug(Ack zxid: 0x + Long.toHexString(zxid));
+if (LOG.isTraceEnabled()) {
+LOG.trace(Ack zxid: 0x + Long.toHexString(zxid));
 for (Proposal p : outstandingProposals.values()) {
 long packetZxid = p.packet.getZxid();
-LOG.debug(outstanding proposal: 0x
+LOG.trace(outstanding proposal: 0x
 + Long.toHexString(packetZxid));
 }
-LOG.debug(outstanding proposals all);
+LOG.trace(outstanding proposals all);
 }
 
 if (outstandingProposals.size() == 0) {




svn commit: r808566 - /hadoop/zookeeper/tags/release-3.2.1-rc0/

2009-08-27 Thread phunt
Author: phunt
Date: Thu Aug 27 18:47:58 2009
New Revision: 808566

URL: http://svn.apache.org/viewvc?rev=808566view=rev
Log:
ZooKeeper 3.2.1-rc0 release.

Added:
hadoop/zookeeper/tags/release-3.2.1-rc0/
  - copied from r808565, hadoop/zookeeper/branches/branch-3.2/



svn commit: r803000 - in /hadoop/zookeeper/trunk: ./ src/c/include/ src/java/main/org/apache/zookeeper/jmx/ src/java/main/org/apache/zookeeper/server/ src/java/main/org/apache/zookeeper/server/quorum/

2009-08-11 Thread phunt
Author: phunt
Date: Tue Aug 11 06:16:41 2009
New Revision: 803000

URL: http://svn.apache.org/viewvc?rev=803000view=rev
Log:
reverted: ZOOKEEPER-483. ZK fataled on me, and ugly

Modified:
hadoop/zookeeper/trunk/CHANGES.txt
hadoop/zookeeper/trunk/src/c/include/zookeeper_log.h   (props changed)

hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/jmx/CommonNames.java  
 (props changed)

hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/jmx/MBeanRegistry.java
   (props changed)

hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/jmx/ManagedUtil.java  
 (props changed)

hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/jmx/ZKMBeanInfo.java  
 (props changed)

hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/ConnectionBean.java
   (props changed)

hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/ConnectionMXBean.java
   (props changed)

hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/DataTreeBean.java
   (props changed)

hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/DataTreeMXBean.java
   (props changed)

hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/ZooKeeperServerBean.java
   (props changed)

hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/ZooKeeperServerMXBean.java
   (props changed)

hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/FollowerBean.java
   (props changed)

hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/FollowerMXBean.java
   (props changed)

hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/LeaderBean.java
   (props changed)

hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/LeaderElectionBean.java
   (props changed)

hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/LeaderElectionMXBean.java
   (props changed)

hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/LeaderMXBean.java
   (props changed)

hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/LocalPeerBean.java
   (props changed)

hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/LocalPeerMXBean.java
   (props changed)

hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumBean.java
   (props changed)

hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumMXBean.java
   (props changed)

hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/RemotePeerBean.java
   (props changed)

hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/RemotePeerMXBean.java
   (props changed)

hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/SendAckRequestProcessor.java

hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/ServerBean.java
   (props changed)

hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/ServerMXBean.java
   (props changed)

hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/QuorumTest.java

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=803000r1=802999r2=803000view=diff
==
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Tue Aug 11 06:16:41 2009
@@ -57,12 +57,11 @@
 
   ZOOKEEPER-501. CnxManagerTest failed on hudson. (flavio via mahadev)
   
-  ZOOKEEPER-499. electionAlg should default to FLE (3) - regression
-  (phunt via mahadev) 
+  ZOOKEEPER-499. electionAlg should default to FLE (3) - regression (phunt via
+  mahadev) 
 
   ZOOKEEPER-477. zkCleanup.sh is flaky (fernando via mahadev)
 
-  ZOOKEEPER-483. ZK fataled on me, and ugly (breed via phunt)
 
 IMPROVEMENTS:
   ZOOKEEPER-473. cleanup junit tests to eliminate false positives due to

Propchange: hadoop/zookeeper/trunk/src/c/include/zookeeper_log.h
('svn:mergeinfo' removed)

Propchange: 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/jmx/CommonNames.java
('svn:mergeinfo' removed)

Propchange: 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/jmx/MBeanRegistry.java
('svn:mergeinfo' removed)

Propchange: 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/jmx/ManagedUtil.java
('svn:mergeinfo' removed)

Propchange: 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/jmx/ZKMBeanInfo.java
('svn:mergeinfo' removed)

Propchange: 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/ConnectionBean.java
('svn:mergeinfo' removed)

Propchange: 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/ConnectionMXBean.java
('svn:mergeinfo' removed)

Propchange: 
hadoop/zookeeper/trunk/src/java/main

svn commit: r802995 - in /hadoop/zookeeper/trunk: CHANGES.txt src/java/main/org/apache/zookeeper/server/quorum/SendAckRequestProcessor.java src/java/test/org/apache/zookeeper/test/QuorumTest.java

2009-08-10 Thread phunt
Author: phunt
Date: Tue Aug 11 05:44:51 2009
New Revision: 802995

URL: http://svn.apache.org/viewvc?rev=802995view=rev
Log:
ZOOKEEPER-483. ZK fataled on me, and ugly

Modified:
hadoop/zookeeper/trunk/CHANGES.txt

hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/SendAckRequestProcessor.java

hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/QuorumTest.java

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=802995r1=802994r2=802995view=diff
==
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Tue Aug 11 05:44:51 2009
@@ -57,11 +57,12 @@
 
   ZOOKEEPER-501. CnxManagerTest failed on hudson. (flavio via mahadev)
   
-  ZOOKEEPER-499. electionAlg should default to FLE (3) - regression (phunt via
-  mahadev) 
+  ZOOKEEPER-499. electionAlg should default to FLE (3) - regression
+  (phunt via mahadev) 
 
   ZOOKEEPER-477. zkCleanup.sh is flaky (fernando via mahadev)
 
+  ZOOKEEPER-483. ZK fataled on me, and ugly (breed via phunt)
 
 IMPROVEMENTS:
   ZOOKEEPER-473. cleanup junit tests to eliminate false positives due to

Modified: 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/SendAckRequestProcessor.java
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/SendAckRequestProcessor.java?rev=802995r1=802994r2=802995view=diff
==
--- 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/SendAckRequestProcessor.java
 (original)
+++ 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/SendAckRequestProcessor.java
 Tue Aug 11 05:44:51 2009
@@ -43,13 +43,33 @@
 try {
 follower.writePacket(qp, false);
 } catch (IOException e) {
-LOG.warn(Ignoring unexpected exception during packet send, 
e);
+LOG.warn(Closing connection to leader, exception during 
packet send, e);
+try {
+if (!follower.sock.isClosed()) {
+follower.sock.close();
+}
+} catch (IOException e1) {
+// Nothing to do, we are shutting things down, so an 
exception here is irrelevant
+LOG.debug(Ignoring error closing the connection, e1);
+}
 }
 }
 }
 
 public void flush() throws IOException {
-follower.writePacket(null, true);
+try {
+follower.writePacket(null, true);
+} catch(IOException e) {
+LOG.warn(Closing connection to leader, exception during packet 
send, e);
+try {
+if (!follower.sock.isClosed()) {
+follower.sock.close();
+}
+} catch (IOException e1) {
+// Nothing to do, we are shutting things down, so an 
exception here is irrelevant
+LOG.debug(Ignoring error closing the connection, e1);
+}
+}
 }
 
 public void shutdown() {

Modified: 
hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/QuorumTest.java
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/QuorumTest.java?rev=802995r1=802994r2=802995view=diff
==
--- 
hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/QuorumTest.java 
(original)
+++ 
hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/QuorumTest.java 
Tue Aug 11 05:44:51 2009
@@ -23,12 +23,16 @@
 import java.util.ArrayList;
 
 import org.apache.log4j.Logger;
+import org.apache.zookeeper.AsyncCallback;
 import org.apache.zookeeper.CreateMode;
 import org.apache.zookeeper.KeeperException;
 import org.apache.zookeeper.WatchedEvent;
 import org.apache.zookeeper.Watcher;
 import org.apache.zookeeper.ZooDefs;
 import org.apache.zookeeper.ZooKeeper;
+import org.apache.zookeeper.data.Stat;
+import org.apache.zookeeper.server.quorum.FollowerHandler;
+import org.apache.zookeeper.server.quorum.Leader;
 import org.apache.zookeeper.ZooDefs.Ids;
 import org.junit.Before;
 import org.junit.Test;
@@ -93,6 +97,42 @@
 {
 ct.testClientWithWatcherObj();
 }
+volatile int counter = 0;
+volatile int errors = 0;
+@Test
+public void testLeaderShutdown() throws IOException, InterruptedException, 
KeeperException {
+ZooKeeper zk = new DisconnectableZooKeeper(qb.hostPort, 
ClientBase.CONNECTION_TIMEOUT, new Watcher() {
+public void process(WatchedEvent event) {
+}});
+zk.create(/blah, new byte[0], ZooDefs.Ids.OPEN_ACL_UNSAFE, 
CreateMode.PERSISTENT);
+zk.create(/blah/blah, new byte[0

svn commit: r802108 - in /hadoop/zookeeper/trunk: CHANGES.txt src/java/main/org/apache/zookeeper/ZooKeeper.java

2009-08-07 Thread phunt
Author: phunt
Date: Fri Aug  7 18:00:48 2009
New Revision: 802108

URL: http://svn.apache.org/viewvc?rev=802108view=rev
Log:
ZOOKEEPER-490. the java docs for session creation are misleading/incomplete

Modified:
hadoop/zookeeper/trunk/CHANGES.txt
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/ZooKeeper.java

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=802108r1=802107r2=802108view=diff
==
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Fri Aug  7 18:00:48 2009
@@ -46,11 +46,15 @@
 
   ZOOKEEPER-493. patch for command line setquota (steve bendiola via phunt)
 
-  ZOOKEEPER-311. handle small path lengths in zoo_create() (chris barroch via 
breed)
+  ZOOKEEPER-311. handle small path lengths in zoo_create()
+  (chris barroch via breed)
 
   ZOOKEEPER-484.  Clients get SESSION MOVED exception when switching from
   follower to a leader. (mahadev)
 
+  ZOOKEEPER-490. the java docs for session creation are misleading/incomplete
+  (phunt)
+
 IMPROVEMENTS:
   ZOOKEEPER-473. cleanup junit tests to eliminate false positives due to
   socket reuse and failure to close client (phunt via mahadev)

Modified: 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/ZooKeeper.java
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/ZooKeeper.java?rev=802108r1=802107r2=802108view=diff
==
--- hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/ZooKeeper.java 
(original)
+++ hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/ZooKeeper.java 
Fri Aug  7 18:00:48 2009
@@ -60,6 +60,7 @@
  * This is the main class of ZooKeeper client library. To use a ZooKeeper
  * service, an application must first instantiate an object of ZooKeeper class.
  * All the iterations will be done by calling the methods of ZooKeeper class.
+ * The methods of this class are thread-safe unless otherwise noted.
  * p
  * Once a connection to a server is established, a session ID is assigned to 
the
  * client. The client will send heart beats to the server periodically to keep
@@ -324,18 +325,28 @@
  * connection string containing a comma separated list of host:port pairs,
  * each corresponding to a ZooKeeper server.
  * p
- * The client object will pick an arbitrary server and try to connect to 
it.
- * If failed, it will try the next one in the list, until a connection is
- * established, or all the servers have been tried.
+ * Session establishment is asynchronous. This constructor will initiate
+ * connection to the server and return immediately - potentially (usually)
+ * before the session is fully established. The watcher argument specifies
+ * the watcher that will be notified of any changes in state. This
+ * notification can come at any point before or after the constructor call
+ * has returned.
+ * p
+ * The instantiated ZooKeeper client object will pick an arbitrary server
+ * from the connectString and attempt to connect to it. If establishment of
+ * the connection fails, another server in the connect string will be tried
+ * (the order is non-deterministic, as we random shuffle the list), until a
+ * connection is established. The client will continue attempts until the
+ * session is explicitly closed.
  * p
  * Added in 3.2.0: An optional chroot suffix may also be appended to the
  * connection string. This will run the client commands while interpreting
  * all paths relative to this root (similar to the unix chroot command).
- *
+ * 
  * @param connectString
  *comma separated host:port pairs, each corresponding to a zk
- *server. e.g. 127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002
- *If the optional chroot suffix is used the example would look
+ *server. e.g. 127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002 
If
+ *the optional chroot suffix is used the example would look
  *like: 127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002/app/a
  *where the client would be rooted at /app/a and all paths
  *would be relative to this root - ie getting/setting/etc...
@@ -346,9 +357,11 @@
  * @param watcher
  *a watcher object which will be notified of state changes, may
  *also be notified for node events
- *
- * @throws IOException in cases of network failure
- * @throws IllegalArgumentException if an invalid chroot path is specified
+ * 
+ * @throws IOException
+ * in cases of network failure
+ * @throws IllegalArgumentException
+ * if an invalid chroot path is specified
  */
 public

svn commit: r802131 - in /hadoop/zookeeper/branches/branch-3.2: CHANGES.txt src/java/main/org/apache/zookeeper/ZooKeeper.java

2009-08-07 Thread phunt
Author: phunt
Date: Fri Aug  7 18:17:20 2009
New Revision: 802131

URL: http://svn.apache.org/viewvc?rev=802131view=rev
Log:
ZOOKEEPER-490. the java docs for session creation are misleading/incomplete

Modified:
hadoop/zookeeper/branches/branch-3.2/CHANGES.txt

hadoop/zookeeper/branches/branch-3.2/src/java/main/org/apache/zookeeper/ZooKeeper.java

Modified: hadoop/zookeeper/branches/branch-3.2/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.2/CHANGES.txt?rev=802131r1=802130r2=802131view=diff
==
--- hadoop/zookeeper/branches/branch-3.2/CHANGES.txt (original)
+++ hadoop/zookeeper/branches/branch-3.2/CHANGES.txt Fri Aug  7 18:17:20 2009
@@ -48,6 +48,9 @@
   ZOOKEEPER-484.  Clients get SESSION MOVED exception when switching from
   follower to a leader. (mahadev)
 
+  ZOOKEEPER-490. the java docs for session creation are misleading/incomplete
+  (phunt)
+
 IMPROVEMENTS:
 
 NEW FEATURES:

Modified: 
hadoop/zookeeper/branches/branch-3.2/src/java/main/org/apache/zookeeper/ZooKeeper.java
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.2/src/java/main/org/apache/zookeeper/ZooKeeper.java?rev=802131r1=802130r2=802131view=diff
==
--- 
hadoop/zookeeper/branches/branch-3.2/src/java/main/org/apache/zookeeper/ZooKeeper.java
 (original)
+++ 
hadoop/zookeeper/branches/branch-3.2/src/java/main/org/apache/zookeeper/ZooKeeper.java
 Fri Aug  7 18:17:20 2009
@@ -60,6 +60,7 @@
  * This is the main class of ZooKeeper client library. To use a ZooKeeper
  * service, an application must first instantiate an object of ZooKeeper class.
  * All the iterations will be done by calling the methods of ZooKeeper class.
+ * The methods of this class are thread-safe unless otherwise noted.
  * p
  * Once a connection to a server is established, a session ID is assigned to 
the
  * client. The client will send heart beats to the server periodically to keep
@@ -324,18 +325,28 @@
  * connection string containing a comma separated list of host:port pairs,
  * each corresponding to a ZooKeeper server.
  * p
- * The client object will pick an arbitrary server and try to connect to 
it.
- * If failed, it will try the next one in the list, until a connection is
- * established, or all the servers have been tried.
+ * Session establishment is asynchronous. This constructor will initiate
+ * connection to the server and return immediately - potentially (usually)
+ * before the session is fully established. The watcher argument specifies
+ * the watcher that will be notified of any changes in state. This
+ * notification can come at any point before or after the constructor call
+ * has returned.
+ * p
+ * The instantiated ZooKeeper client object will pick an arbitrary server
+ * from the connectString and attempt to connect to it. If establishment of
+ * the connection fails, another server in the connect string will be tried
+ * (the order is non-deterministic, as we random shuffle the list), until a
+ * connection is established. The client will continue attempts until the
+ * session is explicitly closed.
  * p
  * Added in 3.2.0: An optional chroot suffix may also be appended to the
  * connection string. This will run the client commands while interpreting
  * all paths relative to this root (similar to the unix chroot command).
- *
+ * 
  * @param connectString
  *comma separated host:port pairs, each corresponding to a zk
- *server. e.g. 127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002
- *If the optional chroot suffix is used the example would look
+ *server. e.g. 127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002 
If
+ *the optional chroot suffix is used the example would look
  *like: 127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002/app/a
  *where the client would be rooted at /app/a and all paths
  *would be relative to this root - ie getting/setting/etc...
@@ -346,9 +357,11 @@
  * @param watcher
  *a watcher object which will be notified of state changes, may
  *also be notified for node events
- *
- * @throws IOException in cases of network failure
- * @throws IllegalArgumentException if an invalid chroot path is specified
+ * 
+ * @throws IOException
+ * in cases of network failure
+ * @throws IllegalArgumentException
+ * if an invalid chroot path is specified
  */
 public ZooKeeper(String connectString, int sessionTimeout, Watcher watcher)
 throws IOException
@@ -366,9 +379,19 @@
  * connection string containing a comma separated list of host:port pairs,
  * each corresponding to a ZooKeeper server

svn commit: r800981 - in /hadoop/zookeeper/trunk: CHANGES.txt bin/zkEnv.sh bin/zkServer.sh

2009-08-04 Thread phunt
Author: phunt
Date: Tue Aug  4 21:21:02 2009
New Revision: 800981

URL: http://svn.apache.org/viewvc?rev=800981view=rev
Log:
ZOOKEEPER-447. zkServer.sh doesn't allow different config files to be specified 
on the command line

Modified:
hadoop/zookeeper/trunk/CHANGES.txt
hadoop/zookeeper/trunk/bin/zkEnv.sh
hadoop/zookeeper/trunk/bin/zkServer.sh

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=800981r1=800980r2=800981view=diff
==
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Tue Aug  4 21:21:02 2009
@@ -38,8 +38,11 @@
   ZOOKEEPER-480. FLE should perform leader check when node is not leading and
   add vote of follower (flavio via mahadev)
 
-  ZOOKEEPER-491. Prevent zero-weight servers from being elected. (flavio via
-  mahadev)
+  ZOOKEEPER-491. Prevent zero-weight servers from being elected.
+  (flavio via mahadev)
+
+  ZOOKEEPER-447. zkServer.sh doesn't allow different config files to be
+  specified on the command line (henry robinson via phunt)
 
 IMPROVEMENTS:
   ZOOKEEPER-473. cleanup junit tests to eliminate false positives due to

Modified: hadoop/zookeeper/trunk/bin/zkEnv.sh
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/bin/zkEnv.sh?rev=800981r1=800980r2=800981view=diff
==
--- hadoop/zookeeper/trunk/bin/zkEnv.sh (original)
+++ hadoop/zookeeper/trunk/bin/zkEnv.sh Tue Aug  4 21:21:02 2009
@@ -32,6 +32,13 @@
 fi
 fi
 
+if [ x$ZOOCFG = x ]
+then
+ZOOCFG=zoo.cfg
+fi
+
+ZOOCFG=$ZOOCFGDIR/$ZOOCFG
+
 if [ -e $ZOOCFGDIR/java.env ]
 then
 . $ZOOCFGDIR/java.env
@@ -64,4 +71,3 @@
 done
 #add the zoocfg dir to classpath
 CLASSPATH=$ZOOCFGDIR:$CLASSPATH
-ZOOCFG=$ZOOCFGDIR/zoo.cfg

Modified: hadoop/zookeeper/trunk/bin/zkServer.sh
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/bin/zkServer.sh?rev=800981r1=800980r2=800981view=diff
==
--- hadoop/zookeeper/trunk/bin/zkServer.sh (original)
+++ hadoop/zookeeper/trunk/bin/zkServer.sh Tue Aug  4 21:21:02 2009
@@ -53,6 +53,12 @@
 
 . $ZOOBINDIR/zkEnv.sh
 
+if [ x$2 != x ]
+then
+ZOOCFG=$ZOOCFGDIR/$2
+fi
+echo Using config: $ZOOCFG
+
 ZOOPIDFILE=$(grep dataDir $ZOOCFG | sed -e 's/.*=//')/zookeeper_server.pid
 
 




svn commit: r800983 - in /hadoop/zookeeper/branches/branch-3.2: CHANGES.txt bin/zkEnv.sh bin/zkServer.sh

2009-08-04 Thread phunt
Author: phunt
Date: Tue Aug  4 21:23:06 2009
New Revision: 800983

URL: http://svn.apache.org/viewvc?rev=800983view=rev
Log:
ZOOKEEPER-447. zkServer.sh doesn't allow different config files to be specified 
on the command line

Modified:
hadoop/zookeeper/branches/branch-3.2/CHANGES.txt
hadoop/zookeeper/branches/branch-3.2/bin/zkEnv.sh
hadoop/zookeeper/branches/branch-3.2/bin/zkServer.sh

Modified: hadoop/zookeeper/branches/branch-3.2/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.2/CHANGES.txt?rev=800983r1=800982r2=800983view=diff
==
--- hadoop/zookeeper/branches/branch-3.2/CHANGES.txt (original)
+++ hadoop/zookeeper/branches/branch-3.2/CHANGES.txt Tue Aug  4 21:23:06 2009
@@ -35,8 +35,11 @@
   ZOOKEEPER-480. FLE should perform leader check when node is not leading and
   add vote of follower (flavio via mahadev)
 
-  ZOOKEEPER-491. Prevent zero-weight servers from being elected (flavio via
-  mahadev)
+  ZOOKEEPER-491. Prevent zero-weight servers from being elected
+  (flavio via mahadev)
+
+  ZOOKEEPER-447. zkServer.sh doesn't allow different config files to be
+  specified on the command line (henry robinson via phunt)
 
 IMPROVEMENTS:
 

Modified: hadoop/zookeeper/branches/branch-3.2/bin/zkEnv.sh
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.2/bin/zkEnv.sh?rev=800983r1=800982r2=800983view=diff
==
--- hadoop/zookeeper/branches/branch-3.2/bin/zkEnv.sh (original)
+++ hadoop/zookeeper/branches/branch-3.2/bin/zkEnv.sh Tue Aug  4 21:23:06 2009
@@ -32,6 +32,13 @@
 fi
 fi
 
+if [ x$ZOOCFG = x ]
+then
+ZOOCFG=zoo.cfg
+fi
+
+ZOOCFG=$ZOOCFGDIR/$ZOOCFG
+
 if [ -e $ZOOCFGDIR/java.env ]
 then
 . $ZOOCFGDIR/java.env
@@ -64,4 +71,3 @@
 done
 #add the zoocfg dir to classpath
 CLASSPATH=$ZOOCFGDIR:$CLASSPATH
-ZOOCFG=$ZOOCFGDIR/zoo.cfg

Modified: hadoop/zookeeper/branches/branch-3.2/bin/zkServer.sh
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.2/bin/zkServer.sh?rev=800983r1=800982r2=800983view=diff
==
--- hadoop/zookeeper/branches/branch-3.2/bin/zkServer.sh (original)
+++ hadoop/zookeeper/branches/branch-3.2/bin/zkServer.sh Tue Aug  4 21:23:06 
2009
@@ -53,6 +53,12 @@
 
 . $ZOOBINDIR/zkEnv.sh
 
+if [ x$2 != x ]
+then
+ZOOCFG=$ZOOCFGDIR/$2
+fi
+echo Using config: $ZOOCFG
+
 ZOOPIDFILE=$(grep dataDir $ZOOCFG | sed -e 's/.*=//')/zookeeper_server.pid
 
 




svn commit: r800990 - in /hadoop/zookeeper/trunk: CHANGES.txt src/java/main/org/apache/zookeeper/ZooKeeperMain.java

2009-08-04 Thread phunt
Author: phunt
Date: Tue Aug  4 21:38:38 2009
New Revision: 800990

URL: http://svn.apache.org/viewvc?rev=800990view=rev
Log:
ZOOKEEPER-493. patch for command line setquota

Modified:
hadoop/zookeeper/trunk/CHANGES.txt
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/ZooKeeperMain.java

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=800990r1=800989r2=800990view=diff
==
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Tue Aug  4 21:38:38 2009
@@ -44,6 +44,8 @@
   ZOOKEEPER-447. zkServer.sh doesn't allow different config files to be
   specified on the command line (henry robinson via phunt)
 
+  ZOOKEEPER-493. patch for command line setquota (steve bendiola via phunt)
+
 IMPROVEMENTS:
   ZOOKEEPER-473. cleanup junit tests to eliminate false positives due to
   socket reuse and failure to close client (phunt via mahadev)

Modified: 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/ZooKeeperMain.java
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/ZooKeeperMain.java?rev=800990r1=800989r2=800990view=diff
==
--- 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/ZooKeeperMain.java 
(original)
+++ 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/ZooKeeperMain.java 
Tue Aug  4 21:38:38 2009
@@ -733,11 +733,12 @@
 }
 } else if (cmd.equals(setquota)  args.length = 4) {
 String option = args[1];
+String val = args[2];
 path = args[3];
 System.err.println(Comment: the parts are  +
-option  + option +  path  +
-args[3] +  val  + args[2]);
-String val = args[3];
+   option  + option +
+val  + val +
+path  + path);
 if (-b.equals(option)) {
 // we are setting the bytes quota
 createQuota(zk, path, Long.parseLong(val), -1);




svn commit: r800991 - in /hadoop/zookeeper/branches/branch-3.2: CHANGES.txt src/java/main/org/apache/zookeeper/ZooKeeperMain.java

2009-08-04 Thread phunt
Author: phunt
Date: Tue Aug  4 21:38:57 2009
New Revision: 800991

URL: http://svn.apache.org/viewvc?rev=800991view=rev
Log:
ZOOKEEPER-493. patch for command line setquota

Modified:
hadoop/zookeeper/branches/branch-3.2/CHANGES.txt

hadoop/zookeeper/branches/branch-3.2/src/java/main/org/apache/zookeeper/ZooKeeperMain.java

Modified: hadoop/zookeeper/branches/branch-3.2/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.2/CHANGES.txt?rev=800991r1=800990r2=800991view=diff
==
--- hadoop/zookeeper/branches/branch-3.2/CHANGES.txt (original)
+++ hadoop/zookeeper/branches/branch-3.2/CHANGES.txt Tue Aug  4 21:38:57 2009
@@ -41,6 +41,8 @@
   ZOOKEEPER-447. zkServer.sh doesn't allow different config files to be
   specified on the command line (henry robinson via phunt)
 
+  ZOOKEEPER-493. patch for command line setquota (steve bendiola via phunt)
+
 IMPROVEMENTS:
 
 NEW FEATURES:

Modified: 
hadoop/zookeeper/branches/branch-3.2/src/java/main/org/apache/zookeeper/ZooKeeperMain.java
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.2/src/java/main/org/apache/zookeeper/ZooKeeperMain.java?rev=800991r1=800990r2=800991view=diff
==
--- 
hadoop/zookeeper/branches/branch-3.2/src/java/main/org/apache/zookeeper/ZooKeeperMain.java
 (original)
+++ 
hadoop/zookeeper/branches/branch-3.2/src/java/main/org/apache/zookeeper/ZooKeeperMain.java
 Tue Aug  4 21:38:57 2009
@@ -733,11 +733,12 @@
 }
 } else if (cmd.equals(setquota)  args.length = 4) {
 String option = args[1];
+String val = args[2];
 path = args[3];
 System.err.println(Comment: the parts are  +
-option  + option +  path  +
-args[3] +  val  + args[2]);
-String val = args[3];
+   option  + option +
+val  + val +
+path  + path);
 if (-b.equals(option)) {
 // we are setting the bytes quota
 createQuota(zk, path, Long.parseLong(val), -1);




svn commit: r800652 - in /hadoop/zookeeper/trunk: CHANGES.txt src/c/src/zookeeper.c src/c/tests/TestClient.cc

2009-08-03 Thread phunt
Author: phunt
Date: Tue Aug  4 01:58:02 2009
New Revision: 800652

URL: http://svn.apache.org/viewvc?rev=800652view=rev
Log:
ZOOKEEPER-466. crash on zookeeper_close() when using auth with empty cert

Modified:
hadoop/zookeeper/trunk/CHANGES.txt
hadoop/zookeeper/trunk/src/c/src/zookeeper.c
hadoop/zookeeper/trunk/src/c/tests/TestClient.cc

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=800652r1=800651r2=800652view=diff
==
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Tue Aug  4 01:58:02 2009
@@ -27,11 +27,13 @@
   ZOOKEEPER-457. Make ZookeeperMain public, support for HBase (and other)
   embedded clients (ryan rawson via phunt)
 
-  ZOOKEEPER-481. Add lastMessageSent to QuorumCnxManager. (flavio via
-mahadev)
+  ZOOKEEPER-481. Add lastMessageSent to QuorumCnxManager. (flavio via mahadev)
 
-  ZOOKEEPER-479.  QuorumHierarchical does not count groups correctly (flavio
-via mahadev)
+  ZOOKEEPER-479.  QuorumHierarchical does not count groups correctly
+  (flavio via mahadev)
+
+  ZOOKEEPER-466. crash on zookeeper_close() when using auth with empty cert
+  (Chris Darroch via phunt)
 
 IMPROVEMENTS:
   ZOOKEEPER-473. cleanup junit tests to eliminate false positives due to

Modified: hadoop/zookeeper/trunk/src/c/src/zookeeper.c
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/c/src/zookeeper.c?rev=800652r1=800651r2=800652view=diff
==
--- hadoop/zookeeper/trunk/src/c/src/zookeeper.c (original)
+++ hadoop/zookeeper/trunk/src/c/src/zookeeper.c Tue Aug  4 01:58:02 2009
@@ -2674,8 +2674,7 @@
 zoo_lock_auth(zh);
 authinfo = (auth_info*) malloc(sizeof(auth_info));
 authinfo-scheme=strdup(scheme);
-if(auth.buff)
-authinfo-auth=auth;
+authinfo-auth=auth;
 authinfo-completion=completion;
 authinfo-data=data;
 authinfo-next = NULL;

Modified: hadoop/zookeeper/trunk/src/c/tests/TestClient.cc
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/c/tests/TestClient.cc?rev=800652r1=800651r2=800652view=diff
==
--- hadoop/zookeeper/trunk/src/c/tests/TestClient.cc (original)
+++ hadoop/zookeeper/trunk/src/c/tests/TestClient.cc Tue Aug  4 01:58:02 2009
@@ -423,7 +423,7 @@
 void testAuth() {
 int rc;
 count = 0;
-watchctx_t ctx1, ctx2, ctx3;
+watchctx_t ctx1, ctx2, ctx3, ctx4;
 zhandle_t *zk = createClient(ctx1);
 struct ACL_vector nodeAcl;
 struct ACL acl_val;
@@ -444,6 +444,21 @@
 rc = zoo_create(zk, /tauth1, , 0, ZOO_CREATOR_ALL_ACL, 0, 0, 0);
 CPPUNIT_ASSERT_EQUAL((int)ZOK, rc);
 
+{
+//create a new client
+zk = createClient(ctx4);
+rc = zoo_add_auth(zk, digest, , 0, voidCompletion, (void*)ZOK);
+CPPUNIT_ASSERT_EQUAL((int) ZOK, rc);
+waitForVoidCompletion(3);
+CPPUNIT_ASSERT(count == 0);
+
+rc = zoo_add_auth(zk, digest, , 0, voidCompletion, (void*)ZOK);
+CPPUNIT_ASSERT_EQUAL((int) ZOK, rc);
+waitForVoidCompletion(3);
+CPPUNIT_ASSERT(count == 0);
+}
+
+//create a new client
 zk = createClient(ctx2);
 
 rc = zoo_add_auth(zk, digest, pat:passwd2, 11, voidCompletion,




svn commit: r800653 - in /hadoop/zookeeper/branches/branch-3.2: CHANGES.txt src/c/src/zookeeper.c src/c/tests/TestClient.cc

2009-08-03 Thread phunt
Author: phunt
Date: Tue Aug  4 01:58:22 2009
New Revision: 800653

URL: http://svn.apache.org/viewvc?rev=800653view=rev
Log:
ZOOKEEPER-466. crash on zookeeper_close() when using auth with empty cert

Modified:
hadoop/zookeeper/branches/branch-3.2/CHANGES.txt
hadoop/zookeeper/branches/branch-3.2/src/c/src/zookeeper.c
hadoop/zookeeper/branches/branch-3.2/src/c/tests/TestClient.cc

Modified: hadoop/zookeeper/branches/branch-3.2/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.2/CHANGES.txt?rev=800653r1=800652r2=800653view=diff
==
--- hadoop/zookeeper/branches/branch-3.2/CHANGES.txt (original)
+++ hadoop/zookeeper/branches/branch-3.2/CHANGES.txt Tue Aug  4 01:58:22 2009
@@ -26,8 +26,11 @@
 
   ZOOKEEPER-481. Add lastMessageSent to QuorumCnxManager. (flavio via mahadev)
 
-  ZOOKEEPER-479.  QuorumHierarchical does not count groups correctly (flavio
-via mahadev)
+  ZOOKEEPER-479.  QuorumHierarchical does not count groups correctly
+  (flavio via mahadev)
+
+  ZOOKEEPER-466. crash on zookeeper_close() when using auth with empty cert
+  (Chris Darroch via phunt)
 
 IMPROVEMENTS:
 

Modified: hadoop/zookeeper/branches/branch-3.2/src/c/src/zookeeper.c
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.2/src/c/src/zookeeper.c?rev=800653r1=800652r2=800653view=diff
==
--- hadoop/zookeeper/branches/branch-3.2/src/c/src/zookeeper.c (original)
+++ hadoop/zookeeper/branches/branch-3.2/src/c/src/zookeeper.c Tue Aug  4 
01:58:22 2009
@@ -2674,8 +2674,7 @@
 zoo_lock_auth(zh);
 authinfo = (auth_info*) malloc(sizeof(auth_info));
 authinfo-scheme=strdup(scheme);
-if(auth.buff)
-authinfo-auth=auth;
+authinfo-auth=auth;
 authinfo-completion=completion;
 authinfo-data=data;
 authinfo-next = NULL;

Modified: hadoop/zookeeper/branches/branch-3.2/src/c/tests/TestClient.cc
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.2/src/c/tests/TestClient.cc?rev=800653r1=800652r2=800653view=diff
==
--- hadoop/zookeeper/branches/branch-3.2/src/c/tests/TestClient.cc (original)
+++ hadoop/zookeeper/branches/branch-3.2/src/c/tests/TestClient.cc Tue Aug  4 
01:58:22 2009
@@ -423,7 +423,7 @@
 void testAuth() {
 int rc;
 count = 0;
-watchctx_t ctx1, ctx2, ctx3;
+watchctx_t ctx1, ctx2, ctx3, ctx4;
 zhandle_t *zk = createClient(ctx1);
 struct ACL_vector nodeAcl;
 struct ACL acl_val;
@@ -444,6 +444,21 @@
 rc = zoo_create(zk, /tauth1, , 0, ZOO_CREATOR_ALL_ACL, 0, 0, 0);
 CPPUNIT_ASSERT_EQUAL((int)ZOK, rc);
 
+{
+//create a new client
+zk = createClient(ctx4);
+rc = zoo_add_auth(zk, digest, , 0, voidCompletion, (void*)ZOK);
+CPPUNIT_ASSERT_EQUAL((int) ZOK, rc);
+waitForVoidCompletion(3);
+CPPUNIT_ASSERT(count == 0);
+
+rc = zoo_add_auth(zk, digest, , 0, voidCompletion, (void*)ZOK);
+CPPUNIT_ASSERT_EQUAL((int) ZOK, rc);
+waitForVoidCompletion(3);
+CPPUNIT_ASSERT(count == 0);
+}
+
+//create a new client
 zk = createClient(ctx2);
 
 rc = zoo_add_auth(zk, digest, pat:passwd2, 11, voidCompletion,




svn commit: r799703 - in /hadoop/zookeeper/branches/branch-3.2: ./ src/java/main/org/apache/zookeeper/common/ src/java/test/org/apache/zookeeper/test/

2009-07-31 Thread phunt
Author: phunt
Date: Fri Jul 31 19:08:19 2009
New Revision: 799703

URL: http://svn.apache.org/viewvc?rev=799703view=rev
Log:
ZOOKEEPER-487. setdata on root (/) crashes the servers

Modified:
hadoop/zookeeper/branches/branch-3.2/CHANGES.txt

hadoop/zookeeper/branches/branch-3.2/src/java/main/org/apache/zookeeper/common/PathTrie.java

hadoop/zookeeper/branches/branch-3.2/src/java/test/org/apache/zookeeper/test/QuorumQuotaTest.java

hadoop/zookeeper/branches/branch-3.2/src/java/test/org/apache/zookeeper/test/ZooKeeperQuotaTest.java

Modified: hadoop/zookeeper/branches/branch-3.2/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.2/CHANGES.txt?rev=799703r1=799702r2=799703view=diff
==
--- hadoop/zookeeper/branches/branch-3.2/CHANGES.txt (original)
+++ hadoop/zookeeper/branches/branch-3.2/CHANGES.txt Fri Jul 31 19:08:19 2009
@@ -11,13 +11,15 @@
 
   ZOOKEEPER-470. include unistd.h for sleep() in c tests (chris via mahadev)
 
-  ZOOKEEPER-460. bad testRetry in cppunit tests (hudson failure) (giri via
-mahadev)
+  ZOOKEEPER-460. bad testRetry in cppunit tests (hudson failure)
+  (giri via mahadev)
   
   ZOOKEEPER-467.  Change log level in BookieHandle (flavio via mahadev)
 
   ZOOKEEPER-482. ignore sigpipe in testRetry to avoid silent immediate
-failure. (chris via mahadev) 
+  failure. (chris via mahadev) 
+
+  ZOOKEEPER-487. setdata on root (/) crashes the servers (mahadev via phunt)
 
 IMPROVEMENTS:
 

Modified: 
hadoop/zookeeper/branches/branch-3.2/src/java/main/org/apache/zookeeper/common/PathTrie.java
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.2/src/java/main/org/apache/zookeeper/common/PathTrie.java?rev=799703r1=799702r2=799703view=diff
==
--- 
hadoop/zookeeper/branches/branch-3.2/src/java/main/org/apache/zookeeper/common/PathTrie.java
 (original)
+++ 
hadoop/zookeeper/branches/branch-3.2/src/java/main/org/apache/zookeeper/common/PathTrie.java
 Fri Jul 31 19:08:19 2009
@@ -248,6 +248,9 @@
 if (path == null) {
 return null;
 }
+if (/.equals(path)) {
+return path;
+}
 String[] pathComponents = path.split(/);
 TrieNode parent = rootNode;
 ListString components = new ArrayListString();

Modified: 
hadoop/zookeeper/branches/branch-3.2/src/java/test/org/apache/zookeeper/test/QuorumQuotaTest.java
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.2/src/java/test/org/apache/zookeeper/test/QuorumQuotaTest.java?rev=799703r1=799702r2=799703view=diff
==
--- 
hadoop/zookeeper/branches/branch-3.2/src/java/test/org/apache/zookeeper/test/QuorumQuotaTest.java
 (original)
+++ 
hadoop/zookeeper/branches/branch-3.2/src/java/test/org/apache/zookeeper/test/QuorumQuotaTest.java
 Fri Jul 31 19:08:19 2009
@@ -49,6 +49,7 @@
 
 public void testQuotaWithQuorum() throws Exception {
 ZooKeeper zk = createClient();
+zk.setData(/, some.getBytes(), -1);
 zk.create(/a, some.getBytes(), Ids.OPEN_ACL_UNSAFE,
 CreateMode.PERSISTENT);
 int i = 0;

Modified: 
hadoop/zookeeper/branches/branch-3.2/src/java/test/org/apache/zookeeper/test/ZooKeeperQuotaTest.java
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.2/src/java/test/org/apache/zookeeper/test/ZooKeeperQuotaTest.java?rev=799703r1=799702r2=799703view=diff
==
--- 
hadoop/zookeeper/branches/branch-3.2/src/java/test/org/apache/zookeeper/test/ZooKeeperQuotaTest.java
 (original)
+++ 
hadoop/zookeeper/branches/branch-3.2/src/java/test/org/apache/zookeeper/test/ZooKeeperQuotaTest.java
 Fri Jul 31 19:08:19 2009
@@ -52,7 +52,8 @@
 InterruptedException, KeeperException {
 final ZooKeeper zk = createClient();
 final String path = /a/b/v;
-
+// making sure setdata works on /
+zk.setData(/, some.getBytes(), -1);
 zk.create(/a, some.getBytes(), Ids.OPEN_ACL_UNSAFE,
 CreateMode.PERSISTENT);
 




svn commit: r799741 - in /hadoop/zookeeper/trunk: CHANGES.txt src/java/main/org/apache/zookeeper/ZooKeeperMain.java

2009-07-31 Thread phunt
Author: phunt
Date: Fri Jul 31 20:32:02 2009
New Revision: 799741

URL: http://svn.apache.org/viewvc?rev=799741view=rev
Log:
ZOOKEEPER-457. Make ZookeeperMain public, support for HBase (and other) 
embedded clients

Modified:
hadoop/zookeeper/trunk/CHANGES.txt
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/ZooKeeperMain.java

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=799741r1=799740r2=799741view=diff
==
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Fri Jul 31 20:32:02 2009
@@ -24,6 +24,9 @@
 
   ZOOKEEPER-487. setdata on root (/) crashes the servers (mahadev via phunt)
 
+  ZOOKEEPER-457. Make ZookeeperMain public, support for HBase (and other)
+  embedded clients (ryan rawson via phunt)
+
 IMPROVEMENTS:
   ZOOKEEPER-473. cleanup junit tests to eliminate false positives due to
   socket reuse and failure to close client (phunt via mahadev)

Modified: 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/ZooKeeperMain.java
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/ZooKeeperMain.java?rev=799741r1=799740r2=799741view=diff
==
--- 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/ZooKeeperMain.java 
(original)
+++ 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/ZooKeeperMain.java 
Fri Jul 31 20:32:02 2009
@@ -60,7 +60,7 @@
 return printWatches;
 }
 
-static void populateCommandMap() {
+static {
 commandMap.put(connect, host:port);
 commandMap.put(close,);
 commandMap.put(create, [-s] [-e] path data acl);
@@ -145,12 +145,13 @@
  */
 static private class MyCommandOptions {
 
-private MapString,String options = null;
+private MapString,String options = new HashMapString,String();
 private ListString cmdArgs = null;
 private String command = null;
 
 public MyCommandOptions() {
-options = null; command = null;
+  options.put(server, localhost:2181);
+  options.put(timeout, 3);
 }
 
 public String getOption(String opt) {
@@ -173,13 +174,6 @@
 return cmdArgs.toArray(new String[0]);
 }
 
-private MapString,String buildDefaults( ) {
-options = new HashMapString,String( );
-options.put(server, localhost:2181);
-options.put(timeout, 3);
-return options;
-}
-
 /**
  * Parses a command line that may contain one or more flags
  * before an optional command string
@@ -187,7 +181,6 @@
  * @return true if parsing succeeded, false otherwise.
  */
 public boolean parseOptions(String[] args) {
-MapString, String ret = buildDefaults();
 ListString argList = Arrays.asList(args);
 IteratorString it = argList.iterator();
 
@@ -195,9 +188,9 @@
 String opt = it.next();
 try {
 if (opt.equals(-server)) {
-ret.put(server, it.next());
+options.put(server, it.next());
 } else if (opt.equals(-timeout)) {
-ret.put(timeout, it.next());
+options.put(timeout, it.next());
 }
 } catch (NoSuchElementException e){
 System.err.println(Error: no argument found for option 
@@ -271,7 +264,6 @@
 public static void main(String args[])
 throws KeeperException, IOException, InterruptedException
 {
-populateCommandMap();
 ZooKeeperMain main = new ZooKeeperMain(args);
 main.run();
 }
@@ -284,6 +276,10 @@
 //Integer.parseInt(cl.getOption(timeout)), new MyWatcher());
 }
 
+public ZooKeeperMain(ZooKeeper zk) {
+  this.zk = zk;
+}
+
 @SuppressWarnings(unchecked)
 void run() throws KeeperException, IOException, InterruptedException {
 if (cl.getCommand() == null) {
@@ -310,12 +306,7 @@
 String line;
 Method readLine = consoleC.getMethod(readLine, String.class);
 while ((line = (String)readLine.invoke(console, getPrompt())) 
!= null) {
-if (!line.equals()) {
-cl.parseCommand(line);
-addToHistory(commandCount,line);
-processCmd(cl);
-commandCount++;
-}
+executeLine(line);
 }
 } catch (ClassNotFoundException e) {
 LOG.debug(Unable to start jline, e);
@@ -341,12 +332,7 @@
 
 String line;
 while ((line = br.readLine

svn commit: r792229 - in /hadoop/zookeeper/site: author/src/documentation/content/xdocs/ publish/

2009-07-08 Thread phunt
Author: phunt
Date: Wed Jul  8 16:54:59 2009
New Revision: 792229

URL: http://svn.apache.org/viewvc?rev=792229view=rev
Log:
Updated site for release 3.2.0

Modified:
hadoop/zookeeper/site/author/src/documentation/content/xdocs/releases.xml
hadoop/zookeeper/site/author/src/documentation/content/xdocs/site.xml
hadoop/zookeeper/site/publish/credits.html
hadoop/zookeeper/site/publish/index.html
hadoop/zookeeper/site/publish/irc.html
hadoop/zookeeper/site/publish/issue_tracking.html
hadoop/zookeeper/site/publish/linkmap.html
hadoop/zookeeper/site/publish/linkmap.pdf
hadoop/zookeeper/site/publish/mailing_lists.html
hadoop/zookeeper/site/publish/releases.html
hadoop/zookeeper/site/publish/releases.pdf
hadoop/zookeeper/site/publish/version_control.html

Modified: 
hadoop/zookeeper/site/author/src/documentation/content/xdocs/releases.xml
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/site/author/src/documentation/content/xdocs/releases.xml?rev=792229r1=792228r2=792229view=diff
==
--- hadoop/zookeeper/site/author/src/documentation/content/xdocs/releases.xml 
(original)
+++ hadoop/zookeeper/site/author/src/documentation/content/xdocs/releases.xml 
Wed Jul  8 16:54:59 2009
@@ -34,6 +34,17 @@
 
 section
   titleNews/title
+
+  section
+title8 July, 2009: release 3.2.0 available /title
+pThis release contains many improvements, new features, bug
+fixes and optimizations./p
+pSee the a 
href=http://hadoop.apache.org/zookeeper/docs/r3.2.0/releasenotes.html;ZooKeeper
 3.2.0 Release Notes/a for details.  
+   Alternatively, you can look at the
+   a 
href=http://issues.apache.org/jira/browse/ZOOKEEPER?report=com.atlassian.jira.plugin.system.project:changelog-panel;
+   Jira issue log for all releases/a./p
+  /section
+
   section
 title27 March, 2009: release 3.1.1 available /title
 pThis release contains a small number of bug fixes./p

Modified: hadoop/zookeeper/site/author/src/documentation/content/xdocs/site.xml
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/site/author/src/documentation/content/xdocs/site.xml?rev=792229r1=792228r2=792229view=diff
==
--- hadoop/zookeeper/site/author/src/documentation/content/xdocs/site.xml 
(original)
+++ hadoop/zookeeper/site/author/src/documentation/content/xdocs/site.xml Wed 
Jul  8 16:54:59 2009
@@ -25,8 +25,8 @@
   /project
 
   docs label=Documentation 
-r3.0.1   label=Release 3.0.1 href=ext:docs/r3.0.1/ /
 r3.1.1   label=Release 3.1.1 href=ext:docs/r3.1.1/ /
+r3.2.0   label=Release 3.2.0 href=ext:docs/r3.2.0/ /
   /docs
 
   resources label=Developers
@@ -54,6 +54,7 @@
   r3.0.1 href=r3.0.1//
   r3.1.0 href=r3.1.0//
   r3.1.1 href=r3.1.1//
+  r3.2.0 href=r3.2.0//
 /docs
   /external-refs
  

Modified: hadoop/zookeeper/site/publish/credits.html
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/site/publish/credits.html?rev=792229r1=792228r2=792229view=diff
==
--- hadoop/zookeeper/site/publish/credits.html (original)
+++ hadoop/zookeeper/site/publish/credits.html Wed Jul  8 16:54:59 2009
@@ -120,10 +120,10 @@
 div onclick=SwitchMenu('menu_1.2', 'skin/') id=menu_1.2Title 
class=menutitleDocumentation/div
 div id=menu_1.2 class=menuitemgroup
 div class=menuitem
-a href=http://hadoop.apache.org/zookeeper/docs/r3.0.1/;Release 3.0.1/a
+a href=http://hadoop.apache.org/zookeeper/docs/r3.1.1/;Release 3.1.1/a
 /div
 div class=menuitem
-a href=http://hadoop.apache.org/zookeeper/docs/r3.1.1/;Release 3.1.1/a
+a href=http://hadoop.apache.org/zookeeper/docs/r3.2.0/;Release 3.2.0/a
 /div
 /div
 div onclick=SwitchMenu('menu_1.3', 'skin/') id=menu_1.3Title 
class=menutitleDevelopers/div

Modified: hadoop/zookeeper/site/publish/index.html
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/site/publish/index.html?rev=792229r1=792228r2=792229view=diff
==
--- hadoop/zookeeper/site/publish/index.html (original)
+++ hadoop/zookeeper/site/publish/index.html Wed Jul  8 16:54:59 2009
@@ -120,10 +120,10 @@
 div onclick=SwitchMenu('menu_1.2', 'skin/') id=menu_1.2Title 
class=menutitleDocumentation/div
 div id=menu_1.2 class=menuitemgroup
 div class=menuitem
-a href=http://hadoop.apache.org/zookeeper/docs/r3.0.1/;Release 3.0.1/a
+a href=http://hadoop.apache.org/zookeeper/docs/r3.1.1/;Release 3.1.1/a
 /div
 div class=menuitem
-a href=http://hadoop.apache.org/zookeeper/docs/r3.1.1/;Release 3.1.1/a
+a href=http://hadoop.apache.org/zookeeper/docs/r3.2.0/;Release 3.2.0/a
 /div
 /div
 div onclick=SwitchMenu('menu_1.3', 'skin/') id=menu_1.3Title 
class=menutitleDevelopers/div

Modified: hadoop/zookeeper/site/publish/irc.html

svn commit: r791930 - in /hadoop/zookeeper/tags: release-3.2.0-rc1/ release-3.2.0/

2009-07-07 Thread phunt
Author: phunt
Date: Tue Jul  7 18:27:39 2009
New Revision: 791930

URL: http://svn.apache.org/viewvc?rev=791930view=rev
Log:
ZooKeeper 3.2.0 release.

Added:
hadoop/zookeeper/tags/release-3.2.0/
  - copied from r791929, hadoop/zookeeper/tags/release-3.2.0-rc1/
Removed:
hadoop/zookeeper/tags/release-3.2.0-rc1/



svn commit: r790257 - in /hadoop/zookeeper/branches/branch-3.2: CHANGES.txt src/c/src/zookeeper.c

2009-07-01 Thread phunt
Author: phunt
Date: Wed Jul  1 16:38:34 2009
New Revision: 790257

URL: http://svn.apache.org/viewvc?rev=790257view=rev
Log:
ZOOKEEPER-455. zookeeper c client crashes with chroot specified in the string.

Modified:
hadoop/zookeeper/branches/branch-3.2/CHANGES.txt
hadoop/zookeeper/branches/branch-3.2/src/c/src/zookeeper.c

Modified: hadoop/zookeeper/branches/branch-3.2/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.2/CHANGES.txt?rev=790257r1=790256r2=790257view=diff
==
--- hadoop/zookeeper/branches/branch-3.2/CHANGES.txt (original)
+++ hadoop/zookeeper/branches/branch-3.2/CHANGES.txt Wed Jul  1 16:38:34 2009
@@ -151,7 +151,10 @@
   ZOOKEEPER-453. Worker is not removed in QuorumCnxManager upon crash.
   (flavio via mahadev)
 
-  ZOOKEEPER-454. allow compilation with jdk1.5
+  ZOOKEEPER-454. allow compilation with jdk1.5 (phunt)
+
+  ZOOKEEPER-455. zookeeper c client crashes with chroot specified in the 
string.
+  (phunt via mahadev)
 
 IMPROVEMENTS:
   ZOOKEEPER-308. improve the atomic broadcast performance 3x.

Modified: hadoop/zookeeper/branches/branch-3.2/src/c/src/zookeeper.c
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.2/src/c/src/zookeeper.c?rev=790257r1=790256r2=790257view=diff
==
--- hadoop/zookeeper/branches/branch-3.2/src/c/src/zookeeper.c (original)
+++ hadoop/zookeeper/branches/branch-3.2/src/c/src/zookeeper.c Wed Jul  1 
16:38:34 2009
@@ -645,13 +645,14 @@
 zh-hostname = (char *) malloc(index_chroot - host + 1);
 zh-hostname = strncpy(zh-hostname, host, (index_chroot - host));
 //strncpy does not null terminate
-*(zh-hostname + (index_chroot - host) +1) = '\0';
+*(zh-hostname + (index_chroot - host)) = '\0';
 
 } else {
 zh-chroot = NULL;
 zh-hostname = strdup(host);
 }
 if (zh-chroot  !isValidPath(zh-chroot, 0)) { 
+errno = EINVAL;
 goto abort;
 }
 if (zh-hostname == 0) {




svn commit: r790260 - in /hadoop/zookeeper/branches/branch-3.2: docs/releasenotes.html docs/releasenotes.pdf src/docs/src/documentation/content/xdocs/releasenotes.xml

2009-07-01 Thread phunt
Author: phunt
Date: Wed Jul  1 16:47:46 2009
New Revision: 790260

URL: http://svn.apache.org/viewvc?rev=790260view=rev
Log:
Preparing for release 3.2.0

Modified:
hadoop/zookeeper/branches/branch-3.2/docs/releasenotes.html
hadoop/zookeeper/branches/branch-3.2/docs/releasenotes.pdf

hadoop/zookeeper/branches/branch-3.2/src/docs/src/documentation/content/xdocs/releasenotes.xml

Modified: hadoop/zookeeper/branches/branch-3.2/docs/releasenotes.html
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.2/docs/releasenotes.html?rev=790260r1=790259r2=790260view=diff
==
--- hadoop/zookeeper/branches/branch-3.2/docs/releasenotes.html (original)
+++ hadoop/zookeeper/branches/branch-3.2/docs/releasenotes.html Wed Jul  1 
16:47:46 2009
@@ -650,6 +650,11 @@
 tda 
href=https://issues.apache.org/jira/browse/ZOOKEEPER-454;ZOOKEEPER-454/a/tdtdallow
 compilation with jdk1.5
 /td
 /tr
+
+tr
+tda 
href=https://issues.apache.org/jira/browse/ZOOKEEPER-455;ZOOKEEPER-455/a/tdtdzookeeper
 c client crashes with chroot specified in the string.
+/td
+/tr
 
 
 tr

Modified: hadoop/zookeeper/branches/branch-3.2/docs/releasenotes.pdf
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.2/docs/releasenotes.pdf?rev=790260r1=790259r2=790260view=diff
==
Binary files - no diff available.

Modified: 
hadoop/zookeeper/branches/branch-3.2/src/docs/src/documentation/content/xdocs/releasenotes.xml
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.2/src/docs/src/documentation/content/xdocs/releasenotes.xml?rev=790260r1=790259r2=790260view=diff
==
--- 
hadoop/zookeeper/branches/branch-3.2/src/docs/src/documentation/content/xdocs/releasenotes.xml
 (original)
+++ 
hadoop/zookeeper/branches/branch-3.2/src/docs/src/documentation/content/xdocs/releasenotes.xml
 Wed Jul  1 16:47:46 2009
@@ -235,6 +235,8 @@
 /entry/row
 rowentryulink 
url=https://issues.apache.org/jira/browse/ZOOKEEPER-454;ZOOKEEPER-454/ulink/entryentryallow
 compilation with jdk1.5
 /entry/row
+rowentryulink 
url=https://issues.apache.org/jira/browse/ZOOKEEPER-455;ZOOKEEPER-455/ulink/entryentryzookeeper
 c client crashes with chroot specified in the string.
+/entry/row
 
 row
   entryImprovement/entry




svn commit: r789955 - /hadoop/zookeeper/trunk/CHANGES.txt

2009-06-30 Thread phunt
Author: phunt
Date: Tue Jun 30 21:05:27 2009
New Revision: 789955

URL: http://svn.apache.org/viewvc?rev=789955view=rev
Log:
Preparing for release 3.2.0

Modified:
hadoop/zookeeper/trunk/CHANGES.txt

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=789955r1=789954r2=789955view=diff
==
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Tue Jun 30 21:05:27 2009
@@ -20,7 +20,7 @@
   (chris darroch via mahadev)
 
   ZOOKEEPER-334. bookkeeper benchmark (testclient.java) has compiling errors.
-  (flavio and mahadev) 
+  (flavio and mahadev)
 
   ZOOKEEPER-281. autoreconf fails for /zookeeper-3.0.1/src/c/ (phunt)
 




svn commit: r789956 - /hadoop/zookeeper/branches/branch-3.2/

2009-06-30 Thread phunt
Author: phunt
Date: Tue Jun 30 21:07:10 2009
New Revision: 789956

URL: http://svn.apache.org/viewvc?rev=789956view=rev
Log:
Branching for 3.2 releases

Added:
hadoop/zookeeper/branches/branch-3.2/
  - copied from r789955, hadoop/zookeeper/trunk/



svn commit: r789959 - in /hadoop/zookeeper/trunk: CHANGES.txt build.xml src/c/configure.ac src/c/include/zookeeper_version.h src/docs/src/documentation/content/xdocs/tabs.xml

2009-06-30 Thread phunt
Author: phunt
Date: Tue Jun 30 21:18:14 2009
New Revision: 789959

URL: http://svn.apache.org/viewvc?rev=789959view=rev
Log:
Preparing for release 3.3.0

Modified:
hadoop/zookeeper/trunk/CHANGES.txt
hadoop/zookeeper/trunk/build.xml
hadoop/zookeeper/trunk/src/c/configure.ac
hadoop/zookeeper/trunk/src/c/include/zookeeper_version.h
hadoop/zookeeper/trunk/src/docs/src/documentation/content/xdocs/tabs.xml

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=789959r1=789958r2=789959view=diff
==
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Tue Jun 30 21:18:14 2009
@@ -1,3 +1,18 @@
+Trunk
+
+Non-backward compatible changes:
+
+BUGFIXES: 
+
+Backward compatible changes:
+
+BUGFIXES: 
+
+IMPROVEMENTS:
+
+NEW FEATURES:
+
+
 Release 3.2.0 - 2009-06-30
 
 Non-backward compatible changes:

Modified: hadoop/zookeeper/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/build.xml?rev=789959r1=789958r2=789959view=diff
==
--- hadoop/zookeeper/trunk/build.xml (original)
+++ hadoop/zookeeper/trunk/build.xml Tue Jun 30 21:18:14 2009
@@ -24,7 +24,7 @@
 
 property environment=env/
 
-property name=version value=3.2.0 /
+property name=version value=3.3.0 /
 property name=final.name value=${name}-${version}/
 property name=revision.dir value=${basedir}/.revision /
 property name=revision.properties value=revision.properties /

Modified: hadoop/zookeeper/trunk/src/c/configure.ac
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/c/configure.ac?rev=789959r1=789958r2=789959view=diff
==
--- hadoop/zookeeper/trunk/src/c/configure.ac (original)
+++ hadoop/zookeeper/trunk/src/c/configure.ac Tue Jun 30 21:18:14 2009
@@ -3,7 +3,7 @@
 
 AC_PREREQ(2.59)
 
-AC_INIT([zookeeper C 
client],3.2.0,[zookeeper-u...@hadoop.apache.org],[c-client-src])
+AC_INIT([zookeeper C 
client],3.3.0,[zookeeper-u...@hadoop.apache.org],[c-client-src])
 AC_CONFIG_SRCDIR([src/zookeeper.c])
 
 # initialize Doxygen support

Modified: hadoop/zookeeper/trunk/src/c/include/zookeeper_version.h
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/c/include/zookeeper_version.h?rev=789959r1=789958r2=789959view=diff
==
--- hadoop/zookeeper/trunk/src/c/include/zookeeper_version.h (original)
+++ hadoop/zookeeper/trunk/src/c/include/zookeeper_version.h Tue Jun 30 
21:18:14 2009
@@ -23,7 +23,7 @@
 #endif
 
 #define ZOO_MAJOR_VERSION 3
-#define ZOO_MINOR_VERSION 2
+#define ZOO_MINOR_VERSION 3
 #define ZOO_PATCH_VERSION 0
 
 #ifdef __cplusplus

Modified: 
hadoop/zookeeper/trunk/src/docs/src/documentation/content/xdocs/tabs.xml
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/docs/src/documentation/content/xdocs/tabs.xml?rev=789959r1=789958r2=789959view=diff
==
--- hadoop/zookeeper/trunk/src/docs/src/documentation/content/xdocs/tabs.xml 
(original)
+++ hadoop/zookeeper/trunk/src/docs/src/documentation/content/xdocs/tabs.xml 
Tue Jun 30 21:18:14 2009
@@ -31,6 +31,6 @@
 
   tab label=Project href=http://hadoop.apache.org/zookeeper/; /
   tab label=Wiki href=http://wiki.apache.org/hadoop/ZooKeeper; /
-  tab label=ZooKeeper 3.2 Documentation dir= /
+  tab label=ZooKeeper 3.3 Documentation dir= /
   
 /tabs




svn commit: r789980 [2/2] - in /hadoop/zookeeper/branches/branch-3.2: docs/releasenotes.html docs/releasenotes.pdf src/docs/src/documentation/content/xdocs/releasenotes.xml

2009-06-30 Thread phunt
Modified: 
hadoop/zookeeper/branches/branch-3.2/src/docs/src/documentation/content/xdocs/releasenotes.xml
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.2/src/docs/src/documentation/content/xdocs/releasenotes.xml?rev=789980r1=789979r2=789980view=diff
==
--- 
hadoop/zookeeper/branches/branch-3.2/src/docs/src/documentation/content/xdocs/releasenotes.xml
 (original)
+++ 
hadoop/zookeeper/branches/branch-3.2/src/docs/src/documentation/content/xdocs/releasenotes.xml
 Tue Jun 30 22:10:54 2009
@@ -18,7 +18,7 @@
 !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
-  titleZooKeeper 3.0.0 Release Notes/title
+  titleZooKeeper 3.2.0 Release Notes/title
 
   articleinfo
 legalnotice
@@ -36,204 +36,28 @@
   /articleinfo
 
 para
-These release notes include new developer and user facing incompatibilities, 
features, and major improvements.
+These release notes include new developer and user facing
+incompatibilities, features, and major improvements.
 /para
 
-itemizedlist
-  listitemparaulink url=#migrationMigration 
Instructions/ulink/para/listitem
-  listitemparaulink url=#changesChanges/ulink/para/listitem
-/itemizedlist
-
-section id=migration
-titleMigration Instructions when Upgrading to 3.0.0/title
-
-para
-emphasisYou should only have to read this section if you are upgrading from 
a previous version of ZooKeeper to version 3.0.0, otw skip down to ulink 
url=#changeschanges/ulink/emphasis
-/para
-
-para
-A small number of changes in this release have resulted in non-backward 
compatible Zookeeper client user code and server instance data. The following 
instructions provide details on how to migrate code and date from version 2.2.1 
to version 3.0.0.
-/para
-
-para
-Note: ZooKeeper increments the major version number (major.minor.fix) when 
backward incompatible changes are made to the source base. As part of the 
migration from SourceForge we changed the package structure 
(com.yahoo.zookeeper.* to org.apache.zookeeper.*) and felt it was a good time 
to incorporate some changes that we had been withholding. As a result the 
following will be required when migrating from 2.2.1 to 3.0.0 version of 
ZooKeeper.
-/para
-
-itemizedlist
-  listitemparaulink url=#migration_codeMigrating Client 
Code/ulink/para/listitem
-  listitemparaulink url=#migration_dataMigrating Server 
Data/ulink/para/listitem
-  listitemparaulink url=#migration_configMigrating Server 
Configuration/ulink/para/listitem
-/itemizedlist
-
-section id=migration_code
-titleMigrating Client Code/title
-
-para
-  The underlying client-server protocol has changed in version 3.0.0
-  of ZooKeeper. As a result clients must be upgraded along with
-  serving clusters to ensure proper operation of the system (old
-  pre-3.0.0 clients are not guaranteed to operate against upgraded
-  3.0.0 servers and vice-versa).
-/para
-
-section
-titleWatch Management/title
-
-para
-In previous releases of ZooKeeper any watches registered by clients were lost 
if the client lost a connection to a ZooKeeper server.
-This meant that developers had to track watches they were interested in and 
reregister them if a session disconnect event was recieved.
-In this release the client library tracks watches that a client has registered 
and reregisters the watches when a connection is made to a new server.
-Applications that still manually reregister interest should continue working 
properly as long as they are able to handle unsolicited watches.
-For example, an old application may register a watch for /foo and /goo, lose 
the connection, and reregister only /goo.
-As long as the application is able to recieve a notification for /foo, 
(probably ignoring it) the applications does not to be changes.
-One caveat to the watch management: it is possible to miss an event for the 
creation and deletion of a znode if watching for creation and both the create 
and delete happens while the client is disconnected from ZooKeeper.
-/para
-
-para
-This release also allows clients to specify call specific watch functions.
-This gives the developer the ability to modularize logic in different watch 
functions rather than cramming everything in the watch function attached to the 
ZooKeeper handle.
-Call specific watch functions receive all session events for as long as they 
are active, but will only receive the watch callbacks for which they are 
registered.
-/para
-/section
-
-section
-titleJava API/title
-
-orderedlist
-  listitemparaThe java package structure has changed from emphasis 
role=boldcom.yahoo.zookeeper*/emphasis to emphasis 
role=boldorg.apache.zookeeper*/emphasis. This will probably effect all of 
your java code which makes use of ZooKeeper APIs (typically import 
statements)/para/listitem
-  listitemparaA number of constants used in the client ZooKeeper API were 

svn commit: r789980 [1/2] - in /hadoop/zookeeper/branches/branch-3.2: docs/releasenotes.html docs/releasenotes.pdf src/docs/src/documentation/content/xdocs/releasenotes.xml

2009-06-30 Thread phunt
Author: phunt
Date: Tue Jun 30 22:10:54 2009
New Revision: 789980

URL: http://svn.apache.org/viewvc?rev=789980view=rev
Log:
Preparing for release 3.2.0

Modified:
hadoop/zookeeper/branches/branch-3.2/docs/releasenotes.html
hadoop/zookeeper/branches/branch-3.2/docs/releasenotes.pdf

hadoop/zookeeper/branches/branch-3.2/src/docs/src/documentation/content/xdocs/releasenotes.xml

Modified: hadoop/zookeeper/branches/branch-3.2/docs/releasenotes.html
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.2/docs/releasenotes.html?rev=789980r1=789979r2=789980view=diff
==
--- hadoop/zookeeper/branches/branch-3.2/docs/releasenotes.html (original)
+++ hadoop/zookeeper/branches/branch-3.2/docs/releasenotes.html Tue Jun 30 
22:10:54 2009
@@ -5,7 +5,7 @@
 meta content=Apache Forrest name=Generator
 meta name=Forrest-version content=0.8
 meta name=Forrest-skin-name content=pelt
-titleZooKeeper 3.0.0 Release Notes/title
+titleZooKeeper 3.2.0 Release Notes/title
 link type=text/css href=skin/basic.css rel=stylesheet
 link media=screen type=text/css href=skin/screen.css rel=stylesheet
 link media=print type=text/css href=skin/print.css rel=stylesheet
@@ -199,36 +199,11 @@
 a class=dida href=releasenotes.pdfimg alt=PDF -icon 
src=skin/images/pdfdoc.gif class=skinbr
 PDF/a
 /div
-h1ZooKeeper 3.0.0 Release Notes/h1
+h1ZooKeeper 3.2.0 Release Notes/h1
 div id=minitoc-area
 ul class=minitoc
 li
-a href=#migrationMigration Instructions when Upgrading to 3.0.0/a
-ul class=minitoc
-li
-a href=#migration_codeMigrating Client Code/a
-ul class=minitoc
-li
-a href=#Watch+ManagementWatch Management/a
-/li
-li
-a href=#Java+APIJava API/a
-/li
-li
-a href=#C+APIC API/a
-/li
-/ul
-/li
-li
-a href=#migration_dataMigrating Server Data/a
-/li
-li
-a href=#migration_configMigrating Server Configuration/a
-/li
-/ul
-/li
-li
-a href=#changesChanges Since ZooKeeper 2.2.1/a
+a href=#changesChanges Since ZooKeeper 3.1/a
 /li
 /ul
 /div
@@ -238,299 +213,32 @@
 
 
 p
-These release notes include new developer and user facing incompatibilities, 
features, and major improvements.
-/p
-
-
-ul
-  
-li
-p
-a href=#migrationMigration Instructions/a
-/p
-/li
-  
-li
-p
-a href=#changesChanges/a
+These release notes include new developer and user facing
+incompatibilities, features, and major improvements.
 /p
-/li
-
-/ul
 
 
-a name=N1001B/aa name=migration/a
-h2 class=h3Migration Instructions when Upgrading to 3.0.0/h2
-div class=section
-p
-
-emYou should only have to read this section if you are upgrading from a 
previous version of ZooKeeper to version 3.0.0, otw skip down to a 
href=#changeschanges/a/em
-
-/p
-p
-A small number of changes in this release have resulted in non-backward 
compatible Zookeeper client user code and server instance data. The following 
instructions provide details on how to migrate code and date from version 2.2.1 
to version 3.0.0.
-/p
-p
-Note: ZooKeeper increments the major version number (major.minor.fix) when 
backward incompatible changes are made to the source base. As part of the 
migration from SourceForge we changed the package structure 
(com.yahoo.zookeeper.* to org.apache.zookeeper.*) and felt it was a good time 
to incorporate some changes that we had been withholding. As a result the 
following will be required when migrating from 2.2.1 to 3.0.0 version of 
ZooKeeper.
-/p
-ul
-  
-li
-p
-a href=#migration_codeMigrating Client Code/a
-/p
-/li
-  
-li
-p
-a href=#migration_dataMigrating Server Data/a
-/p
-/li
-  
-li
-p
-a href=#migration_configMigrating Server Configuration/a
-/p
-/li
-
-/ul
-a name=N10045/aa name=migration_code/a
-h3 class=h4Migrating Client Code/h3
-p
-  The underlying client-server protocol has changed in version 3.0.0
-  of ZooKeeper. As a result clients must be upgraded along with
-  serving clusters to ensure proper operation of the system (old
-  pre-3.0.0 clients are not guaranteed to operate against upgraded
-  3.0.0 servers and vice-versa).
-/p
-a name=N1004E/aa name=Watch+Management/a
-h4Watch Management/h4
 p
-In previous releases of ZooKeeper any watches registered by clients were lost 
if the client lost a connection to a ZooKeeper server.
-This meant that developers had to track watches they were interested in and 
reregister them if a session disconnect event was recieved.
-In this release the client library tracks watches that a client has registered 
and reregisters the watches when a connection is made to a new server.
-Applications that still manually reregister interest should continue working 
properly as long as they are able to handle unsolicited watches.
-For example, an old application may register a watch for /foo and /goo, lose 
the connection, and reregister only /goo.
-As long as the application is able to recieve a notification for /foo, 
(probably ignoring it) the applications does not to be changes.
-One caveat to the watch management: it is possible

svn commit: r789982 - /hadoop/zookeeper/tags/release-3.2.0-rc0/

2009-06-30 Thread phunt
Author: phunt
Date: Tue Jun 30 22:13:40 2009
New Revision: 789982

URL: http://svn.apache.org/viewvc?rev=789982view=rev
Log:
ZooKeeper 3.2.0-rc0 release.

Added:
hadoop/zookeeper/tags/release-3.2.0-rc0/
  - copied from r789981, hadoop/zookeeper/branches/branch-3.2/



svn commit: r780828 - in /hadoop/zookeeper/trunk: ./ src/contrib/zkpython/src/test/

2009-06-01 Thread phunt
Author: phunt
Date: Mon Jun  1 21:00:09 2009
New Revision: 780828

URL: http://svn.apache.org/viewvc?rev=780828view=rev
Log:
ZOOKEEPER-421. zkpython run_tests.sh is missing #!

Modified:
hadoop/zookeeper/trunk/CHANGES.txt
hadoop/zookeeper/trunk/src/contrib/zkpython/src/test/connection_test.py   
(contents, props changed)
hadoop/zookeeper/trunk/src/contrib/zkpython/src/test/create_test.py   
(contents, props changed)
hadoop/zookeeper/trunk/src/contrib/zkpython/src/test/exists_test.py   
(contents, props changed)
hadoop/zookeeper/trunk/src/contrib/zkpython/src/test/get_set_test.py   
(contents, props changed)
hadoop/zookeeper/trunk/src/contrib/zkpython/src/test/run_tests.sh
hadoop/zookeeper/trunk/src/contrib/zkpython/src/test/zktestbase.py   
(contents, props changed)

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=780828r1=780827r2=780828view=diff
==
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Mon Jun  1 21:00:09 2009
@@ -108,6 +108,9 @@
   ZOOKEEPER-419. Reference counting bug in Python bindings causes abort errors
   (henry robinson via phunt)
 
+  ZOOKEEPER-421. zkpython run_tests.sh is missing #!
+  (henry robinson via phunt)
+
 IMPROVEMENTS:
   ZOOKEEPER-308. improve the atomic broadcast performance 3x.
   (breed via mahadev)

Modified: 
hadoop/zookeeper/trunk/src/contrib/zkpython/src/test/connection_test.py
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/contrib/zkpython/src/test/connection_test.py?rev=780828r1=780827r2=780828view=diff
==
--- hadoop/zookeeper/trunk/src/contrib/zkpython/src/test/connection_test.py 
(original)
+++ hadoop/zookeeper/trunk/src/contrib/zkpython/src/test/connection_test.py Mon 
Jun  1 21:00:09 2009
@@ -1,3 +1,5 @@
+#!/usr/bin/python
+#
 #  Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
 # distributed with this work for additional information

Propchange: 
hadoop/zookeeper/trunk/src/contrib/zkpython/src/test/connection_test.py
--
svn:executable = *

Modified: hadoop/zookeeper/trunk/src/contrib/zkpython/src/test/create_test.py
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/contrib/zkpython/src/test/create_test.py?rev=780828r1=780827r2=780828view=diff
==
--- hadoop/zookeeper/trunk/src/contrib/zkpython/src/test/create_test.py 
(original)
+++ hadoop/zookeeper/trunk/src/contrib/zkpython/src/test/create_test.py Mon Jun 
 1 21:00:09 2009
@@ -1,3 +1,5 @@
+#!/usr/bin/python
+#
 #  Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
 # distributed with this work for additional information

Propchange: hadoop/zookeeper/trunk/src/contrib/zkpython/src/test/create_test.py
--
svn:executable = *

Modified: hadoop/zookeeper/trunk/src/contrib/zkpython/src/test/exists_test.py
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/contrib/zkpython/src/test/exists_test.py?rev=780828r1=780827r2=780828view=diff
==
--- hadoop/zookeeper/trunk/src/contrib/zkpython/src/test/exists_test.py 
(original)
+++ hadoop/zookeeper/trunk/src/contrib/zkpython/src/test/exists_test.py Mon Jun 
 1 21:00:09 2009
@@ -1,3 +1,5 @@
+#!/usr/bin/python
+#
 #  Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
 # distributed with this work for additional information

Propchange: hadoop/zookeeper/trunk/src/contrib/zkpython/src/test/exists_test.py
--
svn:executable = *

Modified: hadoop/zookeeper/trunk/src/contrib/zkpython/src/test/get_set_test.py
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/contrib/zkpython/src/test/get_set_test.py?rev=780828r1=780827r2=780828view=diff
==
--- hadoop/zookeeper/trunk/src/contrib/zkpython/src/test/get_set_test.py 
(original)
+++ hadoop/zookeeper/trunk/src/contrib/zkpython/src/test/get_set_test.py Mon 
Jun  1 21:00:09 2009
@@ -1,3 +1,5 @@
+#!/usr/bin/python
+#
 #  Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
 # distributed with this work for additional information

Propchange: hadoop/zookeeper/trunk/src/contrib/zkpython/src/test/get_set_test.py

svn commit: r779716 - in /hadoop/zookeeper/trunk: CHANGES.txt src/contrib/zkpython/src/c/zookeeper.c

2009-05-28 Thread phunt
Author: phunt
Date: Thu May 28 18:31:15 2009
New Revision: 779716

URL: http://svn.apache.org/viewvc?rev=779716view=rev
Log:
ZOOKEEPER-419. Reference counting bug in Python bindings causes abort errors

Modified:
hadoop/zookeeper/trunk/CHANGES.txt
hadoop/zookeeper/trunk/src/contrib/zkpython/src/c/zookeeper.c

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=779716r1=779715r2=779716view=diff
==
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Thu May 28 18:31:15 2009
@@ -96,11 +96,17 @@
 
   ZOOKEEPER-385. crctest failed on hudson patch test (mahadev via phunt)
 
-  ZOOKEEPER-192.  trailing whitespace in config file can cause number format 
exceptions (phunt via breed)
+  ZOOKEEPER-192.  trailing whitespace in config file can cause number format
+  exceptions (phunt via breed)
  
-  ZOOKEEPER-409. address all findbugs warnings in jute related classes (phunt 
via breed)
+  ZOOKEEPER-409. address all findbugs warnings in jute related classes
+  (phunt via breed)
 
-  ZOOKEEPER-416. bookkeeper jar includes unnnecessary files. (flavio via 
mahadev)
+  ZOOKEEPER-416. bookkeeper jar includes unnnecessary files.
+  (flavio via mahadev)
+
+  ZOOKEEPER-419. Reference counting bug in Python bindings causes abort errors
+  (henry robinson via phunt)
 
 IMPROVEMENTS:
   ZOOKEEPER-308. improve the atomic broadcast performance 3x.

Modified: hadoop/zookeeper/trunk/src/contrib/zkpython/src/c/zookeeper.c
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/contrib/zkpython/src/c/zookeeper.c?rev=779716r1=779715r2=779716view=diff
==
--- hadoop/zookeeper/trunk/src/contrib/zkpython/src/c/zookeeper.c (original)
+++ hadoop/zookeeper/trunk/src/contrib/zkpython/src/c/zookeeper.c Thu May 28 
18:31:15 2009
@@ -190,7 +190,7 @@
   pywatcher_t *pyw = (pywatcher_t*)data;
   PyObject *callback = pyw-callback;
   gstate = PyGILState_Ensure();
-  PyObject *arglist = Py_BuildValue((i,i,O), pyw-zhandle,rc, 
build_stat(stat));
+  PyObject *arglist = Py_BuildValue((i,i,N), pyw-zhandle,rc, 
build_stat(stat));
   if (PyObject_CallObject((PyObject*)callback, arglist) == NULL)
 PyErr_Print();
   free_pywatcher(pyw);
@@ -655,7 +655,7 @@
   return NULL;
 }
 
-  return Py_BuildValue(O, build_stat(stat));
+  return build_stat(stat);
 }
 
 static PyObject *pyzoo_get(PyObject *self, PyObject *args)
@@ -684,7 +684,7 @@
   return NULL;
 }
 
-  return Py_BuildValue( (s#,O), buffer,buffer_len, stat_dict );
+  return Py_BuildValue( (s#,N), buffer,buffer_len, stat_dict );
 }
 
 PyObject *pyzoo_get_acl(PyObject *self, PyObject *args)
@@ -703,7 +703,7 @@
 }
   PyObject *pystat = build_stat( stat );
   PyObject *acls = build_acls( acl );
-  return Py_BuildValue( (O,O), pystat, acls );
+  return Py_BuildValue( (N,N), pystat, acls );
 }
 
 PyObject *pyzoo_set_acl(PyObject *self, PyObject *args)




svn commit: r777413 - in /hadoop/zookeeper/trunk: CHANGES.txt src/c/tests/TestClient.cc

2009-05-22 Thread phunt
Author: phunt
Date: Fri May 22 07:25:21 2009
New Revision: 777413

URL: http://svn.apache.org/viewvc?rev=777413view=rev
Log:
ZOOKEEPER-415. zookeeper c tests hang.

Modified:
hadoop/zookeeper/trunk/CHANGES.txt
hadoop/zookeeper/trunk/src/c/tests/TestClient.cc

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=777413r1=777412r2=777413view=diff
==
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Fri May 22 07:25:21 2009
@@ -92,6 +92,8 @@
   ZOOKEEPER-402. zookeeper c library segfaults on data for a node in zookeeper
   being null. (mahadev via phunt)
 
+  ZOOKEEPER-415. zookeeper c tests hang. (mahadev via phunt)
+
 IMPROVEMENTS:
   ZOOKEEPER-308. improve the atomic broadcast performance 3x.
   (breed via mahadev)

Modified: hadoop/zookeeper/trunk/src/c/tests/TestClient.cc
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/c/tests/TestClient.cc?rev=777413r1=777412r2=777413view=diff
==
--- hadoop/zookeeper/trunk/src/c/tests/TestClient.cc (original)
+++ hadoop/zookeeper/trunk/src/c/tests/TestClient.cc Fri May 22 07:25:21 2009
@@ -116,6 +116,7 @@
 evt_t getEvent() {
 evt_t evt;
 mutex.acquire();
+CPPUNIT_ASSERT( events.size()  0);
 evt = events.front();
 events.pop_front();
 mutex.release();
@@ -602,11 +603,13 @@
 CPPUNIT_ASSERT_EQUAL_MESSAGE(evt.path, ZOO_CHANGED_EVENT, evt.type);
 CPPUNIT_ASSERT_EQUAL(string(/watchtest/child), evt.path);
 
+CPPUNIT_ASSERT_MESSAGE(testName, waitForEvent(zk, ctxLocal, 5));
 // The create will trigget the get children and the
 // exists watches
 evt = ctxLocal-getEvent();
 CPPUNIT_ASSERT_EQUAL_MESSAGE(evt.path, ZOO_CREATED_EVENT, evt.type);
 CPPUNIT_ASSERT_EQUAL(string(/watchtest/child2), evt.path);
+CPPUNIT_ASSERT_MESSAGE(testName, waitForEvent(zk, ctxLocal, 5));
 evt = ctxLocal-getEvent();
 CPPUNIT_ASSERT_EQUAL_MESSAGE(evt.path, ZOO_CHILD_EVENT, evt.type);
 CPPUNIT_ASSERT_EQUAL(string(/watchtest), evt.path);
@@ -653,7 +656,8 @@
 evt = ctxLocal-getEvent();
 CPPUNIT_ASSERT_EQUAL_MESSAGE(evt.path, ZOO_DELETED_EVENT, evt.type);
 CPPUNIT_ASSERT_EQUAL(string(/watchtest/child2), evt.path);
-
+
+CPPUNIT_ASSERT_MESSAGE(testName, waitForEvent(zk, ctxLocal, 5));
 evt = ctxLocal-getEvent();
 CPPUNIT_ASSERT_EQUAL_MESSAGE(evt.path, ZOO_CHILD_EVENT, evt.type);
 CPPUNIT_ASSERT_EQUAL(string(/watchtest), evt.path);




svn commit: r769882 - in /hadoop/zookeeper/trunk: CHANGES.txt src/c/tests/TestClient.cc

2009-04-29 Thread phunt
Author: phunt
Date: Wed Apr 29 19:11:39 2009
New Revision: 769882

URL: http://svn.apache.org/viewvc?rev=769882view=rev
Log:
ZOOKEEPER-382. zookeeper cpp tests fails on 64 bit machines with gcc 4.1.2

Modified:
hadoop/zookeeper/trunk/CHANGES.txt
hadoop/zookeeper/trunk/src/c/tests/TestClient.cc

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=769882r1=769881r2=769882view=diff
==
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Wed Apr 29 19:11:39 2009
@@ -64,6 +64,9 @@
   ZOOKEEPER-377. running ant cppunit tests, a failure still results in 
   BUILD SUCCESSFUL (giri via mahadev)
 
+  ZOOKEEPER-382. zookeeper cpp tests fails on 64 bit machines with gcc 4.1.2
+  (mahadev via phunt)
+
 IMPROVEMENTS:
   ZOOKEEPER-308. improve the atomic broadcast performance 3x.
   (breed via mahadev)

Modified: hadoop/zookeeper/trunk/src/c/tests/TestClient.cc
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/c/tests/TestClient.cc?rev=769882r1=769881r2=769882view=diff
==
--- hadoop/zookeeper/trunk/src/c/tests/TestClient.cc (original)
+++ hadoop/zookeeper/trunk/src/c/tests/TestClient.cc Wed Apr 29 19:11:39 2009
@@ -270,7 +270,8 @@
 static zhandle_t *async_zk;
 
 static void statCompletion(int rc, const struct Stat *stat, const void 
*data) {
-CPPUNIT_ASSERT_EQUAL((int)data, rc);
+int tmp = (int) (long) data;
+CPPUNIT_ASSERT_EQUAL(tmp, rc);
 }
 
 static void stringCompletion(int rc, const char *value, const void *data) {
@@ -288,7 +289,8 @@
 }
 
 static void voidCompletion(int rc, const void *data) {
-CPPUNIT_ASSERT_EQUAL((int)data, rc);
+int tmp = (int) (long) data;
+CPPUNIT_ASSERT_EQUAL(tmp, rc);
 }
 
 static void verifyCreateFails(const char *path, zhandle_t *zk) {




svn commit: r767596 [3/3] - in /hadoop/zookeeper/trunk: CHANGES.txt build.xml src/java/lib/jdiff/ src/java/lib/jdiff/zookeeper_3.1.1.xml

2009-04-22 Thread phunt
Propchange: hadoop/zookeeper/trunk/src/java/lib/jdiff/zookeeper_3.1.1.xml
--
svn:eol-style = native




svn commit: r767596 [1/3] - in /hadoop/zookeeper/trunk: CHANGES.txt build.xml src/java/lib/jdiff/ src/java/lib/jdiff/zookeeper_3.1.1.xml

2009-04-22 Thread phunt
Author: phunt
Date: Wed Apr 22 17:52:22 2009
New Revision: 767596

URL: http://svn.apache.org/viewvc?rev=767596view=rev
Log:
ZOOKEEPER-371. jdiff documentation included in build/release

Added:
hadoop/zookeeper/trunk/src/java/lib/jdiff/
hadoop/zookeeper/trunk/src/java/lib/jdiff/zookeeper_3.1.1.xml   (with props)
Modified:
hadoop/zookeeper/trunk/CHANGES.txt
hadoop/zookeeper/trunk/build.xml

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=767596r1=767595r2=767596view=diff
==
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Wed Apr 22 17:52:22 2009
@@ -58,10 +58,11 @@
   ZOOKEEPER-367. RecoveryTest failure - unreasonable length IOException
   (mahadev via phunt)
 
-  ZOOKEEPER-346. remove the kill command fro mthe client port. (phunt via 
mahadev)
+  ZOOKEEPER-346. remove the kill command fro mthe client port.
+  (phunt via mahadev)
 
-  ZOOKEEPER-377. running ant cppunit tests, a failure still results in BUILD
-SUCCESSFUL (giri via mahadev)
+  ZOOKEEPER-377. running ant cppunit tests, a failure still results in 
+  BUILD SUCCESSFUL (giri via mahadev)
 
 IMPROVEMENTS:
   ZOOKEEPER-308. improve the atomic broadcast performance 3x.
@@ -106,6 +107,8 @@
 
 NEW FEATURES:
 
+  ZOOKEEPER-371. jdiff documentation included in build/release (giri via phunt)
+
 
 Release 3.1.0 - 2009-02-06
   

Modified: hadoop/zookeeper/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/build.xml?rev=767596r1=767595r2=767596view=diff
==
--- hadoop/zookeeper/trunk/build.xml (original)
+++ hadoop/zookeeper/trunk/build.xml Wed Apr 22 17:52:22 2009
@@ -117,7 +117,25 @@
 property name=make.cmd value=make/
 property name=test_patch_sh value=${test.src.dir}/bin/test-patch.sh/
 
-!-- == --
+   !-- jdiff.home property set --
+property name=jdiff.home value=${lib.dir}/
+property name=jdiff.version value=1.0.9/
+property name=xerces.version value=1.4.4/
+property name=jdiff.jar 
value=${jdiff.home}/jdiff-${jdiff.version}.jar/
+property name=xerces.jar 
value=${jdiff.home}/xerces-${xerces.version}.jar/
+property name=jdiff.build.dir value=${build.docs}/jdiff/
+property name=jdiff.xml.dir value=${lib.dir}/jdiff/
+property name=jdiff.stable value=3.1.1/
+property name=jdiff.stable.javadoc 
+
value=http://hadoop.apache.org/zookeeper/docs/r${jdiff.stable}/api//
+property name=jdiff.download.url 
+   
value=http://mirrors.ibiblio.org/pub/mirrors/maven2/jdiff/jdiff/${jdiff.version}/jdiff-${jdiff.version}.jar/
+property name=jdiff.jar value=${jdiff.home}/jdiff.jar/
+property name=xerces.download.url 
+   
value=http://mirrors.ibiblio.org/pub/mirrors/maven2/xerces/xerces/${xerces.version}/xerces-${xerces.version}.jar/
+property name=xerces.jar value=${jdiff.home}/xerces.jar/
+
+!-- == --
 !-- Macro definitions  --
 !-- == --
 macrodef name=macro_tar description=Worker Macro for tar
@@ -406,13 +424,14 @@
 !-- == --
 !----
 !-- == --
-target name=package depends=release-jar, javadoc, compile-test
+target name=package depends=release-jar, api-report, compile-test
 description=Build distribution
   mkdir dir=${dist.dir}/
   mkdir dir=${dist.dir}/lib/
   mkdir dir=${dist.dir}/contrib/
   mkdir dir=${dist.dir}/bin/
   mkdir dir=${dist.dir}/docs/
+  mkdir dir=${dist.dir}/docs/jdiff/
   mkdir dir=${dist.dir}/docs/api/
 
   copy todir=${dist.dir}/lib includeEmptyDirs=false
@@ -513,7 +532,11 @@
   delete dir=${docs.src}/build/
   delete dir=${src_generated.dir} /
   delete dir=${csrc_generated.dir} /
+  delete file=${jdiff.jar} /
+  delete file=${xerces.jar} /
+  delete file=${lib.dir}/Null.java/
   delete file=${lib.dir}/rats.jar /
+  delete file=${jdiff.xml.dir}/${name}_${version}.xml/ 
   delete file=${jar.name} /
   delete dir=${distribution}/
   delete dir=${revision.dir}/
@@ -899,4 +922,59 @@
/exec
  /target
 
+ target name=get-jdiff description=download jdiff and its 
dependencies
+   get src=${jdiff.download.url} dest=${jdiff.jar} 
usetimestamp=true/
+   get src=${xerces.download.url} dest=${xerces.jar} 
usetimestamp=true/
+ /target 
+
+ target name=api-xml depends=get-jdiff, javadoc, write-null
+   javadoc

svn commit: r763973 - /hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/common/PathUtils.java

2009-04-10 Thread phunt
Author: phunt
Date: Fri Apr 10 16:21:56 2009
New Revision: 763973

URL: http://svn.apache.org/viewvc?rev=763973view=rev
Log:
Adding a file missed in -- ZOOKEEPER-355. make validatePath non public in 
Zookeeper client api.

Added:

hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/common/PathUtils.java 
  (with props)

Added: 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/common/PathUtils.java
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/common/PathUtils.java?rev=763973view=auto
==
--- 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/common/PathUtils.java 
(added)
+++ 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/common/PathUtils.java 
Fri Apr 10 16:21:56 2009
@@ -0,0 +1,103 @@
+ /**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * License); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.zookeeper.common;
+
+
+/**
+ * Path related utilities
+ */
+public class PathUtils {
+   
+   /** validate the provided znode path string
+* @param path znode path string
+* @param isSequential if the path is being created
+* with a sequential flag
+* @throws IllegalArgumentException if the path is invalid
+*/
+   public static void validatePath(String path, boolean isSequential) 
+   throws IllegalArgumentException {
+   validatePath(isSequential? path + 1: path);
+   }
+   
+/**
+ * Validate the provided znode path string
+ * @param path znode path string
+ * @throws IllegalArgumentException if the path is invalid
+ */
+public static void validatePath(String path) throws 
IllegalArgumentException {
+if (path == null) {
+throw new IllegalArgumentException(Path cannot be null);
+}
+if (path.length() == 0) {
+throw new IllegalArgumentException(Path length must be  0);
+}
+if (path.charAt(0) != '/') {
+throw new IllegalArgumentException(
+ Path must start with / character);
+}
+if (path.length() == 1) { // done checking - it's the root
+return;
+}
+if (path.charAt(path.length() - 1) == '/') {
+throw new IllegalArgumentException(
+ Path must not end with / character);
+}
+
+String reason = null;
+char lastc = '/';
+char chars[] = path.toCharArray();
+char c;
+for (int i = 1; i  chars.length; lastc = chars[i], i++) {
+c = chars[i];
+
+if (c == 0) {
+reason = null character not allowed @ + i;
+break;
+} else if (c == '/'  lastc == '/') {
+reason = empty node name specified @ + i;
+break;
+} else if (c == '.'  lastc == '.') {
+if (chars[i-2] == '/' 
+((i + 1 == chars.length)
+|| chars[i+1] == '/')) {
+reason = relative paths not allowed @ + i;
+break;
+}
+} else if (c == '.') {
+if (chars[i-1] == '/' 
+((i + 1 == chars.length)
+|| chars[i+1] == '/')) {
+reason = relative paths not allowed @ + i;
+break;
+}
+} else if (c  '\u'  c  '\u001f'
+|| c  '\u007f'  c  '\u009F'
+|| c  '\ud800'  c  '\uf8ff'
+|| c  '\ufff0'  c  '\u') {
+reason = invalid charater @ + i;
+break;
+}
+}
+
+if (reason != null) {
+throw new IllegalArgumentException(
+Invalid path string \ + path + \ caused by  + 
reason);
+}
+}
+}

Propchange: 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/common/PathUtils.java
--
svn:eol-style = native




svn commit: r758142 - in /hadoop/zookeeper/tags: release-3.1.1-rc1/ release-3.1.1/

2009-03-24 Thread phunt
Author: phunt
Date: Wed Mar 25 05:23:53 2009
New Revision: 758142

URL: http://svn.apache.org/viewvc?rev=758142view=rev
Log:
ZooKeeper 3.1.1 release.

Added:
hadoop/zookeeper/tags/release-3.1.1/
  - copied from r758141, hadoop/zookeeper/tags/release-3.1.1-rc1/
Removed:
hadoop/zookeeper/tags/release-3.1.1-rc1/



svn commit: r752729 - in /hadoop/zookeeper/branches/branch-3.1: CHANGES.txt src/c/src/zookeeper.c src/c/tests/TestClient.cc

2009-03-11 Thread phunt
Author: phunt
Date: Thu Mar 12 00:42:14 2009
New Revision: 752729

URL: http://svn.apache.org/viewvc?rev=752729view=rev
Log:
ZOOKEEPER-309. core dump using zoo_get_acl()

Modified:
hadoop/zookeeper/branches/branch-3.1/CHANGES.txt
hadoop/zookeeper/branches/branch-3.1/src/c/src/zookeeper.c
hadoop/zookeeper/branches/branch-3.1/src/c/tests/TestClient.cc

Modified: hadoop/zookeeper/branches/branch-3.1/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.1/CHANGES.txt?rev=752729r1=752728r2=752729view=diff
==
--- hadoop/zookeeper/branches/branch-3.1/CHANGES.txt (original)
+++ hadoop/zookeeper/branches/branch-3.1/CHANGES.txt Thu Mar 12 00:42:14 2009
@@ -25,6 +25,8 @@
   ZOOKEEPER-333. helgrind thread issues identified in mt c client code
   (mahadev via phunt)
 
+  ZOOKEEPER-309. core dump using zoo_get_acl() (mahadev via phunt)
+
 IMPROVEMENTS:
 
   ZOOKEEPER-279. Allow specialization of quorum config parsing

Modified: hadoop/zookeeper/branches/branch-3.1/src/c/src/zookeeper.c
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.1/src/c/src/zookeeper.c?rev=752729r1=752728r2=752729view=diff
==
--- hadoop/zookeeper/branches/branch-3.1/src/c/src/zookeeper.c (original)
+++ hadoop/zookeeper/branches/branch-3.1/src/c/src/zookeeper.c Thu Mar 12 
00:42:14 2009
@@ -1680,7 +1680,6 @@
 if (rc == 0) {
 struct GetACLResponse res;
 deserialize_GetACLResponse(ia, reply, res);
-cptr-c.acl_result(rc, res.acl, res.stat, 
cptr-data);
 sc-u.acl.acl = res.acl;
 sc-u.acl.stat = res.stat;
 /* We don't deallocate since we are passing it back */

Modified: hadoop/zookeeper/branches/branch-3.1/src/c/tests/TestClient.cc
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/branches/branch-3.1/src/c/tests/TestClient.cc?rev=752729r1=752728r2=752729view=diff
==
--- hadoop/zookeeper/branches/branch-3.1/src/c/tests/TestClient.cc (original)
+++ hadoop/zookeeper/branches/branch-3.1/src/c/tests/TestClient.cc Thu Mar 12 
00:42:14 2009
@@ -159,6 +159,7 @@
 #ifdef THREADED
 CPPUNIT_TEST(testPathValidation);
 CPPUNIT_TEST(testPing);
+CPPUNIT_TEST(testAcl);
 CPPUNIT_TEST(testWatcherAutoResetWithGlobal);
 CPPUNIT_TEST(testWatcherAutoResetWithLocal);
 #endif
@@ -222,7 +223,7 @@
 sprintf(cmd, %s stop %s, ZKSERVER_CMD, getHostPorts());
 CPPUNIT_ASSERT(system(cmd) == 0);
 }
-
+
 void testPing()
 {
 watchctx_t ctxIdle;
@@ -296,6 +297,53 @@
   path, , 0, ZOO_OPEN_ACL_UNSAFE, 0, 0, 0));
 }
 
+
+/**
+   returns false if the vectors dont match
+**/
+bool compareAcl(struct ACL_vector acl1, struct ACL_vector acl2) {
+if (acl1.count != acl2.count) {
+return false;
+}
+struct ACL *aclval1 = acl1.data;
+struct ACL *aclval2 = acl2.data;
+if (aclval1-perms != aclval2-perms) {
+return false;
+}
+struct Id id1 = aclval1-id;
+struct Id id2 = aclval2-id;
+if (strcmp(id1.scheme, id2.scheme) != 0) {
+return false;
+}
+if (strcmp(id1.id, id2.id) != 0) {
+return false;
+}
+return true;
+}
+
+void testAcl() {
+int rc;
+struct String_vector strings;
+struct ACL_vector aclvec;
+struct Stat stat;
+watchctx_t ctx;
+zhandle_t *zk = createClient(ctx);
+rc = zoo_create(zk, /acl, , 0, 
+ZOO_OPEN_ACL_UNSAFE, 0, 0, 0);
+CPPUNIT_ASSERT_EQUAL((int)ZOK, rc);
+rc = zoo_get_acl(zk, /acl, aclvec, stat  );
+CPPUNIT_ASSERT_EQUAL((int) ZOK, rc);
+bool cmp = compareAcl(ZOO_OPEN_ACL_UNSAFE, aclvec);
+CPPUNIT_ASSERT_EQUAL(true, cmp);
+rc = zoo_set_acl(zk, /acl, -1, ZOO_READ_ACL_UNSAFE);
+CPPUNIT_ASSERT_EQUAL((int) ZOK, rc);
+rc = zoo_get_acl(zk, /acl, aclvec, stat);
+CPPUNIT_ASSERT_EQUAL((int) ZOK, rc);
+cmp = compareAcl(ZOO_READ_ACL_UNSAFE, aclvec);
+CPPUNIT_ASSERT_EQUAL(true, cmp);
+}
+
+
 void testPathValidation() {
 watchctx_t ctx;
 zhandle_t *zk = createClient(ctx);
@@ -376,7 +424,7 @@
 rc = zoo_acreate(zk, path, , 0,  ZOO_OPEN_ACL_UNSAFE, 0, 
stringCompletion, strdup(path));
 CPPUNIT_ASSERT_EQUAL((int)ZOK, rc);
 }
-
+
 yield(zk, 1);
 stopServer();
 CPPUNIT_ASSERT(ctx.waitForDisconnected(zk));
@@ -409,6 +457,7 @@
 rc = zoo_create(zk, /watchtest/child, , 0,
 ZOO_OPEN_ACL_UNSAFE, ZOO_EPHEMERAL, 0, 0

svn commit: r724936 - in /hadoop/zookeeper/trunk: CHANGES.txt docs/zookeeperAdmin.html docs/zookeeperAdmin.pdf src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml

2008-12-09 Thread phunt
Author: phunt
Date: Tue Dec  9 16:11:48 2008
New Revision: 724936

URL: http://svn.apache.org/viewvc?rev=724936view=rev
Log:
ZOOKEEPER-161. Content needed: Designing a ZooKeeper Deployment

Modified:
hadoop/zookeeper/trunk/CHANGES.txt
hadoop/zookeeper/trunk/docs/zookeeperAdmin.html
hadoop/zookeeper/trunk/docs/zookeeperAdmin.pdf

hadoop/zookeeper/trunk/src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=724936r1=724935r2=724936view=diff
==
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Tue Dec  9 16:11:48 2008
@@ -5,58 +5,62 @@
 Backward compatibile changes:
 
 BUGFIXES: 
-   ZOOKEEPER-211 Not all Mock tests are working (ben via phunt)
+  ZOOKEEPER-211. Not all Mock tests are working (ben via phunt)
 
-   ZOOKEEPER-223. change default level in root logger to INFO.
-   (pat via mahadev) 
+  ZOOKEEPER-223. change default level in root logger to INFO.
+  (pat via mahadev) 

-   ZOOKEEPER-212. fix the snapshot to be asynchronous. (mahadev and ben)
+  ZOOKEEPER-212. fix the snapshot to be asynchronous. (mahadev and ben)
 
-   ZOOKEEPER-213. fix programmer guide C api docs to be  in sync with latest
-   zookeeper.h (pat via mahadev)
+  ZOOKEEPER-213. fix programmer guide C api docs to be  in sync with latest
+  zookeeper.h (pat via mahadev)
 
-   ZOOKEEPER-219. fix events.poll timeout in watcher test to be longer.
-   (pat via mahadev)
+  ZOOKEEPER-219. fix events.poll timeout in watcher test to be longer.
+  (pat via mahadev)

-   ZOOKEEPER-217. Fix errors in config to be thrown as Exceptions. (mahadev)
+  ZOOKEEPER-217. Fix errors in config to be thrown as Exceptions. (mahadev)
 
-   ZOOKEEPER-228. fix apache header missing in DBTest. (mahadev)
+  ZOOKEEPER-228. fix apache header missing in DBTest. (mahadev)
 
-   ZOOKEEPER-218. fix the error in the barrier example code. (pat via mahadev)
+  ZOOKEEPER-218. fix the error in the barrier example code. (pat via mahadev)
 
-   ZOOKEEPER-206. documentation tab should contain the version number and 
-   other small site changes. (pat via mahadev) 
+  ZOOKEEPER-206. documentation tab should contain the version number and 
+  other small site changes. (pat via mahadev) 
 
-   ZOOKEEPER-226. fix exists calls that fail on server if node has null data.
-   (mahadev) 
+  ZOOKEEPER-226. fix exists calls that fail on server if node has null data.
+  (mahadev) 
 
-   ZOOKEEPER-204. SetWatches needs to be the first message after auth messages
-to the server (ben via mahadev)
+  ZOOKEEPER-204. SetWatches needs to be the first message after auth
+  messages to the server (ben via mahadev)
   
-   ZOOKEEPER-208. Zookeeper C client uses API that are not thread safe,
-causing crashes when multiple instances are active. (austin shoemaker, chris
-daroch and ben reed via mahadev) 
+  ZOOKEEPER-208. Zookeeper C client uses API that are not thread safe,
+  causing crashes when multiple instances are active.
+  (austin shoemaker, chris daroch and ben reed via mahadev) 
 
-   ZOOKEEPER-227. gcc warning from recordio.h (chris darroch via mahadev)
+  ZOOKEEPER-227. gcc warning from recordio.h (chris darroch via mahadev)
 
-   ZOOKEEPER-232. fix apache licence header in TestableZookeeper (mahadev)
+  ZOOKEEPER-232. fix apache licence header in TestableZookeeper (mahadev)
 
-   ZOOKEEPER-249. QuorumPeer.getClientPort() always returns -1. (nitay 
-joffe via mahadev)
+  ZOOKEEPER-249. QuorumPeer.getClientPort() always returns -1.
+  (nitay joffe via mahadev)
 
-  ZOOKEEPER-248.  QuorumPeer should use Map interface instead of 
-HashMap implementation. (nitay joffe via mahadev)
+  ZOOKEEPER-248.  QuorumPeer should use Map interface instead of HashMap
+  implementation. (nitay joffe via mahadev)
 
-  ZOOKEEPER-241. Build of a distro fails after clean target is run. (patrick
-hunt via mahadev)
+  ZOOKEEPER-241. Build of a distro fails after clean target is run.
+  (patrick hunt via mahadev)
 
 IMPROVEMENTS:

-   ZOOKEEPER-64. Log system env information when initializing server and
-client (pat via mahadev)
+  ZOOKEEPER-161. Content needed: Designing a ZooKeeper Deployment
+  (breed via phunt)
+
+  ZOOKEEPER-64. Log system env information when initializing server and
+  client (pat via mahadev)
+
+  ZOOKEEPER-243. add SEQUENCE flag documentation to the programming guide.
+  (patrick hunt via mahadev)
 
-   ZOOKEEPER-243. add SEQUENCE flag documentation to the programming guide.
-(patrick hunt via mahadev)
 
 Release 3.0.0 - 2008-10-21
 

Modified: hadoop/zookeeper/trunk/docs/zookeeperAdmin.html
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/docs/zookeeperAdmin.html?rev=724936r1=724935r2=724936view=diff
==
--- hadoop/zookeeper/trunk/docs

svn commit: r723115 - in /hadoop/zookeeper/tags: release-3.0.1-rc1/ release-3.0.1/

2008-12-03 Thread phunt
Author: phunt
Date: Wed Dec  3 14:53:33 2008
New Revision: 723115

URL: http://svn.apache.org/viewvc?rev=723115view=rev
Log:
ZooKeeper 3.0.1 release.

Added:
hadoop/zookeeper/tags/release-3.0.1/
  - copied from r723114, hadoop/zookeeper/tags/release-3.0.1-rc1/
Removed:
hadoop/zookeeper/tags/release-3.0.1-rc1/



svn commit: r706865 - in /hadoop/zookeeper/dist: HEADER.html KEYS

2008-10-22 Thread phunt
Author: phunt
Date: Tue Oct 21 23:29:54 2008
New Revision: 706865

URL: http://svn.apache.org/viewvc?rev=706865view=rev
Log:
added initial header.html and keys file (for phunt)

Added:
hadoop/zookeeper/dist/HEADER.html   (with props)
hadoop/zookeeper/dist/KEYS   (with props)

Added: hadoop/zookeeper/dist/HEADER.html
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/dist/HEADER.html?rev=706865view=auto
==
--- hadoop/zookeeper/dist/HEADER.html (added)
+++ hadoop/zookeeper/dist/HEADER.html Tue Oct 21 23:29:54 2008
@@ -0,0 +1,9 @@
+h1a href=http://hadoop.apache.org/zookeeper;ZooKeeper/a Releases/h1
+
+pPlease make sure you're downloading from a
+href=http://www.apache.org/dyn/closer.cgi/hadoop/zookeeper/;a nearby
+mirror site/a, not from www.apache.org./p
+
+pWe suggest downloading the current a href=stablestable/a release./p
+
+pOlder releases are available from the a 
href=http://archive.apache.org/dist/hadoop/zookeeper/;archives/a./p

Propchange: hadoop/zookeeper/dist/HEADER.html
--
svn:eol-style = native

Added: hadoop/zookeeper/dist/KEYS
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/dist/KEYS?rev=706865view=auto
==
--- hadoop/zookeeper/dist/KEYS (added)
+++ hadoop/zookeeper/dist/KEYS Tue Oct 21 23:29:54 2008
@@ -0,0 +1,35 @@
+pub   1024D/68E327C1 2008-10-22
+  Key fingerprint = D0BC 8D8A 4E90 A40A FDFC  43B3 E22A 746A 68E3 27C1
+uid  Patrick Hunt (ZooKeeper release signing key) [EMAIL 
PROTECTED]
+sub   2048g/279C600D 2008-10-22
+
+-BEGIN PGP PUBLIC KEY BLOCK-
+Version: GnuPG v1.4.6 (GNU/Linux)
+
+mQGiBEj+sa8RBACfP1oQOrzoIH+vaGFOR0hUNQ1tVFn8u8p0MJLtAzx3C3fXuLAQ
+lTAviPR5LpsVfnZtil/ysp8o5wlHPUrMDHwcrtDonxe404FaTclHfKcRhGE8T4wL
+9BvplKe04kT5E6vzyfuU9+Vza6SdVU8ZPd79CK/UNr2JpQ7x/NdXKupptwCg3B/Y
+Sxzze9vjlV1Xq9wNx2+Dc6MD/2Sm7u41EfTfq6v7NdXg9DY6+NBN95D+VBCjXr+T
+8ZnUTvXJN2KeLYFf5ozdtjfj0u+rlj57/bEpcEqBAoIy37cFakmI3aiNjP3RXqLx
+LrAgZVwUAHAN5kIPrVd4ZQ8OZyshH5WtSViWs/NQj4CerXQe3XmGEqU//iaAeFgv
+8ZgMA/0YlDS95tzEfhS/3LYhKUgsi+pxLhFv/h1oTF4HRIL4syzhJGe2Hwwy4/rT
+p1BdlOhatc4AjTDjjSx8R1sQaCu3jeWfz75CqbIJPcnu1dh1UDa+2EK/ykfQoNzN
+bmc+fttw/0McWhl0eBsI/0vg9yMkVIlUQwgn0qeruKcQBbqeqbQ/UGF0cmljayBI
+dW50IChab29LZWVwZXIgcmVsZWFzZSBzaWduaW5nIGtleSkgPHBodW50QGFwYWNo
+ZS5vcmc+iGAEExECACAFAkj+sa8CGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAAK
+CRDiKnRqaOMnwWYCAJ46DnpkBAYwgJW56dgnQc7VAOwmJgCgxb+Zo0kznrRKh+xw
+8fr+ZdqI/OW5Ag0ESP6xuhAIAKcqHEC9Orkl7qNBbSlECLZ8cuaSv7zZvIeE0DaD
+XwfspY0vNrE7RDBOcWPVttWZzYLssMquxodAXhFJQ7k4ETIM1D0cp9J7lFr+rAxq
+1ybhPNukJPOIKcmXGS9wr/oWbsonF8CsY2DX3hCSQqeL1qsLgNP/FA+1Bawhpz7P
+HpZqgu3qBNUNbShFTadXw/L7ru19/BlPaI4p0UFhbbf01XKd4kR5sdAxHWCkOvY1
+U4JAwty84xLQ1fU4Xc65u6Y/EpNq4dosJjfPEzxAFVZLhBNdarX0b8u/tJI138tn
+pGCSBvWNsdJX8zClmK1KDLf1ksWYbMagStuBbOzG4wBmjPcABAsH/1u4u32PgQ39
+3aqh5WT6lxjO3Dggc0BrtaSmxsoKPrisgiVIRS/C7XEK98T7832y8LUX0xAoRT6q
+Jyg+rvDc6PFt8Jde2j+q2UCCq68xO+Qad576BpKK448YHPo5PjjisgpXbp1AB4G7
+UrA4aW1fA+kqVOL1EebnWBmG37zgCntYnOwJJT/MT+shC4mM1u9lXfyV8JPqnYWY
+R7Hjq90bavKBUO0vA5s/791SceT1rBqgtNOSPA41A3Q38iBnGeo2Dh2kQdAZ8a5g
+fsEYQ/ZPhlxRkxhjfTCvWUbkh0b1fO5ZOZbeag+fR/GBI4SQmClRpD/66VhAzERL
+y9NfusDU8p+ISQQYEQIACQUCSP6xugIbDAAKCRDiKnRqaOMnwRPAAJkBcxNG0qZt
+ahF/8VAEXFBkiASz8QCeImay/25M8xvX/VmqMj1Vq88cUUU=
+=HKV3
+-END PGP PUBLIC KEY BLOCK-

Propchange: hadoop/zookeeper/dist/KEYS
--
svn:eol-style = native




svn commit: r706816 - in /hadoop/zookeeper/trunk: CHANGES.txt docs/releasenotes.html docs/releasenotes.pdf src/docs/src/documentation/content/xdocs/releasenotes.xml

2008-10-21 Thread phunt
Author: phunt
Date: Tue Oct 21 17:13:54 2008
New Revision: 706816

URL: http://svn.apache.org/viewvc?rev=706816view=rev
Log:
ZOOKEEPER-191. forrest docs for upgrade.

Modified:
hadoop/zookeeper/trunk/CHANGES.txt
hadoop/zookeeper/trunk/docs/releasenotes.html
hadoop/zookeeper/trunk/docs/releasenotes.pdf

hadoop/zookeeper/trunk/src/docs/src/documentation/content/xdocs/releasenotes.xml

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=706816r1=706815r2=706816view=diff
==
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Tue Oct 21 17:13:54 2008
@@ -2,6 +2,8 @@
 
 Non-backward compatible changes:
 
+  ZOOKEEPER-43. Server side of auto reset watches. (breed via mahadev)
+
   ZOOKEEPER-132. Create Enum to replace CreateFlag in ZooKepper.create 
   method (Jakob Homan via phunt)
 
@@ -31,12 +33,12 @@
   ZOOKEEPER-33. Better ACL management
   (mahadev)

-  ZOOKEEPER-43. Server side of auto reset watches.
-
 Backward compatibile changes:
 
   BUGFIXES: 
 
+  ZOOKEEPER-191. forrest docs for upgrade. (mahadev via phunt)
+
   ZOOKEEPER-201. validate magic number when reading snapshot and transaction
   logs (mahadev via phunt)
 

Modified: hadoop/zookeeper/trunk/docs/releasenotes.html
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/docs/releasenotes.html?rev=706816r1=706815r2=706816view=diff
==
--- hadoop/zookeeper/trunk/docs/releasenotes.html (original)
+++ hadoop/zookeeper/trunk/docs/releasenotes.html Tue Oct 21 17:13:54 2008
@@ -330,19 +330,123 @@
 
 /ul
 p
-The following must be run once, and only once, when upgrading the ZooKeeper 
server instances to version 3.0.0.
+  
+strongThe following must be run once, and only once, when upgrading the 
ZooKeeper server instances to version 3.0.0./strong
+
 /p
+div class=note
+div class=labelNote/div
+div class=content
+  
+p
+The lt;dataLogDirgt; and lt;dataDirgt; directories referenced
+below are specified by the emdataLogDir/em
+and emdataLogDir/em specification in your
+ZooKeeper config file
+respectively. emdataLogDir/em defaults to the
+value of emdataDir/em if not specified explicitly
+in the ZooKeeper server config file (in which case provide the
+same directory for both parameters to the upgrade utility).
+  /p
+
+/div
+/div
 ol
   
 li
-pTBD/p
+pShutdown the ZooKeeper server cluster./p
+/li
+  
+li
+pBackup your lt;dataLogDirgt; and lt;dataDirgt; directories/p
+/li
+  
+li
+pRun upgrade using/p
+
+ul
+  
+li
+p
+span class=codefrag computeroutputbin/zkServer.sh upgrade 
lt;dataLogDirgt; lt;dataDirgt;/span
+/p
+/li
+
+/ul
+
+por/p
+
+ul
+  
+li
+p
+span class=codefrag computeroutputjava -classpath 
pathtolog4j:pathtozookeeper.jar UpgradeMain lt;dataLogDirgt; 
lt;dataDirgt;/span
+/p
+/li
+
+/ul
+
+pwhere lt;dataLogDirgt; is the directory where all transaction logs 
(log.*) are stored. lt;dataDirgt; is the directory where all the snapshots 
(snapshot.*) are stored./p
+  
+/li
+  
+li
+pRestart the cluster. /p
 /li
+ 
+/ol
+p
+ If you have any failure during the upgrade procedure keep reading to sanitize 
your database. 
+ /p
+pThis is how upgrade works in ZooKeeper. This will help you troubleshoot in 
case you have problems while upgrading/p
+ol
 
+li
+pUpgrade moves files from lt;dataLogDirgt; and lt;dataDirgt; to 
lt;dataLogDirgt;/version-1/ and lt;dataDirgt;/version-1 respectively 
(version-1 sub-directory is created by the upgrade utility). /p
+/li
+ 
+li
+pUpgrade creates a new version sub-directory lt;dataDirgt;/version-2 and 
lt;dataLogDirgt;/version-2/p
+/li
+ 
+li
+pUpgrade reads the old database from lt;dataDirgt;/version-1 and 
lt;dataLogDirgt;/version-1 into the memory and creates a new upgraded 
snapshot. /p
+/li
+ 
+li
+pUpgrade writes the new database in lt;dataDirgt;/version-2.  /p
+/li
+ 
+/ol
+pTroubleshooting./p
+ol
+ 
+li
+pIn case you start ZooKeeper 3.0 without upgrading from 2.0 on a 2.0 
database - the servers will start up with an empty database.
+ This is because the servers assume that lt;dataDirgt;/version-2 and 
lt;dataLogDirgt;/version-2 will have the database to start with. Since this 
will be empty
+ in case of no upgrade, the servers will start with an empty database. In such 
a case, shutdown the ZooKeeper servers, remove the version-2 directory (remember
+ this will lead to loss of updates after you started 3.0.)
+ and then start the upgrade procedure./p
+/li
+ 
+li
+pIf the upgrade fails while trying to rename files into the version-1 
directory, you should try and move all the files under lt;dataDirgt;/version-1
+ and lt;dataLogDirgt;/version-1 to lt;dataDirgt; and lt;dataLogDirgt; 
respectively. Then try upgrade again.
+ /p
+ 
+/li
+ 
+li
+p If you do not wish to run with ZooKeeper

svn commit: r706852 - in /hadoop/zookeeper/trunk: CHANGES.txt docs/releasenotes.html docs/releasenotes.pdf src/docs/src/documentation/content/xdocs/releasenotes.xml

2008-10-21 Thread phunt
Author: phunt
Date: Tue Oct 21 20:47:09 2008
New Revision: 706852

URL: http://svn.apache.org/viewvc?rev=706852view=rev
Log:
ZOOKEEPER-203. fix datadir typo in releasenotes

Modified:
hadoop/zookeeper/trunk/CHANGES.txt
hadoop/zookeeper/trunk/docs/releasenotes.html
hadoop/zookeeper/trunk/docs/releasenotes.pdf

hadoop/zookeeper/trunk/src/docs/src/documentation/content/xdocs/releasenotes.xml

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=706852r1=706851r2=706852view=diff
==
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Tue Oct 21 20:47:09 2008
@@ -37,6 +37,8 @@
 
   BUGFIXES: 
 
+  ZOOKEEPER-203. fix datadir typo in releasenotes (phunt)
+
   ZOOKEEPER-145. write detailed release notes for users migrating from 2.x
   to 3.0 (phunt)
 

Modified: hadoop/zookeeper/trunk/docs/releasenotes.html
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/docs/releasenotes.html?rev=706852r1=706851r2=706852view=diff
==
--- hadoop/zookeeper/trunk/docs/releasenotes.html (original)
+++ hadoop/zookeeper/trunk/docs/releasenotes.html Tue Oct 21 20:47:09 2008
@@ -376,7 +376,7 @@
 p
 The lt;dataLogDirgt; and lt;dataDirgt; directories referenced
 below are specified by the emdataLogDir/em
-and emdataLogDir/em specification in your
+and emdataDir/em specification in your
 ZooKeeper config file
 respectively. emdataLogDir/em defaults to the
 value of emdataDir/em if not specified explicitly

Modified: hadoop/zookeeper/trunk/docs/releasenotes.pdf
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/docs/releasenotes.pdf?rev=706852r1=706851r2=706852view=diff
==
Binary files - no diff available.

Modified: 
hadoop/zookeeper/trunk/src/docs/src/documentation/content/xdocs/releasenotes.xml
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/docs/src/documentation/content/xdocs/releasenotes.xml?rev=706852r1=706851r2=706852view=diff
==
--- 
hadoop/zookeeper/trunk/src/docs/src/documentation/content/xdocs/releasenotes.xml
 (original)
+++ 
hadoop/zookeeper/trunk/src/docs/src/documentation/content/xdocs/releasenotes.xml
 Tue Oct 21 20:47:09 2008
@@ -142,7 +142,7 @@
   para
 The lt;dataLogDirgt; and lt;dataDirgt; directories referenced
 below are specified by the emphasisdataLogDir/emphasis
-and emphasisdataLogDir/emphasis specification in your
+and emphasisdataDir/emphasis specification in your
 ZooKeeper config file
 respectively. emphasisdataLogDir/emphasis defaults to the
 value of emphasisdataDir/emphasis if not specified explicitly




svn commit: r706860 - /hadoop/zookeeper/branches/branch-3.0/

2008-10-21 Thread phunt
Author: phunt
Date: Tue Oct 21 22:45:32 2008
New Revision: 706860

URL: http://svn.apache.org/viewvc?rev=706860view=rev
Log:
Branching for 3.0 releases

Added:
hadoop/zookeeper/branches/branch-3.0/
  - copied from r706859, hadoop/zookeeper/trunk/



svn commit: r706861 - in /hadoop/zookeeper/trunk: CHANGES.txt build.xml

2008-10-21 Thread phunt
Author: phunt
Date: Tue Oct 21 22:48:26 2008
New Revision: 706861

URL: http://svn.apache.org/viewvc?rev=706861view=rev
Log:
Preparing for 3.1.0 development

Modified:
hadoop/zookeeper/trunk/CHANGES.txt
hadoop/zookeeper/trunk/build.xml

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=706861r1=706860r2=706861view=diff
==
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Tue Oct 21 22:48:26 2008
@@ -1,3 +1,13 @@
+Trunk
+
+Non-backward compatible changes:
+
+Backward compatibile changes:
+
+  BUGFIXES: 
+
+
+
 Release 3.0.0 - 2008-10-21
 
 Non-backward compatible changes:

Modified: hadoop/zookeeper/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/build.xml?rev=706861r1=706860r2=706861view=diff
==
--- hadoop/zookeeper/trunk/build.xml (original)
+++ hadoop/zookeeper/trunk/build.xml Tue Oct 21 22:48:26 2008
@@ -24,7 +24,7 @@
 
 property environment=env/
 
-property name=version value=3.0.0 /
+property name=version value=3.1.0 /
 property name=final.name value=${name}-${version}/
 property name=revision.dir value=${basedir}/.revision /
 property name=revision.properties value=revision.properties /




svn commit: r705380 - in /hadoop/zookeeper/trunk: ./ docs/ src/docs/src/documentation/content/xdocs/

2008-10-16 Thread phunt
Author: phunt
Date: Thu Oct 16 15:31:23 2008
New Revision: 705380

URL: http://svn.apache.org/viewvc?rev=705380view=rev
Log:
ZOOKEEPER-194. Fix terminology in zookeeperAdmin.xml

Modified:
hadoop/zookeeper/trunk/CHANGES.txt
hadoop/zookeeper/trunk/docs/zookeeperAdmin.html
hadoop/zookeeper/trunk/docs/zookeeperAdmin.pdf
hadoop/zookeeper/trunk/docs/zookeeperOver.html
hadoop/zookeeper/trunk/docs/zookeeperOver.pdf
hadoop/zookeeper/trunk/docs/zookeeperProgrammers.html
hadoop/zookeeper/trunk/docs/zookeeperProgrammers.pdf

hadoop/zookeeper/trunk/src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml

hadoop/zookeeper/trunk/src/docs/src/documentation/content/xdocs/zookeeperOver.xml

hadoop/zookeeper/trunk/src/docs/src/documentation/content/xdocs/zookeeperProgrammers.xml

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=705380r1=705379r2=705380view=diff
==
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Thu Oct 16 15:31:23 2008
@@ -35,6 +35,9 @@
 
   BUGFIXES: 
 
+  ZOOKEEPER-194. Fix terminology in zookeeperAdmin.xml
+  (Flavio Paiva Junqueira)
+
   ZOOKEEPER-151. Document change to server configuration
   (Flavio Paiva Junqueira)
 

Modified: hadoop/zookeeper/trunk/docs/zookeeperAdmin.html
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/docs/zookeeperAdmin.html?rev=705380r1=705379r2=705380view=diff
==
--- hadoop/zookeeper/trunk/docs/zookeeperAdmin.html (original)
+++ hadoop/zookeeper/trunk/docs/zookeeperAdmin.html Thu Oct 16 15:31:23 2008
@@ -316,23 +316,24 @@
 a name=N10032/aa name=sc_systemReq/a
 h3 class=h4System Requirements/h3
 pZooKeeper runs in Java, release 1.5 or greater (JDK 5 or greater).
-  It runs as group of hosts called a quorum. Three ZooKeeper hosts per
-  quorum is the minimum recommended quorum size. At Yahoo!, ZooKeeper is
-  usually deployed on dedicated RHEL boxes, with dual-core processors, 2GB
-  of RAM, and 80GB IDE hard drives./p
-a name=N1003C/aa name=sc_zkMulitServerSetup/a
+  It runs as an emensemble/em of ZooKeeper servers. Three ZooKeeper
+  servers is the minimum recommended size for an ensemble, and we also 
recommend that
+  they run on separate machines. At Yahoo!, ZooKeeper is usually deployed 
on 
+  dedicated RHEL boxes, with dual-core processors, 2GB of RAM, and 80GB 
IDE hard 
+  drives./p
+a name=N1003F/aa name=sc_zkMulitServerSetup/a
 h3 class=h4Clustered (Multi-Server) Setup/h3
 pFor reliable ZooKeeper service, you should deploy ZooKeeper in a
-  cluster known as a emquorum/em. As long as a majority
-  of the quorum are up, the service will be available. Because Zookeeper
+  cluster known as an emensemble/em. As long as a majority
+  of the ensemble are up, the service will be available. Because Zookeeper
   requires a majority, it is best to use an
   odd number of machines. For example, with four machines ZooKeeper can
   only handle the failure of a single machine; if two machines fail, the
   remaining two machines do not constitute a majority. However, with five
   machines ZooKeeper can handle the failure of two machines. /p
-pHere are the steps to setting a server that will be part of a
-  quorum. These steps should be performed on every host in the
-  quorum:/p
+pHere 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:/p
 ol
 
 li
@@ -401,8 +402,8 @@
   though about a few here:/p
 
   
-pEvery machine that is part of the ZooKeeper quorum should know
-  about every other machine in the quorum. You accomplish this with
+pEvery machine that is part of the ZooKeeper ensemble should know
+  about every other machine in the ensemble. You accomplish this with
   the series of lines of the form 
strongserver.id=host:port:port/strong. The parameters stronghost/strong 
and strongport/strong are straightforward. You attribute the
   server id to each machine by creating a file named
   span class=codefrag filenamemyid/span, one for each server, 
which resides in
@@ -411,7 +412,7 @@
   consists of a single line containing only the text of that machine's
   id. So span class=codefrag filenamemyid/span of server 1 would 
contain the text
   1 and nothing else. The id must be unique within the
-  quorum./p
+  ensemble./p
 
 /li
 
@@ -488,7 +489,7 @@
 /li
   
 /ol
-a name=N100D0/aa name=sc_singleAndDevSetup/a
+a name=N100D3/aa name=sc_singleAndDevSetup/a
 h3 class=h4Single Server and Developer Setup/h3
 pIf you want to setup ZooKeeper for development purposes, you will
   probably

svn commit: r704686 - in /hadoop/zookeeper/trunk: CHANGES.txt src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java

2008-10-14 Thread phunt
Author: phunt
Date: Tue Oct 14 14:09:46 2008
New Revision: 704686

URL: http://svn.apache.org/viewvc?rev=704686view=rev
Log:
ZOOKEEPER-188. Check that election port is present for all servers --- also 
addressed some missing items in changes.txt

Modified:
hadoop/zookeeper/trunk/CHANGES.txt

hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java

hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=704686r1=704685r2=704686view=diff
==
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Tue Oct 14 14:09:46 2008
@@ -35,6 +35,11 @@
 
   BUGFIXES: 
 
+  ZOOKEEPER-188. Check that election port is present for all servers
+  (Flavio Paiva Junqueira via phunt)
+
+  ZOOKEEPER-185. Improved version of FLETest (Flavio Paiva Junqueira)
+
   ZOOKEEPER-184. tests: An explicit include derective is needed for the usage
   of memcpy(), memset(), strlen(), strdup() and free() functions
   (Maxim P. Dementiev via phunt)
@@ -56,6 +61,8 @@
   ZOOKEEPER-179. Programmer's Guide Basic Operations section is missing 
   content (robbie via phunt)
 
+  ZOOKEEPER-178. FLE test. (Flavio Paiva Junqueira)
+
   ZOOKEEPER-159. Cover two corner cases of leader election
   (Flavio Paiva Junqueira via phunt)
 
@@ -65,14 +72,24 @@
   ZOOKEEPER-154. reliability graph diagram in overview doc needs context
   (phunt)
 
+  ZOOKEEPER-157. Peer can't find existing leader (Flavio Paiva Junqueira)
+
   ZOOKEEPER-155. improve the zookeeper project section of overview doc
   (phunt)
 
+  ZOOKEEPER-140. Deadlock in QuorumCnxManager (Flavio Paiva Junqueira)
+
   ZOOKEEPER-147. This is version of the documents with most of the [tbd...]
   scrubbed out (robbie via phunt)
 
   ZOOKEEPER-150. zookeeper build broken (mahadev via phunt)
 
+  ZOOKEEPER-136. sync causes hang in all followers of quorum. (breed)
+
+  ZOOKEEPER-134. findbugs cleanup (phunt)
+
+  ZOOKEEPER-133. hudson tests failing intermittently (phunt)
+
   ZOOKEEPER-144. add tostring support for watcher event, and enums for event
   type/state (Jakob Homan via phunt)
 
@@ -96,11 +113,23 @@
   ZOOKEEPER-118. findbugs flagged switch statement in 
   followerrequestprocessor.run() (Flavio Paiva Junqueira via phunt)
 
+  ZOOKEEPER-115. Potential NPE in QuorumCnxManager
+  (Flavio Paiva Junqueira)
+
+  ZOOKEEPER-114. cleanup ugly event messages in zookeeper client 
+  (Jakob Homan)
+
+  ZOOKEEPER-112. src/java/main ZooKeeper.java has test code embedded into it.
+  (phunt)
+
   ZOOKEEPER-39. Use Watcher objects rather than boolean on read operations.
   (Andrew Kornev)
 
   ZOOKEEPER-97. supports optional output directory in code generator. (Hiram
   Chirino via phunt)
+
+  ZOOKEEPER-101. Integrate ZooKeeper with violations feature on hudson
+  (phunt)
  
   ZOOKEEPER-105. Catch Zookeeper exceptions and print on the stderr. 
   (Anthony Urso via Mahadev)
@@ -120,8 +149,23 @@
   ZOOKEEPER-25. Fuse module for Zookeeper. (Swee Lim, Bart, Patrick Hunt and
   Andrew Kornev via Mahadev)
 
+  ZOOKEEPER-58. Race condition on ClientCnxn.java (breed)
+
   ZOOKEEPER-56. Add clover support to build.xml. (Patrick Hunt via mahadev)
 
+  ZOOKEEPER-75. register the ZooKeeper mailing lists with nabble.com (phunt)
+  
+  ZOOKEEPER-54. remove sleeps in the tests. (phunt)
+
+  ZOOKEEPER-55. build.xml failes to retrieve a release number from SVN and 
+  the ant target dist fails (Andrew Kornev)
+
+  ZOOKEEPER-89. invoke WhenOwnerListener.whenNotOwner() when the ZK 
+  connection fails (james strachan)
+
+  ZOOKEEPER-90. invoke WhenOwnerListener.whenNotOwner() when the ZK
+  session expires and the znode is the leader (james strachan)
+
   ZOOKEEPER-82. Make the ZooKeeperServer more DI friendly. (Hiram Chirino via
   mahadev)
 
@@ -143,8 +187,33 @@
  ZOOKEEPER-125. Remove unwanted class declaration in FastLeaderElection. 
  (Flavio Paiva Junqueira via mahadev)
 
+ ZOOKEEPER-61. Address (remove) use of sleep(#) in client/server test cases.
+ (phunt)
+
+ ZOOKEEPER-75. cleanup the library directory (phunt)
+
+ ZOOKEEPER-109. cleanup of NPE and Resource issue nits found by static
+ analysis (phunt)
+
+ ZOOKEEPER-76. Commit 677109 removed the cobertura library, but not the 
+ build targets. (phunt)
+
  ZOOKEEPER-63. Race condition in client close() operation. (phunt via breed)
 
+ ZOOKEEPER-70. Add skeleton forrest doc structure for ZooKeeper (phunt)
+
+ ZOOKEEPER-79. Document jacob's leader election on the wiki recipes page 
+ (Flavio Junqueira)
+
+ ZOOKEEPER-73. Move ZK wiki from SourceForge to Apache (phunt)
+
+ ZOOKEEPER-72. Initial creation/setup of ZooKeeper ASF site. (phunt)
+
+ ZOOKEEPER-71. Determine what to do re ZooKeeper Changelog(s) (mahadev)
+
+ ZOOKEEPER-68. parseACLs in ZooKeeper.java fails to parse

svn commit: r700871 - in /hadoop/zookeeper/trunk: CHANGES.txt src/java/main/org/apache/zookeeper/server/persistence/Util.java

2008-10-01 Thread phunt
Author: phunt
Date: Wed Oct  1 12:05:48 2008
New Revision: 700871

URL: http://svn.apache.org/viewvc?rev=700871view=rev
Log:
ZOOKEEPER-150. zookeeper build broken

Modified:
hadoop/zookeeper/trunk/CHANGES.txt

hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/persistence/Util.java

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=700871r1=700870r2=700871view=diff
==
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Wed Oct  1 12:05:48 2008
@@ -10,10 +10,18 @@
 
   ZOOKEEPER-18. keeper state inconsistency (Jakob Homan via phunt)
 
+  ZOOKEEPER-38. headers (version+) in log/snap files (Andrew Kornev and Mahadev
+  Konar via breed)
+
+  ZOOKEEPER-127.  Use of non-standard election ports in config breaks services
+  (Mark Harwood and Flavio Junqueira via breed)
+
 Backward compatibile changes:
 
   BUGFIXES: 
 
+  ZOOKEEPER-150. zookeeper build broken (mahadev via phunt)
+
   ZOOKEEPER-144. add tostring support for watcher event, and enums for event
   type/state (Jakob Homan via phunt)
 
@@ -96,9 +104,3 @@
 
  ZOOKEEPER-117. threading issues in Leader election (Flavio Junqueira and 
Patrick
  Hunt via breed)
-
- ZOOKEEPER-38. headers (version+) in log/snap files (Andrew Kornev and Mahadev
- Konar via breed)
-
- ZOOKEEPER-127.  Use of non-standard election ports in config breaks services 
(Mark
- Harwood and Flavio Junqueira via breed)

Modified: 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/persistence/Util.java
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/persistence/Util.java?rev=700871r1=700870r2=700871view=diff
==
--- 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/persistence/Util.java
 (original)
+++ 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/persistence/Util.java
 Wed Oct  1 12:05:48 2008
@@ -126,37 +126,7 @@
 public static String getFormatConversionPolicy(Properties props){
 return props.getProperty(DB_FORMAT_CONV);
 }
-
-/**
- * The routine parses the scheme-specific part and returns the attributes 
- * values (if any) as an instance of Properties.
- * @param uri the persistence provider URI
- * @return URI attributes
- */
-public static Properties parseUrl(URI uri){
-Properties props=new Properties();
-for(String s: uri.getSchemeSpecificPart().split(;)){
-String[] pair=s.split(=);
-if(pair.length==2){
-if(pair[0].equals(SNAP_DIR)){
-props.setProperty(SNAP_DIR,pair[1]);
-}else if(pair[0].equals(LOG_DIR)){
-props.setProperty(LOG_DIR,pair[1]);
-}else if(pair[0].equals(DB_FORMAT_CONV)){
-props.setProperty(DB_FORMAT_CONV,pair[1]); 
   
-}else{
-LOG.warn(Unknown parameter [+pair[0]+] ignored);
-}
-}
-}
-SetString pp=props.stringPropertyNames();
-if(!pp.contains(SNAP_DIR) || !pp.contains(LOG_DIR)){
-throw new IllegalArgumentException(
-Both snapDir and logDir must be specified);
-}
-return props;
-}
-
+   
 /**
  * Extracts zxid from the file name. The file name should have been created
  * using one of the [EMAIL PROTECTED] makeLogName} or [EMAIL PROTECTED] 
makeSnapshotName}.




svn commit: r700664 - in /hadoop/zookeeper/trunk: CHANGES.txt src/java/main/org/apache/zookeeper/ClientCnxn.java src/java/main/org/apache/zookeeper/WatchedEvent.java src/java/main/org/apache/zookeeper

2008-09-30 Thread phunt
Author: phunt
Date: Tue Sep 30 19:47:54 2008
New Revision: 700664

URL: http://svn.apache.org/viewvc?rev=700664view=rev
Log:
ZOOKEEPER-144 add tostring support for watcher event, and enums for event 
type/state

Modified:
hadoop/zookeeper/trunk/CHANGES.txt
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/ClientCnxn.java
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/WatchedEvent.java
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/ZooKeeperMain.java

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=700664r1=700663r2=700664view=diff
==
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Tue Sep 30 19:47:54 2008
@@ -14,6 +14,9 @@
 
   BUGFIXES: 
 
+  ZOOKEEPER-144. add tostring support for watcher event, and enums for event
+  type/state (Jakob Homan via phunt)
+
   ZOOKEEPER-21. Improve zk ctor/watcher (state transition) docs (phunt)
 
   ZOOKEEPER-142. Provide Javadoc as to the maximum size of the data byte 

Modified: 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/ClientCnxn.java
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/ClientCnxn.java?rev=700664r1=700663r2=700664view=diff
==
--- hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/ClientCnxn.java 
(original)
+++ hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/ClientCnxn.java 
Tue Sep 30 19:47:54 2008
@@ -493,13 +493,13 @@
 // -1 means notification
 WatcherEvent event = new WatcherEvent();
 event.deserialize(bbia, response);
-
+WatchedEvent we = new WatchedEvent(event);
 if (LOG.isDebugEnabled()) {
-LOG.debug(Got an event:  + event +  for sessionid 0x
+LOG.debug(Got  + we +  for sessionid 0x
 + Long.toHexString(sessionId));
 }
 
-eventThread.queueEvent( new WatchedEvent(event) );
+eventThread.queueEvent( we );
 return;
 }
 if (pendingQueue.size() == 0) {

Modified: 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/WatchedEvent.java
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/WatchedEvent.java?rev=700664r1=700663r2=700664view=diff
==
--- hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/WatchedEvent.java 
(original)
+++ hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/WatchedEvent.java 
Tue Sep 30 19:47:54 2008
@@ -62,12 +62,20 @@
 return path;
 }
 
+@Override
+public String toString() {
+if(path == null)  // then is a state change 
+return WatchedEvent: Server state change. New state:  + 
keeperState;
+ else  // is a znode change
+return WatchedEvent: Znode change. Path:  + path +  Type:  + 
eventType;
+}
+
 /**
  *  Convert WatchedEvent to type that can be sent over network
  */
 public WatcherEvent getWrapper() {
 return new WatcherEvent(eventType.getIntValue(), 
-   keeperState.getIntValue(), 
-   path);
+keeperState.getIntValue(), 
+path);
 }
 }

Modified: 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/ZooKeeperMain.java
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/ZooKeeperMain.java?rev=700664r1=700663r2=700664view=diff
==
--- 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/ZooKeeperMain.java 
(original)
+++ 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/ZooKeeperMain.java 
Tue Sep 30 19:47:54 2008
@@ -51,8 +51,7 @@
 
 static private class MyWatcher implements Watcher {
 public void process(WatchedEvent event) {
-System.err.println(event.getPath() + :  + event.getState() + -
-+ event.getType());
+System.err.println(event);
 }
 }
 




svn commit: r699125 - /hadoop/zookeeper/trunk/CHANGES.txt

2008-09-25 Thread phunt
Author: phunt
Date: Thu Sep 25 15:57:25 2008
New Revision: 699125

URL: http://svn.apache.org/viewvc?rev=699125view=rev
Log:
updated for recently committed changes

Modified:
hadoop/zookeeper/trunk/CHANGES.txt

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=699125r1=699124r2=699125view=diff
==
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Thu Sep 25 15:57:25 2008
@@ -2,13 +2,35 @@
 
 Non-backward compatible changes:
 
-  ZOOKEEPER-132. Create Enum to replace CreateFlag in ZooKepper.create method 
(Jakob Homan via phunt)
+  ZOOKEEPER-132. Create Enum to replace CreateFlag in ZooKepper.create 
+  method (Jakob Homan via phunt)
+
+  ZOOKEEPER-139. Create Enums for WatcherEvent's KeeperState and EventType
+  (Jakob Homan via phunt)
+
+  ZOOKEEPER-18. keeper state inconsistency (Jakob Homan via phunt)
 
 Backward compatibile changes:
 
   BUGFIXES: 
 
-  ZOOKEEPER-118. findbugs flagged switch statement in 
followerrequestprocessor.run() (Flavio Paiva Junqueira via phunt)
+  ZOOKEEPER-142. Provide Javadoc as to the maximum size of the data byte 
+  array that may be stored within a znode (Jakob Homan via phunt)
+
+  ZOOKEEPER-93. Create Documentation for Zookeeper (phunt)
+
+  ZOOKEEPER-117. threading issues in Leader election (fpj via breed)
+
+  ZOOKEEPER-137. client watcher objects can lose events (phunt via breed)
+
+  ZOOKEEPER-131. Old leader election can elect a dead leader over and over
+  again (breed via mahadev)
+
+  ZOOKEEPER-130. update build.xml to support apache release process
+  (phunt via mahadev)
+
+  ZOOKEEPER-118. findbugs flagged switch statement in 
+  followerrequestprocessor.run() (Flavio Paiva Junqueira via phunt)
 
   ZOOKEEPER-39. Use Watcher objects rather than boolean on read operations.
   (Andrew Kornev)




svn commit: r684175 - /hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/SyncCallTest.java

2008-08-08 Thread phunt
Author: phunt
Date: Fri Aug  8 22:02:12 2008
New Revision: 684175

URL: http://svn.apache.org/viewvc?rev=684175view=rev
Log:
Committing ZOOKEEPER-108-TEST.patch

Added:

hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/SyncCallTest.java
   (with props)

Added: 
hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/SyncCallTest.java
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/SyncCallTest.java?rev=684175view=auto
==
--- 
hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/SyncCallTest.java
 (added)
+++ 
hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/SyncCallTest.java
 Fri Aug  8 22:02:12 2008
@@ -0,0 +1,114 @@
+/**
+ * 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 java.io.IOException;
+import java.util.Date;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.zookeeper.Watcher;
+import org.apache.zookeeper.ZooKeeper;
+import org.apache.zookeeper.AsyncCallback.ChildrenCallback;
+import org.apache.zookeeper.AsyncCallback.StringCallback;
+import org.apache.zookeeper.AsyncCallback.VoidCallback;
+import org.apache.zookeeper.ZooDefs.Ids;
+import org.apache.zookeeper.proto.WatcherEvent;
+import org.junit.Test;
+
+
+public class SyncCallTest extends ClientBase
+implements Watcher, ChildrenCallback, StringCallback, VoidCallback
+{
+private CountDownLatch clientConnected;
+private CountDownLatch opsCount;
+
+ListInteger results = new LinkedListInteger();
+Integer limit = 100 + 1 + 100 + 100;
+
+@Test
+public void testSync() throws Exception {
+try {
+LOG.info(Starting ZK: + (new Date()).toString());
+opsCount = new CountDownLatch(limit);
+ZooKeeper zk = createClient();
+
+LOG.info(Beginning test: + (new Date()).toString());
+for(int i = 0; i  100; i++)
+zk.create(/test + i, new byte[0], Ids.OPEN_ACL_UNSAFE,
+0, this, results);
+zk.sync(/test, this, results);
+for(int i = 0; i  100; i++)
+zk.delete(/test + i, 0, this, results);
+for(int i = 0; i  100; i++)
+zk.getChildren(/, this, this, results);
+
+LOG.info(Submitted all operations: + (new Date()).toString());
+
+if(!opsCount.await(1, TimeUnit.MILLISECONDS))
+fail(Haven't received all confirmations + 
opsCount.getCount());
+
+for(int i = 0; i  limit ; i++){
+assertEquals(0, (int) results.get(i));
+}
+
+} catch (IOException e) {
+System.out.println(e.toString());
+} 
+}
+
+private ZooKeeper createClient() throws IOException,InterruptedException{
+clientConnected=new CountDownLatch(1);
+ZooKeeper zk = new ZooKeeper(hostPort, 3, this);
+if(!clientConnected.await(CONNECTION_TIMEOUT, TimeUnit.MILLISECONDS)){
+fail(Unable to connect to server);
+}
+return zk;
+}
+
+public void process(WatcherEvent event) {
+//LOG.info(Process:  + event.getType() +   + event.getPath()); 
  
+if (event.getState() == Event.KeeperStateSyncConnected) {
+clientConnected.countDown();
+}
+}
+
+@SuppressWarnings(unchecked)
+public void processResult(int rc, String path, Object ctx,
+ListString children) { 
+((ListInteger)ctx).add(rc);
+opsCount.countDown();
+}
+
+@SuppressWarnings(unchecked)
+public void processResult(int rc, String path, Object ctx, String name){
+((ListInteger) ctx).add(rc);
+opsCount.countDown();
+
+}
+
+@SuppressWarnings(unchecked)
+public void processResult(int rc, String path, Object ctx){
+((ListInteger) ctx).add(rc);
+opsCount.countDown();
+
+}
+}

Propchange: 
hadoop/zookeeper/trunk/src/java/test/org/apache

svn commit: r681503 - /hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java

2008-07-31 Thread phunt
Author: phunt
Date: Thu Jul 31 14:22:33 2008
New Revision: 681503

URL: http://svn.apache.org/viewvc?rev=681503view=rev
Log:
fixed applying ZOOKEEPER-42 patch file

Modified:

hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java

Modified: 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java?rev=681503r1=681502r2=681503view=diff
==
--- 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java
 (original)
+++ 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java
 Thu Jul 31 14:22:33 2008
@@ -70,8 +70,8 @@
 int tickTime = 0;
 int initLimit = 0;
 int syncLimit = 0;
-int electionAlg = 0;
-int electionPort = 0;
+int electionAlg = 3;
+int electionPort = 2182;
 for (EntryObject, Object entry : cfg.entrySet()) {
 String key = entry.getKey().toString();
 String value = entry.getValue().toString();