manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1541640 [1/2] - in /manifoldcf/trunk: ./ connectors/solr/ framework/ framework/core/ framework/core/src/main/java/org/apache/manifoldcf/core/ framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/ framework/core/src/test/java...
Date Wed, 13 Nov 2013 18:02:40 GMT
Author: kwright
Date: Wed Nov 13 18:02:39 2013
New Revision: 1541640

URL: http://svn.apache.org/r1541640
Log:
Fixes for CONNECTORS-13.  Refactor lock manager to support ZooKeeper locking and shared configuration,
and also provide both a file and a zookeeper multi-process example.

Added:
    manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/BaseLockManager.java
      - copied unchanged from r1541634, manifoldcf/branches/CONNECTORS-13/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/BaseLockManager.java
    manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/FileLockManager.java
      - copied unchanged from r1541634, manifoldcf/branches/CONNECTORS-13/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/FileLockManager.java
    manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/FileLockObject.java
      - copied unchanged from r1541634, manifoldcf/branches/CONNECTORS-13/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/FileLockObject.java
    manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/FileLockObjectFactory.java
      - copied unchanged from r1541634, manifoldcf/branches/CONNECTORS-13/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/FileLockObjectFactory.java
    manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/LocalLock.java
      - copied unchanged from r1541634, manifoldcf/branches/CONNECTORS-13/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/LocalLock.java
    manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/LocalLockPool.java
      - copied unchanged from r1541634, manifoldcf/branches/CONNECTORS-13/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/LocalLockPool.java
    manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/LockObjectFactory.java
      - copied unchanged from r1541634, manifoldcf/branches/CONNECTORS-13/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/LockObjectFactory.java
    manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/ZooKeeperConnection.java
      - copied unchanged from r1541634, manifoldcf/branches/CONNECTORS-13/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/ZooKeeperConnection.java
    manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/ZooKeeperConnectionPool.java
      - copied unchanged from r1541634, manifoldcf/branches/CONNECTORS-13/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/ZooKeeperConnectionPool.java
    manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/ZooKeeperLockManager.java
      - copied unchanged from r1541634, manifoldcf/branches/CONNECTORS-13/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/ZooKeeperLockManager.java
    manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/ZooKeeperLockObject.java
      - copied unchanged from r1541634, manifoldcf/branches/CONNECTORS-13/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/ZooKeeperLockObject.java
    manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/ZooKeeperLockObjectFactory.java
      - copied unchanged from r1541634, manifoldcf/branches/CONNECTORS-13/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/ZooKeeperLockObjectFactory.java
    manifoldcf/trunk/framework/core/src/test/java/org/apache/manifoldcf/core/lockmanager/
      - copied from r1541634, manifoldcf/branches/CONNECTORS-13/framework/core/src/test/java/org/apache/manifoldcf/core/lockmanager/
    manifoldcf/trunk/framework/example-multiprocess-file/
      - copied from r1541634, manifoldcf/branches/CONNECTORS-13/framework/example-multiprocess-file/
    manifoldcf/trunk/framework/example-multiprocess-file-common/
      - copied from r1541634, manifoldcf/branches/CONNECTORS-13/framework/example-multiprocess-file-common/
    manifoldcf/trunk/framework/example-multiprocess-file-proprietary/
      - copied from r1541634, manifoldcf/branches/CONNECTORS-13/framework/example-multiprocess-file-proprietary/
    manifoldcf/trunk/framework/example-multiprocess-zk/
      - copied from r1541634, manifoldcf/branches/CONNECTORS-13/framework/example-multiprocess-zk/
    manifoldcf/trunk/framework/example-multiprocess-zk-common/
      - copied from r1541634, manifoldcf/branches/CONNECTORS-13/framework/example-multiprocess-zk-common/
    manifoldcf/trunk/framework/example-multiprocess-zk-proprietary/
      - copied from r1541634, manifoldcf/branches/CONNECTORS-13/framework/example-multiprocess-zk-proprietary/
Removed:
    manifoldcf/trunk/framework/example-multiprocess/
    manifoldcf/trunk/framework/example-multiprocess-common/lock-clean.bat
    manifoldcf/trunk/framework/example-multiprocess-common/lock-clean.sh
    manifoldcf/trunk/framework/example-multiprocess-proprietary/
