Skip to content

Commit

Permalink
Prepping assembly and install script.
Browse files Browse the repository at this point in the history
  • Loading branch information
twilmes committed Sep 11, 2018
1 parent 6704ce3 commit 5500b9f
Show file tree
Hide file tree
Showing 32 changed files with 1,058 additions and 26 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -23,3 +23,5 @@ target/

# FDB test configuration generated by the FDB test container
src/test/resources/etc

jub*.xml
629 changes: 629 additions & 0 deletions LICENSE.txt

Large diffs are not rendered by default.

43 changes: 43 additions & 0 deletions conf/gremlin-server.yaml
@@ -0,0 +1,43 @@
host: 0.0.0.0
port: 8182
scriptEvaluationTimeout: 30000
channelizer: org.apache.tinkerpop.gremlin.server.channel.WebSocketChannelizer
graphs: {
graph: conf/gremlin-server/janusgraph-foundationdb-es-server.properties
}
scriptEngines: {
gremlin-groovy: {
plugins: { org.janusgraph.graphdb.tinkerpop.plugin.JanusGraphGremlinPlugin: {},
org.apache.tinkerpop.gremlin.server.jsr223.GremlinServerGremlinPlugin: {},
org.apache.tinkerpop.gremlin.tinkergraph.jsr223.TinkerGraphGremlinPlugin: {},
org.apache.tinkerpop.gremlin.jsr223.ImportGremlinPlugin: {classImports: [java.lang.Math], methodImports: [java.lang.Math#*]},
org.apache.tinkerpop.gremlin.jsr223.ScriptFileGremlinPlugin: {files: [scripts/empty-sample.groovy]}}}}
serializers:
- { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry] }}
- { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0, config: { serializeResultToString: true }}
- { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV3d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry] }}
# Older serialization versions for backwards compatibility:
- { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry] }}
- { className: org.apache.tinkerpop.gremlin.driver.ser.GryoLiteMessageSerializerV1d0, config: {ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry] }}
- { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0, config: { serializeResultToString: true }}
- { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV2d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry] }}
- { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV1d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistryV1d0] }}
- { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistryV1d0] }}
processors:
- { className: org.apache.tinkerpop.gremlin.server.op.session.SessionOpProcessor, config: { sessionTimeout: 28800000 }}
- { className: org.apache.tinkerpop.gremlin.server.op.traversal.TraversalOpProcessor, config: { cacheExpirationTime: 600000, cacheMaxSize: 1000 }}
metrics: {
consoleReporter: {enabled: true, interval: 180000},
csvReporter: {enabled: true, interval: 180000, fileName: /tmp/gremlin-server-metrics.csv},
jmxReporter: {enabled: true},
slf4jReporter: {enabled: true, interval: 180000},
gangliaReporter: {enabled: false, interval: 180000, addressingMode: MULTICAST},
graphiteReporter: {enabled: false, interval: 180000}}
maxInitialLineLength: 4096
maxHeaderSize: 8192
maxChunkSize: 8192
maxContentLength: 65536
maxAccumulationBufferComponents: 1024
resultIterationBatchSize: 64
writeBufferLowWaterMark: 32768
writeBufferHighWaterMark: 65536
125 changes: 125 additions & 0 deletions conf/janusgraph-foundationdb-es-server.properties
@@ -0,0 +1,125 @@
gremlin.graph=org.janusgraph.core.JanusGraphFactory
# JanusGraph configuration sample: FoundationDB
#
# This file connects to a local FoundationDB instance.
# FoundationDB must already be started before starting JanusGraph
# with this file.

# The primary persistence provider used by JanusGraph. This is required.
# It should be set one of JanusGraph's built-in shorthand names for its
# standard storage backends (shorthands: berkeleyje, cassandrathrift,
# cassandra, astyanax, embeddedcassandra, cql, hbase, foundationdb,
# inmemory) or to the full package and classname of a custom/third-party
# StoreManager implementation.
#
# Default: (no default value)
# Data Type: String
# Mutability: LOCAL
storage.backend=com.experoinc.janusgraph.diskstorage.foundationdb.FoundationDBStoreManager

# Whether to enable JanusGraph's database-level cache, which is shared
# across all transactions. Enabling this option speeds up traversals by
# holding hot graph elements in memory, but also increases the likelihood
# of reading stale data. Disabling it forces each transaction to
# independently fetch graph elements from storage before reading/writing
# them.
#
# Default: false
# Data Type: Boolean
# Mutability: MASKABLE
cache.db-cache = false

# How long, in milliseconds, database-level cache will keep entries after
# flushing them. This option is only useful on distributed storage
# backends that are capable of acknowledging writes without necessarily
# making them immediately visible.
#
# Default: 50
# Data Type: Integer
# Mutability: GLOBAL_OFFLINE
#
# Settings with mutability GLOBAL_OFFLINE are centrally managed in
# JanusGraph's storage backend. After starting the database for the first
# time, this file's copy of this setting is ignored. Use JanusGraph's
# Management System to read or modify this value after bootstrapping.
cache.db-cache-clean-wait = 20

