You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by ch...@apache.org on 2016/10/20 08:34:45 UTC
svn commit: r1765770 - in /jackrabbit/oak/trunk:
oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/bundlor/
oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/bundlor/
oak-run/src/main/java/org/apache/jackrabbit/oak/bench...
Author: chetanm
Date: Thu Oct 20 08:34:44 2016
New Revision: 1765770
URL: http://svn.apache.org/viewvc?rev=1765770&view=rev
Log:
OAK-1312 - Bundle nodes into a document
Change the config node name from 'documentstore' to 'rep:documentStore' as per convention used by other node names under 'jcr:system'
Modified:
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/bundlor/BundlingConfigHandler.java
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/bundlor/BundlingConfigHandlerTest.java
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/bundlor/DocumentBundlingTest.java
jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/BundlingNodeTest.java
Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/bundlor/BundlingConfigHandler.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/bundlor/BundlingConfigHandler.java?rev=1765770&r1=1765769&r2=1765770&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/bundlor/BundlingConfigHandler.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/bundlor/BundlingConfigHandler.java Thu Oct 20 08:34:44 2016
@@ -46,10 +46,10 @@ import static com.google.common.base.Pre
import static org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.EMPTY_NODE;
public class BundlingConfigHandler implements Observer, Closeable {
- public static final String DOCUMENT_NODE_STORE = "documentstore";
+ public static final String DOCUMENT_NODE_STORE = "rep:documentStore";
public static final String BUNDLOR = "bundlor";
- public static final String CONFIG_PATH = "/jcr:system/documentstore/bundlor";
+ public static final String CONFIG_PATH = "/jcr:system/rep:documentStore/bundlor";
private final Logger log = LoggerFactory.getLogger(getClass());
private NodeState root = EMPTY_NODE;
private BackgroundObserver backgroundObserver;
Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/bundlor/BundlingConfigHandlerTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/bundlor/BundlingConfigHandlerTest.java?rev=1765770&r1=1765769&r2=1765770&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/bundlor/BundlingConfigHandlerTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/bundlor/BundlingConfigHandlerTest.java Thu Oct 20 08:34:44 2016
@@ -30,6 +30,8 @@ import org.junit.Test;
import static com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor;
import static java.util.Collections.singletonList;
+import static org.apache.jackrabbit.oak.plugins.document.bundlor.BundlingConfigHandler.BUNDLOR;
+import static org.apache.jackrabbit.oak.plugins.document.bundlor.BundlingConfigHandler.DOCUMENT_NODE_STORE;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
@@ -59,7 +61,7 @@ public class BundlingConfigHandlerTest {
private void addBundlorConfigForAsset() throws CommitFailedException {
NodeBuilder builder = nodeStore.getRoot().builder();
- NodeBuilder bundlor = builder.child("jcr:system").child("documentstore").child("bundlor");
+ NodeBuilder bundlor = builder.child("jcr:system").child(DOCUMENT_NODE_STORE).child(BUNDLOR);
bundlor.child("app:Asset").setProperty(DocumentBundlor.PROP_PATTERN,
singletonList("metadata"), Type.STRINGS);
nodeStore.merge(builder, EmptyHook.INSTANCE, CommitInfo.EMPTY);
Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/bundlor/DocumentBundlingTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/bundlor/DocumentBundlingTest.java?rev=1765770&r1=1765769&r2=1765770&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/bundlor/DocumentBundlingTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/bundlor/DocumentBundlingTest.java Thu Oct 20 08:34:44 2016
@@ -57,6 +57,8 @@ import static java.lang.String.format;
import static org.apache.commons.io.FileUtils.ONE_MB;
import static org.apache.jackrabbit.JcrConstants.JCR_PRIMARYTYPE;
import static org.apache.jackrabbit.oak.commons.PathUtils.concat;
+import static org.apache.jackrabbit.oak.plugins.document.bundlor.BundlingConfigHandler.BUNDLOR;
+import static org.apache.jackrabbit.oak.plugins.document.bundlor.BundlingConfigHandler.DOCUMENT_NODE_STORE;
import static org.apache.jackrabbit.oak.plugins.document.bundlor.DocumentBundlor.META_PROP_BUNDLED_CHILD;
import static org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.EMPTY_NODE;
import static org.apache.jackrabbit.oak.spi.state.NodeStateUtils.getNode;
@@ -93,7 +95,7 @@ public class DocumentBundlingTest {
.build();
NodeBuilder builder = store.getRoot().builder();
- builder.child("jcr:system").child("documentstore").setChildNode("bundlor", registryState);
+ builder.child("jcr:system").child(DOCUMENT_NODE_STORE).setChildNode(BUNDLOR, registryState);
merge(builder);
}
Modified: jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/BundlingNodeTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/BundlingNodeTest.java?rev=1765770&r1=1765769&r2=1765770&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/BundlingNodeTest.java (original)
+++ jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/benchmark/BundlingNodeTest.java Thu Oct 20 08:34:44 2016
@@ -64,6 +64,8 @@ import static org.apache.jackrabbit.JcrC
import static org.apache.jackrabbit.JcrConstants.NT_RESOURCE;
import static org.apache.jackrabbit.commons.JcrUtils.getOrAddNode;
import static org.apache.jackrabbit.oak.api.Type.STRINGS;
+import static org.apache.jackrabbit.oak.plugins.document.bundlor.BundlingConfigHandler.BUNDLOR;
+import static org.apache.jackrabbit.oak.plugins.document.bundlor.BundlingConfigHandler.DOCUMENT_NODE_STORE;
import static org.apache.jackrabbit.oak.plugins.index.IndexConstants.DECLARING_NODE_TYPES;
import static org.apache.jackrabbit.oak.plugins.memory.PropertyStates.createProperty;
import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.NT_OAK_RESOURCE;
@@ -300,8 +302,6 @@ public class BundlingNodeTest extends Ab
}
private class BundlingConfigInitializer implements RepositoryInitializer {
- private static final String DOCUMENT_NODE_STORE = "documentstore";
- private static final String BUNDLOR = "bundlor";
@Override
public void initialize(@Nonnull NodeBuilder builder) {