Modified:
    manifoldcf/trunk/   (props changed)
    manifoldcf/trunk/CHANGES.txt
    manifoldcf/trunk/build.xml
    manifoldcf/trunk/connectors/solr/pom.xml
    manifoldcf/trunk/framework/build.xml
    manifoldcf/trunk/framework/core/pom.xml
    manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/LockClean.java
    manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/LockManager.java
    manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/LockObject.java
    manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/LockPool.java
    manifoldcf/trunk/pom.xml

Propchange: manifoldcf/trunk/
------------------------------------------------------------------------------
  Merged /manifoldcf/branches/CONNECTORS-13:r1539324-1541634

Modified: manifoldcf/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/CHANGES.txt?rev=1541640&r1=1541639&r2=1541640&view=diff
==============================================================================
--- manifoldcf/trunk/CHANGES.txt (original)
+++ manifoldcf/trunk/CHANGES.txt Wed Nov 13 18:02:39 2013
@@ -3,6 +3,10 @@ $Id$
 
 ======================= 1.5-dev =====================
 
+CONNECTORS-13: Provide a ZooKeeper method of coordinating
+various ManifoldCF processes, along with an example.
+(Karl Wright)
+
 CONNECTORS-808: Add raw jdbc string so smart users can override the
 default behavior and supply gobbledegook Oracle connect strings.
 (Marcello Lorenzi, Karl Wright)

Modified: manifoldcf/trunk/build.xml
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/build.xml?rev=1541640&r1=1541639&r2=1541640&view=diff
==============================================================================
--- manifoldcf/trunk/build.xml (original)
+++ manifoldcf/trunk/build.xml Wed Nov 13 18:02:39 2013
@@ -1145,15 +1145,19 @@
     <target name="preclean-for-delivery">
         <mkdir dir="dist"/>
         <mkdir dir="dist/example"/>
-        <mkdir dir="dist/multiprocess-example"/>
         <mkdir dir="dist/example-proprietary"/>
-        <mkdir dir="dist/multiprocess-example-proprietary"/>
+        <mkdir dir="dist/multiprocess-file-example"/>
+        <mkdir dir="dist/multiprocess-zk-example"/>
+        <mkdir dir="dist/multiprocess-file-example-proprietary"/>
+        <mkdir dir="dist/multiprocess-zk-example-proprietary"/>
         <delete file="dist/connectors.xml"/>
         <delete file="dist/connectors-proprietary.xml"/>
         <delete file="dist/example/properties.xml"/>
         <delete file="dist/example-proprietary/properties.xml"/>
-        <delete file="dist/multiprocess-example/properties.xml"/>
-        <delete file="dist/multiprocess-example-proprietary/properties.xml"/>
+        <delete file="dist/multiprocess-file-example/properties.xml"/>
+        <delete file="dist/multiprocess-file-example-proprietary/properties.xml"/>
+        <delete file="dist/multiprocess-zk-example/properties.xml"/>
+        <delete file="dist/multiprocess-zk-example-proprietary/properties.xml"/>
         <delete file="dist/NOTICE.txt"/>
         <delete file="dist/LICENSE.txt"/>
     </target>
@@ -1167,13 +1171,21 @@
         <copy todir="dist/web-proprietary">
             <fileset dir="framework/dist/web-proprietary"/>
         </copy>
-        <mkdir dir="dist/multiprocess-example"/>
-        <copy todir="dist/multiprocess-example">
-            <fileset dir="framework/dist/multiprocess-example"/>
-        </copy>
-        <mkdir dir="dist/multiprocess-example-proprietary"/>
-        <copy todir="dist/multiprocess-example-proprietary">
-            <fileset dir="framework/dist/multiprocess-example-proprietary"/>
+        <mkdir dir="dist/multiprocess-file-example"/>
+        <copy todir="dist/multiprocess-file-example">
+            <fileset dir="framework/dist/multiprocess-file-example"/>
+        </copy>
+        <mkdir dir="dist/multiprocess-file-example-proprietary"/>
+        <copy todir="dist/multiprocess-file-example-proprietary">
+            <fileset dir="framework/dist/multiprocess-file-example-proprietary"/>
+        </copy>
+        <mkdir dir="dist/multiprocess-zk-example"/>
+        <copy todir="dist/multiprocess-zk-example">
+            <fileset dir="framework/dist/multiprocess-zk-example"/>
+        </copy>
+        <mkdir dir="dist/multiprocess-zk-example-proprietary"/>
+        <copy todir="dist/multiprocess-zk-example-proprietary">
+            <fileset dir="framework/dist/multiprocess-zk-example-proprietary"/>
         </copy>
         <mkdir dir="dist/example"/>
         <copy todir="dist/example">
