[MARMOTTA-605] accumulo graph backend
Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/acb0e5bf Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/acb0e5bf Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/acb0e5bf Branch: refs/heads/MARMOTTA-556 Commit: acb0e5bfce3fdee186ea16f303f30f6b33f4fa85 Parents: 055e9ec Author: Raffaele Palmieri <[email protected]> Authored: Tue Apr 7 20:33:50 2015 +0200 Committer: Raffaele Palmieri <[email protected]> Committed: Tue Apr 7 20:33:50 2015 +0200 ---------------------------------------------------------------------- launchers/marmotta-webapp/pom.xml | 69 ++++++++++ parent/pom.xml | 1 + .../marmotta-backend-accumulograph/pom.xml | 63 +++++++++ .../AccumuloGraphLoggingModule.java | 79 +++++++++++ .../accumulograph/AccumuloGraphProvider.java | 128 ++++++++++++++++++ .../src/main/resources/META-INF/beans.xml | 28 ++++ .../main/resources/config-defaults.properties | 28 ++++ .../resources/config-descriptions.properties | 133 +++++++++++++++++++ .../src/main/resources/kiwi-module.properties | 37 ++++++ .../src/main/resources/web/admin/about.html | 36 +++++ .../main/resources/web/admin/configuration.html | 54 ++++++++ platform/backends/pom.xml | 1 + 12 files changed, 657 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/marmotta/blob/acb0e5bf/launchers/marmotta-webapp/pom.xml ---------------------------------------------------------------------- diff --git a/launchers/marmotta-webapp/pom.xml b/launchers/marmotta-webapp/pom.xml index deb2af0..cd28038 100644 --- a/launchers/marmotta-webapp/pom.xml +++ b/launchers/marmotta-webapp/pom.xml @@ -235,6 +235,75 @@ </profile> <profile> + <id>accumulograph</id> + <activation> + <property> + <name>marmotta.backend</name> + <value>accumulograph</value> + </property> + </activation> + <dependencies> + <dependency> + <groupId>org.apache.marmotta</groupId> + <artifactId>marmotta-backend-accumulograph</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.marmotta</groupId> + <artifactId>marmotta-ldcache-file</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>edu.jhuapl.tinkerpop</groupId> + <artifactId>blueprints-accumulo-graph</artifactId> + <version>${accumulograph.version}</version> + </dependency> + <dependency> + <groupId>com.tinkerpop.blueprints</groupId> + <artifactId>blueprints-graph-sail</artifactId> + <!-- TODO: create a shared blueprints version in marmotta-parent --> + <version>2.6.0</version> + </dependency> + <dependency> + <groupId>org.apache.hadoop</groupId> + <artifactId>hadoop-common</artifactId> + <!-- TODO: create a shared hadoop version in marmotta-parent --> + <version>2.2.0</version> + <exclusions> + <exclusion> + <groupId>org.mortbay.jetty</groupId> + <artifactId>*</artifactId> + </exclusion> + <exclusion> + <groupId>org.eclipse.jetty</groupId> + <artifactId>*</artifactId> + </exclusion> + <exclusion> + <groupId>tomcat</groupId> + <artifactId>*</artifactId> + </exclusion> + <exclusion> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + </exclusion> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + </exclusion> + <exclusion> + <groupId>javax.servlet</groupId> + <artifactId>*</artifactId> + </exclusion> + <exclusion> + <groupId>javax.servlet.jsp</groupId> + <artifactId>*</artifactId> + </exclusion> + </exclusions> + </dependency> + </dependencies> + </profile> + + <profile> <id>titan-berkeleydb</id> <activation> <property> http://git-wip-us.apache.org/repos/asf/marmotta/blob/acb0e5bf/parent/pom.xml ---------------------------------------------------------------------- diff --git a/parent/pom.xml b/parent/pom.xml index 1c00cf4..68e257e 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -53,6 +53,7 @@ <resteasy.version>3.0.10.Final</resteasy.version> <jackson.version>2.3.3</jackson.version> <titan.version>0.4.2</titan.version> + <accumulograph.version>0.2.1</accumulograph.version> <jax.doclets.version>0.10.1</jax.doclets.version> </properties> http://git-wip-us.apache.org/repos/asf/marmotta/blob/acb0e5bf/platform/backends/marmotta-backend-accumulograph/pom.xml ---------------------------------------------------------------------- diff --git a/platform/backends/marmotta-backend-accumulograph/pom.xml b/platform/backends/marmotta-backend-accumulograph/pom.xml new file mode 100644 index 0000000..941077c --- /dev/null +++ b/platform/backends/marmotta-backend-accumulograph/pom.xml @@ -0,0 +1,63 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +~ Licensed to the Apache Software Foundation (ASF) under one or more +~ contributor license agreements. See the NOTICE file distributed with +~ this work for additional information regarding copyright ownership. +~ The ASF licenses this file to You under the Apache License, Version 2.0 +~ (the "License"); you may not use this file except in compliance with +~ the License. You may obtain a copy of the License at +~ +~ http://www.apache.org/licenses/LICENSE-2.0 +~ +~ Unless required by applicable law or agreed to in writing, software +~ distributed under the License is distributed on an "AS IS" BASIS, +~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +~ See the License for the specific language governing permissions and +~ limitations under the License. +--> + +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <parent> + <groupId>org.apache.marmotta</groupId> + <artifactId>marmotta-parent</artifactId> + <version>3.4.0-SNAPSHOT</version> + <relativePath>../../../parent/pom.xml</relativePath> + </parent> + <modelVersion>4.0.0</modelVersion> + + <artifactId>marmotta-backend-accumulograph</artifactId> + + <name>Apache Marmotta Platform: Accumulograph Backend</name> + <description> + This module provides an Apache Marmotta backend using blueprints abstraction on Accumulograph. This is a suitable backend in + high performance or big data scenarios. It does not support rule-based reasoning and versioning. NOTE: + This backend uses the Apache licensed AccumuloGraph library together with other Apache licensed products. + See from https://github.com/JHUAPL/AccumuloGraph/blob/master/LICENSE. + </description> + + <dependencies> + <dependency> + <groupId>org.apache.marmotta</groupId> + <artifactId>marmotta-core</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.marmotta</groupId> + <artifactId>marmotta-sail-transactions</artifactId> + </dependency> + <dependency> + <groupId>edu.jhuapl.tinkerpop</groupId> + <artifactId>blueprints-accumulo-graph</artifactId> + <version>${accumulograph.version}</version + </dependency> + <dependency> + <groupId>com.tinkerpop.blueprints</groupId> + <artifactId>blueprints-graph-sail</artifactId> + <!-- TODO: create a shared blueprints version in marmotta-parent --> + <version>2.6.0</version> + </dependency> + </dependencies> + +</project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/marmotta/blob/acb0e5bf/platform/backends/marmotta-backend-accumulograph/src/main/java/org/apache/marmotta/platform/backend/accumulograph/AccumuloGraphLoggingModule.java ---------------------------------------------------------------------- diff --git a/platform/backends/marmotta-backend-accumulograph/src/main/java/org/apache/marmotta/platform/backend/accumulograph/AccumuloGraphLoggingModule.java b/platform/backends/marmotta-backend-accumulograph/src/main/java/org/apache/marmotta/platform/backend/accumulograph/AccumuloGraphLoggingModule.java new file mode 100644 index 0000000..b710a09 --- /dev/null +++ b/platform/backends/marmotta-backend-accumulograph/src/main/java/org/apache/marmotta/platform/backend/accumulograph/AccumuloGraphLoggingModule.java @@ -0,0 +1,79 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.marmotta.platform.backend.accumulograph; + +import ch.qos.logback.classic.Level; +import com.google.common.collect.ImmutableSet; +import org.apache.marmotta.platform.core.logging.BaseLoggingModule; + +import javax.enterprise.context.ApplicationScoped; +import java.util.Collection; + +/** + * Logging module extension + * @author Raffaele Palmieri + */ +@ApplicationScoped +public class AccumuloGraphLoggingModule extends BaseLoggingModule { + + public AccumuloGraphLoggingModule() { + } + + /** + * Return the default (logback) level used by this logging module. Should in most cases be INFO or WARN. + * + * @return + */ + @Override + public Level getDefaultLevel() { + return Level.WARN; + } + + /** + * Return a unique identifier for this logging module. This identifier will e.g. be used in the configuration file + * to store the configuration for this module. For this reason it should only consist of alpha-numeric characters + * plus _ and _. + * + * @return a unique identifier for the module, suitable for use in the configuration file + */ + @Override + public String getId() { + return "accumulograph"; + } + + /** + * Return a human-readable name for this logging module. This name is used for displaying information about the + * module to the user, e.g. in a configuration interface. + * + * @return a human-readable name for the module, suitable for displaying in a user interface + */ + @Override + public String getName() { + return "AccumuloGraph Backend"; + } + + /** + * Return a collection of packages covered by this logging module. This method should be used to group together + * those packages that conceptually make up the functionality described by the logging module (e.g. "SPARQL"). + * + * @return a collection of package names + */ + @Override + public Collection<String> getPackages() { + return ImmutableSet.of("org.apache.marmotta.platform.backend.accumulograph", "edu.jhuapl.tinkerpop"); + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/marmotta/blob/acb0e5bf/platform/backends/marmotta-backend-accumulograph/src/main/java/org/apache/marmotta/platform/backend/accumulograph/AccumuloGraphProvider.java ---------------------------------------------------------------------- diff --git a/platform/backends/marmotta-backend-accumulograph/src/main/java/org/apache/marmotta/platform/backend/accumulograph/AccumuloGraphProvider.java b/platform/backends/marmotta-backend-accumulograph/src/main/java/org/apache/marmotta/platform/backend/accumulograph/AccumuloGraphProvider.java new file mode 100644 index 0000000..897149d --- /dev/null +++ b/platform/backends/marmotta-backend-accumulograph/src/main/java/org/apache/marmotta/platform/backend/accumulograph/AccumuloGraphProvider.java @@ -0,0 +1,128 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.marmotta.platform.backend.accumulograph; + +import com.tinkerpop.blueprints.oupls.sail.GraphSail; +import edu.jhuapl.tinkerpop.AccumuloGraph; +import edu.jhuapl.tinkerpop.AccumuloGraphConfiguration.InstanceType; +import edu.jhuapl.tinkerpop.AccumuloGraphConfiguration; +import com.tinkerpop.blueprints.GraphFactory; +import org.apache.commons.configuration.BaseConfiguration; +import org.apache.commons.configuration.Configuration; +import org.apache.marmotta.platform.core.api.config.ConfigurationService; +import org.apache.marmotta.platform.core.api.triplestore.SesameService; +import org.apache.marmotta.platform.core.api.triplestore.StoreProvider; +import org.apache.marmotta.platform.core.events.ConfigurationChangedEvent; +import org.openrdf.repository.sail.SailRepository; +import org.openrdf.sail.NotifyingSail; +import org.openrdf.sail.Sail; +import org.slf4j.Logger; + +import javax.enterprise.context.ApplicationScoped; +import javax.enterprise.event.Observes; +import javax.inject.Inject; +import java.util.List; + +/** + * Blueprints Implementation by Accumulo Graph + * @author Raffaele Palmieri + * @see https://github.com/JHUAPL/AccumuloGraph + */ +@ApplicationScoped +public class AccumuloGraphProvider implements StoreProvider { + + @Inject + private Logger log; + + @Inject + private ConfigurationService configurationService; + + @Inject + private SesameService sesameService; + + private NotifyingSail m_sail; + + /** + * Create the store provided by this SailProvider + * + * @return a new instance of the store + */ + @Override + public NotifyingSail createStore() { + log.info("Initializing Backend: AccumuloGraph Store"); + final AccumuloGraph graph = createAccumuloGraph(); + m_sail = new GraphSail(graph); + return m_sail; + } + + /** + * Observes configuration change + */ + public void configurationChanged(@Observes ConfigurationChangedEvent e) { + if(e.containsChangedKeyWithPrefix("accumulograph")) { + sesameService.restart(); + } + } + + /** + * Create the repository using the sail given as argument. + * This method is needed because some backends + * use custom implementations of SailRepository. + * + * @param sail + * @return + */ + @Override + public SailRepository createRepository(Sail sail) { + return new SailRepository(sail); + } + + /** + * Create Accumulograph from the configuration + * + * @return AccumuloGraph + */ + public AccumuloGraph createAccumuloGraph() { + Configuration conf = new BaseConfiguration(); + List<String> accumuloGraphConf = configurationService.listConfigurationKeys("accumulograph"); + for (String key : accumuloGraphConf) { + String accumuloGraphKey = key.replaceFirst("^accumulograph\\.", ""); + conf.setProperty(accumuloGraphKey, configurationService.getStringConfiguration(key)); + } + return new AccumuloGraph(conf); + } + + /** + * Return the name of the provider. Used e.g. for displaying status information or logging. + * + * @return + */ + @Override + public String getName() { + return "AccumuloGraph"; + } + + /** + * Return true if this sail provider is enabled in the configuration. + * + * @return + */ + @Override + public boolean isEnabled() { + return true; + } +} http://git-wip-us.apache.org/repos/asf/marmotta/blob/acb0e5bf/platform/backends/marmotta-backend-accumulograph/src/main/resources/META-INF/beans.xml ---------------------------------------------------------------------- diff --git a/platform/backends/marmotta-backend-accumulograph/src/main/resources/META-INF/beans.xml b/platform/backends/marmotta-backend-accumulograph/src/main/resources/META-INF/beans.xml new file mode 100644 index 0000000..6a9575d --- /dev/null +++ b/platform/backends/marmotta-backend-accumulograph/src/main/resources/META-INF/beans.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +--> +<beans + xmlns="http://java.sun.com/xml/ns/javaee" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation=" + http://java.sun.com/xml/ns/javaee + http://java.sun.com/xml/ns/javaee/beans_1_0.xsd"> + +</beans> http://git-wip-us.apache.org/repos/asf/marmotta/blob/acb0e5bf/platform/backends/marmotta-backend-accumulograph/src/main/resources/config-defaults.properties ---------------------------------------------------------------------- diff --git a/platform/backends/marmotta-backend-accumulograph/src/main/resources/config-defaults.properties b/platform/backends/marmotta-backend-accumulograph/src/main/resources/config-defaults.properties new file mode 100644 index 0000000..bd0c4b2 --- /dev/null +++ b/platform/backends/marmotta-backend-accumulograph/src/main/resources/config-defaults.properties @@ -0,0 +1,28 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################### +# AccumuloGraph default configuration +############################################################################### + +accumulograph.blueprints.accumulo.instance.type = Mock +accumulograph.blueprints.accumulo.name = marmotta_graph +accumulograph.blueprints.accumulo.user = user +accumulograph.blueprints.accumulo.password = password +accumulograph.blueprints.accumulo.create = true +accumulograph.blueprints.accumulo.instance = accumulo_instance +accumulograph.blueprints.accumulo.zkhosts = localhost http://git-wip-us.apache.org/repos/asf/marmotta/blob/acb0e5bf/platform/backends/marmotta-backend-accumulograph/src/main/resources/config-descriptions.properties ---------------------------------------------------------------------- diff --git a/platform/backends/marmotta-backend-accumulograph/src/main/resources/config-descriptions.properties b/platform/backends/marmotta-backend-accumulograph/src/main/resources/config-descriptions.properties new file mode 100644 index 0000000..3e44ae7 --- /dev/null +++ b/platform/backends/marmotta-backend-accumulograph/src/main/resources/config-descriptions.properties @@ -0,0 +1,133 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################### +# AccumuloGraph storage configuration +############################################################################### + +accumulograph.blueprints.accumulo.zkhosts.description = ZooKeeper hosts string, in the same format as used \ + by ZooKeeperInstance +accumulograph.blueprints.accumulo.zkhosts.type = java.lang.String + +accumulograph.blueprints.accumulo.instance.description = Accumulo instance name to use +accumulograph.blueprints.accumulo.instance.type = java.lang.String + +accumulograph.blueprints.accumulo.instance.type.description = Instance type to use with Accumulo:Distributed \ + , Mini, Mock +accumulograph.blueprints.accumulo.instance.type.type = java.lang.String + +accumulograph.blueprints.accumulo.user.description = Username to use for Accumulo authentication +accumulograph.blueprints.accumulo.user.type = java.lang.String + +accumulograph.blueprints.accumulo.password.description = Accumulo password used for authentication +accumulograph.blueprints.accumulo.password.type = java.lang.String + +accumulograph.blueprints.accumulo.name.description = Name of the graph to create +accumulograph.blueprints.accumulo.name.type = java.lang.String + +accumulograph.blueprints.accumulo.write.max.latency.description = Maximum wait time before changes are flushed \ + to Accumulo (milliseconds) +accumulograph.blueprints.accumulo.write.max.latency.type = java.lang.Long + +accumulograph.blueprints.accumulo.write.max.memory.description = Maximum memory usage when buffering \ + writes(bytes) +accumulograph.blueprints.accumulo.write.max.memory.type = java.lang.Long + +accumulograph.blueprints.accumulo.write.max.threads.description = Maximum number of threads to use \ + for writing to Accumulo +accumulograph.blueprints.accumulo.write.max.threads.type = java.lang.Integer + +accumulograph.blueprints.accumulo.write.timeout.description = How long to wait before declaring a \ + write failure (milliseconds) +accumulograph.blueprints.accumulo.write.timeout.type = java.lang.Long + +accumulograph.blueprints.accumulo.read.queryThreads.description = Number of Accumulo query threads \ + to use +accumulograph.blueprints.accumulo.read.queryThreads.type = java.lang.Integer + +accumulograph.blueprints.accumulo.auto.flush.description = Whether updates should be immediately \ + flushed to the backing Accumulo store \ + (true) or not (false) +accumulograph.blueprints.accumulo.auto.flush.type = java.lang.Boolean + +accumulograph.blueprints.accumulo.create.description = If the graph does not exist, whether it \ + should be created +accumulograph.blueprints.accumulo.create.type = java.lang.Boolean + +accumulograph.blueprints.accumulo.clear.description = Whether to clear an existing graph on \ + initialization +accumulograph.blueprints.accumulo.clear.type = java.lang.Boolean + +accumulograph.blueprints.accumulo.splits.description = A space-separated, ordered list of \ + splits to be applied to the backing \ + Accumulo table +accumulograph.blueprints.accumulo.splits.type = java.lang.String + +accumulograph.blueprints.accumulo.skipExistenceChecks.description = The TinkerPop API defines \ + certain operations should fail \ + if a Vertex or Edge already exists \ + or does not exist. +accumulograph.blueprints.accumulo.skipExistenceChecks.type = java.lang.Boolean + +accumulograph.blueprints.accumulo.property.preload.description = Deferred property loading \ + is the default. By setting this \ + configuration value, any keys in the provided \ + property list will be automatically loaded \ + in bulk when it makes sense (i.e., \ + when the system has to make a \ + trip out to Accumulo anyway). Other properties not in the \ + list will continue to be lazily and individually loaded. \ + In order to set this value, \ + you must first define a positive \ + property cache timeout value +accumulograph.blueprints.accumulo.property.preload.type = java.lang.String + +accumulograph.blueprints.accumulo.property.preload.all.description = If true, retrieve all \ + properties for elements when \ + retrieving them from Accumulo +accumulograph.blueprints.accumulo.property.preload.all.type = java.lang.Boolean + +accumulograph.blueprints.accumulo.propertyCacheTimeout.description = Sets the number of \ + milliseconds since retrieval \ + that a property value will be \ + maintained in a RAM \ + cache before that value is expired +accumulograph.blueprints.accumulo.propertyCacheTimeout.type = java.lang.Integer + +accumulograph.blueprints.accumulo.edgeCacheSize.description = Maximum size of the edges' cache +accumulograph.blueprints.accumulo.edgeCacheSize.type = java.lang.Integer + +accumulograph.blueprints.accumulo.edgeCacheTimeout.description = The maximum number of milliseconds \ + an Edge should be held in RAM +accumulograph.blueprints.accumulo.edgeCacheTimeout.type = java.lang.Integer + +accumulograph.blueprints.accumulo.vertexCacheTimeout.description = The maximum number of milliseconds \ + a Vertex should be held in RAM +accumulograph.blueprints.accumulo.vertexCacheTimeout.type = java.lang.Integer + +accumulograph.blueprints.accumulo.vertexCacheSize.description = Maximum size of the vertices' cache +accumulograph.blueprints.accumulo.vertexCacheSize.type = java.lang.Integer + +accumulograph.blueprints.accumulo.edge.preload.description = Maximum size of the vertices' cache +accumulograph.blueprints.accumulo.edge.preload.type = java.lang.Integer + +accumulograph.blueprints.accumulo.index.auto.description = Whether to automatically index \ + element properties +accumulograph.blueprints.accumulo.index.auto.type = java.lang.Boolean + +accumulograph.blueprints.accumulo.index.disable.description = Disables the IndexableGraph functions +accumulograph.blueprints.accumulo.index.disable.type = java.lang.Boolean \ No newline at end of file http://git-wip-us.apache.org/repos/asf/marmotta/blob/acb0e5bf/platform/backends/marmotta-backend-accumulograph/src/main/resources/kiwi-module.properties ---------------------------------------------------------------------- diff --git a/platform/backends/marmotta-backend-accumulograph/src/main/resources/kiwi-module.properties b/platform/backends/marmotta-backend-accumulograph/src/main/resources/kiwi-module.properties new file mode 100644 index 0000000..5c591d5 --- /dev/null +++ b/platform/backends/marmotta-backend-accumulograph/src/main/resources/kiwi-module.properties @@ -0,0 +1,37 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +name=Storage Backend: AccumuloGraph + +container=Generic +container.weight = 10 + +subtitle = Configure AccumuloGraph Backend +weight = 10 + +icon_small = /admin/img/config_small.png + +#do not change!!! +baseurl=/storage-accumulograph + +adminpage.0.title=About +adminpage.0.link=/admin/about.html + +adminpage.1.title=Configuration +adminpage.1.link=/admin/configuration.html + +webservices= \ No newline at end of file http://git-wip-us.apache.org/repos/asf/marmotta/blob/acb0e5bf/platform/backends/marmotta-backend-accumulograph/src/main/resources/web/admin/about.html ---------------------------------------------------------------------- diff --git a/platform/backends/marmotta-backend-accumulograph/src/main/resources/web/admin/about.html b/platform/backends/marmotta-backend-accumulograph/src/main/resources/web/admin/about.html new file mode 100644 index 0000000..7828b22 --- /dev/null +++ b/platform/backends/marmotta-backend-accumulograph/src/main/resources/web/admin/about.html @@ -0,0 +1,36 @@ +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one or more + ~ contributor license agreements. See the NOTICE file distributed with + ~ this work for additional information regarding copyright ownership. + ~ The ASF licenses this file to You under the Apache License, Version 2.0 + ~ (the "License"); you may not use this file except in compliance with + ~ the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + --> + +<html> +<head> + <!--###BEGIN_HEAD###--> + <title>Storage Backend: Accumulo</title> + <!--###END_HEAD###--> +</head> +<body> +<!--###BEGIN_CONTENT###--> +<h1>Storage Backend: Accumulo</h1> + +<p> + This module provides an Apache Marmotta storage backend based on the <a href="https://github.com/JHUAPL/AccumuloGraph">the implementation of Tinkerpop Blueprints Accumulo backend.</a> + Accumulo supports various instance types (Distributed, Mini, Mock), which you need to + configure manually. This default installation uses Mock Accumulo backend for demonstration purposes. +</p> +<!--###END_CONTENT###--> +</body> +</html> + http://git-wip-us.apache.org/repos/asf/marmotta/blob/acb0e5bf/platform/backends/marmotta-backend-accumulograph/src/main/resources/web/admin/configuration.html ---------------------------------------------------------------------- diff --git a/platform/backends/marmotta-backend-accumulograph/src/main/resources/web/admin/configuration.html b/platform/backends/marmotta-backend-accumulograph/src/main/resources/web/admin/configuration.html new file mode 100644 index 0000000..8c8d0e1 --- /dev/null +++ b/platform/backends/marmotta-backend-accumulograph/src/main/resources/web/admin/configuration.html @@ -0,0 +1,54 @@ +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one or more + ~ contributor license agreements. See the NOTICE file distributed with + ~ this work for additional information regarding copyright ownership. + ~ The ASF licenses this file to You under the Apache License, Version 2.0 + ~ (the "License"); you may not use this file except in compliance with + ~ the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + --> + +<html> +<head> + <title>Storage Backend: Accumulo</title> + <script type="text/javascript"> + var _SERVER_URL = "http://localhost:8080/marmotta/"; + </script> + <!--###BEGIN_HEAD###--> + <script type="text/javascript" src="../../webjars/jquery/1.8.2/jquery.min.js"></script> + <script type="text/javascript" src="../../core/public/js/widgets/configurator/configurator.js"></script> + <link rel="stylesheet" href="style.css" /> + <link type="text/css" rel="stylesheet" href="../../core/public/js/widgets/configurator/style.css"> + <script type="text/javascript"> + jQuery(document).ready(function(){ + var options = { + url : _SERVER_URL, + container : "accumulograph_configurator", + prefix : 'accumulograph' + } + var configurator = new Configurator(options); + }); + </script> + <!--###END_HEAD###--> +</head> +<body> +<!--###BEGIN_CONTENT###--> +<h1>Accumulo Graph Configuration</h1> +<p> + Here you can configure options offered by the Accumulo Graph. Some documentation on these options is available + <a href="https://github.com/JHUAPL/AccumuloGraph">at the Accumulo Graph webpage</a><br /> + The configuration currently contains: +</p> +<div id="accumulograph_configurator"> + <h4>Loading configurator</h4> +</div> +<!--###END_CONTENT###--> +</body> +</html> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/marmotta/blob/acb0e5bf/platform/backends/pom.xml ---------------------------------------------------------------------- diff --git a/platform/backends/pom.xml b/platform/backends/pom.xml index 7b2105d..fe41526 100644 --- a/platform/backends/pom.xml +++ b/platform/backends/pom.xml @@ -67,6 +67,7 @@ <module>marmotta-backend-native</module> <module>marmotta-backend-memory</module> <module>marmotta-backend-titan</module> + <module>marmotta-backend-accumulograph</module> </modules>
