Author: mduerig
Date: Fri Jul  4 21:18:35 2014
New Revision: 1607941

URL: http://svn.apache.org/r1607941
Log:
OAK-1928: Cleanup test and execution fixtures
Remove the MemoryMK and the H2 fixtures

Modified:
    jackrabbit/oak/trunk/oak-run/README.md
    
jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/BenchmarkRunner.java
    
jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/fixture/OakFixture.java
    
jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/fixture/OakRepositoryFixture.java
    
jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/run/Main.java
    
jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/scalability/ScalabilityRunner.java

Modified: jackrabbit/oak/trunk/oak-run/README.md
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/README.md?rev=1607941&r1=1607940&r2=1607941&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-run/README.md (original)
+++ jackrabbit/oak/trunk/oak-run/README.md Fri Jul  4 21:18:35 2014
@@ -148,7 +148,6 @@ to be used. The following fixtures are c
 | Oak-MongoMK   | Oak with the Mongo MicroKernel                        |
 | Oak-Tar       | Oak with the Tar backend (aka Segment NodeStore)      |
 | Oak-Tar-FDS   | Oak with the Tar backend and FileDataStore            |
-| Oak-H2        | Oak with the MK using embedded H2 database            |
 
 
 Depending on the fixture the following options are available:
@@ -158,7 +157,7 @@ Depending on the fixture the following o
     --port 27101           - MongoDB port
     --db <name>            - MongoDB database (default is a generated name)
     --clusterIds           - Cluster Ids for the Mongo setup: a comma 
separated list of integers
-    --base <file>          - Tar and H2: Path to the base file
+    --base <file>          - Tar: Path to the base file
     --mmap <64bit?>        - TarMK memory mapping (the default on 64 bit JVMs)
 
 Examples:
@@ -185,7 +184,7 @@ The following benchmark options (with de
     --port 27101           - MongoDB port
     --db <name>            - MongoDB database (default is a generated name)
     --dropDBAfterTest true - Whether to drop the MongoDB database after the 
test
-    --base target          - Path to the base file (Tar and H2 setup),
+    --base target          - Path to the base file (Tar setup),
     --mmap <64bit?>        - TarMK memory mapping (the default on 64 bit JVMs)
     --cache 100            - cache size (in MB)
     --wikipedia <file>     - Wikipedia dump
@@ -203,8 +202,7 @@ that need them. For example the Wikipedi
 WikipediaImport test case and the MongoDB address information by the
 MongoMK and SegmentMK -based repository fixtures. The cache setting
 controls the bundle cache size in Jackrabbit, the KernelNodeState
-cache size in MongoMK and the default H2 MK, and the segment cache
-size in SegmentMK.
+cache size in MongoMK, and the segment cache size in SegmentMK.
 
 The `--concurrency` levels can be specified as comma separated list of values,
 eg: `--concurrency 1,4,8`, which will execute the same test with the number of
@@ -253,7 +251,6 @@ Finally the benchmark runner supports th
 | Oak-MongoNS   | Oak with the Mongo NodeStore                          |
 | Oak-MongoMK   | Oak with the Mongo MicroKernel                        |
 | Oak-Tar       | Oak with the Tar backend (aka Segment NodeStore)      |
-| Oak-H2        | Oak with the MK using embedded H2 database            |
 | Oak-RDB       | Oak with the DocumentMK/RDB persistence               |
 
 (Note that for Oak-RDB, the required JDBC drivers either need to be embedded
@@ -381,7 +378,7 @@ The following scalability options (with 
     --port 27101           - MongoDB port
     --db <name>            - MongoDB database (default is a generated name)
     --dropDBAfterTest true - Whether to drop the MongoDB database after the 
test
-    --base target          - Path to the base file (Tar and H2 setup),
+    --base target          - Path to the base file (Tar setup),
     --mmap <64bit?>        - TarMK memory mapping (the default on 64 bit JVMs)
     --cache 100            - cache size (in MB)
     --csvFile <file>       - Optional csv file to report the benchmark results
@@ -392,8 +389,8 @@ The following scalability options (with 
 These options are passed to the various suites and repository fixtures
 that need them. For example the the MongoDB address information by the
 MongoMK and SegmentMK -based repository fixtures. The cache setting
-controls the KernelNodeState cache size in MongoMK and the default H2 MK, and 
the 
-segment cache size in SegmentMK.
+controls the KernelNodeState cache size in MongoMK, and the segment
+cache size in SegmentMK.
 
 You can use extra JVM options like `-Xmx` settings to better control the
 scalability suite test environment. It's also possible to attach the JVM to a
@@ -428,7 +425,6 @@ Finally the scalability runner supports 
 | Oak-MongoNS   | Oak with the Mongo NodeStore                          |
 | Oak-MongoMK   | Oak with the Mongo MicroKernel                        |
 | Oak-Tar       | Oak with the Tar backend (aka Segment NodeStore)      |
-| Oak-H2        | Oak with the MK using embedded H2 database            |
 | Oak-RDB       | Oak with the DocumentMK/RDB persistence               |
 
 (Note that for Oak-RDB, the required JDBC drivers either need to be embedded

Modified: 
jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/BenchmarkRunner.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/BenchmarkRunner.java?rev=1607941&r1=1607940&r2=1607941&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/BenchmarkRunner.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/BenchmarkRunner.java
 Fri Jul  4 21:18:35 2014
@@ -110,8 +110,6 @@ public class BenchmarkRunner {
         RepositoryFixture[] allFixtures = new RepositoryFixture[] {
                 new JackrabbitRepositoryFixture(base.value(options), 
cacheSize),
                 OakRepositoryFixture.getMemoryNS(cacheSize * MB),
-                OakRepositoryFixture.getMemoryMK(cacheSize * MB),
-                OakRepositoryFixture.getH2MK(base.value(options), cacheSize * 
MB),
                 OakRepositoryFixture.getMongo(
                         host.value(options), port.value(options),
                         dbName.value(options), dropDBAfterTest.value(options),

Modified: 
jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/fixture/OakFixture.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/fixture/OakFixture.java?rev=1607941&r1=1607940&r2=1607941&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/fixture/OakFixture.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/fixture/OakFixture.java
 Fri Jul  4 21:18:35 2014
@@ -22,13 +22,10 @@ import java.util.Map;
 import javax.sql.DataSource;
 
 import com.google.common.collect.Maps;
-
 import org.apache.commons.io.FileUtils;
 import org.apache.jackrabbit.core.data.DataStore;
 import org.apache.jackrabbit.core.data.DataStoreException;
 import org.apache.jackrabbit.core.data.FileDataStore;
-import org.apache.jackrabbit.mk.api.MicroKernel;
-import org.apache.jackrabbit.mk.core.MicroKernelImpl;
 import org.apache.jackrabbit.oak.Oak;
 import org.apache.jackrabbit.oak.commons.PropertiesUtil;
 import org.apache.jackrabbit.oak.kernel.KernelNodeStore;
@@ -49,7 +46,6 @@ public abstract class OakFixture {
 
     public static final String OAK_MEMORY = "Oak-Memory";
     public static final String OAK_MEMORY_NS = "Oak-MemoryNS";
-    public static final String OAK_MEMORY_MK = "Oak-MemoryMK";
 
     public static final String OAK_MONGO = "Oak-Mongo";
     public static final String OAK_MONGO_FDS = "Oak-Mongo-FDS";
@@ -58,7 +54,6 @@ public abstract class OakFixture {
 
     public static final String OAK_RDB = "Oak-RDB";
 
-    public static final String OAK_H2 = "Oak-H2";
     public static final String OAK_TAR = "Oak-Tar";
     public static final String OAK_TAR_FDS = "Oak-Tar-FDS";
 
@@ -85,28 +80,19 @@ public abstract class OakFixture {
     }
 
     public static OakFixture getMemory(long cacheSize) {
-        return getMemory(OAK_MEMORY, false, cacheSize);
+        return getMemory(OAK_MEMORY, cacheSize);
     }
 
     public static OakFixture getMemoryNS(long cacheSize) {
-        return getMemory(OAK_MEMORY_NS, false, cacheSize);
-    }
-
-    public static OakFixture getMemoryMK(long cacheSize) {
-        return getMemory(OAK_MEMORY_MK, true, cacheSize);
+        return getMemory(OAK_MEMORY_NS, cacheSize);
     }
 
-    public static OakFixture getMemory(String name, final boolean useMk, final 
long cacheSize) {
+    public static OakFixture getMemory(String name, final long cacheSize) {
         return new OakFixture(name) {
             @Override
             public Oak getOak(int clusterId) throws Exception {
                 Oak oak;
-                if (useMk) {
-                    MicroKernel kernel = new MicroKernelImpl();
-                    oak = new Oak(new KernelNodeStore(kernel, cacheSize));
-                } else {
-                    oak = new Oak(new MemoryNodeStore());
-                }
+                oak = new Oak(new MemoryNodeStore());
                 return oak;
             }
 
@@ -115,12 +101,7 @@ public abstract class OakFixture {
                 Oak[] cluster = new Oak[n];
                 for (int i = 0; i < cluster.length; i++) {
                     Oak oak;
-                    if (useMk) {
-                        MicroKernel kernel = new MicroKernelImpl();
-                        oak = new Oak(new KernelNodeStore(kernel, cacheSize));
-                    } else {
-                        oak = new Oak(new MemoryNodeStore());
-                    }
+                    oak = new Oak(new MemoryNodeStore());
                     cluster[i] = oak;
                 }
                 return cluster;
@@ -423,34 +404,4 @@ public abstract class OakFixture {
         };
     }
 
-
-
-    public static OakFixture getH2MK(final File base, final long cacheSize) {
-        return new OakFixture(OAK_H2) {
-            private MicroKernelImpl[] kernels;
-
-            @Override
-            public Oak getOak(int clusterId) throws Exception {
-                return new Oak(new KernelNodeStore(new 
MicroKernelImpl(base.getPath()), cacheSize));
-            }
-
-            @Override
-            public Oak[] setUpCluster(int n) throws Exception {
-                Oak[] cluster = new Oak[n];
-                kernels = new MicroKernelImpl[cluster.length];
-                for (int i = 0; i < cluster.length; i++) {
-                    kernels[i] = new MicroKernelImpl(new File(base, 
unique).getPath());
-                    cluster[i] = new Oak(new KernelNodeStore(kernels[i], 
cacheSize));
-                }
-                return cluster;
-            }
-            @Override
-            public void tearDownCluster() {
-                for (MicroKernelImpl kernel : kernels) {
-                    kernel.dispose();
-                }
-                FileUtils.deleteQuietly(new File(base, unique));
-            }
-        };
-    }
 }
\ No newline at end of file

Modified: 
jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/fixture/OakRepositoryFixture.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/fixture/OakRepositoryFixture.java?rev=1607941&r1=1607940&r2=1607941&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/fixture/OakRepositoryFixture.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/fixture/OakRepositoryFixture.java
 Fri Jul  4 21:18:35 2014
@@ -26,19 +26,11 @@ import org.apache.jackrabbit.oak.jcr.Jcr
 public class OakRepositoryFixture implements RepositoryFixture {
 
     public static RepositoryFixture getMemoryNS(long cacheSize) {
-        return getMemory(OakFixture.OAK_MEMORY_NS, false, cacheSize);
+        return getMemory(OakFixture.OAK_MEMORY_NS, cacheSize);
     }
 
-    public static RepositoryFixture getMemoryMK(long cacheSize) {
-        return getMemory(OakFixture.OAK_MEMORY_MK, true, cacheSize);
-    }
-
-    private static RepositoryFixture getMemory(String name, boolean useMK, 
long cacheSize) {
-        return new OakRepositoryFixture(OakFixture.getMemory(name, useMK, 
cacheSize));
-    }
-
-    public static RepositoryFixture getH2MK(File base, long cacheSize) {
-        return new OakRepositoryFixture(OakFixture.getH2MK(base, cacheSize));
+    private static RepositoryFixture getMemory(String name, long cacheSize) {
+        return new OakRepositoryFixture(OakFixture.getMemory(name, cacheSize));
     }
 
     public static RepositoryFixture getMongo(String host, int port, String 
database,

Modified: 
jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/run/Main.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/run/Main.java?rev=1607941&r1=1607940&r2=1607941&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/run/Main.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/run/Main.java
 Fri Jul  4 21:18:35 2014
@@ -16,6 +16,9 @@
  */
 package org.apache.jackrabbit.oak.run;
 
+import static com.google.common.collect.Sets.newHashSet;
+import static java.util.Arrays.asList;
+
 import java.io.Closeable;
 import java.io.File;
 import java.io.IOException;
@@ -45,7 +48,6 @@ import com.mongodb.MongoURI;
 import joptsimple.OptionParser;
 import joptsimple.OptionSet;
 import joptsimple.OptionSpec;
-
 import org.apache.jackrabbit.core.RepositoryContext;
 import org.apache.jackrabbit.core.config.RepositoryConfig;
 import org.apache.jackrabbit.oak.Oak;
@@ -82,9 +84,6 @@ import org.eclipse.jetty.server.Server;
 import org.eclipse.jetty.servlet.ServletContextHandler;
 import org.eclipse.jetty.servlet.ServletHolder;
 
-import static com.google.common.collect.Sets.newHashSet;
-import static java.util.Arrays.asList;
-
 public class Main {
 
     public static final int PORT = 8080;
@@ -530,8 +529,6 @@ public class Main {
         if (fix.startsWith(OakFixture.OAK_MEMORY)) {
             if (OakFixture.OAK_MEMORY_NS.equals(fix)) {
                 oakFixture = OakFixture.getMemoryNS(cacheSize * MB);
-            } else if (OakFixture.OAK_MEMORY_MK.equals(fix)) {
-                oakFixture = OakFixture.getMemoryMK(cacheSize * MB);
             } else {
                 oakFixture = OakFixture.getMemory(cacheSize * MB);
             }
@@ -562,12 +559,6 @@ public class Main {
                 throw new IllegalArgumentException("Required argument base 
missing.");
             }
             oakFixture = OakFixture.getTar(OakFixture.OAK_TAR, baseFile, 256, 
cacheSize, mmap.value(options), false);
-        } else if (fix.equals(OakFixture.OAK_H2)) {
-            File baseFile = base.value(options);
-            if (baseFile == null) {
-                throw new IllegalArgumentException("Required argument base 
missing.");
-            }
-            oakFixture = OakFixture.getH2MK(baseFile, cacheSize * MB);
         } else {
             throw new IllegalArgumentException("Unsupported repository setup " 
+ fix);
         }

Modified: 
jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/scalability/ScalabilityRunner.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/scalability/ScalabilityRunner.java?rev=1607941&r1=1607940&r2=1607941&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/scalability/ScalabilityRunner.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/scalability/ScalabilityRunner.java
 Fri Jul  4 21:18:35 2014
@@ -94,8 +94,6 @@ public class ScalabilityRunner {
         RepositoryFixture[] allFixtures = new RepositoryFixture[] {
                 new JackrabbitRepositoryFixture(base.value(options), 
cacheSize),
                 OakRepositoryFixture.getMemoryNS(cacheSize * MB),
-                OakRepositoryFixture.getMemoryMK(cacheSize * MB),
-                OakRepositoryFixture.getH2MK(base.value(options), cacheSize * 
MB),
                 OakRepositoryFixture.getMongo(
                         host.value(options), port.value(options),
                         dbName.value(options), dropDBAfterTest.value(options),


Reply via email to