@@ -1205,8 +1217,10 @@
         <chmod dir="dist/script-engine" perm="a+x" includes="**/*.sh"/>
         <chmod dir="dist/example" perm="a+x" includes="**/*.sh"/>
         <chmod dir="dist/example-proprietary" perm="a+x" includes="**/*.sh"/>
-        <chmod dir="dist/multiprocess-example" perm="a+x" includes="**/*.sh"/>
-        <chmod dir="dist/multiprocess-example-proprietary" perm="a+x" includes="**/*.sh"/>
+        <chmod dir="dist/multiprocess-file-example" perm="a+x" includes="**/*.sh"/>
+        <chmod dir="dist/multiprocess-file-example-proprietary" perm="a+x" includes="**/*.sh"/>
+        <chmod dir="dist/multiprocess-zk-example" perm="a+x" includes="**/*.sh"/>
+        <chmod dir="dist/multiprocess-zk-example-proprietary" perm="a+x" includes="**/*.sh"/>
         <copy todir="dist">
             <fileset dir="dist-license" includes="*.txt"/>
         </copy>
@@ -3084,7 +3098,8 @@
           <exclude name="connector-lib-proprietary/*-PLACEHOLDER.txt"/>
           <exclude name="connectors-proprietary.xml"/>
           <exclude name="/example-proprietary/"/>
-          <exclude name="/multiprocess-example-proprietary/"/>
+          <exclude name="/multiprocess-file-example-proprietary/"/>
+          <exclude name="/multiprocess-zk-example-proprietary/"/>
           <exclude name="/web-proprietary/"/>
         </zipfileset>
       </zip>
@@ -3098,7 +3113,8 @@
           <exclude name="connector-lib-proprietary/*-PLACEHOLDER.txt"/>
           <exclude name="connectors-proprietary.xml"/>
           <exclude name="/example-proprietary/"/>
-          <exclude name="/multiprocess-example-proprietary/"/>
+          <exclude name="/multiprocess-file-example-proprietary/"/>
+          <exclude name="/multiprocess-zk-example-proprietary/"/>
           <exclude name="/web-proprietary/"/>
         </tarfileset>
       </tar>

Modified: manifoldcf/trunk/connectors/solr/pom.xml
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/solr/pom.xml?rev=1541640&r1=1541639&r2=1541640&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/solr/pom.xml (original)
+++ manifoldcf/trunk/connectors/solr/pom.xml Wed Nov 13 18:02:39 2013
@@ -92,6 +92,11 @@
       <version>${solr.version}</version>
     </dependency>
     <dependency>
+      <groupId>org.apache.zookeeper</groupId>
+      <artifactId>zookeeper</artifactId>
+      <version>${zookeeper.version}</version>
+    </dependency>
+    <dependency>
       <groupId>org.apache.httpcomponents</groupId>
       <artifactId>httpclient</artifactId>
       <version>${httpcomponent.httpclient.version}</version>

Modified: manifoldcf/trunk/framework/build.xml
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/build.xml?rev=1541640&r1=1541639&r2=1541640&view=diff
==============================================================================
--- manifoldcf/trunk/framework/build.xml (original)
+++ manifoldcf/trunk/framework/build.xml Wed Nov 13 18:02:39 2013
@@ -32,6 +32,7 @@
     
     <path id="framework-classpath">
         <fileset dir="../lib">
+            <include name="zookeeper*.jar"/>
             <include name="json*.jar"/>
             <include name="commons-codec*.jar"/>
             <include name="commons-collections*.jar"/>
@@ -308,6 +309,7 @@
         <mkdir dir="build/webapp/authority-service/WEB-INF/lib"/>
         <copy todir="build/webapp/authority-service/WEB-INF/lib">
             <fileset dir="../lib">
+                <include name="zookeeper*.jar"/>
                 <include name="json*.jar"/>
                 <include name="commons-codec*.jar"/>
                 <include name="commons-collections*.jar"/>