# Default expiration time, in milliseconds, for entries in the
# database-level cache. Entries are evicted when they reach this age even
# if the cache has room to spare. Set to 0 to disable expiration (cache
# entries live forever or until memory pressure triggers eviction when set
# to 0).
#
# Default: 10000
# Data Type: Long
# Mutability: GLOBAL_OFFLINE
#
# Settings with mutability GLOBAL_OFFLINE are centrally managed in
# JanusGraph's storage backend. After starting the database for the first
# time, this file's copy of this setting is ignored. Use JanusGraph's
# Management System to read or modify this value after bootstrapping.
cache.db-cache-time = 180000

# Size of JanusGraph's database level cache. Values between 0 and 1 are
# interpreted as a percentage of VM heap, while larger values are
# interpreted as an absolute size in bytes.
#
# Default: 0.3
# Data Type: Double
# Mutability: MASKABLE
cache.db-cache-size = 0.5

# Connect to an already-running ES instance on localhost

# The indexing backend used to extend and optimize JanusGraph's query
# functionality. This setting is optional. JanusGraph can use multiple
# heterogeneous index backends. Hence, this option can appear more than
# once, so long as the user-defined name between "index" and "backend" is
# unique among appearances.Similar to the storage backend, this should be
# set to one of JanusGraph's built-in shorthand names for its standard index
# backends (shorthands: lucene, elasticsearch, es, solr) or to the full
# package and classname of a custom/third-party IndexProvider
# implementation.
#
# Default: elasticsearch
# Data Type: String
# Mutability: GLOBAL_OFFLINE
#
# Settings with mutability GLOBAL_OFFLINE are centrally managed in JanusGraph's
# storage backend. After starting the database for the first time, this
# file's copy of this setting is ignored. Use JanusGraph's Management System
# to read or modify this value after bootstrapping.
index.search.backend=elasticsearch

# The hostname or comma-separated list of hostnames of index backend
# servers. This is only applicable to some index backends, such as
# elasticsearch and solr.
#
# Default: 127.0.0.1
# Data Type: class java.lang.String[]
# Mutability: MASKABLE
index.search.hostname=127.0.0.1

# The Elasticsearch node.client option is set to this boolean value, and
# the Elasticsearch node.data option is set to the negation of this value.
# True creates a thin client which holds no data. False creates a regular
# Elasticsearch cluster node that may store data.
#
# Default: true
# Data Type: Boolean
# Mutability: GLOBAL_OFFLINE
#
# Settings with mutability GLOBAL_OFFLINE are centrally managed in JanusGraph's
# storage backend. After starting the database for the first time, this
# file's copy of this setting is ignored. Use JanusGraph's Management System
# to read or modify this value after bootstrapping.
index.search.elasticsearch.client-only=true

# Or start ES inside the JanusGraph JVM
#index.search.backend=elasticsearch
#index.search.directory=db/es
#index.search.elasticsearch.client-only=false
#index.search.elasticsearch.local-mode=true

# Turn on storage adapter query parallelization
query.batch = true
73 changes: 73 additions & 0 deletions conf/janusgraph-foundationdb.properties
@@ -0,0 +1,73 @@
gremlin.graph=org.janusgraph.core.JanusGraphFactory
# JanusGraph configuration sample: FoundationDB
#
# This file connects to a local FoundationDB instance.
# FoundationDB must already be started before starting JanusGraph
# with this file.

# The primary persistence provider used by JanusGraph. This is required.
# It should be set one of JanusGraph's built-in shorthand names for its
# standard storage backends (shorthands: berkeleyje, cassandrathrift,
# cassandra, astyanax, embeddedcassandra, cql, hbase, foundationdb,
# inmemory) or to the full package and classname of a custom/third-party
# StoreManager implementation.
#
# Default: (no default value)
# Data Type: String
# Mutability: LOCAL
storage.backend=com.experoinc.janusgraph.diskstorage.foundationdb.FoundationDBStoreManager

# Whether to enable JanusGraph's database-level cache, which is shared
# across all transactions. Enabling this option speeds up traversals by
# holding hot graph elements in memory, but also increases the likelihood
# of reading stale data. Disabling it forces each transaction to
# independently fetch graph elements from storage before reading/writing
# them.
#
# Default: false
# Data Type: Boolean
# Mutability: MASKABLE
cache.db-cache = false

# How long, in milliseconds, database-level cache will keep entries after
# flushing them. This option is only useful on distributed storage
# backends that are capable of acknowledging writes without necessarily
# making them immediately visible.
#
# Default: 50
# Data Type: Integer
# Mutability: GLOBAL_OFFLINE
#
# Settings with mutability GLOBAL_OFFLINE are centrally managed in
# JanusGraph's storage backend. After starting the database for the first
# time, this file's copy of this setting is ignored. Use JanusGraph's
# Management System to read or modify this value after bootstrapping.
cache.db-cache-clean-wait = 20

