Re: Configured graph factory not working after making changes to gremlin-server.yaml
Sai Supraj R
Hi, This is the gremlin-server.yaml file # 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. host: 0.0.0.0 port: 8182 scriptEvaluationTimeout: 30000 channelizer: org.janusgraph.channelizers.JanusGraphWebSocketChannelizer graphManager: org.janusgraph.graphdb.management.JanusGraphManager graphs: { ConfigurationManagementGraph: conf/janusgraph-scylla-configurationgraph.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: []}}}} 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.GraphSONMessageSerializerV2d0, 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 This is the properties file: # 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: Cassandra over a socket # # This file connects to a Cassandra daemon running on localhost via # Thrift. Cassandra must already be started before starting JanusGraph # with this file. # The implementation of graph factory that will be used by gremlin server # # Default: org.janusgraph.core.JanusGraphFactory # Data Type: String # Mutability: LOCAL # gremlin.graph=org.janusgraph.core.JanusGraphFactory gremlin.graph = org.janusgraph.core.ConfiguredGraphFactory graph.graphname=ConfigurationManagementGraph # 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, 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 # 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=****** # 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=***** # 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.5 storage.cql.write-consistency-level = QUORUM storage.cql.read-consistency-level = QUORUM #storage.cql.replication-strategy-class = "NetworkTopologyStrategy" #storage.cql.replication-strategy-options = "us-east,3" storage.cql.protocol-version=4 storage.read-time=100000 storage.write-time=100000 #do not auto generate graph vertex id graph.set-vertex-id=true When i try to open the graph i am getting this error: gremlin> ConfiguredGraphFactory.open("ConfigurationManagementGraph") Please create configuration for this graph using the ConfigurationManagementGraph#createConfiguration API. Type ':help' or ':h' for help. Display stack trace? [yN]N When trying to create a new graph: gremlin> map = new HashMap<String, Object>(); gremlin> map.put("storage.backend", "cql"); ==>null gremlin> map.put("storage.hostname", "127.0.0.1"); ==>null gremlin> map.put("graph.graphname", "graph1"); ==>null gremlin> ConfiguredGraphFactory.createConfiguration(new MapConfiguration(map)); Must provide vertex id Type ':help' or ':h' for help. Display stack trace? [yN]y java.lang.IllegalArgumentException: Must provide vertex id Thanks Sai On Thu, Apr 29, 2021 at 1:04 AM Vinayak Bali <vinayakbali16@...> wrote:
|
|