@@ -346,6 +348,7 @@
         <mkdir dir="build/webapp/authority-service-proprietary/WEB-INF/lib"/>
         <copy todir="build/webapp/authority-service-proprietary/WEB-INF/lib">
             <fileset dir="../lib">
+                <include name="zookeeper*.jar"/>
                 <include name="json*.jar"/>
                 <include name="commons-codec*.jar"/>
                 <include name="commons-collections*.jar"/>
@@ -389,6 +392,7 @@
         <mkdir dir="build/webapp/api-service/WEB-INF/lib"/>
         <copy todir="build/webapp/api-service/WEB-INF/lib">
             <fileset dir="../lib">
+                <include name="zookeeper*.jar"/>
                 <include name="json*.jar"/>
                 <include name="commons-codec*.jar"/>
                 <include name="commons-collections*.jar"/>
@@ -428,6 +432,7 @@
         <mkdir dir="build/webapp/api-service-proprietary/WEB-INF/lib"/>
         <copy todir="build/webapp/api-service-proprietary/WEB-INF/lib">
             <fileset dir="../lib">
+                <include name="zookeeper*.jar"/>
                 <include name="json*.jar"/>
                 <include name="commons-codec*.jar"/>
                 <include name="commons-collections*.jar"/>
@@ -473,6 +478,7 @@
         <copy todir="build/webapp/crawler-ui/WEB-INF/lib">
             <fileset dir="../lib">
                 <include name="jstl*.jar"/>
+                <include name="zookeeper*.jar"/>
                 <include name="json*.jar"/>
                 <include name="commons-codec*.jar"/>
                 <include name="commons-collections*.jar"/>
@@ -520,6 +526,7 @@
         <copy todir="build/webapp/crawler-ui-proprietary/WEB-INF/lib">
             <fileset dir="../lib">
                 <include name="jstl*.jar"/>
+                <include name="zookeeper*.jar"/>
                 <include name="json*.jar"/>
                 <include name="commons-codec*.jar"/>
                 <include name="commons-collections*.jar"/>
@@ -574,6 +581,7 @@
         <copy todir="build/webapp/combined-service/WEB-INF/lib">
             <fileset dir="../lib">
                 <include name="jstl*.jar"/>
+                <include name="zookeeper*.jar"/>
                 <include name="json*.jar"/>
                 <include name="commons-codec*.jar"/>
                 <include name="commons-collections*.jar"/>
@@ -623,6 +631,7 @@
         <copy todir="build/webapp/combined-service-proprietary/WEB-INF/lib">
             <fileset dir="../lib">
                 <include name="jstl*.jar"/>
+                <include name="zookeeper*.jar"/>
                 <include name="json*.jar"/>
                 <include name="commons-codec*.jar"/>
                 <include name="commons-collections*.jar"/>
@@ -736,10 +745,11 @@
         <copy file="example-common/README.txt" todir="dist/connector-lib-proprietary"/>
     </target>
     
-    <target name="multi-processes" depends="jar-core,jar-agents,jar-pull-agent">
-        <mkdir dir="dist/multiprocess-example/processes/lib"/>
-        <copy todir="dist/multiprocess-example/processes/lib">
+    <target name="multi-processes-file" depends="jar-core,jar-agents,jar-pull-agent">
+        <mkdir dir="dist/multiprocess-file-example/processes/lib"/>
+        <copy todir="dist/multiprocess-file-example/processes/lib">
             <fileset dir="../lib">
+                <include name="zookeeper*.jar"/>
                 <include name="json*.jar"/>
                 <include name="commons-codec*.jar"/>
                 <include name="commons-collections*.jar"/>
@@ -770,16 +780,17 @@
                 <include name="mcf-pull-agent.jar"/>
             </fileset>
         </copy>
-        <copy todir="dist/multiprocess-example/processes">
+        <copy todir="dist/multiprocess-file-example/processes">
             <fileset dir="scripts"/>
         </copy>
-        <mkdir dir="dist/multiprocess-example/syncharea"/>
+        <mkdir dir="dist/multiprocess-file-example/syncharea"/>
     </target>
 
