From e5cfa4349b5dd6d2aa325fe2c3c9e3abe3dc07fc Mon Sep 17 00:00:00 2001 From: Oleksandr Porunov Date: Thu, 2 Sep 2021 21:26:17 +0300 Subject: [PATCH] Cleanup duplicate configurations and add datacenter options to cql configuration for better visibility Signed-off-by: Oleksandr Porunov --- ...nusgraph-cql-configurationgraph.properties | 82 ++------- .../cfilter/conf/janusgraph-cql-es.properties | 2 + .../conf/janusgraph-cql-solr.properties | 2 + .../cfilter/conf/janusgraph-cql.properties | 4 +- .../gremlin-server/gremlin-server-cql-es.yaml | 2 +- ...janusgraph-berkeleyje-es-server.properties | 26 --- .../janusgraph-berkeleyje-server.properties | 17 -- .../janusgraph-cql-es-server.properties | 161 ------------------ 8 files changed, 21 insertions(+), 275 deletions(-) delete mode 100644 janusgraph-dist/src/assembly/static/conf/gremlin-server/janusgraph-berkeleyje-es-server.properties delete mode 100644 janusgraph-dist/src/assembly/static/conf/gremlin-server/janusgraph-berkeleyje-server.properties delete mode 100644 janusgraph-dist/src/assembly/static/conf/gremlin-server/janusgraph-cql-es-server.properties diff --git a/janusgraph-dist/src/assembly/cfilter/conf/janusgraph-cql-configurationgraph.properties b/janusgraph-dist/src/assembly/cfilter/conf/janusgraph-cql-configurationgraph.properties index 78f79dd2d8..151462b4f4 100644 --- a/janusgraph-dist/src/assembly/cfilter/conf/janusgraph-cql-configurationgraph.properties +++ b/janusgraph-dist/src/assembly/cfilter/conf/janusgraph-cql-configurationgraph.properties @@ -12,85 +12,29 @@ # See the License for the specific language governing permissions and # limitations under the License. -# JanusGraph configuration sample: Cassandra over a socket +# JanusGraph configuration sample: Cassandra over a socket with `ConfiguredGraphFactory` which allows to dynamically +# create and open multiple graphs. # # This file connects to a Cassandra daemon running on localhost via # CQL. Cassandra must already be started before starting JanusGraph # with this file. -gremlin.graph=org.janusgraph.core.ConfiguredGraphFactory +#JANUSGRAPHCFG{gremlin.graph=org.janusgraph.core.ConfiguredGraphFactory} -# 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, cql, hbase, 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=cql +#JANUSGRAPHCFG{storage.backend=cql} # The configuration management graph reserved for use with JanusGraphManager # and ConfiguredGraphFactory -graph.graphname=ConfigurationManagementGraph -# The hostname or comma-separated list of hostnames of storage backend -# servers. This is only applicable to some storage backends, such as -# cassandra and hbase. -# -# Default: 127.0.0.1 -# Data Type: class java.lang.String[] -# Mutability: LOCAL -storage.hostname=127.0.0.1 +#JANUSGRAPHCFG{graph.graphname=ConfigurationManagementGraph} -# 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 = true +#JANUSGRAPHCFG{storage.hostname=127.0.0.1} -# 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 +#JANUSGRAPHCFG{storage.cql.local-datacenter=datacenter1} -# 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 +#JANUSGRAPHCFG{cache.db-cache = true} -# 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 +#JANUSGRAPHCFG{cache.db-cache-clean-wait = 20} + +#JANUSGRAPHCFG{cache.db-cache-time = 180000} + +#JANUSGRAPHCFG{cache.db-cache-size = 0.5} diff --git a/janusgraph-dist/src/assembly/cfilter/conf/janusgraph-cql-es.properties b/janusgraph-dist/src/assembly/cfilter/conf/janusgraph-cql-es.properties index 8983ddd239..500a2f8d46 100644 --- a/janusgraph-dist/src/assembly/cfilter/conf/janusgraph-cql-es.properties +++ b/janusgraph-dist/src/assembly/cfilter/conf/janusgraph-cql-es.properties @@ -28,6 +28,8 @@ #JANUSGRAPHCFG{storage.cql.keyspace=janusgraph} +#JANUSGRAPHCFG{storage.cql.local-datacenter=datacenter1} + #JANUSGRAPHCFG{cache.db-cache = true} #JANUSGRAPHCFG{cache.db-cache-clean-wait = 20} diff --git a/janusgraph-dist/src/assembly/cfilter/conf/janusgraph-cql-solr.properties b/janusgraph-dist/src/assembly/cfilter/conf/janusgraph-cql-solr.properties index 8f5ab1a645..6b20bda8d2 100644 --- a/janusgraph-dist/src/assembly/cfilter/conf/janusgraph-cql-solr.properties +++ b/janusgraph-dist/src/assembly/cfilter/conf/janusgraph-cql-solr.properties @@ -27,6 +27,8 @@ #JANUSGRAPHCFG{storage.cql.keyspace=janusgraph} +#JANUSGRAPHCFG{storage.cql.local-datacenter=datacenter1} + #JANUSGRAPHCFG{cache.db-cache = true} #JANUSGRAPHCFG{cache.db-cache-clean-wait = 20} diff --git a/janusgraph-dist/src/assembly/cfilter/conf/janusgraph-cql.properties b/janusgraph-dist/src/assembly/cfilter/conf/janusgraph-cql.properties index cbd5caed98..7ef11a1210 100644 --- a/janusgraph-dist/src/assembly/cfilter/conf/janusgraph-cql.properties +++ b/janusgraph-dist/src/assembly/cfilter/conf/janusgraph-cql.properties @@ -15,7 +15,7 @@ # JanusGraph configuration sample: Cassandra over a socket # # This file connects to a Cassandra daemon running on localhost via -# Thrift. Cassandra must already be started before starting JanusGraph +# CQL. Cassandra must already be started before starting JanusGraph # with this file. #JANUSGRAPHCFG{gremlin.graph=org.janusgraph.core.JanusGraphFactory} @@ -26,6 +26,8 @@ #JANUSGRAPHCFG{storage.cql.keyspace=janusgraph} +#JANUSGRAPHCFG{storage.cql.local-datacenter=datacenter1} + #JANUSGRAPHCFG{cache.db-cache = true} #JANUSGRAPHCFG{cache.db-cache-clean-wait = 20} diff --git a/janusgraph-dist/src/assembly/static/conf/gremlin-server/gremlin-server-cql-es.yaml b/janusgraph-dist/src/assembly/static/conf/gremlin-server/gremlin-server-cql-es.yaml index 537bda5fb4..6c1f4f9a4f 100644 --- a/janusgraph-dist/src/assembly/static/conf/gremlin-server/gremlin-server-cql-es.yaml +++ b/janusgraph-dist/src/assembly/static/conf/gremlin-server/gremlin-server-cql-es.yaml @@ -17,7 +17,7 @@ port: 8182 evaluationTimeout: 30000 channelizer: org.apache.tinkerpop.gremlin.server.channel.WebSocketChannelizer graphs: { - graph: conf/gremlin-server/janusgraph-cql-es-server.properties + graph: conf/janusgraph-cql-es.properties } scriptEngines: { gremlin-groovy: { diff --git a/janusgraph-dist/src/assembly/static/conf/gremlin-server/janusgraph-berkeleyje-es-server.properties b/janusgraph-dist/src/assembly/static/conf/gremlin-server/janusgraph-berkeleyje-es-server.properties deleted file mode 100644 index 11d37b0e2d..0000000000 --- a/janusgraph-dist/src/assembly/static/conf/gremlin-server/janusgraph-berkeleyje-es-server.properties +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright 2019 JanusGraph Authors -# -# 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. - -# JanusGraph configuration sample: BerkeleyDB JE and embedded Elasticsearch -# -# This file opens a BDB JE instance in the directory -# db/berkeley. It also starts a local Elasticsearch -# service inside the same JVM running JanusGraph, persisted at -# db/es. - -gremlin.graph=org.janusgraph.core.JanusGraphFactory -storage.backend=berkeleyje -storage.directory=db/berkeley -index.search.backend=elasticsearch -index.search.hostname=elasticsearch diff --git a/janusgraph-dist/src/assembly/static/conf/gremlin-server/janusgraph-berkeleyje-server.properties b/janusgraph-dist/src/assembly/static/conf/gremlin-server/janusgraph-berkeleyje-server.properties deleted file mode 100644 index 8dd56be2f1..0000000000 --- a/janusgraph-dist/src/assembly/static/conf/gremlin-server/janusgraph-berkeleyje-server.properties +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright 2019 JanusGraph Authors -# -# 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. - -gremlin.graph=org.janusgraph.core.JanusGraphFactory -storage.backend=berkeleyje -storage.directory=db/berkeley diff --git a/janusgraph-dist/src/assembly/static/conf/gremlin-server/janusgraph-cql-es-server.properties b/janusgraph-dist/src/assembly/static/conf/gremlin-server/janusgraph-cql-es-server.properties deleted file mode 100644 index 5544108c10..0000000000 --- a/janusgraph-dist/src/assembly/static/conf/gremlin-server/janusgraph-cql-es-server.properties +++ /dev/null @@ -1,161 +0,0 @@ -# Copyright 2019 JanusGraph Authors -# -# 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. - -gremlin.graph=org.janusgraph.core.JanusGraphFactory - -# JanusGraph configuration sample: Cassandra & Elasticsearch over sockets -# -# This file connects to Cassandra and Elasticsearch services running -# on localhost over the CQL API and the Elasticsearch native -# "Transport" API on their respective default ports. The Cassandra -# and Elasticsearch services must already be running 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 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=cql - -# The hostname or comma-separated list of hostnames of storage backend -# servers. This is only applicable to some storage backends, such as -# cassandra and hbase. -# -# Default: 127.0.0.1 -# Data Type: class java.lang.String[] -# Mutability: LOCAL -storage.hostname=127.0.0.1 - -# The name of JanusGraph's keyspace. It will be created if it does not -# exist. -# -# Default: janusgraph -# Data Type: String -# Mutability: LOCAL -storage.cql.keyspace=janusgraph - -# The name of the local or closest Cassandra datacenter. -# -# Default: datacenter1 -# Data Type: String -# Mutability: MASKABLE -storage.cql.local-datacenter=datacenter1 - -# 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 = true - -# 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.25 - -# 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