jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r1302917 - in /jackrabbit/sandbox/microkernel/src: main/java/org/apache/jackrabbit/mk/ main/java/org/apache/jackrabbit/mk/api/ main/java/org/apache/jackrabbit/mk/cluster/ main/java/org/apache/jackrabbit/mk/index/ main/java/org/apache/jackra...
Date Tue, 20 Mar 2012 14:42:48 GMT
Author: stefan
Date: Tue Mar 20 14:42:47 2012
New Revision: 1302917

URL: http://svn.apache.org/viewvc?rev=1302917&view=rev
Log:
cleanup sandbox project in order to avoid confusion with the oak code-base.

Removed:
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/MicroKernelImpl.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/Repository.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/util/AbstractFilteringIterator.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/util/AbstractRangeIterator.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/util/EmptyIterator.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/util/RangeIterator.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/util/UnmodifiableIterator.java
    jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/store/CopyHeadRevisionTest.java
Modified:
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/MicroKernelFactory.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/api/MicroKernel.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/cluster/HotBackup.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/index/Indexer.java
    jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/ConcurrentWriteTest.java
    jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/HelloWorld.java
    jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/MultiMkTestBase.java
    jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/cluster/BasicTest.java
    jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/cluster/HotBackupTest.java

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/MicroKernelFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/MicroKernelFactory.java?rev=1302917&r1=1302916&r2=1302917&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/MicroKernelFactory.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/MicroKernelFactory.java
Tue Mar 20 14:42:47 2012
@@ -36,9 +36,6 @@ public class MicroKernelFactory {
     /**
      * Get an instance. Supported URLs:
      * <ul>
-     * <li>fs:target/mk-test (using the directory ./target/mk-test)</li>
-     * <li>fs:target/mk-test;clean (same, but delete the old repository first)</li>
-     * <li>fs:{homeDir} (use the system property homeDir or '.' if not set)</li>
      * <li>simple: (in-memory implementation)</li>
      * <li>simple:fs:target/temp (using the directory ./target/temp)</li>
      * </ul>
@@ -59,22 +56,6 @@ public class MicroKernelFactory {
             return VirtualRepositoryWrapper.get(url);
         } else if (url.startsWith("index:")) {
             return IndexWrapper.get(url);
-        } else if (url.startsWith("fs:")) {
-            boolean clean = false;
-            if (url.endsWith(";clean")) {
-                url = url.substring(0, url.length() - ";clean".length());
-                clean = true;
-            }
-            String dir = url.substring("fs:".length());
-            dir = dir.replaceAll("\\{homeDir\\}", System.getProperty("homeDir", "."));
-            if (clean) {
-                try {
-                    FileUtils.deleteRecursive(dir + "/" + ".mk", false);
-                } catch (IOException e) {
-                    throw ExceptionFactory.convert(e);
-                }
-            }
-            return new MicroKernelImpl(dir);
         } else if (url.startsWith("http:")) {
             return Client.createHttpClient(url);
         } else if (url.startsWith("http-bridge:")) {

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/api/MicroKernel.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/api/MicroKernel.java?rev=1302917&r1=1302916&r2=1302917&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/api/MicroKernel.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/api/MicroKernel.java
Tue Mar 20 14:42:47 2012
@@ -19,39 +19,8 @@ package org.apache.jackrabbit.mk.api;
 import java.io.InputStream;
 
 /**
- * The MicroKernel <b>design goals/principles</b>:
- * <ul>
- * <li>manage huge trees of nodes and properties efficiently</li>
- * <li>MVCC-based concurrency control</li>
- * <li>GIT/SVN-inspired DAG-based data model</li>
- * <li>highly scalable concurrent read & write operations</li>
- * <li>stateless API</li>
- * <li>portable to C</li>
- * <li>efficient support for large number of child nodes</li>
- * <li>integrated API for storing/retrieving large binaries (similar to existing DataStore
API)</li>
- * <li>human-readable data serialization (JSON)</li>
- * </ul>
- * <p/>
- * The MicroKernel <b>Data Model</b>:
- * <ul>
- * <li>simple JSON-inspired data model: just nodes and properties</li>
- * <li>a node consists of an unordered set of name -&gt; item mappings. each
- * property and child node is uniquely named and a single name can only
- * refer to a property or a child node, not both at the same time.
- * <li>properties are represented as name/value pairs</li>
- * <li>supported property types: string, number</li>
- * <li>other property types (weak/hard reference, date, etc) would need to be
- * encoded/mangled in name or value</li>
- * <li>no support for JCR/XML-like namespaces, "foo:bar" is just an ordinary name</li>
- * </ul>
- * <p/>
- * <b>Architecture (overview)</b>:
- * <ol>
- * <li>JCR (full TCK-compliant implementation)</li>
- * <li>SPI (node types, workspaces, namespaces, access control, search, locking, ...)</li>
- * <li><i>MicroKernel</i></li>
- * </ol>
- * </ul>
+ * @deprecated
+ * Moved to <a href="http://svn.apache.org/repos/asf/jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/api/MicroKernel.java">MicroKernel.java</a>
in the Jackrabbit Oak code-base.
  */
 public interface MicroKernel {
 

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/cluster/HotBackup.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/cluster/HotBackup.java?rev=1302917&r1=1302916&r2=1302917&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/cluster/HotBackup.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/cluster/HotBackup.java
Tue Mar 20 14:42:47 2012
@@ -98,7 +98,7 @@ public class HotBackup {
             String diff = new JsopBuilder().tag('-').key(name).value(null).toString();
             mk.commit(parent, diff, mk.getHeadRevision(), null);
         } else {
-            String diff = new JsopBuilder().tag('+').key(name).value(value).toString();
+            String diff = new JsopBuilder().tag('^').key(name).value(value).toString();
             mk.commit(parent, diff, mk.getHeadRevision(), null);
         }
     }

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/index/Indexer.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/index/Indexer.java?rev=1302917&r1=1302916&r2=1302917&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/index/Indexer.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/index/Indexer.java
Tue Mar 20 14:42:47 2012
@@ -16,7 +16,6 @@
  */
 package org.apache.jackrabbit.mk.index;
 
-import org.apache.jackrabbit.mk.MicroKernelImpl;
 import org.apache.jackrabbit.mk.api.MicroKernel;
 import org.apache.jackrabbit.mk.json.JsopBuilder;
 import org.apache.jackrabbit.mk.json.JsopReader;
@@ -194,11 +193,6 @@ public class Indexer {
     }
 
     void commit() {
-        // TODO remove this method once MicroKernelImpl supports
-        // move + add node
-        if (mk instanceof MicroKernelImpl) {
-            commitChanges();
-        }
     }
 
     void modified(BTree tree, BTreePage page, boolean deleted) {

Modified: jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/ConcurrentWriteTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/ConcurrentWriteTest.java?rev=1302917&r1=1302916&r2=1302917&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/ConcurrentWriteTest.java
(original)
+++ jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/ConcurrentWriteTest.java
Tue Mar 20 14:42:47 2012
@@ -24,9 +24,7 @@ public class ConcurrentWriteTest extends
 
     protected static final String TEST_PATH = "/" + ConcurrentWriteTest.class.getName();
 
-    private static final String URL = "fs:{homeDir}/target;clean";
-    // private static final String URL = "fs:{homeDir}/target";
-    // private static final String URL = "simple:";
+    private static final String URL = "simple:";
     //private static final String URL = "simple:fs:target/temp;clean";
 
     private static final int NUM_THREADS = 20;

Modified: jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/HelloWorld.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/HelloWorld.java?rev=1302917&r1=1302916&r2=1302917&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/HelloWorld.java
(original)
+++ jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/HelloWorld.java
Tue Mar 20 14:42:47 2012
@@ -25,7 +25,6 @@ import org.json.simple.parser.ParseExcep
 public class HelloWorld {
 
     public static void main(String... args) throws ParseException {
-        test("fs:{homeDir};clean");
         test("simple:");
         test("simple:fs:target/temp;clean");
     }

Modified: jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/MultiMkTestBase.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/MultiMkTestBase.java?rev=1302917&r1=1302916&r2=1302917&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/MultiMkTestBase.java
(original)
+++ jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/MultiMkTestBase.java
Tue Mar 20 14:42:47 2012
@@ -48,8 +48,7 @@ public class MultiMkTestBase {
     public static Collection<Object[]> urls() {
             return Arrays.asList(new Object[][]{
                     {"simple:fs:target/temp"},
-                    {"fs:{homeDir}/target"},
-                    {"http-bridge:fs:{homeDir}/target"},
+                    {"http-bridge:simple:fs:target/temp"},
                     {"simple:"}
                     });
     }

Modified: jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/cluster/BasicTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/cluster/BasicTest.java?rev=1302917&r1=1302916&r2=1302917&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/cluster/BasicTest.java
(original)
+++ jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/cluster/BasicTest.java
Tue Mar 20 14:42:47 2012
@@ -33,8 +33,8 @@ public class BasicTest {
     
     @Before
     public void setUp() throws Exception {
-        mk1 = MicroKernelFactory.getInstance("fs:{homeDir}/target/mk1;clean");
-        mk2 = MicroKernelFactory.getInstance("fs:{homeDir}/target/mk2;clean");
+        mk1 = MicroKernelFactory.getInstance("simple:fs:{homeDir}/target/mk1;clean");
+        mk2 = MicroKernelFactory.getInstance("simple:fs:{homeDir}/target/mk2;clean");
     }
     
     @After

Modified: jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/cluster/HotBackupTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/cluster/HotBackupTest.java?rev=1302917&r1=1302916&r2=1302917&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/cluster/HotBackupTest.java
(original)
+++ jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/cluster/HotBackupTest.java
Tue Mar 20 14:42:47 2012
@@ -29,8 +29,8 @@ public class HotBackupTest {
     
     @Before
     public void setUp() throws Exception {
-        source = MicroKernelFactory.getInstance("fs:{homeDir}/target/mk1;clean");
-        target = MicroKernelFactory.getInstance("fs:{homeDir}/target/mk2;clean");
+        source = MicroKernelFactory.getInstance("simple:fs:{homeDir}/target/mk1;clean");
+        target = MicroKernelFactory.getInstance("simple:fs:{homeDir}/target/mk2;clean");
     }
     
     @After



Mime
View raw message