-    <target name="multi-processes-proprietary" depends="jar-core,jar-agents,jar-pull-agent">
-        <mkdir dir="dist/multiprocess-example-proprietary/processes/lib"/>
-        <copy todir="dist/multiprocess-example-proprietary/processes/lib">
+    <target name="multi-processes-file-proprietary" depends="jar-core,jar-agents,jar-pull-agent">
+        <mkdir dir="dist/multiprocess-file-example-proprietary/processes/lib"/>
+        <copy todir="dist/multiprocess-file-example-proprietary/processes/lib">
             <fileset dir="../lib">
+                <include name="zookeeper*.jar"/>
                 <include name="json*.jar"/>
                 <include name="commons-codec*.jar"/>
                 <include name="commons-collections*.jar"/>
@@ -815,27 +826,211 @@
                 <include name="mcf-pull-agent.jar"/>
             </fileset>
         </copy>
-        <copy todir="dist/multiprocess-example-proprietary/processes">
+        <copy todir="dist/multiprocess-file-example-proprietary/processes">
             <fileset dir="scripts"/>
         </copy>
-        <mkdir dir="dist/multiprocess-example-proprietary/syncharea"/>
+        <mkdir dir="dist/multiprocess-file-example-proprietary/syncharea"/>
     </target>
 
-    <target name="multi-process-example" depends="jar-core,jar-ui-core,jar-agents,jar-pull-agent,jar-jetty-runner,multi-processes">
-        <mkdir dir="dist/multiprocess-example"/>
-        <copy todir="dist/multiprocess-example">
+    <target name="multi-processes-zk" depends="jar-core,jar-agents,jar-pull-agent">
+        <mkdir dir="dist/multiprocess-zk-example/processes/lib"/>
+        <copy todir="dist/multiprocess-zk-example/processes/lib">
+            <fileset dir="../lib">
+                <include name="zookeeper*.jar"/>
+                <include name="json*.jar"/>
+                <include name="commons-codec*.jar"/>
+                <include name="commons-collections*.jar"/>
+                <include name="commons-el*.jar"/>
+                <include name="commons-fileupload*.jar"/>
+                <include name="httpcore*.jar"/>
+                <include name="httpclient*.jar"/>
+                <include name="commons-io*.jar"/>
+                <include name="commons-lang*.jar"/>
+                <include name="commons-logging*.jar"/>
+                <include name="log4j*.jar"/>
+                <include name="serializer*.jar"/>
+                <include name="servlet-api*.jar"/>
+                <include name="xalan*.jar"/>
+                <include name="xercesImpl*.jar"/>
+                <include name="xml-apis*.jar"/>
+                <include name="velocity*.jar"/>
+                <include name="slf4j*.jar"/>
+            </fileset>
+            <fileset dir="../lib">
+                <include name="postgresql*.jar"/>
+                <include name="derby*.jar"/>
+                <include name="hsqldb*.jar"/>
+            </fileset>
+            <fileset dir="build/jar">
+                <include name="mcf-core.jar"/>
+                <include name="mcf-agents.jar"/>
+                <include name="mcf-pull-agent.jar"/>
+            </fileset>
+        </copy>
+        <copy todir="dist/multiprocess-zk-example/processes">
+            <fileset dir="scripts"/>
+        </copy>
+        <mkdir dir="dist/multiprocess-zk-example/zookeeper"/>
+    </target>
+
+    <target name="multi-processes-zk-proprietary" depends="jar-core,jar-agents,jar-pull-agent">
+        <mkdir dir="dist/multiprocess-zk-example-proprietary/processes/lib"/>
+        <copy todir="dist/multiprocess-zk-example-proprietary/processes/lib">
+            <fileset dir="../lib">
+                <include name="zookeeper*.jar"/>
+                <include name="json*.jar"/>
+                <include name="commons-codec*.jar"/>
+                <include name="commons-collections*.jar"/>
+                <include name="commons-el*.jar"/>
+                <include name="commons-fileupload*.jar"/>
+                <include name="httpcore*.jar"/>
+                <include name="httpclient*.jar"/>
+                <include name="commons-io*.jar"/>
+                <include name="commons-lang*.jar"/>
+                <include name="commons-logging*.jar"/>
+                <include name="log4j*.jar"/>
+                <include name="serializer*.jar"/>
+                <include name="servlet-api*.jar"/>
+                <include name="xalan*.jar"/>
+                <include name="xercesImpl*.jar"/>
+                <include name="xml-apis*.jar"/>
+                <include name="velocity*.jar"/>
+                <include name="slf4j*.jar"/>
+            </fileset>
+            <fileset dir="../lib">
+                <include name="postgresql*.jar"/>
+                <include name="derby*.jar"/>
+                <include name="hsqldb*.jar"/>
+            </fileset>
+            <fileset dir="../lib-proprietary">
+                <include name="mysql*.jar"/>
+                <include name="ojdbc*.jar"/>
+                <include name="jtds*.jar"/>
+            </fileset>
+            <fileset dir="build/jar">
+                <include name="mcf-core.jar"/>
+                <include name="mcf-agents.jar"/>
+                <include name="mcf-pull-agent.jar"/>
+            </fileset>
+        </copy>
+        <copy todir="dist/multiprocess-zk-example-proprietary/processes">
+            <fileset dir="scripts"/>
+        </copy>
+        <mkdir dir="dist/multiprocess-zk-example-proprietary/zookeeper"/>
+    </target>
+
+    <target name="multi-process-file-example" depends="jar-core,jar-ui-core,jar-agents,jar-pull-agent,jar-jetty-runner,multi-processes-file">
+        <mkdir dir="dist/multiprocess-file-example"/>
+        <copy todir="dist/multiprocess-file-example">
             <fileset dir="example-multiprocess-common">
                 <include name="logging.ini"/>
                 <include name="*.sh"/>
                 <include name="*.bat"/>
             </fileset>
