Skip to content

Commit 5500b9f

Browse files
committed
Prepping assembly and install script.
1 parent 6704ce3 commit 5500b9f

32 files changed

+1058
-26
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,5 @@ target/
2323

2424
# FDB test configuration generated by the FDB test container
2525
src/test/resources/etc
26+
27+
jub*.xml

LICENSE.txt

Lines changed: 629 additions & 0 deletions
Large diffs are not rendered by default.

conf/gremlin-server.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
host: 0.0.0.0
2+
port: 8182
3+
scriptEvaluationTimeout: 30000
4+
channelizer: org.apache.tinkerpop.gremlin.server.channel.WebSocketChannelizer
5+
graphs: {
6+
graph: conf/gremlin-server/janusgraph-foundationdb-es-server.properties
7+
}
8+
scriptEngines: {
9+
gremlin-groovy: {
10+
plugins: { org.janusgraph.graphdb.tinkerpop.plugin.JanusGraphGremlinPlugin: {},
11+
org.apache.tinkerpop.gremlin.server.jsr223.GremlinServerGremlinPlugin: {},
12+
org.apache.tinkerpop.gremlin.tinkergraph.jsr223.TinkerGraphGremlinPlugin: {},
13+
org.apache.tinkerpop.gremlin.jsr223.ImportGremlinPlugin: {classImports: [java.lang.Math], methodImports: [java.lang.Math#*]},
14+
org.apache.tinkerpop.gremlin.jsr223.ScriptFileGremlinPlugin: {files: [scripts/empty-sample.groovy]}}}}
15+
serializers:
16+
- { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry] }}
17+
- { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0, config: { serializeResultToString: true }}
18+
- { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV3d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry] }}
19+
# Older serialization versions for backwards compatibility:
20+
- { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry] }}
21+
- { className: org.apache.tinkerpop.gremlin.driver.ser.GryoLiteMessageSerializerV1d0, config: {ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry] }}
22+
- { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0, config: { serializeResultToString: true }}
23+
- { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV2d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry] }}
24+
- { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV1d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistryV1d0] }}
25+
- { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistryV1d0] }}
26+
processors:
27+
- { className: org.apache.tinkerpop.gremlin.server.op.session.SessionOpProcessor, config: { sessionTimeout: 28800000 }}
28+
- { className: org.apache.tinkerpop.gremlin.server.op.traversal.TraversalOpProcessor, config: { cacheExpirationTime: 600000, cacheMaxSize: 1000 }}
29+
metrics: {
30+
consoleReporter: {enabled: true, interval: 180000},
31+
csvReporter: {enabled: true, interval: 180000, fileName: /tmp/gremlin-server-metrics.csv},
32+
jmxReporter: {enabled: true},
33+
slf4jReporter: {enabled: true, interval: 180000},
34+
gangliaReporter: {enabled: false, interval: 180000, addressingMode: MULTICAST},
35+
graphiteReporter: {enabled: false, interval: 180000}}
36+
maxInitialLineLength: 4096
37+
maxHeaderSize: 8192
38+
maxChunkSize: 8192
39+
maxContentLength: 65536
40+
maxAccumulationBufferComponents: 1024
41+
resultIterationBatchSize: 64
42+
writeBufferLowWaterMark: 32768
43+
writeBufferHighWaterMark: 65536
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
gremlin.graph=org.janusgraph.core.JanusGraphFactory
2+
# JanusGraph configuration sample: FoundationDB
3+
#
4+
# This file connects to a local FoundationDB instance.
5+
# FoundationDB must already be started before starting JanusGraph
6+
# with this file.
7+
8+
# The primary persistence provider used by JanusGraph. This is required.
9+
# It should be set one of JanusGraph's built-in shorthand names for its
10+
# standard storage backends (shorthands: berkeleyje, cassandrathrift,
11+
# cassandra, astyanax, embeddedcassandra, cql, hbase, foundationdb,
12+
# inmemory) or to the full package and classname of a custom/third-party
13+
# StoreManager implementation.
14+
#
15+
# Default: (no default value)
16+
# Data Type: String
17+
# Mutability: LOCAL
18+
storage.backend=com.experoinc.janusgraph.diskstorage.foundationdb.FoundationDBStoreManager
19+
20+
# Whether to enable JanusGraph's database-level cache, which is shared
21+
# across all transactions. Enabling this option speeds up traversals by
22+
# holding hot graph elements in memory, but also increases the likelihood
23+
# of reading stale data. Disabling it forces each transaction to
24+
# independently fetch graph elements from storage before reading/writing
25+
# them.
26+
#
27+
# Default: false
28+
# Data Type: Boolean
29+
# Mutability: MASKABLE
30+
cache.db-cache = false
31+
32+
# How long, in milliseconds, database-level cache will keep entries after
33+
# flushing them. This option is only useful on distributed storage
34+
# backends that are capable of acknowledging writes without necessarily
35+
# making them immediately visible.
36+
#
37+
# Default: 50
38+
# Data Type: Integer
39+
# Mutability: GLOBAL_OFFLINE
40+
#
41+
# Settings with mutability GLOBAL_OFFLINE are centrally managed in
42+
# JanusGraph's storage backend. After starting the database for the first
43+
# time, this file's copy of this setting is ignored. Use JanusGraph's
44+
# Management System to read or modify this value after bootstrapping.
45+
cache.db-cache-clean-wait = 20
46+
47+
# Default expiration time, in milliseconds, for entries in the
48+
# database-level cache. Entries are evicted when they reach this age even
49+
# if the cache has room to spare. Set to 0 to disable expiration (cache
50+
# entries live forever or until memory pressure triggers eviction when set
51+
# to 0).
52+
#
53+
# Default: 10000
54+
# Data Type: Long
55+
# Mutability: GLOBAL_OFFLINE
56+
#
57+
# Settings with mutability GLOBAL_OFFLINE are centrally managed in
58+
# JanusGraph's storage backend. After starting the database for the first
59+
# time, this file's copy of this setting is ignored. Use JanusGraph's
60+
# Management System to read or modify this value after bootstrapping.
61+
cache.db-cache-time = 180000
62+
63+
# Size of JanusGraph's database level cache. Values between 0 and 1 are
64+
# interpreted as a percentage of VM heap, while larger values are
65+
# interpreted as an absolute size in bytes.
66+
#
67+
# Default: 0.3
68+
# Data Type: Double
69+
# Mutability: MASKABLE
70+
cache.db-cache-size = 0.5
71+
72+
# Connect to an already-running ES instance on localhost
73+
74+
# The indexing backend used to extend and optimize JanusGraph's query
75+
# functionality. This setting is optional. JanusGraph can use multiple
76+
# heterogeneous index backends. Hence, this option can appear more than
77+
# once, so long as the user-defined name between "index" and "backend" is
78+
# unique among appearances.Similar to the storage backend, this should be
79+
# set to one of JanusGraph's built-in shorthand names for its standard index
80+
# backends (shorthands: lucene, elasticsearch, es, solr) or to the full
81+
# package and classname of a custom/third-party IndexProvider
82+
# implementation.
83+
#
84+
# Default: elasticsearch
85+
# Data Type: String
86+
# Mutability: GLOBAL_OFFLINE
87+
#
88+
# Settings with mutability GLOBAL_OFFLINE are centrally managed in JanusGraph's
89+
# storage backend. After starting the database for the first time, this
90+
# file's copy of this setting is ignored. Use JanusGraph's Management System
91+
# to read or modify this value after bootstrapping.
92+
index.search.backend=elasticsearch
93+
94+
# The hostname or comma-separated list of hostnames of index backend
95+
# servers. This is only applicable to some index backends, such as
96+
# elasticsearch and solr.
97+
#
98+
# Default: 127.0.0.1
99+
# Data Type: class java.lang.String[]
100+
# Mutability: MASKABLE
101+
index.search.hostname=127.0.0.1
102+
103+
# The Elasticsearch node.client option is set to this boolean value, and
104+
# the Elasticsearch node.data option is set to the negation of this value.
105+
# True creates a thin client which holds no data. False creates a regular
106+
# Elasticsearch cluster node that may store data.
107+
#
108+
# Default: true
109+
# Data Type: Boolean
110+
# Mutability: GLOBAL_OFFLINE
111+
#
112+
# Settings with mutability GLOBAL_OFFLINE are centrally managed in JanusGraph's
113+
# storage backend. After starting the database for the first time, this
114+
# file's copy of this setting is ignored. Use JanusGraph's Management System
115+
# to read or modify this value after bootstrapping.
116+
index.search.elasticsearch.client-only=true
117+
118+
# Or start ES inside the JanusGraph JVM
119+
#index.search.backend=elasticsearch
120+
#index.search.directory=db/es
121+
#index.search.elasticsearch.client-only=false
122+
#index.search.elasticsearch.local-mode=true
123+
124+
# Turn on storage adapter query parallelization
125+
query.batch = true
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
gremlin.graph=org.janusgraph.core.JanusGraphFactory
2+
# JanusGraph configuration sample: FoundationDB
3+
#
4+
# This file connects to a local FoundationDB instance.
5+
# FoundationDB must already be started before starting JanusGraph
6+
# with this file.
7+
8+
# The primary persistence provider used by JanusGraph. This is required.
9+
# It should be set one of JanusGraph's built-in shorthand names for its
10+
# standard storage backends (shorthands: berkeleyje, cassandrathrift,
11+
# cassandra, astyanax, embeddedcassandra, cql, hbase, foundationdb,
12+
# inmemory) or to the full package and classname of a custom/third-party
13+
# StoreManager implementation.
14+
#
15+
# Default: (no default value)
16+
# Data Type: String
17+
# Mutability: LOCAL
18+
storage.backend=com.experoinc.janusgraph.diskstorage.foundationdb.FoundationDBStoreManager
19+
20+
# Whether to enable JanusGraph's database-level cache, which is shared
21+
# across all transactions. Enabling this option speeds up traversals by
22+
# holding hot graph elements in memory, but also increases the likelihood
23+
# of reading stale data. Disabling it forces each transaction to
24+
# independently fetch graph elements from storage before reading/writing
25+
# them.
26+
#
27+
# Default: false
28+
# Data Type: Boolean
29+
# Mutability: MASKABLE
30+
cache.db-cache = false
31+
32+
# How long, in milliseconds, database-level cache will keep entries after
33+
# flushing them. This option is only useful on distributed storage
34+
# backends that are capable of acknowledging writes without necessarily
35+
# making them immediately visible.
36+
#
37+
# Default: 50
38+
# Data Type: Integer
39+
# Mutability: GLOBAL_OFFLINE
40+
#
41+
# Settings with mutability GLOBAL_OFFLINE are centrally managed in
42+
# JanusGraph's storage backend. After starting the database for the first
43+
# time, this file's copy of this setting is ignored. Use JanusGraph's
44+
# Management System to read or modify this value after bootstrapping.
45+
cache.db-cache-clean-wait = 20
46+
47+
# Default expiration time, in milliseconds, for entries in the
48+
# database-level cache. Entries are evicted when they reach this age even
49+
# if the cache has room to spare. Set to 0 to disable expiration (cache
50+
# entries live forever or until memory pressure triggers eviction when set
51+
# to 0).
52+
#
53+
# Default: 10000
54+
# Data Type: Long
55+
# Mutability: GLOBAL_OFFLINE
56+
#
57+
# Settings with mutability GLOBAL_OFFLINE are centrally managed in
58+
# JanusGraph's storage backend. After starting the database for the first
59+
# time, this file's copy of this setting is ignored. Use JanusGraph's
60+
# Management System to read or modify this value after bootstrapping.
61+
cache.db-cache-time = 180000
62+
63+
# Size of JanusGraph's database level cache. Values between 0 and 1 are
64+
# interpreted as a percentage of VM heap, while larger values are
65+
# interpreted as an absolute size in bytes.
66+
#
67+
# Default: 0.3
68+
# Data Type: Double
69+
# Mutability: MASKABLE
70+
cache.db-cache-size = 0.5
71+
72+
# Turn on storage adapter query parallelization
73+
query.batch = true