# Default expiration time, in milliseconds, for entries in the
# database-level cache. Entries are evicted when they reach this age even
# if the cache has room to spare. Set to 0 to disable expiration (cache
# entries live forever or until memory pressure triggers eviction when set
# to 0).
#
# Default: 10000
# Data Type: Long
# Mutability: GLOBAL_OFFLINE
#
# Settings with mutability GLOBAL_OFFLINE are centrally managed in
# JanusGraph's storage backend. After starting the database for the first
# time, this file's copy of this setting is ignored. Use JanusGraph's
# Management System to read or modify this value after bootstrapping.
cache.db-cache-time = 180000

# Size of JanusGraph's database level cache. Values between 0 and 1 are
# interpreted as a percentage of VM heap, while larger values are
# interpreted as an absolute size in bytes.
#
# Default: 0.3
# Data Type: Double
# Mutability: MASKABLE
cache.db-cache-size = 0.5

# Turn on storage adapter query parallelization
query.batch = true
38 changes: 38 additions & 0 deletions install.sh
@@ -0,0 +1,38 @@
#!/bin/bash
#
# Copyright 2018 Expero Inc.
#
# Licensed 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.
#

if [ -z "$*" ]; then
echo "Please provide the path to your JanusGraph install directory"
exit 0
fi

JANUS_INSTALL_PATH=$1
JANUS_CONF_PATH=${JANUS_INSTALL_PATH}/conf
JANUS_GREMLIN_SERVER_CONF=${JANUS_CONF_PATH}/gremlin-server

if [ ! -d "$JANUS_INSTALL_PATH" ]; then
echo "Directory ${JANUS_INSTALL_PATH} does not exist"
exit 0
fi

cp lib/* ${JANUS_INSTALL_PATH}/ext
cp conf/janusgraph-foundationdb.properties ${JANUS_CONF_PATH}
cp conf/janusgraph-foundationdb-es-server.properties ${JANUS_GREMLIN_SERVER_CONF}

# backup Gremlin server config
mv ${JANUS_GREMLIN_SERVER_CONF}/gremlin-server.yaml ${JANUS_GREMLIN_SERVER_CONF}/gremlin-server.yaml.orig
cp conf/gremlin-server.yaml ${JANUS_GREMLIN_SERVER_CONF}/gremlin-server.yaml
77 changes: 76 additions & 1 deletion pom.xml
Expand Up @@ -16,6 +16,8 @@
<janusgraph.version>0.3.0</janusgraph.version>
<foundationdb.version>5.2.5</foundationdb.version>
<dependency.plugin.version>2.10</dependency.plugin.version>
<test.skip.default>false</test.skip.default>
<test.skip.tp>true</test.skip.tp>
</properties>

<developers>
Expand Down Expand Up @@ -77,6 +79,7 @@
</dependencies>

<build>
<directory>${basedir}/target</directory>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
Expand Down Expand Up @@ -104,7 +107,79 @@
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.15</version>
<configuration>
<parallel>none</parallel>
<runOrder>alphabetical</runOrder>
<failIfNoTests>false</failIfNoTests>
<excludes>
<exclude>**/*PerformanceTest.java</exclude>
<exclude>**/*ConcurrentTest.java</exclude>
<exclude>**/*Groovy*Test.java</exclude>
<exclude>**/*ComputerTest.java</exclude>
<exclude>**/*ProcessTest.java</exclude>
<exclude>**/*ProcessPerformanceTest.java</exclude>
<exclude>**/*StructureTest.java</exclude>
</excludes>
<skip>${test.skip.default}</skip>
<!-- Use log4j.properties from module test resources -->
<systemProperties>
<property>
<name>log4j.configuration</name>
<value>file:${project.build.directory}/test-classes/log4j.properties</value>
</property>
</systemProperties>
</configuration>
<executions>
<execution>
<id>tinkerpop-test</id>
<goals>
<goal>test</goal>
</goals>
<phase>test</phase>
<configuration combine.self="override">
<reuseForks>false</reuseForks>
<forkCount>1</forkCount>
<parallel>none</parallel>
<threadCount>1</threadCount>
<perCoreThreadCount>false</perCoreThreadCount>
<includes>
<include>**/*Groovy*Test.java</include>
<include>**/*ComputerTest.java</include>
<include>**/*ProcessTest.java</include>
<include>**/*ProcessPerformanceTest.java</include>
<include>**/*StructureTest.java</include>
</includes>
<runOrder>alphabetical</runOrder>
<skipTests>${test.skip.tp}</skipTests>
<systemPropertyVariables>
<build.dir>${project.build.directory}</build.dir>
<log4j.configuration>file:${project.build.directory}/test-classes/log4j.properties</log4j.configuration>
<is.testing>true</is.testing>
</systemPropertyVariables>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.5.3</version>
<configuration>
<descriptor>src/assembly/dep.xml</descriptor>
</configuration>
<executions>
<execution>
<id>create-archive</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
</project>

0 comments on commit 5500b9f

Please sign in to comment.