-            <fileset dir="example-multiprocess">
+            <fileset dir="example-multiprocess-file-common">
+                <include name="*.sh"/>
+                <include name="*.bat"/>
+            </fileset>
+            <fileset dir="example-multiprocess-file">
+                <include name="properties.xml"/>
+            </fileset>
+        </copy>
+        <mkdir dir="dist/multiprocess-file-example/lib"/>
+        <copy todir="dist/multiprocess-file-example/lib">
+            <fileset dir="../lib">
+                <include name="zookeeper*.jar"/>
+                <include name="json*.jar"/>
+                <include name="commons-logging*.jar"/>
+                <include name="log4j*.jar"/>
+            </fileset>
+            <fileset dir="build/jar">
+                <include name="mcf-core.jar"/>
+                <include name="mcf-ui-core.jar"/>
+                <include name="mcf-agents.jar"/>
+                <include name="mcf-pull-agent.jar"/>
+                <include name="mcf-jetty-runner.jar"/>
+            </fileset>
+            <fileset dir="../lib">
+                <include name="jetty*.jar"/>
+                <include name="slf4j*.jar"/>
+                <include name="servlet-api*.jar"/>
+                <include name="ecj*.jar"/>
+                <include name="jasper*.jar"/>
+                <include name="juli*.jar"/>
+                <include name="jsp-api*.jar"/>
+            </fileset>
+        </copy>
+        <mkdir dir="dist/multiprocess-file-example/logs"/>
+        <chmod dir="dist/multiprocess-file-example" perm="a+x" includes="**/*.sh"/>
+    </target>
+  
+      <target name="multi-process-file-example-proprietary" depends="jar-core,jar-ui-core,jar-agents,jar-pull-agent,jar-jetty-runner,multi-processes-file-proprietary">
+        <mkdir dir="dist/multiprocess-file-example-proprietary"/>
+        <copy todir="dist/multiprocess-file-example-proprietary">
+            <fileset dir="example-multiprocess-common">
+                <include name="logging.ini"/>
+                <include name="*.sh"/>
+                <include name="*.bat"/>
+            </fileset>
+            <fileset dir="example-multiprocess-file-common">
+                <include name="*.sh"/>
+                <include name="*.bat"/>
+            </fileset>
+            <fileset dir="example-multiprocess-file-proprietary">
+                <include name="properties.xml"/>
+            </fileset>
+        </copy>
+        <mkdir dir="dist/multiprocess-file-example-proprietary/lib"/>
+        <copy todir="dist/multiprocess-file-example-proprietary/lib">
+            <fileset dir="../lib">
+                <include name="zookeeper*.jar"/>
+                <include name="json*.jar"/>
+                <include name="commons-logging*.jar"/>
+                <include name="log4j*.jar"/>
+            </fileset>
+            <fileset dir="build/jar">
+                <include name="mcf-core.jar"/>
+                <include name="mcf-ui-core.jar"/>
+                <include name="mcf-agents.jar"/>
+                <include name="mcf-pull-agent.jar"/>
+                <include name="mcf-jetty-runner.jar"/>
+            </fileset>
+            <fileset dir="../lib">
+                <include name="jetty*.jar"/>
+                <include name="slf4j*.jar"/>
+                <include name="servlet-api*.jar"/>
+                <include name="ecj*.jar"/>
+                <include name="jasper*.jar"/>
+                <include name="juli*.jar"/>
+                <include name="jsp-api*.jar"/>
+            </fileset>
+        </copy>
+        <mkdir dir="dist/multiprocess-file-example-proprietary/logs"/>
+        <chmod dir="dist/multiprocess-file-example-proprietary" perm="a+x" includes="**/*.sh"/>
+    </target>
+
+    <target name="multi-process-zk-example" depends="jar-core,jar-ui-core,jar-agents,jar-pull-agent,jar-jetty-runner,multi-processes-zk">
+        <mkdir dir="dist/multiprocess-zk-example"/>
+        <copy todir="dist/multiprocess-zk-example">
+            <fileset dir="example-multiprocess-common">
+                <include name="logging.ini"/>
+                <include name="*.sh"/>
+                <include name="*.bat"/>
+            </fileset>
+            <fileset dir="example-multiprocess-zk-common">
+                <include name="*.sh"/>
+                <include name="*.bat"/>
+                <include name="*.cfg"/>
+                <include name="*.xml"/>
+            </fileset>
+            <fileset dir="example-multiprocess-zk">
                 <include name="properties.xml"/>
             </fileset>
         </copy>
