Author: angela
Date: Mon Apr 13 08:28:21 2015
New Revision: 1673133

URL: http://svn.apache.org/r1673133
Log:
OAK-2700 : Cleanup usages of mk-api
OAK-2701 : Move oak-mk-api to attic
OAK-2702 : Move oak-mk to attic

Added:
    jackrabbit/oak/attic/oak-commons/
    jackrabbit/oak/attic/oak-commons/src/
    jackrabbit/oak/attic/oak-commons/src/main/
    jackrabbit/oak/attic/oak-commons/src/main/java/
    jackrabbit/oak/attic/oak-commons/src/main/java/org/
    jackrabbit/oak/attic/oak-commons/src/main/java/org/apache/
    jackrabbit/oak/attic/oak-commons/src/main/java/org/apache/jackrabbit/
    jackrabbit/oak/attic/oak-commons/src/main/java/org/apache/jackrabbit/oak/
    
jackrabbit/oak/attic/oak-commons/src/main/java/org/apache/jackrabbit/oak/commons/
    
jackrabbit/oak/attic/oak-commons/src/main/java/org/apache/jackrabbit/oak/commons/mk/
      - copied from r1672615, 
jackrabbit/oak/trunk/oak-commons/src/main/java/org/apache/jackrabbit/oak/commons/mk/
    jackrabbit/oak/attic/oak-commons/src/test/
    jackrabbit/oak/attic/oak-commons/src/test/java/
    jackrabbit/oak/attic/oak-commons/src/test/java/org/
    jackrabbit/oak/attic/oak-commons/src/test/java/org/apache/
    jackrabbit/oak/attic/oak-commons/src/test/java/org/apache/jackrabbit/
    jackrabbit/oak/attic/oak-commons/src/test/java/org/apache/jackrabbit/oak/
    
jackrabbit/oak/attic/oak-commons/src/test/java/org/apache/jackrabbit/oak/commons/
    
jackrabbit/oak/attic/oak-commons/src/test/java/org/apache/jackrabbit/oak/commons/mk/
      - copied from r1672615, 
jackrabbit/oak/trunk/oak-commons/src/test/java/org/apache/jackrabbit/oak/commons/mk/
    jackrabbit/oak/attic/oak-it-mk/
    jackrabbit/oak/attic/oak-it-mk/mk/
      - copied from r1672615, jackrabbit/oak/trunk/oak-it/mk/
    jackrabbit/oak/attic/oak-mk/
      - copied from r1672615, jackrabbit/oak/trunk/oak-mk/
    jackrabbit/oak/attic/oak-mk-api/
      - copied from r1672615, jackrabbit/oak/trunk/oak-mk-api/
Removed:
    
jackrabbit/oak/trunk/oak-auth-external/src/test/resources/META-INF/services/org.apache.jackrabbit.mk.test.MicroKernelFixture
    
jackrabbit/oak/trunk/oak-commons/src/main/java/org/apache/jackrabbit/oak/commons/mk/
    
jackrabbit/oak/trunk/oak-commons/src/test/java/org/apache/jackrabbit/oak/commons/mk/
    
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/
    
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/LogWrapper.java
    
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/TimingWrapper.java
    
jackrabbit/oak/trunk/oak-core/src/test/resources/META-INF/services/org.apache.jackrabbit.mk.test.MicroKernelFixture
    jackrabbit/oak/trunk/oak-it/mk/
    jackrabbit/oak/trunk/oak-mk/
    jackrabbit/oak/trunk/oak-mk-api/
Modified:
    jackrabbit/oak/trunk/README.md
    jackrabbit/oak/trunk/oak-commons/pom.xml
    jackrabbit/oak/trunk/oak-core/pom.xml
    
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ContentRepositoryImpl.java
    
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ContentSessionImpl.java
    
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentMK.java
    
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreBranch.java
    
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/TimingDocumentStoreWrapper.java
    
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentOverflowException.java
    
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/AbstractMongoConnectionTest.java
    
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/BaseDocumentMKTest.java
    
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ClusterTest.java
    
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ConcurrentConflictTest.java
    
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ConcurrentPropertyUpdateTest.java
    
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ConflictTest.java
    
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentMKBranchMergeTest.java
    
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentMKCommitAddTest.java
    
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentMKDiffTest.java
    
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentMKRebaseTest.java
    
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentMKResetTest.java
    
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentMKTestBase.java
    
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/MongoDocumentStoreIT.java
    
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/RandomizedClusterTest.java
    
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/SimpleTest.java
    
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/blob/DocumentMKReadTest.java
    
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/blob/DocumentMKWriteTest.java
    
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/impl/DocumentMKWaitForCommitTest.java
    
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/impl/SimpleNodeScenario.java
    
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/impl/command/ConcurrentWriteMultipleMkMongoTest.java
    
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/multitenancy/MultiTenancyTest.java
    jackrabbit/oak/trunk/oak-doc/src/site/markdown/architecture/big-picture.uxf
    jackrabbit/oak/trunk/oak-doc/src/site/markdown/architecture/nodestate.md
    
jackrabbit/oak/trunk/oak-doc/src/site/markdown/architecture/transactional-model.md
    jackrabbit/oak/trunk/oak-doc/src/site/markdown/dev_getting_started.md
    jackrabbit/oak/trunk/oak-doc/src/site/markdown/nodestore/documentmk.md
    jackrabbit/oak/trunk/oak-doc/src/site/markdown/nodestore/overview.md
    jackrabbit/oak/trunk/oak-it/osgi/pom.xml
    jackrabbit/oak/trunk/oak-it/osgi/test-bundles.xml
    jackrabbit/oak/trunk/oak-it/pom.xml
    jackrabbit/oak/trunk/oak-run/README.md
    
jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/fixture/OakFixture.java
    jackrabbit/oak/trunk/pom.xml

Modified: jackrabbit/oak/trunk/README.md
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/README.md?rev=1673133&r1=1673132&r2=1673133&view=diff
==============================================================================
--- jackrabbit/oak/trunk/README.md (original)
+++ jackrabbit/oak/trunk/README.md Mon Apr 13 08:28:21 2015
@@ -50,8 +50,6 @@ The build consists of the following main
   - oak-parent        - parent POM
   - oak-doc           - Oak documentation
   - oak-commons       - shared utility code
-  - oak-mk-api        - MicroKernel API (_deprecated_)
-  - oak-mk            - MicroKernel implementation
   - [oak-core][1]     - Oak repository API and implementation
   - oak-jcr           - JCR binding for the Oak repository
   - oak-sling         - integration with Apache Sling
@@ -64,7 +62,6 @@ The build consists of the following main
   - oak-pojosr        - integration with PojoSR
   - oak-upgrade       - tooling for upgrading Jackrabbit repositories to Oak
   - oak-it            - integration tests
-    - oak-it/mk       - integration tests for MicroKernel
     - oak-it/osgi     - integration tests for OSGi
 
   [1]: oak-core/README.md
@@ -74,7 +71,11 @@ Archive
 
 The following components have been moved to the Jackrabbit Attic:
 
+  - oak-mk-api        - MicroKernel API (_deprecated_)
+  - oak-mk            - MicroKernel implementation
   - oak-mk-remote     - MicroKernel remoting  (see OAK-2693)
+  - oak-it/mk         - integration tests for MicroKernel
+
 
 
 License

Modified: jackrabbit/oak/trunk/oak-commons/pom.xml
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-commons/pom.xml?rev=1673133&r1=1673132&r2=1673133&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-commons/pom.xml (original)
+++ jackrabbit/oak/trunk/oak-commons/pom.xml Mon Apr 13 08:28:21 2015
@@ -87,11 +87,6 @@
       <artifactId>guava</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.apache.jackrabbit</groupId>
-      <artifactId>oak-mk-api</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-    <dependency>
       <groupId>commons-io</groupId>
       <artifactId>commons-io</artifactId>
       <version>2.4</version>

Modified: jackrabbit/oak/trunk/oak-core/pom.xml
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/pom.xml?rev=1673133&r1=1673132&r2=1673133&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/pom.xml (original)
+++ jackrabbit/oak/trunk/oak-core/pom.xml Mon Apr 13 08:28:21 2015
@@ -50,7 +50,6 @@
               org.apache.jackrabbit.oak.api.jmx,
               org.apache.jackrabbit.oak.stats,
               org.apache.jackrabbit.oak.json,
-              org.apache.jackrabbit.oak.kernel,
               org.apache.jackrabbit.oak.management,
               org.apache.jackrabbit.oak.util,
               org.apache.jackrabbit.oak.namepath,
@@ -183,11 +182,6 @@
     <!-- Dependencies to other Oak components -->
     <dependency>
       <groupId>org.apache.jackrabbit</groupId>
