jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chet...@apache.org
Subject svn commit: r1577494 - in /jackrabbit/oak/trunk/oak-core: pom.xml src/main/java/org/apache/jackrabbit/oak/plugins/blob/datastore/S3DataStoreService.java
Date Fri, 14 Mar 2014 11:45:32 GMT
Author: chetanm
Date: Fri Mar 14 11:45:32 2014
New Revision: 1577494

URL: http://svn.apache.org/r1577494
Log:
OAK-1502 - Make DataStores available to NodeStores

-- Exposing S3DataStore via configuration
-- Added optional dependency on jackrabbit-aws-ext

Modified:
    jackrabbit/oak/trunk/oak-core/pom.xml
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/blob/datastore/S3DataStoreService.java

Modified: jackrabbit/oak/trunk/oak-core/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/pom.xml?rev=1577494&r1=1577493&r2=1577494&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/pom.xml (original)
+++ jackrabbit/oak/trunk/oak-core/pom.xml Fri Mar 14 11:45:32 2014
@@ -211,6 +211,12 @@
       <version>1.1.1</version>
       <optional>true</optional>
     </dependency>
+    <dependency>
+      <groupId>org.apache.jackrabbit</groupId>
+      <artifactId>jackrabbit-aws-ext</artifactId>
+      <version>${jackrabbit.version}</version>
+      <optional>true</optional>
+    </dependency>
 
     <!-- Optional dependencies for different persistence backends -->
     <dependency>

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/blob/datastore/S3DataStoreService.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/blob/datastore/S3DataStoreService.java?rev=1577494&r1=1577493&r2=1577494&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/blob/datastore/S3DataStoreService.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/blob/datastore/S3DataStoreService.java
Fri Mar 14 11:45:32 2014
@@ -20,9 +20,11 @@
 package org.apache.jackrabbit.oak.plugins.blob.datastore;
 
 import java.util.Map;
+import java.util.Properties;
 
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.ConfigurationPolicy;
+import org.apache.jackrabbit.aws.ext.ds.S3DataStore;
 import org.apache.jackrabbit.core.data.DataStore;
 import org.osgi.service.component.ComponentContext;
 
@@ -32,9 +34,12 @@ public class S3DataStoreService extends 
 
     @Override
     protected DataStore createDataStore(ComponentContext context, Map<String, Object>
config) {
-        //TODO Looks like there is no release of jackrabbit-aws-ext so far
-        //So need to wait for that
-//        return new S3DataStore();
-        throw new IllegalStateException("S3 support not complete");
+        S3DataStore dataStore = new S3DataStore();
+
+        Properties properties = new Properties();
+        properties.putAll(config);
+
+        dataStore.setProperties(properties);
+        return dataStore;
     }
 }



Mime
View raw message