-        <mkdir dir="dist/multiprocess-example/lib"/>
-        <copy todir="dist/multiprocess-example/lib">
+        <mkdir dir="dist/multiprocess-zk-example/lib"/>
+        <copy todir="dist/multiprocess-zk-example/lib">
             <fileset dir="../lib">
+                <include name="zookeeper*.jar"/>
                 <include name="json*.jar"/>
                 <include name="commons-logging*.jar"/>
                 <include name="log4j*.jar"/>
@@ -857,25 +1052,32 @@
                 <include name="jsp-api*.jar"/>
             </fileset>
         </copy>
-        <mkdir dir="dist/multiprocess-example/logs"/>
-        <chmod dir="dist/multiprocess-example" perm="a+x" includes="**/*.sh"/>
+        <mkdir dir="dist/multiprocess-zk-example/logs"/>
+        <chmod dir="dist/multiprocess-zk-example" perm="a+x" includes="**/*.sh"/>
     </target>
   
-      <target name="multi-process-example-proprietary" depends="jar-core,jar-ui-core,jar-agents,jar-pull-agent,jar-jetty-runner,multi-processes-proprietary">
-        <mkdir dir="dist/multiprocess-example-proprietary"/>
-        <copy todir="dist/multiprocess-example-proprietary">
+      <target name="multi-process-zk-example-proprietary" depends="jar-core,jar-ui-core,jar-agents,jar-pull-agent,jar-jetty-runner,multi-processes-zk-proprietary">
+        <mkdir dir="dist/multiprocess-zk-example-proprietary"/>
+        <copy todir="dist/multiprocess-zk-example-proprietary">
             <fileset dir="example-multiprocess-common">
                 <include name="logging.ini"/>
                 <include name="*.sh"/>
                 <include name="*.bat"/>
             </fileset>
-            <fileset dir="example-multiprocess-proprietary">
+            <fileset dir="example-multiprocess-zk-common">
+                <include name="*.sh"/>
+                <include name="*.bat"/>
+                <include name="*.cfg"/>
+                <include name="*.xml"/>
+            </fileset>
+            <fileset dir="example-multiprocess-zk-proprietary">
                 <include name="properties.xml"/>
             </fileset>
         </copy>
-        <mkdir dir="dist/multiprocess-example-proprietary/lib"/>
-        <copy todir="dist/multiprocess-example-proprietary/lib">
+        <mkdir dir="dist/multiprocess-zk-example-proprietary/lib"/>
+        <copy todir="dist/multiprocess-zk-example-proprietary/lib">
             <fileset dir="../lib">
+                <include name="zookeeper*.jar"/>
                 <include name="json*.jar"/>
                 <include name="commons-logging*.jar"/>
                 <include name="log4j*.jar"/>