install.sh

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/bin/bash
2+
#
3+
# Copyright 2018 Expero Inc.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
18+
if [ -z "$*" ]; then
19+
echo "Please provide the path to your JanusGraph install directory"
20+
exit 0
21+
fi
22+
23+
JANUS_INSTALL_PATH=$1
24+
JANUS_CONF_PATH=${JANUS_INSTALL_PATH}/conf
25+
JANUS_GREMLIN_SERVER_CONF=${JANUS_CONF_PATH}/gremlin-server
26+
27+
if [ ! -d "$JANUS_INSTALL_PATH" ]; then
28+
echo "Directory ${JANUS_INSTALL_PATH} does not exist"
29+
exit 0
30+
fi
31+
32+
cp lib/* ${JANUS_INSTALL_PATH}/ext
33+
cp conf/janusgraph-foundationdb.properties ${JANUS_CONF_PATH}
34+
cp conf/janusgraph-foundationdb-es-server.properties ${JANUS_GREMLIN_SERVER_CONF}
35+
36+
# backup Gremlin server config
37+
mv ${JANUS_GREMLIN_SERVER_CONF}/gremlin-server.yaml ${JANUS_GREMLIN_SERVER_CONF}/gremlin-server.yaml.orig
38+
cp conf/gremlin-server.yaml ${JANUS_GREMLIN_SERVER_CONF}/gremlin-server.yaml

pom.xml

Lines changed: 76 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
<janusgraph.version>0.3.0</janusgraph.version>
1717
<foundationdb.version>5.2.5</foundationdb.version>
1818
<dependency.plugin.version>2.10</dependency.plugin.version>
19+
<test.skip.default>false</test.skip.default>
20+
<test.skip.tp>true</test.skip.tp>
1921
</properties>
2022

2123
<developers>
@@ -77,6 +79,7 @@
7779
</dependencies>
7880

7981
<build>
82+
<directory>${basedir}/target</directory>
8083
<plugins>
8184
<plugin>
8285
<artifactId>maven-compiler-plugin</artifactId>
@@ -104,7 +107,79 @@
104107
</execution>
105108
</executions>
106109
</plugin>
110+
<plugin>
111+
<artifactId>maven-surefire-plugin</artifactId>
112+
<version>2.15</version>
113+
<configuration>
114+
<parallel>none</parallel>
115+
<runOrder>alphabetical</runOrder>
116+
<failIfNoTests>false</failIfNoTests>
117+
<excludes>
118+
<exclude>**/*PerformanceTest.java</exclude>
119+
<exclude>**/*ConcurrentTest.java</exclude>
120+
<exclude>**/*Groovy*Test.java</exclude>
121+
<exclude>**/*ComputerTest.java</exclude>
122+
<exclude>**/*ProcessTest.java</exclude>
123+
<exclude>**/*ProcessPerformanceTest.java</exclude>
124+
<exclude>**/*StructureTest.java</exclude>
125+
</excludes>
126+
<skip>${test.skip.default}</skip>
127+
<!-- Use log4j.properties from module test resources -->
128+
<systemProperties>
129+
<property>
130+
<name>log4j.configuration</name>
131+
<value>file:${project.build.directory}/test-classes/log4j.properties</value>
132+
</property>
133+
</systemProperties>
134+
</configuration>
135+
<executions>
136+
<execution>
137+
<id>tinkerpop-test</id>
138+
<goals>
139+
<goal>test</goal>
140+
</goals>
141+
<phase>test</phase>
142+
<configuration combine.self="override">
143+
<reuseForks>false</reuseForks>
144+
<forkCount>1</forkCount>
145+
<parallel>none</parallel>
146+
<threadCount>1</threadCount>
147+
<perCoreThreadCount>false</perCoreThreadCount>
148+
<includes>
149+
<include>**/*Groovy*Test.java</include>
150+
<include>**/*ComputerTest.java</include>
151+
<include>**/*ProcessTest.java</include>
152+
<include>**/*ProcessPerformanceTest.java</include>
153+
<include>**/*StructureTest.java</include>
154+
</includes>
155+
<runOrder>alphabetical</runOrder>
156+
<skipTests>${test.skip.tp}</skipTests>
157+
<systemPropertyVariables>
158+
<build.dir>${project.build.directory}</build.dir>
159+
<log4j.configuration>file:${project.build.directory}/test-classes/log4j.properties</log4j.configuration>
160+
<is.testing>true</is.testing>
161+
</systemPropertyVariables>
162+
</configuration>
163+
</execution>
164+
</executions>
165+
</plugin>
166+
<plugin>
167+
<artifactId>maven-assembly-plugin</artifactId>
168+
<version>2.5.3</version>
169+
<configuration>
170+
<descriptor>src/assembly/dep.xml</descriptor>
171+
</configuration>
172+
<executions>
173+
<execution>
174+
<id>create-archive</id>
175+
<phase>package</phase>
176+
<goals>
177+
<goal>single</goal>
178+
</goals>
179+
</execution>
180+
</executions>
181+
</plugin>
107182
</plugins>
108183
</build>
109184

110-
</project>
185+
</project>

0 commit comments

Comments
 (0)