-      <artifactId>oak-mk-api</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.jackrabbit</groupId>
       <artifactId>oak-commons</artifactId>
       <version>${project.version}</version>
     </dependency>

Modified: 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ContentRepositoryImpl.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ContentRepositoryImpl.java?rev=1673133&r1=1673132&r2=1673133&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ContentRepositoryImpl.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ContentRepositoryImpl.java
 Mon Apr 13 08:28:21 2015
@@ -105,7 +105,7 @@ import org.apache.jackrabbit.oak.spi.sta
 import org.apache.jackrabbit.oak.util.GenericDescriptors;
 
 /**
- * {@code MicroKernel}-based implementation of
+ * {@code NodeStore}-based implementation of
  * the {@link ContentRepository} interface.
  */
 public class ContentRepositoryImpl implements ContentRepository, Closeable {

Modified: 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ContentSessionImpl.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ContentSessionImpl.java?rev=1673133&r1=1673132&r2=1673133&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ContentSessionImpl.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ContentSessionImpl.java
 Mon Apr 13 08:28:21 2015
@@ -38,7 +38,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * {@code MicroKernel}-based implementation of the {@link ContentSession} 
interface.
+ * {@code NodeStore}-based implementation of the {@link ContentSession} 
interface.
  */
 class ContentSessionImpl implements ContentSession {
 

Modified: 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentMK.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentMK.java?rev=1673133&r1=1673132&r2=1673133&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentMK.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentMK.java
 Mon Apr 13 08:28:21 2015
@@ -30,8 +30,6 @@ import com.google.common.cache.Weigher;
 import com.google.common.util.concurrent.MoreExecutors;
 import com.mongodb.DB;
 
-import org.apache.jackrabbit.mk.api.MicroKernel;
-import org.apache.jackrabbit.mk.api.MicroKernelException;
 import org.apache.jackrabbit.oak.api.CommitFailedException;
 import org.apache.jackrabbit.oak.cache.CacheLIRS;
 import org.apache.jackrabbit.oak.cache.CacheValue;
@@ -62,9 +60,10 @@ import org.slf4j.LoggerFactory;
 import static com.google.common.base.Preconditions.checkArgument;
 
 /**
- * A MicroKernel implementation that stores the data in a {@link 
DocumentStore}.
+ * A JSON-based wrapper around the NodeStore implementation that stores the
+ * data in a {@link DocumentStore}. It is used for testing purpose only.
  */
-public class DocumentMK implements MicroKernel {
+public class DocumentMK {
     
     static final Logger LOG = LoggerFactory.getLogger(DocumentMK.class);
     
@@ -141,48 +140,42 @@ public class DocumentMK implements Micro
         return nodeStore.getPendingWriteCount();
     }
 
-    @Override
-    public String getHeadRevision() throws MicroKernelException {
+    public String getHeadRevision() throws DocumentStoreException {
         return nodeStore.getHeadRevision().toString();
     }
 
-    @Override @Nonnull
-    public String checkpoint(long lifetime) throws MicroKernelException {
+    public String checkpoint(long lifetime) throws DocumentStoreException {
         try {
             return nodeStore.checkpoint(lifetime);
         } catch (DocumentStoreException e) {
-            throw new MicroKernelException(e);
+            throw new DocumentStoreException(e);
         }
     }
 
-    @Override
     public String getRevisionHistory(long since, int maxEntries, String path)
-            throws MicroKernelException {
+            throws DocumentStoreException {
         // not currently called by oak-core
-        throw new MicroKernelException("Not implemented");
+        throw new DocumentStoreException("Not implemented");
     }
 
-    @Override
     public String waitForCommit(String oldHeadRevisionId, long timeout)
-            throws MicroKernelException, InterruptedException {
+            throws DocumentStoreException, InterruptedException {
         // not currently called by oak-core
-        throw new MicroKernelException("Not implemented");
+        throw new DocumentStoreException("Not implemented");
     }
 
-    @Override
     public String getJournal(String fromRevisionId, String toRevisionId,
-            String path) throws MicroKernelException {
+            String path) throws DocumentStoreException {
         // not currently called by oak-core
-        throw new MicroKernelException("Not implemented");
+        throw new DocumentStoreException("Not implemented");
     }
 
-    @Override
     public String diff(String fromRevisionId,
                        String toRevisionId,
                        String path,
-                       int depth) throws MicroKernelException {
+                       int depth) throws DocumentStoreException {
         if (depth != 0) {
-            throw new MicroKernelException("Only depth 0 is supported, depth 
is " + depth);
+            throw new DocumentStoreException("Only depth 0 is supported, depth 
is " + depth);
         }
         if (path == null || path.equals("")) {
             path = "/";
@@ -190,15 +183,14 @@ public class DocumentMK implements Micro
         try {
             return nodeStore.diff(fromRevisionId, toRevisionId, path);
         } catch (DocumentStoreException e) {
-            throw new MicroKernelException(e);
+            throw new DocumentStoreException(e);
         }
     }
 
-    @Override
     public boolean nodeExists(String path, String revisionId)
-            throws MicroKernelException {
+            throws DocumentStoreException {
         if (!PathUtils.isAbsolute(path)) {
-            throw new MicroKernelException("Path is not absolute: " + path);
+            throw new DocumentStoreException("Path is not absolute: " + path);
         }
         revisionId = revisionId != null ? revisionId : 
nodeStore.getHeadRevision().toString();
         Revision rev = Revision.fromString(revisionId);
@@ -206,24 +198,22 @@ public class DocumentMK implements Micro
         try {
             n = nodeStore.getNode(path, rev);
         } catch (DocumentStoreException e) {
-            throw new MicroKernelException(e);
+            throw new DocumentStoreException(e);
         }
         return n != null;
     }
 
-    @Override
     public long getChildNodeCount(String path, String revisionId)
-            throws MicroKernelException {
+            throws DocumentStoreException {
         // not currently called by oak-core
-        throw new MicroKernelException("Not implemented");
+        throw new DocumentStoreException("Not implemented");
     }
 
-    @Override
     public String getNodes(String path, String revisionId, int depth,
             long offset, int maxChildNodes, String filter)
-            throws MicroKernelException {
+            throws DocumentStoreException {
         if (depth != 0) {
-            throw new MicroKernelException("Only depth 0 is supported, depth 
is " + depth);
+            throw new DocumentStoreException("Only depth 0 is supported, depth 
is " + depth);
         }
         revisionId = revisionId != null ? revisionId : 
nodeStore.getHeadRevision().toString();
         Revision rev = Revision.fromString(revisionId);
@@ -263,13 +253,12 @@ public class DocumentMK implements Micro
             json.endObject();
             return json.toString();
         } catch (DocumentStoreException e) {
-            throw new MicroKernelException(e);
+            throw new DocumentStoreException(e);
         }
     }
 
-    @Override
     public String commit(String rootPath, String jsonDiff, String baseRevId,
-            String message) throws MicroKernelException {
+            String message) throws DocumentStoreException {
         boolean success = false;
         boolean isBranch = false;
         Revision rev;
@@ -281,7 +270,7 @@ public class DocumentMK implements Micro
             rev = commit.apply();
             success = true;
         } catch (DocumentStoreException e) {
-            throw new MicroKernelException(e);
+            throw new DocumentStoreException(e);
         } finally {
             if (!success) {
                 nodeStore.canceled(commit);
@@ -292,8 +281,7 @@ public class DocumentMK implements Micro
         return rev.toString();
     }
 
-    @Override
-    public String branch(@Nullable String trunkRevisionId) throws 
MicroKernelException {
+    public String branch(@Nullable String trunkRevisionId) throws 
DocumentStoreException {
         // nothing is written when the branch is created, the returned
         // revision simply acts as a reference to the branch base revision
         Revision revision = trunkRevisionId != null
@@ -301,28 +289,26 @@ public class DocumentMK implements Micro
         return revision.asBranchRevision().toString();
     }
 
-    @Override
     public String merge(String branchRevisionId, String message)
-            throws MicroKernelException {
+            throws DocumentStoreException {
         // TODO improve implementation if needed
         Revision revision = Revision.fromString(branchRevisionId);
         if (!revision.isBranch()) {
-            throw new MicroKernelException("Not a branch: " + 
branchRevisionId);
+            throw new DocumentStoreException("Not a branch: " + 
branchRevisionId);
         }
         try {
             return nodeStore.merge(revision, null).toString();
         } catch (DocumentStoreException e) {
-            throw new MicroKernelException(e);
+            throw new DocumentStoreException(e);
         } catch (CommitFailedException e) {
-            throw new MicroKernelException(e);
+            throw new DocumentStoreException(e);
         }
     }
 
-    @Override
     @Nonnull
     public String rebase(@Nonnull String branchRevisionId,
                          @Nullable String newBaseRevisionId)
-            throws MicroKernelException {
+            throws DocumentStoreException {
         Revision r = Revision.fromString(branchRevisionId);
         Revision base = newBaseRevisionId != null ?
                 Revision.fromString(newBaseRevisionId) :
@@ -331,51 +317,47 @@ public class DocumentMK implements Micro
     }
 
     @Nonnull
-    @Override
     public String reset(@Nonnull String branchRevisionId,
                         @Nonnull String ancestorRevisionId)
-            throws MicroKernelException {
+            throws DocumentStoreException {
         Revision branch = Revision.fromString(branchRevisionId);
         if (!branch.isBranch()) {
-            throw new MicroKernelException("Not a branch revision: " + 
branchRevisionId);
+            throw new DocumentStoreException("Not a branch revision: " + 
branchRevisionId);
         }
         Revision ancestor = Revision.fromString(ancestorRevisionId);
         if (!ancestor.isBranch()) {
-            throw new MicroKernelException("Not a branch revision: " + 
ancestorRevisionId);
+            throw new DocumentStoreException("Not a branch revision: " + 
ancestorRevisionId);
         }
         try {
             return nodeStore.reset(branch, ancestor, null).toString();
         } catch (DocumentStoreException e) {
-            throw new MicroKernelException(e);
+            throw new DocumentStoreException(e);
         }
     }
 
-    @Override
-    public long getLength(String blobId) throws MicroKernelException {
+    public long getLength(String blobId) throws DocumentStoreException {
         try {
             return nodeStore.getBlobStore().getBlobLength(blobId);
         } catch (Exception e) {
-            throw new MicroKernelException(e);
+            throw new DocumentStoreException(e);
         }
     }
 
-    @Override
     public int read(String blobId, long pos, byte[] buff, int off, int length)
-            throws MicroKernelException {
+            throws DocumentStoreException {
         try {
             int read = nodeStore.getBlobStore().readBlob(blobId, pos, buff, 
off, length);
             return read < 0 ? 0 : read;
         } catch (Exception e) {
-            throw new MicroKernelException(e);
+            throw new DocumentStoreException(e);
         }
     }
 
-    @Override
-    public String write(InputStream in) throws MicroKernelException {
+    public String write(InputStream in) throws DocumentStoreException {
         try {
             return nodeStore.getBlobStore().writeBlob(in);
         } catch (Exception e) {
-            throw new MicroKernelException(e);
+            throw new DocumentStoreException(e);
         }
     }
 
@@ -406,7 +388,7 @@ public class DocumentMK implements Micro
                 case '-':
                     DocumentNodeState toRemove = nodeStore.getNode(path, 
commit.getBaseRevision());
                     if (toRemove == null) {
-                        throw new MicroKernelException("Node not found: " + 
path + " in revision " + baseRevId);
+                        throw new DocumentStoreException("Node not found: " + 
path + " in revision " + baseRevId);
                     }
                     commit.removeNode(path);
                     nodeStore.markAsDeleted(toRemove, commit, true);
@@ -434,9 +416,9 @@ public class DocumentMK implements Micro
                     }
                     DocumentNodeState source = nodeStore.getNode(path, 
baseRev);
                     if (source == null) {
-                        throw new MicroKernelException("Node not found: " + 
path + " in revision " + baseRevId);
+                        throw new DocumentStoreException("Node not found: " + 
path + " in revision " + baseRevId);
                     } else if (nodeExists(targetPath, baseRevId)) {
-                        throw new MicroKernelException("Node already exists: " 
+ targetPath + " in revision " + baseRevId);
+                        throw new DocumentStoreException("Node already exists: 
" + targetPath + " in revision " + baseRevId);
                     }
                     commit.moveNode(path, targetPath);
                     nodeStore.moveNode(source, targetPath, commit);
@@ -451,16 +433,16 @@ public class DocumentMK implements Micro
                     }
                     DocumentNodeState source = nodeStore.getNode(path, 
baseRev);
                     if (source == null) {
-                        throw new MicroKernelException("Node not found: " + 
path + " in revision " + baseRevId);
+                        throw new DocumentStoreException("Node not found: " + 
path + " in revision " + baseRevId);
                     } else if (nodeExists(targetPath, baseRevId)) {
-                        throw new MicroKernelException("Node already exists: " 
+ targetPath + " in revision " + baseRevId);
+                        throw new DocumentStoreException("Node already exists: 
" + targetPath + " in revision " + baseRevId);
                     }
                     commit.copyNode(path, targetPath);
                     nodeStore.copyNode(source, targetPath, commit);
                     break;
                 }
                 default:
-                    throw new MicroKernelException("token: " + (char) 
t.getTokenType());
+                    throw new DocumentStoreException("token: " + (char) 
t.getTokenType());
             }
         }
     }

Modified: 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreBranch.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreBranch.java?rev=1673133&r1=1673132&r2=1673133&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreBranch.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreBranch.java
 Mon Apr 13 08:28:21 2015
@@ -365,7 +365,7 @@ class DocumentNodeStoreBranch implements
         }
 
         /**
-         * Persist this branch to an underlying branch in the {@code 
MicroKernel}.
+         * Persist this branch to an underlying branch in the {@code 
NodeStore}.
          */
         Persisted persist() {
             Persisted p = new Persisted(base);
@@ -534,7 +534,7 @@ class DocumentNodeStoreBranch implements
 
     /**
      * Instances of this class represent a branch whose head is persisted to an
-     * underlying branch in the {@code MicroKernel}.
+     * underlying branch in the {@code NodeStore}.
      * <p>
      * Transitions to:
      * <ul>

Modified: 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/TimingDocumentStoreWrapper.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/TimingDocumentStoreWrapper.java?rev=1673133&r1=1673132&r2=1673133&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/TimingDocumentStoreWrapper.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/TimingDocumentStoreWrapper.java
 Mon Apr 13 08:28:21 2015
@@ -37,7 +37,7 @@ import org.apache.jackrabbit.oak.plugins
 import org.apache.jackrabbit.oak.plugins.document.cache.CacheInvalidationStats;
 
 /**
- * A MicroKernel wrapper that can be used to log and also time MicroKernel
+ * A DocumentStore wrapper that can be used to log and also time DocumentStore
  * calls.
  */
 public class TimingDocumentStoreWrapper implements DocumentStore {

Modified: 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentOverflowException.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentOverflowException.java?rev=1673133&r1=1673132&r2=1673133&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentOverflowException.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentOverflowException.java
 Mon Apr 13 08:28:21 2015
@@ -20,7 +20,7 @@
 package org.apache.jackrabbit.oak.plugins.segment;
 
 /**
- * This exception is thrown by the Segment MicroKernel when an internal
+ * This exception is thrown by the Segment NodeStore when an internal
  * limit is exceeded such as too many segment references. Clients should
  * only ever see this exception as the cause of a
  * {@link org.apache.jackrabbit.oak.api.CommitFailedException 
CommitFailedException}.

Modified: 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/AbstractMongoConnectionTest.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/AbstractMongoConnectionTest.java?rev=1673133&r1=1673132&r2=1673133&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/AbstractMongoConnectionTest.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/AbstractMongoConnectionTest.java
 Mon Apr 13 08:28:21 2015
@@ -17,7 +17,6 @@
 package org.apache.jackrabbit.oak.plugins.document;
 
 import com.mongodb.DB;
-import org.apache.jackrabbit.mk.api.MicroKernel;
 import org.apache.jackrabbit.oak.plugins.document.util.MongoConnection;
 import org.apache.jackrabbit.oak.stats.Clock;
 import org.junit.After;
@@ -68,8 +67,23 @@ public abstract class AbstractMongoConne
     }
 
     @Override
-    protected MicroKernel getMicroKernel() {
+    protected DocumentMK getDocumentMK() {
         return mk;
     }
 
+    protected static byte[] readFully(DocumentMK mk, String blobId) {
+        int remaining = (int) mk.getLength(blobId);
+        byte[] bytes = new byte[remaining];
+
+        int offset = 0;
+        while (remaining > 0) {
+            int count = mk.read(blobId, offset, bytes, offset, remaining);
+            if (count < 0) {
+                break;
+            }
+            offset += count;
+            remaining -= count;
+        }
+        return bytes;
+    }
 }

Modified: 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/BaseDocumentMKTest.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/BaseDocumentMKTest.java?rev=1673133&r1=1673132&r2=1673133&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/BaseDocumentMKTest.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/BaseDocumentMKTest.java
 Mon Apr 13 08:28:21 2015
@@ -16,7 +16,6 @@
  */
 package org.apache.jackrabbit.oak.plugins.document;
 
-import org.apache.jackrabbit.mk.api.MicroKernel;
 import org.junit.After;
 import org.junit.Before;
 
@@ -33,7 +32,7 @@ public class BaseDocumentMKTest extends
     }
 
     @Override
-    protected MicroKernel getMicroKernel() {
+    protected DocumentMK getDocumentMK() {
         return mk;
     }
 

Modified: 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ClusterTest.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ClusterTest.java?rev=1673133&r1=1673132&r2=1673133&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ClusterTest.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ClusterTest.java
 Mon Apr 13 08:28:21 2015
@@ -29,7 +29,6 @@ import java.util.Set;
 
 import com.google.common.collect.Sets;
 import com.mongodb.DB;
-import org.apache.jackrabbit.mk.api.MicroKernelException;
 import org.apache.jackrabbit.oak.commons.PathUtils;
 import org.apache.jackrabbit.oak.plugins.document.memory.MemoryDocumentStore;
 import org.apache.jackrabbit.oak.spi.blob.BlobStore;
@@ -299,7 +298,7 @@ public class ClusterTest {
         try {
             mk2.commit("/", "+\"test\":{}", m2r0, null);
             fail();
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
         mk1.runBackgroundOperations();
@@ -364,7 +363,7 @@ public class ClusterTest {
         try {
             mk2.commit("/", "+\"a\": {} +\"test\":{}", m2r0, null);
             fail();
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
         mk2.commit("/", "+\"a\": {}", null, null);

Modified: 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ConcurrentConflictTest.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ConcurrentConflictTest.java?rev=1673133&r1=1673132&r2=1673133&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ConcurrentConflictTest.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ConcurrentConflictTest.java
 Mon Apr 13 08:28:21 2015
@@ -25,8 +25,6 @@ import java.util.Map;
 import java.util.Random;
 import java.util.concurrent.atomic.AtomicInteger;
 
-import org.apache.jackrabbit.mk.api.MicroKernel;
-import org.apache.jackrabbit.mk.api.MicroKernelException;
 import org.apache.jackrabbit.oak.plugins.document.memory.MemoryDocumentStore;
 import org.json.simple.JSONObject;
 import org.json.simple.parser.JSONParser;
@@ -112,7 +110,7 @@ public class ConcurrentConflictTest exte
         final List<Exception> exceptions = Collections.synchronizedList(
                 new ArrayList<Exception>());
         List<Thread> writers = new ArrayList<Thread>();
-        for (final MicroKernel mk : kernels) {
+        for (final DocumentMK mk : kernels) {
             writers.add(new Thread(new Runnable() {
                 Random random = new Random();
                 Map<Integer, JSONObject> nodes = new HashMap<Integer, 
JSONObject>();
@@ -126,7 +124,7 @@ public class ConcurrentConflictTest exte
                                 if (!transfer()) {
                                     continue;
                                 }
-                            } catch (MicroKernelException e) {
+                            } catch (DocumentStoreException e) {
                                 log("Failed transfer @" + 
mk.getHeadRevision());
                                 // assume conflict
                                 conflicts.incrementAndGet();
@@ -214,7 +212,7 @@ public class ConcurrentConflictTest exte
         mk.dispose();
     }
 
-    static long calculateSum(MicroKernel mk, String rev) throws Exception {
+    static long calculateSum(DocumentMK mk, String rev) throws Exception {
         long sum = 0;
         for (int i = 0; i < NUM_NODES; i++) {
             String json = mk.getNodes("/node-" + i, rev, 0, 0, 1000, null);

Modified: 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ConcurrentPropertyUpdateTest.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ConcurrentPropertyUpdateTest.java?rev=1673133&r1=1673132&r2=1673133&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ConcurrentPropertyUpdateTest.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ConcurrentPropertyUpdateTest.java
 Mon Apr 13 08:28:21 2015
@@ -17,7 +17,6 @@
 package org.apache.jackrabbit.oak.plugins.document;
 
 import com.google.common.collect.Lists;
-import org.apache.jackrabbit.mk.api.MicroKernelException;
 import org.apache.jackrabbit.oak.api.CommitFailedException;
 import org.apache.jackrabbit.oak.plugins.commit.AnnotatingConflictHandler;
 import org.apache.jackrabbit.oak.plugins.commit.ConflictHook;
@@ -63,7 +62,7 @@ public class ConcurrentPropertyUpdateTes
             @Override
             public <T extends Document> T findAndUpdate(Collection<T> 
collection,
                                                         UpdateOp update)
-                    throws MicroKernelException {
+                    throws DocumentStoreException {
                 try {
                     Thread.sleep((long) (Math.random() * 10f));
                 } catch (InterruptedException e) {

Modified: 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ConflictTest.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ConflictTest.java?rev=1673133&r1=1673132&r2=1673133&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ConflictTest.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/ConflictTest.java
 Mon Apr 13 08:28:21 2015
@@ -16,7 +16,6 @@
  */
 package org.apache.jackrabbit.oak.plugins.document;
 
-import org.apache.jackrabbit.mk.api.MicroKernelException;
 import org.junit.Test;
 
 import static org.junit.Assert.fail;
@@ -35,7 +34,7 @@ public class ConflictTest extends BaseDo
         try {
             mk.commit("/foo", "^\"prop\":\"value\"", rev, null);
             fail("Must fail with conflict for addExistingProperty");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
     }
@@ -50,7 +49,7 @@ public class ConflictTest extends BaseDo
         try {
             mk.commit("/foo", "^\"prop\":\"value\"", rev, null);
             fail("Must fail with conflict for addExistingProperty");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
     }
@@ -66,7 +65,7 @@ public class ConflictTest extends BaseDo
         try {
             mk.merge(branchRev, null);
             fail("Must fail with conflict for addExistingProperty");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
     }
@@ -82,7 +81,7 @@ public class ConflictTest extends BaseDo
         try {
             mk.merge(branchRev, null);
             fail("Must fail with conflict for addExistingProperty");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
     }
@@ -102,7 +101,7 @@ public class ConflictTest extends BaseDo
         try {
             mk.merge(branchRev1, null);
             fail("Must fail with conflict for addExistingProperty");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
     }
@@ -115,7 +114,7 @@ public class ConflictTest extends BaseDo
         try {
             mk.commit("/foo", "^\"prop\":null", rev, null);
             fail("Must fail with conflict for removeRemovedProperty");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
     }
@@ -130,7 +129,7 @@ public class ConflictTest extends BaseDo
         try {
             mk.commit("/foo", "^\"prop\":null", rev, null);
             fail("Must fail with conflict for removeRemovedProperty");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
     }
@@ -146,7 +145,7 @@ public class ConflictTest extends BaseDo
         try {
             mk.merge(branchRev, null);
             fail("Must fail with conflict for removeRemovedProperty");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
     }
@@ -162,7 +161,7 @@ public class ConflictTest extends BaseDo
         try {
             mk.merge(branchRev, null);
             fail("Must fail with conflict for removeRemovedProperty");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
     }
@@ -182,7 +181,7 @@ public class ConflictTest extends BaseDo
         try {
             mk.merge(branchRev1, null);
             fail("Must fail with conflict for removeRemovedProperty");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
     }
@@ -195,7 +194,7 @@ public class ConflictTest extends BaseDo
         try {
             mk.commit("/foo", "^\"prop\":null", rev, null);
             fail("Must fail with conflict for removeChangedProperty");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
     }
@@ -210,7 +209,7 @@ public class ConflictTest extends BaseDo
         try {
             mk.commit("/foo", "^\"prop\":null", rev, null);
             fail("Must fail with conflict for removeChangedProperty");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
     }
@@ -226,7 +225,7 @@ public class ConflictTest extends BaseDo
         try {
             mk.merge(branchRev, null);
             fail("Must fail with conflict for removeChangedProperty");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
     }
@@ -242,7 +241,7 @@ public class ConflictTest extends BaseDo
         try {
             mk.merge(branchRev, null);
             fail("Must fail with conflict for removeChangedProperty");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
     }
@@ -261,7 +260,7 @@ public class ConflictTest extends BaseDo
         try {
             mk.merge(branchRev1, null);
             fail("Must fail with conflict for removeChangedProperty");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
     }
@@ -274,7 +273,7 @@ public class ConflictTest extends BaseDo
         try {
             mk.commit("/foo", "^\"prop\":\"bar\"", rev, null);
             fail("Must fail with conflict for changeRemovedProperty");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
     }
@@ -289,7 +288,7 @@ public class ConflictTest extends BaseDo
         try {
             mk.commit("/foo", "^\"prop\":\"bar\"", rev, null);
             fail("Must fail with conflict for changeRemovedProperty");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
     }
@@ -305,7 +304,7 @@ public class ConflictTest extends BaseDo
         try {
             mk.merge(branchRev, null);
             fail("Must fail with conflict for changeRemovedProperty");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
     }
@@ -321,7 +320,7 @@ public class ConflictTest extends BaseDo
         try {
             mk.merge(branchRev, null);
             fail("Must fail with conflict for changeRemovedProperty");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
     }
@@ -340,7 +339,7 @@ public class ConflictTest extends BaseDo
         try {
             mk.merge(branchRev1, null);
             fail("Must fail with conflict for changeRemovedProperty");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
     }
@@ -353,7 +352,7 @@ public class ConflictTest extends BaseDo
         try {
             mk.commit("/foo", "^\"prop\":\"baz\"", rev, null);
             fail("Must fail with conflict for changeChangedProperty");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
     }
@@ -368,7 +367,7 @@ public class ConflictTest extends BaseDo
         try {
             mk.commit("/foo", "^\"prop\":\"baz\"", rev, null);
             fail("Must fail with conflict for changeChangedProperty");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
     }
@@ -384,7 +383,7 @@ public class ConflictTest extends BaseDo
         try {
             mk.merge(branchRev, null);
             fail("Must fail with conflict for changeChangedProperty");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
     }
@@ -400,7 +399,7 @@ public class ConflictTest extends BaseDo
         try {
             mk.merge(branchRev, null);
             fail("Must fail with conflict for changeChangedProperty");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
     }
@@ -419,7 +418,7 @@ public class ConflictTest extends BaseDo
         try {
             mk.merge(b2, null);
             fail("Must fail with conflict for changeChangedProperty");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
     }
@@ -432,7 +431,7 @@ public class ConflictTest extends BaseDo
         try {
             mk.commit("/foo", "+\"bar\":{}", rev, null);
             fail("Must fail with conflict for addExistingNode");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
     }
@@ -447,7 +446,7 @@ public class ConflictTest extends BaseDo
         try {
             mk.commit("/foo", "+\"bar\":{}", rev, null);
             fail("Must fail with conflict for addExistingNode");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
     }
@@ -463,7 +462,7 @@ public class ConflictTest extends BaseDo
         try {
             mk.merge(branchRev, null);
             fail("Must fail with conflict for addExistingNode");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
     }
@@ -479,7 +478,7 @@ public class ConflictTest extends BaseDo
         try {
             mk.merge(branchRev, null);
             fail("Must fail with conflict for addExistingNode");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
     }
@@ -499,7 +498,7 @@ public class ConflictTest extends BaseDo
         try {
             mk.merge(branchRev1, null);
             fail("Must fail with conflict for addExistingNode");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
     }
@@ -512,7 +511,7 @@ public class ConflictTest extends BaseDo
         try {
             mk.commit("/", "-\"foo\"", rev, null);
             fail("Must fail with conflict for removeRemovedNode");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
     }
@@ -527,7 +526,7 @@ public class ConflictTest extends BaseDo
         try {
             mk.commit("/", "-\"foo\"", rev, null);
             fail("Must fail with conflict for removeRemovedNode");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
     }
@@ -543,7 +542,7 @@ public class ConflictTest extends BaseDo
         try {
             mk.merge(branchRev, null);
             fail("Must fail with conflict for removeRemovedNode");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
     }
@@ -559,7 +558,7 @@ public class ConflictTest extends BaseDo
         try {
             mk.merge(branchRev, null);
             fail("Must fail with conflict for removeRemovedNode");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
     }
@@ -578,7 +577,7 @@ public class ConflictTest extends BaseDo
         try {
             mk.merge(branchRev1, null);
             fail("Must fail with conflict for removeRemovedNode");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
     }
@@ -591,7 +590,7 @@ public class ConflictTest extends BaseDo
         try {
             mk.commit("/", "-\"foo\"", rev, null);
             fail("Must fail with conflict for removeChangedNode");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
     }
@@ -606,7 +605,7 @@ public class ConflictTest extends BaseDo
         try {
             mk.commit("/", "-\"foo\"", rev, null);
             fail("Must fail with conflict for removeChangedNode");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
     }
@@ -622,7 +621,7 @@ public class ConflictTest extends BaseDo
         try {
             mk.merge(branchRev, null);
             fail("Must fail with conflict for removeChangedNode");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
     }
@@ -638,7 +637,7 @@ public class ConflictTest extends BaseDo
         try {
             mk.merge(branchRev, null);
             fail("Must fail with conflict for removeChangedNode");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
     }
@@ -657,7 +656,7 @@ public class ConflictTest extends BaseDo
         try {
             mk.merge(branchRev1, null);
             fail("Must fail with conflict for removeChangedNode");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
     }
@@ -670,7 +669,7 @@ public class ConflictTest extends BaseDo
         try {
             mk.commit("/foo", "^\"prop\":\"value\"", rev, null);
             fail("Must fail with conflict for changeRemovedNode");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
     }
@@ -685,7 +684,7 @@ public class ConflictTest extends BaseDo
         try {
             mk.commit("/foo", "^\"prop\":\"value\"", rev, null);
             fail("Must fail with conflict for changeRemovedNode");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
     }
@@ -701,7 +700,7 @@ public class ConflictTest extends BaseDo
         try {
             mk.merge(branchRev, null);
             fail("Must fail with conflict for changeRemovedNode");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
     }
@@ -717,7 +716,7 @@ public class ConflictTest extends BaseDo
         try {
             mk.merge(branchRev, null);
             fail("Must fail with conflict for changeRemovedNode");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
     }
@@ -736,7 +735,7 @@ public class ConflictTest extends BaseDo
         try {
             mk.merge(branchRev1, null);
             fail("Must fail with conflict for changeRemovedNode");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
     }

Modified: 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentMKBranchMergeTest.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentMKBranchMergeTest.java?rev=1673133&r1=1673132&r2=1673133&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentMKBranchMergeTest.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentMKBranchMergeTest.java
 Mon Apr 13 08:28:21 2015
@@ -20,7 +20,6 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 
-import org.apache.jackrabbit.mk.api.MicroKernelException;
 import org.junit.Ignore;
 import org.junit.Test;
 
@@ -28,7 +27,7 @@ import static org.junit.Assert.assertEqu
 import static org.junit.Assert.fail;
 
 /**
- * Tests for {@code MicroKernel#branch}
+ * Tests for {@code NodeStore#branch}
  */
 public class DocumentMKBranchMergeTest extends BaseDocumentMKTest {
 
@@ -424,7 +423,7 @@ public class DocumentMKBranchMergeTest e
                             branchRev = mk.commit(path, "+\"node" + i + 
"\":{}", branchRev, null);
                             mk.merge(branchRev, null);
                         }
-                    } catch (MicroKernelException e) {
+                    } catch (DocumentStoreException e) {
                         exceptions.add(e);
                     }
                 }

Modified: 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentMKCommitAddTest.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentMKCommitAddTest.java?rev=1673133&r1=1673132&r2=1673133&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentMKCommitAddTest.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentMKCommitAddTest.java
 Mon Apr 13 08:28:21 2015
@@ -23,7 +23,6 @@ import static org.junit.Assert.assertTru
 import static org.junit.Assert.fail;
 
 import com.google.common.base.Stopwatch;
-import org.apache.jackrabbit.mk.api.MicroKernelException;
 import org.json.simple.JSONObject;
 import org.junit.Ignore;
 import org.junit.Test;
@@ -187,7 +186,7 @@ public class DocumentMKCommitAddTest ext
         try {
             mk.commit("/", "^\"a/key1\" : \"value3\"", rev1, null);
             fail("commit must fail with conflicting change");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
 

Modified: 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentMKDiffTest.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentMKDiffTest.java?rev=1673133&r1=1673132&r2=1673133&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentMKDiffTest.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentMKDiffTest.java
 Mon Apr 13 08:28:21 2015
@@ -28,7 +28,7 @@ import static org.junit.Assert.assertNot
 import static org.junit.Assert.assertTrue;
 
 /**
- * Tests for MicroKernel#diff
+ * Tests for NodeStore#diff
  */
 public class DocumentMKDiffTest extends AbstractMongoConnectionTest {
 

Modified: 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentMKRebaseTest.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentMKRebaseTest.java?rev=1673133&r1=1673132&r2=1673133&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentMKRebaseTest.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentMKRebaseTest.java
 Mon Apr 13 08:28:21 2015
@@ -26,7 +26,7 @@ import static org.junit.Assert.assertNot
 import static org.junit.Assert.assertTrue;
 
 /**
- * Tests for {@code MicroKernel#rebase}
+ * Tests for {@code NodeStore#rebase}
  * FIXME: this is copied from MicroKernelImplTest. Factor out.
  */
 public class DocumentMKRebaseTest extends BaseDocumentMKTest {

Modified: 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentMKResetTest.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentMKResetTest.java?rev=1673133&r1=1673132&r2=1673133&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentMKResetTest.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentMKResetTest.java
 Mon Apr 13 08:28:21 2015
@@ -16,7 +16,6 @@
  */
 package org.apache.jackrabbit.oak.plugins.document;
 
-import org.apache.jackrabbit.mk.api.MicroKernelException;
 import org.junit.Ignore;
 import org.junit.Test;
 
@@ -24,7 +23,7 @@ import static org.junit.Assert.assertTru
 import static org.junit.Assert.fail;
 
 /**
- * Tests DocumentMKs implementation of MicroKernel.reset(String, String).
+ * Tests DocumentMKs implementation of NodeStore.reset(String, String).
  */
 public class DocumentMKResetTest extends BaseDocumentMKTest {
 
@@ -41,8 +40,8 @@ public class DocumentMKResetTest extends
         String rev = addNodes(null, "/foo");
         try {
             mk.reset(rev, rev);
-            fail("MicroKernelException expected");
-        } catch (MicroKernelException expected) {}
+            fail("DocumentStoreException expected");
+        } catch (DocumentStoreException expected) {}
     }
 
     @Test
@@ -53,8 +52,8 @@ public class DocumentMKResetTest extends
         branch = addNodes(branch, "/bar");
         try {
             mk.reset(branch, rev);
-            fail("MicroKernelException expected");
-        } catch (MicroKernelException expected) {}
+            fail("DocumentStoreException expected");
+        } catch (DocumentStoreException expected) {}
     }
 
     @Test
@@ -76,7 +75,7 @@ public class DocumentMKResetTest extends
         try {
             mk.merge(b2, null);
             fail("merge with conflict must fail");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
         String b3 = mk.reset(b2, b1);
@@ -95,7 +94,7 @@ public class DocumentMKResetTest extends
         try {
             mk.merge(b2, null);
             fail("merge with conflict must fail");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
         String b3 = mk.reset(b2, b1);
@@ -115,7 +114,7 @@ public class DocumentMKResetTest extends
         try {
             mk.merge(b2, null);
             fail("merge with conflict must fail");
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
         String b3 = mk.reset(b2, b1);

Modified: 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentMKTestBase.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentMKTestBase.java?rev=1673133&r1=1673132&r2=1673133&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentMKTestBase.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentMKTestBase.java
 Mon Apr 13 08:28:21 2015
@@ -16,7 +16,6 @@
  */
 package org.apache.jackrabbit.oak.plugins.document;
 
-import org.apache.jackrabbit.mk.api.MicroKernel;
 import org.json.simple.JSONArray;
 import org.json.simple.JSONObject;
 import org.json.simple.parser.JSONParser;
@@ -32,7 +31,7 @@ import static org.junit.Assert.assertTru
  */
 public abstract class DocumentMKTestBase {
 
-    protected abstract MicroKernel getMicroKernel();
+    protected abstract DocumentMK getDocumentMK();
 
     protected JSONObject getObjectArrayEntry(JSONArray array, int pos) {
         assertTrue(pos >= 0 && pos < array.size());
@@ -76,19 +75,19 @@ public abstract class DocumentMKTestBase
     protected void assertChildNodeCount(String path,
                                         String revision,
                                         long numChildNodes) {
-        JSONObject json = parseJSONObject(getMicroKernel().getNodes(
+        JSONObject json = parseJSONObject(getDocumentMK().getNodes(
                 path, revision, 0, 0, -1, null));
         assertPropertyValue(json, ":childNodeCount", numChildNodes);
     }
 
     protected void assertPropExists(String rev, String path, String property) {
-        String nodes = getMicroKernel().getNodes(path, rev, 0 /*depth*/, 0 
/*offset*/, -1 /*maxChildNodes*/, null /*filter*/);
+        String nodes = getDocumentMK().getNodes(path, rev, 0 /*depth*/, 0 
/*offset*/, -1 /*maxChildNodes*/, null /*filter*/);
         JSONObject obj = parseJSONObject(nodes);
         assertPropertyExists(obj, property);
     }
 
     protected void assertPropNotExists(String rev, String path, String 
property) {
-        String nodes = getMicroKernel().getNodes(path, rev, 0 /*depth*/, 0 
/*offset*/, -1 /*maxChildNodes*/, null /*filter*/);
+        String nodes = getDocumentMK().getNodes(path, rev, 0 /*depth*/, 0 
/*offset*/, -1 /*maxChildNodes*/, null /*filter*/);
         if (nodes == null) {
             return;
         }
@@ -97,7 +96,7 @@ public abstract class DocumentMKTestBase
     }
 
     protected void assertPropValue(String rev, String path, String property, 
String value) {
-        String nodes = getMicroKernel().getNodes(path, rev, 0 /*depth*/, 0 
/*offset*/, -1 /*maxChildNodes*/, null /*filter*/);
+        String nodes = getDocumentMK().getNodes(path, rev, 0 /*depth*/, 0 
/*offset*/, -1 /*maxChildNodes*/, null /*filter*/);
         JSONObject obj = parseJSONObject(nodes);
         assertPropertyValue(obj, property, value);
     }
@@ -154,7 +153,7 @@ public abstract class DocumentMKTestBase
 
     private void doAssertNodes(boolean checkExists, String revision, 
String...paths) {
         for (String path : paths) {
-            boolean exists = getMicroKernel().nodeExists(path, revision);
+            boolean exists = getDocumentMK().nodeExists(path, revision);
             if (checkExists) {
                 assertTrue(path + " does not exist", exists);
             } else {
@@ -186,14 +185,14 @@ public abstract class DocumentMKTestBase
     protected String addNodes(String rev, String...nodes) {
         String newRev = rev;
         for (String node : nodes) {
-            newRev = getMicroKernel().commit("", "+\"" + node + "\":{}", 
newRev, "");
+            newRev = getDocumentMK().commit("", "+\"" + node + "\":{}", 
newRev, "");
         }
         return newRev;
     }
 
     protected String removeNodes(String rev, String... nodes) {
         for (String node : nodes) {
-            rev = getMicroKernel().commit("", "-\"" + node + "\"", rev, null);
+            rev = getDocumentMK().commit("", "-\"" + node + "\"", rev, null);
         }
         return rev;
     }

Modified: 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/MongoDocumentStoreIT.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/MongoDocumentStoreIT.java?rev=1673133&r1=1673132&r2=1673133&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/MongoDocumentStoreIT.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/MongoDocumentStoreIT.java
 Mon Apr 13 08:28:21 2015
@@ -22,7 +22,6 @@ import java.util.Map;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicBoolean;
 
-import org.apache.jackrabbit.mk.api.MicroKernelException;
 import org.apache.jackrabbit.oak.plugins.document.util.Utils;
 import org.junit.Test;
 
@@ -153,7 +152,7 @@ public class MongoDocumentStoreIT extend
         try {
             mk.commit("/test", "^\"prop\":\"v2\"", head, null);
             fail();
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
         doc = docStore.find(NODES, Utils.getIdFromPath("/test"));

Modified: 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/RandomizedClusterTest.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/RandomizedClusterTest.java?rev=1673133&r1=1673132&r2=1673133&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/RandomizedClusterTest.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/RandomizedClusterTest.java
 Mon Apr 13 08:28:21 2015
@@ -27,7 +27,6 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Random;
 
-import org.apache.jackrabbit.mk.api.MicroKernelException;
 import org.apache.jackrabbit.oak.spi.blob.MemoryBlobStore;
 import org.apache.jackrabbit.oak.commons.json.JsonObject;
 import org.apache.jackrabbit.oak.commons.json.JsopBuilder;
@@ -356,7 +355,7 @@ public class RandomizedClusterTest {
             try {
                 mk.commit("/", diff, rev, null);
                 fail("Should fail: " + diff + " with " + ex);
-            } catch (MicroKernelException e2) {
+            } catch (DocumentStoreException e2) {
                 // expected
                 revList[mkId] = mk.getHeadRevision();
                 // it might have been not a conflict with another cluster node

Modified: 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/SimpleTest.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/SimpleTest.java?rev=1673133&r1=1673132&r2=1673133&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/SimpleTest.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/SimpleTest.java
 Mon Apr 13 08:28:21 2015
@@ -25,7 +25,6 @@ import static org.junit.Assert.fail;
 
 import java.util.Random;
 
-import org.apache.jackrabbit.mk.api.MicroKernelException;
 import org.apache.jackrabbit.oak.api.PropertyState;
 import org.apache.jackrabbit.oak.api.Type;
 import org.apache.jackrabbit.oak.commons.json.JsopBuilder;
@@ -131,7 +130,7 @@ public class SimpleTest {
         try {
             mk.commit("/", "+\"b\": {}  +\"a\": {}", null, null);
             fail();
-        } catch (MicroKernelException e) {
+        } catch (DocumentStoreException e) {
             // expected
         }
         // the previous commit should be rolled back now,

Modified: 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/blob/DocumentMKReadTest.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/blob/DocumentMKReadTest.java?rev=1673133&r1=1673132&r2=1673133&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/blob/DocumentMKReadTest.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/blob/DocumentMKReadTest.java
 Mon Apr 13 08:28:21 2015
@@ -21,7 +21,6 @@ import java.util.Arrays;
 
 import junit.framework.Assert;
 
-import org.apache.jackrabbit.oak.commons.mk.MicroKernelInputStream;
 import org.apache.jackrabbit.oak.plugins.document.AbstractMongoConnectionTest;
 import org.junit.Test;
 
@@ -54,7 +53,7 @@ public class DocumentMKReadTest extends
         createAndWriteBlob(blobLength);
 
         // Complete read.
-        byte[] buffer = MicroKernelInputStream.readFully(mk, blobId);
+        byte[] buffer = readFully(mk, blobId);
         Assert.assertEquals(blob.length, buffer.length);
         Assert.assertTrue(Arrays.equals(blob, buffer));
 

Modified: 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/blob/DocumentMKWriteTest.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/blob/DocumentMKWriteTest.java?rev=1673133&r1=1673132&r2=1673133&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/blob/DocumentMKWriteTest.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/blob/DocumentMKWriteTest.java
 Mon Apr 13 08:28:21 2015
@@ -22,7 +22,6 @@ import static org.junit.Assert.assertTru
 import java.io.ByteArrayInputStream;
 import java.util.Arrays;
 
-import org.apache.jackrabbit.oak.commons.mk.MicroKernelInputStream;
 import org.apache.jackrabbit.oak.plugins.document.AbstractMongoConnectionTest;
 import org.junit.Test;
 
@@ -51,7 +50,7 @@ public class DocumentMKWriteTest extends
         String blobId = mk.write(new ByteArrayInputStream(blob));
         assertNotNull(blobId);
 
-        byte[] readBlob = MicroKernelInputStream.readFully(mk, blobId);
+        byte[] readBlob = readFully(mk, blobId);
         assertTrue(Arrays.equals(blob, readBlob));
     }
 

Modified: 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/impl/DocumentMKWaitForCommitTest.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/impl/DocumentMKWaitForCommitTest.java?rev=1673133&r1=1673132&r2=1673133&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/impl/DocumentMKWaitForCommitTest.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/impl/DocumentMKWaitForCommitTest.java
 Mon Apr 13 08:28:21 2015
@@ -26,7 +26,6 @@ import java.util.concurrent.ScheduledExe
 import java.util.concurrent.ScheduledFuture;
 import java.util.concurrent.TimeUnit;
 
-import org.apache.jackrabbit.mk.api.MicroKernel;
 import org.apache.jackrabbit.oak.plugins.document.AbstractMongoConnectionTest;
 import org.apache.jackrabbit.oak.plugins.document.DocumentMK;
 import org.junit.Before;
@@ -41,7 +40,7 @@ import com.mongodb.DB;
 @Ignore("DocumentMK does not implement waitForCommit()")
 public class DocumentMKWaitForCommitTest extends AbstractMongoConnectionTest {
 
-    private MicroKernel mk2;
+    private DocumentMK mk2;
 
     @Before
     @Override
@@ -127,7 +126,7 @@ public class DocumentMKWaitForCommitTest
 
     private ScheduledFuture<String> scheduleCommit(long delay, final String 
revisionId) {
         ScheduledExecutorService executorService = 
Executors.newSingleThreadScheduledExecutor();
-        final MicroKernel mk = this.mk;
+        final DocumentMK mk = this.mk;
         ScheduledFuture<String> future = executorService.schedule(new 
Callable<String>(){
             @Override
             public String call() throws Exception {

Modified: 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/impl/SimpleNodeScenario.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/impl/SimpleNodeScenario.java?rev=1673133&r1=1673132&r2=1673133&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/impl/SimpleNodeScenario.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/impl/SimpleNodeScenario.java
 Mon Apr 13 08:28:21 2015
@@ -16,16 +16,16 @@
  */
 package org.apache.jackrabbit.oak.plugins.document.impl;
 
-import org.apache.jackrabbit.mk.api.MicroKernel;
+import org.apache.jackrabbit.oak.plugins.document.DocumentMK;
 
 /**
  * A class that can perform simple operations.
  */
 public class SimpleNodeScenario {
 
-    private final MicroKernel mk;
+    private final DocumentMK mk;
 
-    public SimpleNodeScenario(MicroKernel mk) {
+    public SimpleNodeScenario(DocumentMK mk) {
         this.mk = mk;
     }
 

Modified: 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/impl/command/ConcurrentWriteMultipleMkMongoTest.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/impl/command/ConcurrentWriteMultipleMkMongoTest.java?rev=1673133&r1=1673132&r2=1673133&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/impl/command/ConcurrentWriteMultipleMkMongoTest.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/impl/command/ConcurrentWriteMultipleMkMongoTest.java
 Mon Apr 13 08:28:21 2015
@@ -22,7 +22,6 @@ import java.util.concurrent.ExecutorServ
 import java.util.concurrent.Executors;
 import java.util.concurrent.TimeUnit;
 
-import org.apache.jackrabbit.mk.api.MicroKernel;
 import org.apache.jackrabbit.oak.plugins.document.AbstractMongoConnectionTest;
 import org.apache.jackrabbit.oak.plugins.document.DocumentMK;
 import org.junit.Ignore;
@@ -108,7 +107,7 @@ public class ConcurrentWriteMultipleMkMo
     private static class GenericWriteTask implements Runnable {
 
         private String id;
-        private MicroKernel mk;
+        private DocumentMK mk;
         private String diff;
         private int nodesPerCommit;
 

Modified: 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/multitenancy/MultiTenancyTest.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/multitenancy/MultiTenancyTest.java?rev=1673133&r1=1673132&r2=1673133&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/multitenancy/MultiTenancyTest.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/multitenancy/MultiTenancyTest.java
 Mon Apr 13 08:28:21 2015
@@ -20,7 +20,6 @@ import static org.junit.Assert.assertEqu
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
-import org.apache.jackrabbit.mk.api.MicroKernel;
 import org.apache.jackrabbit.oak.plugins.document.AbstractMongoConnectionTest;
 import org.apache.jackrabbit.oak.plugins.document.DocumentMK;
 import org.apache.jackrabbit.oak.plugins.document.MongoUtils;
@@ -44,9 +43,9 @@ public class MultiTenancyTest extends Ab
     private static MongoConnection mongoConnection2;
     private static MongoConnection mongoConnection3;
 
-    private static MicroKernel mk1;
-    private static MicroKernel mk2;
-    private static MicroKernel mk3;
+    private static DocumentMK mk1;
+    private static DocumentMK mk2;
+    private static DocumentMK mk3;
 
     @BeforeClass
     public static void createMongoConnections() throws Exception {

Modified: 
jackrabbit/oak/trunk/oak-doc/src/site/markdown/architecture/big-picture.uxf
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-doc/src/site/markdown/architecture/big-picture.uxf?rev=1673133&r1=1673132&r2=1673133&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-doc/src/site/markdown/architecture/big-picture.uxf 
(original)
+++ jackrabbit/oak/trunk/oak-doc/src/site/markdown/architecture/big-picture.uxf 
Mon Apr 13 08:28:21 2015
@@ -126,32 +126,6 @@ bg=yellow</panel_attributes>
   <element>
     <type>com.umlet.element.Class</type>
     <coordinates>
-      <x>430</x>
-      <y>590</y>
-      <w>190</w>
-      <h>30</h>
-    </coordinates>
-    <panel_attributes>MicroKernel interface
-bg=green
-fg=gray</panel_attributes>
-    <additional_attributes/>
-  </element>
-  <element>
-    <type>com.umlet.element.Class</type>
-    <coordinates>
-      <x>550</x>
-      <y>650</y>
-      <w>70</w>
-      <h>60</h>
-    </coordinates>
-    <panel_attributes>"H2" MK
-bg=yellow
-fg=gray</panel_attributes>
-    <additional_attributes/>
-  </element>
-  <element>
-    <type>com.umlet.element.Class</type>
-    <coordinates>
       <x>470</x>
       <y>750</y>
       <w>130</w>
@@ -261,30 +235,6 @@ bg=gray</panel_attributes>
   <element>
     <type>com.umlet.element.Relation</type>
     <coordinates>
-      <x>550</x>
-      <y>590</y>
-      <w>50</w>
-      <h>80</h>
-    </coordinates>
-    <panel_attributes>lt=&lt;&lt;-
-fg=gray</panel_attributes>
-    <additional_attributes>30;30;30;60</additional_attributes>
-  </element>
-  <element>
-    <type>com.umlet.element.Relation</type>
-    <coordinates>
-      <x>430</x>
-      <y>590</y>
-      <w>50</w>
-      <h>80</h>
-    </coordinates>
-    <panel_attributes>lt=&lt;&lt;-
-fg=gray</panel_attributes>
-    <additional_attributes>30;30;30;60</additional_attributes>
-  </element>
-  <element>
-    <type>com.umlet.element.Relation</type>
-    <coordinates>
       <x>360</x>
       <y>470</y>
       <w>50</w>
@@ -345,18 +295,6 @@ bg=green</panel_attributes>
     <additional_attributes>30;70;30;30</additional_attributes>
   </element>
   <element>
-    <type>com.umlet.element.Relation</type>
-    <coordinates>
-      <x>540</x>
-      <y>680</y>
-      <w>50</w>
-      <h>90</h>
-    </coordinates>
-    <panel_attributes>lt=&lt;-
-fg=gray</panel_attributes>
-    <additional_attributes>30;70;30;30</additional_attributes>
-  </element>
-  <element>
     <type>com.umlet.element.Class</type>
     <coordinates>
       <x>50</x>

Modified: 
jackrabbit/oak/trunk/oak-doc/src/site/markdown/architecture/nodestate.md
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-doc/src/site/markdown/architecture/nodestate.md?rev=1673133&r1=1673132&r2=1673133&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-doc/src/site/markdown/architecture/nodestate.md 
(original)
+++ jackrabbit/oak/trunk/oak-doc/src/site/markdown/architecture/nodestate.md 
Mon Apr 13 08:28:21 2015
@@ -27,16 +27,13 @@ Oak extensions.
 Oak organizes all content in a large tree hierarchy that consists of nodes
 and properties. Each snapshot or revision of this content tree is immutable,
 and changes to the tree are expressed as a sequence of new revisions. The
-MicroKernel of an Oak repository is responsible for managing the content
+NodeStore of an Oak repository is responsible for managing the content
 tree and its revisions.
 
-The JSON-based MicroKernel API works well as a part of a remote protocol
-but is cumbersome to use directly in oak-core. There are also many cases
-where transient or virtual content that doesn't (yet) exist in the
-MicroKernel needs to be managed by Oak. The node state model as expressed
-in the NodeState interface in oak-core is designed for these purposes. It
-provides a unified low-level abstraction for managing all tree content and
-lays the foundation for the higher-level Oak API that's visible to clients.
+The node state model as expressed in the NodeState interface in oak-core is
+designed for these purposes. It provides a unified low-level abstraction for
+managing all tree content and lays the foundation for the higher-level Oak API
+that's visible to clients.
 
 ## The state of a node
 

Modified: 
jackrabbit/oak/trunk/oak-doc/src/site/markdown/architecture/transactional-model.md
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-doc/src/site/markdown/architecture/transactional-model.md?rev=1673133&r1=1673132&r2=1673133&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-doc/src/site/markdown/architecture/transactional-model.md
 (original)
+++ 
jackrabbit/oak/trunk/oak-doc/src/site/markdown/architecture/transactional-model.md
 Mon Apr 13 08:28:21 2015
@@ -25,7 +25,7 @@ when it contains operations which are in
 saved successfully. This is different from the standard first committer wins 
strategy where failure
 would occur on conflicting operations rather than on incompatible operations. 
Incompatible is weaker
 than conflict since two write operation on the same item do conflict but are 
not incompatible. The
-details of what incompatible means are specified by `NodeStore.rebase()` and 
`MicroKernel.rebase()`.
+details of what incompatible means are specified by `NodeStore.rebase()`.
 
 Snapshot isolation exhibits [write 
skew](http://http//research.microsoft.com/apps/pubs/default.aspx?id=69541)
 which can be problematic for some application level consistency requirements. 
Consider the following

Modified: jackrabbit/oak/trunk/oak-doc/src/site/markdown/dev_getting_started.md
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-doc/src/site/markdown/dev_getting_started.md?rev=1673133&r1=1673132&r2=1673133&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-doc/src/site/markdown/dev_getting_started.md 
(original)
+++ jackrabbit/oak/trunk/oak-doc/src/site/markdown/dev_getting_started.md Mon 
Apr 13 08:28:21 2015
@@ -62,8 +62,6 @@ The build consists of the following main
   - oak-parent        - parent POM
   - oak-doc           - Oak documentation
   - oak-commons       - shared utility code
-  - oak-mk-api        - MicroKernel API (_deprecated_)
-  - oak-mk            - MicroKernel implementation
   - [oak-core][1]     - Oak repository API and implementation
   - oak-jcr           - JCR binding for the Oak repository
   - oak-sling         - integration with Apache Sling
@@ -75,7 +73,6 @@ The build consists of the following main
   - oak-run           - runnable jar packaging
   - oak-upgrade       - tooling for upgrading Jackrabbit repositories to Oak
   - oak-it            - integration tests
-    - oak-it/mk       - integration tests for MicroKernel
     - oak-it/osgi     - integration tests for OSGi
 
 
@@ -84,7 +81,11 @@ Archive
 
 The following components have been moved to the Jackrabbit Attic:
 
+  - oak-mk-api        - MicroKernel API (_deprecated_)
+  - oak-mk            - MicroKernel implementation
   - oak-mk-remote     - MicroKernel remoting  (see [OAK-2693][2])
+  - oak-it/mk         - integration tests for MicroKernel
+
 
 
   [1]: https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/README.md

Modified: jackrabbit/oak/trunk/oak-doc/src/site/markdown/nodestore/documentmk.md
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-doc/src/site/markdown/nodestore/documentmk.md?rev=1673133&r1=1673132&r2=1673133&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-doc/src/site/markdown/nodestore/documentmk.md 
(original)
+++ jackrabbit/oak/trunk/oak-doc/src/site/markdown/nodestore/documentmk.md Mon 
Apr 13 08:28:21 2015
@@ -19,7 +19,7 @@ Oak Document Storage
 ==============
 
 One of the plugins in Oak stores data in a document oriented format. 
-The plugin implements two low level APIs, the `MicroKernel` and `NodeStore` 
interface.
+The plugin implements the low level `NodeStore` interface.
 
 The document storage optionally uses the [persistent 
cache](persistent-cache.html) to reduce read operations on the backend storage.
 
@@ -184,7 +184,7 @@ As seen in the examples above, a revisio
 Branches
 --------
 
-MicroKernel implementations support branches, which allows a client to stage
+DocumentMK implementations support branches, which allows a client to stage
 multiple commits and make them visible with a single merge call. In DocumentMK
 a branch commit looks very similar to a regular commit, but instead of setting
 the value of an entry in `_revisions` to `c` (committed), it marks it with

Modified: jackrabbit/oak/trunk/oak-doc/src/site/markdown/nodestore/overview.md
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-doc/src/site/markdown/nodestore/overview.md?rev=1673133&r1=1673132&r2=1673133&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-doc/src/site/markdown/nodestore/overview.md 
(original)
+++ jackrabbit/oak/trunk/oak-doc/src/site/markdown/nodestore/overview.md Mon 
Apr 13 08:28:21 2015
@@ -21,15 +21,15 @@ Oak comes with two node storage flavours
 Segment storage is optimised for maximal performance in standalone deployments,
 and document storage is optimised for maximal scalability in clustered 
deployments.
 
-## NodeStore API and MicroKernel API
+## NodeStore API
 
-The node storage implement the `MicroKernel` or the `NodeStore` APIs.
+The node storage implement the `NodeStore` APIs.
 Those are ultimately representations of the
 [node state model](../architecture/nodestate.html). 
-A `MicroKernel` exposes its functionality through a String only (JSON) API, 
which is easy to remote. 
-In contrast a `NodeStore` exposes its functionality through a pure Java API, 
-which is easier to work with in Java, and has lower performance and memory 
overhead.
+The `NodeStore` exposes its functionality through a pure Java API,
+which is suited to work with in Java, and has lower performance and memory 
overhead.
 
-## See also
+## MicroKernel API
 
-* [MicroKernel integration 
tests](https://github.com/apache/jackrabbit-oak/blob/trunk/oak-it/mk/README.md)
+The `MicroKernel` API was deprecated in OAK 1.2 and dropped from the project 
as of
+Oak 1.3.0. It used to exposes its functionality through a String only (JSON) 
API.
\ No newline at end of file

Modified: jackrabbit/oak/trunk/oak-it/osgi/pom.xml
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-it/osgi/pom.xml?rev=1673133&r1=1673132&r2=1673133&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-it/osgi/pom.xml (original)
+++ jackrabbit/oak/trunk/oak-it/osgi/pom.xml Mon Apr 13 08:28:21 2015
@@ -77,12 +77,6 @@
     </dependency>
     <dependency>
       <groupId>org.apache.jackrabbit</groupId>
-      <artifactId>oak-mk-api</artifactId>
-      <version>${project.version}</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.jackrabbit</groupId>
       <artifactId>oak-core</artifactId>
       <version>${project.version}</version>
       <scope>test</scope>


Reply via email to