svn commit: r776797 - /hadoop/zookeeper/trunk/build.xml

2009-05-20 Thread breed
Author: breed
Date: Wed May 20 18:12:24 2009
New Revision: 776797

URL: http://svn.apache.org/viewvc?rev=776797view=rev
Log:
ZOOKEEPER-292. commit configure scripts (autotools) to svn for c projects and 
include in release.

Modified:
hadoop/zookeeper/trunk/build.xml

Modified: hadoop/zookeeper/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/build.xml?rev=776797r1=776796r2=776797view=diff
==
--- hadoop/zookeeper/trunk/build.xml (original)
+++ hadoop/zookeeper/trunk/build.xml Wed May 20 18:12:24 2009
@@ -426,7 +426,8 @@
 !-- == --
 !----
 !-- == --
-target name=package depends=release-jar, api-report, compile-test
+target name=package
+
depends=release-jar,api-report,compile-test,create-cppunit-configure
 description=Build distribution
   mkdir dir=${dist.dir}/
   mkdir dir=${dist.dir}/lib/
@@ -493,14 +494,42 @@
 target name=tar depends=package description=Make release tarball
   macro_tar param.destfile=${build.dir}/${final.name}.tar.gz
 param.listofitems
+  !-- it's unfortunate that the binaries have to be duplicated
+   however that's the only way ant currently supports afaik --
   tarfileset dir=${build.dir} mode=664
 exclude name=${final.name}/bin/* /
 exclude name=${final.name}/contrib/*/bin/* /
+
+exclude name=${final.name}/**/compile /
+exclude name=${final.name}/**/config.guess /
+exclude name=${final.name}/**/config.sub /
+exclude name=${final.name}/**/configure /
+exclude name=${final.name}/**/depcomp /
+exclude name=${final.name}/**/install-sh /
+exclude name=${final.name}/**/ltmain.sh /
+exclude name=${final.name}/**/missing /
+
+exclude name=${final.name}/**/*.sh /
+
 include name=${final.name}/** /
   /tarfileset
   tarfileset dir=${build.dir} mode=755
+!-- be sure to add to exclude list above if you add here --
 include name=${final.name}/bin/* /
 include name=${final.name}/contrib/*/bin/* /
+
+!-- autotools related commands --
+include name=${final.name}/**/compile /
+include name=${final.name}/**/config.guess /
+include name=${final.name}/**/config.sub /
+include name=${final.name}/**/configure /
+include name=${final.name}/**/depcomp /
+include name=${final.name}/**/install-sh /
+include name=${final.name}/**/ltmain.sh /
+include name=${final.name}/**/missing /
+
+!-- any shell scripts --
+include name=${final.name}/**/*.sh /
   /tarfileset
 /param.listofitems
   /macro_tar




svn commit: r776806 - in /hadoop/zookeeper/trunk: ./ src/java/main/org/apache/zookeeper/ src/java/main/org/apache/zookeeper/server/ src/java/main/org/apache/zookeeper/server/quorum/ src/java/test/conf

2009-05-20 Thread breed
Author: breed
Date: Wed May 20 18:48:00 2009
New Revision: 776806

URL: http://svn.apache.org/viewvc?rev=776806view=rev
Log:
ZOOKEEPER-410. address all findbugs warnings in client/server classes.

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/ZooKeeper.java
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/ZooKeeperMain.java

hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/FinalRequestProcessor.java

hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/NIOServerCnxn.java

hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/PrepRequestProcessor.java

hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/SessionTrackerImpl.java

hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/SyncRequestProcessor.java

hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/ZooKeeperServer.java

hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/ZooKeeperServerMain.java

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

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

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

hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java
hadoop/zookeeper/trunk/src/java/test/config/findbugsExcludeFile.xml

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=776806r1=776805r2=776806view=diff
==
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Wed May 20 18:48:00 2009
@@ -76,6 +76,8 @@
 
   ZOOKEEPER-405. nullpointer exception in zookeeper java shell. (mahadev via 
breed)
 
+  ZOOKEEPER-410. address all findbugs warnings in client/server classes. 
(phunt via breed)
+
 IMPROVEMENTS:
   ZOOKEEPER-308. improve the atomic broadcast performance 3x.
   (breed via mahadev)

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=776806r1=776805r2=776806view=diff
==
--- hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/ClientCnxn.java 
(original)
+++ hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/ClientCnxn.java 
Wed May 20 18:48:00 2009
@@ -240,6 +240,20 @@
 }
 
 
+/**
+ * Creates a connection object. The actual network connect doesn't get
+ * established until needed. The start() instance method must be called
+ * subsequent to construction.
+ *
+ * @param hosts
+ *a comma separated list of hosts that can be connected to.
+ * @param sessionTimeout
+ *the timeout for connections.
+ * @param zooKeeper
+ *the zookeeper object that this connection is related to.
+ * @param watcher watcher for this connection
+ * @throws IOException
+ */
 public ClientCnxn(String hosts, int sessionTimeout, ZooKeeper zooKeeper,
 ClientWatchManager watcher)
 throws IOException
@@ -249,7 +263,8 @@
 
 /**
  * Creates a connection object. The actual network connect doesn't get
- * established until needed.
+ * established until needed. The start() instance method must be called
+ * subsequent to construction.
  *
  * @param hosts
  *a comma separated list of hosts that can be connected to.
@@ -257,12 +272,15 @@
  *the timeout for connections.
  * @param zooKeeper
  *the zookeeper object that this connection is related to.
- * @throws KeeperException
+ * @param watcher watcher for this connection
+ * @param sessionId session id if re-establishing session
+ * @param sessionPasswd session passwd if re-establishing session
  * @throws IOException
  */
 public ClientCnxn(String hosts, int sessionTimeout, ZooKeeper zooKeeper,
 ClientWatchManager watcher, long sessionId, byte[] sessionPasswd)
-throws IOException {
+throws IOException
+{
 this.zooKeeper = zooKeeper;
 this.watcher = watcher;
 this.sessionId = sessionId;
@@ -286,10 +304,13 @@
 Collections.shuffle(serverAddrs);
 sendThread = new SendThread();
 eventThread = new EventThread();
+}
+
+public void start() {
 sendThread.start();
 eventThread.start();
 }
-
+
 Object eventOfDeath = new Object();
 
 final static 

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

2009-05-20 Thread breed
Author: breed
Date: Wed May 20 17:58:56 2009
New Revision: 776788

URL: http://svn.apache.org/viewvc?rev=776788view=rev
Log:
ZOOKEEPER-405 nullpointer exception in zookeeper java shell.

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=776788r1=776787r2=776788view=diff
==
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Wed May 20 17:58:56 2009
@@ -74,6 +74,8 @@
 
   ZOOKEEPER-400. Issues with procedure to close ledger. (flavio)
 
+  ZOOKEEPER-405. nullpointer exception in zookeeper java shell. (mahadev via 
breed)
+
 IMPROVEMENTS:
   ZOOKEEPER-308. improve the atomic broadcast performance 3x.
   (breed 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=776788r1=776787r2=776788view=diff
==
--- 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/ZooKeeperMain.java 
(original)
+++ 
hadoop/zookeeper/trunk/src/java/main/org/apache/zookeeper/ZooKeeperMain.java 
Wed May 20 17:58:56 2009
@@ -613,6 +613,7 @@
 } else if (cmd.equals(get)  args.length = 2) {
 path = args[1];
 byte data[] = zk.getData(path, watch, stat);
+data = (data == null)? null.getBytes() : data;
 System.out.println(new String(data));
 printStat(stat);
 } else if (cmd.equals(ls)  args.length = 2) {