@@ -897,8 +1099,8 @@
                 <include name="jsp-api*.jar"/>
             </fileset>
         </copy>
-        <mkdir dir="dist/multiprocess-example-proprietary/logs"/>
-        <chmod dir="dist/multiprocess-example-proprietary" perm="a+x" includes="**/*.sh"/>
+        <mkdir dir="dist/multiprocess-zk-example-proprietary/logs"/>
+        <chmod dir="dist/multiprocess-zk-example-proprietary" perm="a+x" includes="**/*.sh"/>
     </target>
 
     <target name="script-engine" depends="jar-script-engine,jar-core">
@@ -932,6 +1134,7 @@
         <mkdir dir="dist/example/lib"/>
         <copy todir="dist/example/lib">
             <fileset dir="../lib">
+                <include name="zookeeper*.jar"/>
                 <include name="json*.jar"/>
                 <include name="commons-codec*.jar"/>
                 <include name="commons-collections*.jar"/>
@@ -1059,6 +1262,7 @@
         <mkdir dir="dist/example-proprietary/lib"/>
         <copy todir="dist/example-proprietary/lib">
             <fileset dir="../lib">
+                <include name="zookeeper*.jar"/>
                 <include name="json*.jar"/>
                 <include name="commons-codec*.jar"/>
                 <include name="commons-collections*.jar"/>
@@ -1277,7 +1481,8 @@
 
             <test name="org.apache.manifoldcf.core.common.DateTest" todir="test-output"/>
             <test name="org.apache.manifoldcf.core.fuzzyml.TestFuzzyML" todir="test-output"/>
-            
+            <test name="org.apache.manifoldcf.core.lockmanager.TestZooKeeperLocks" todir="test-output"/>
+
         </junit>
     </target>
 
@@ -1441,7 +1646,7 @@
         </java>
     </target>
     
-    <target name="build" depends="multi-process-example,multi-process-example-proprietary,single-process-example,single-process-example-proprietary,example-common,script-engine"/>
+    <target name="build" depends="multi-process-zk-example,multi-process-zk-example-proprietary,multi-process-file-example,multi-process-file-example-proprietary,single-process-example,single-process-example-proprietary,example-common,script-engine"/>
     
     <target name="all" depends="build,doc,build-tests,run-tests,run-tests-derby,run-tests-HSQLDB,run-tests-HSQLDBext"/>
     

Modified: manifoldcf/trunk/framework/core/pom.xml
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/core/pom.xml?rev=1541640&r1=1541639&r2=1541640&view=diff
==============================================================================
--- manifoldcf/trunk/framework/core/pom.xml (original)
+++ manifoldcf/trunk/framework/core/pom.xml Wed Nov 13 18:02:39 2013
@@ -87,5 +87,10 @@
       <artifactId>velocity</artifactId>
       <version>${velocity.version}</version>
     </dependency>
+    <dependency>
+      <groupId>org.apache.zookeeper</groupId>
+      <artifactId>zookeeper</artifactId>
+      <version>${zookeeper.version}</version>
+    </dependency>
   </dependencies>
 </project>

Modified: manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/LockClean.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/LockClean.java?rev=1541640&r1=1541639&r2=1541640&view=diff
==============================================================================
--- manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/LockClean.java
(original)
+++ manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/LockClean.java
Wed Nov 13 18:02:39 2013
@@ -39,14 +39,13 @@ public class LockClean implements Initia
   public void execute() throws ManifoldCFException
   {
     ManifoldCF.initializeEnvironment(ThreadContextFactory.make());
-    String synchDir = ManifoldCF.getFileProperty(org.apache.manifoldcf.core.lockmanager.LockManager.synchDirectoryProperty).toString();
+    File synchDir = org.apache.manifoldcf.core.lockmanager.FileLockManager.getSynchDirectoryProperty();
     if (synchDir != null)
     {
       // Recursively clean up the contents of the synch directory. But don't remove the directory
itself
-      File dir = new File(synchDir);
-      if (dir.isDirectory())
+      if (synchDir.isDirectory())
       {
-        removeContentsOfDirectory(dir);
+        removeContentsOfDirectory(synchDir);
       }
     }
     Logging.root.info("Synchronization storage cleaned up");



Mime
View raw message