janusgraph无法使用configuredgraphfactory()和hbase作为存储后端创建和打开图形

nzkunb0c  于 2021-06-09  发布在  Hbase
关注(0)|答案(1)|浏览(613)

我使用janusgraph创建多个图形并存储在hbase中。其目的是为不同的项目提供不同的图形集。project1有[proj1\u graph1。。。项目1\u graphn]和项目2有[proj2\u graph1…proj2\u graphm]。
参考(a)janusgraph手册,(b)问题1(c)示例1(d)示例2中的步骤,我尝试了以下步骤。但是,janusgraph似乎无法在hbase中创建图形。尽管在hbase中看到了该表,但该表已损坏。因此,当我试图打开图形时,janusgraph超时并返回error。
以下是重新生成的步骤:
在服务器端
(a) 定义gremlin-server-configuredgraph.yaml

host: 127.0.0.1
port: 8182
scriptEvaluationTimeout: 30000
channelizer: org.janusgraph.channelizers.JanusGraphWebSocketChannelizer
graphManager: org.janusgraph.graphdb.management.JanusGraphManager
graphs: {
  ConfigurationManagementGraph: conf/gremlin-server/janusgraph-hbase-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.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

(b) 定义janusgraph-hbase-confuglationgraph.properties

gremlin.graph=org.janusgraph.core.ConfiguredGraphFactory
storage.backend=hbase
graph.graphname=ConfigurationManagementGraph
storage.hostname=127.0.0.1
cache.db-cache = true
cache.db-cache-clean-wait = 20
cache.db-cache-time = 180000
cache.db-cache-size = 0.5

(c) 跑

bin/gremlin-server.sh conf/gremlin-server/gremlin-server-configuredgraph.yaml

在客户端,我运行以下命令并发现一个超时错误

gremlin> :remote connect tinkerpop.server conf/remote-uui.yaml session
==>Configured localhost/127.0.0.1:8182-[2165ab2a-27c9-4375-8caa-7d208126868b]
gremlin> :remote console
==>All scripts will now be sent to Gremlin Server - [localhost/127.0.0.1:8182]-[2165ab2a-27c9-4375-8caa-7d208126868b] - type ':remote console' to return to local mode
gremlin>  map = new HashMap()
gremlin> map.put("storage.backend", "hbase")
==>null
gremlin> map.put("storage.hostname", "127.0.0.1")
==>null
gremlin> map.put("graph.graphname", "graph1")
==>null
gremlin> ConfiguredGraphFactory.createConfiguration(new MapConfiguration(map))
==>null
gremlin> graph = ConfiguredGraphFactory.open("graph1")
Script evaluation exceeded the configured 'scriptEvaluationTimeout' threshold of 30000 ms or evaluation was otherwise cancelled directly for request [graph = ConfiguredGraphFactory.open("graph1")]
Type ':help' or ':h' for help.
Display stack trace? [yN]y
org.apache.tinkerpop.gremlin.jsr223.console.RemoteException: Script evaluation exceeded the configured 'scriptEvaluationTimeout' threshold of 30000 ms or evaluation was otherwise cancelled directly for request [graph = ConfiguredGraphFactory.open("graph1")]
at org.apache.tinkerpop.gremlin.console.jsr223.DriverRemoteAcceptor.submit(DriverRemoteAcceptor.java:178)
at org.apache.tinkerpop.gremlin.console.GremlinGroovysh.execute(GremlinGroovysh.groovy:99)
at org.codehaus.groovy.tools.shell.Shell.leftShift(Shell.groovy:122)
at org.codehaus.groovy.tools.shell.ShellRunner.work(ShellRunner.groovy:95)
at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$work(InteractiveShellRunner.groovy)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1225)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:145)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:165)
at org.codehaus.groovy.tools.shell.InteractiveShellRunner.work(InteractiveShellRunner.groovy:130)
at org.codehaus.groovy.tools.shell.ShellRunner.run(ShellRunner.groovy:59)
at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$run(InteractiveShellRunner.groovy)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1225)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:145)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:165)
at org.codehaus.groovy.tools.shell.InteractiveShellRunner.run(InteractiveShellRunner.groovy:89)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:236)
at org.apache.tinkerpop.gremlin.console.Console.<init>(Console.groovy:146)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:236)
at org.apache.tinkerpop.gremlin.console.Console.main(Console.groovy:453)

服务器端显示以下错误

912845 [gremlin-server-session-1] INFO  org.janusgraph.diskstorage.hbase.HBaseStoreManager  - Copied host list from root.storage.hostname to hbase.zookeeper.quorum: 127.0.0.1
912847 [gremlin-server-session-1] INFO  org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper  - Process identifier=hconnection-0x2cd148c1 connecting to ZooKeeper ensemble=127.0.0.1:2181
912848 [gremlin-server-session-1] INFO  org.apache.hadoop.hbase.shaded.org.apache.zookeeper.ZooKeeper  - Initiating client connection, connectString=127.0.0.1:2181 sessionTimeout=90000 watcher=hconnection-0x2cd148c10x0, quorum=127.0.0.1:2181, baseZNode=/hbase
912850 [gremlin-server-session-1-SendThread(127.0.0.1:2181)] INFO  org.apache.hadoop.hbase.shaded.org.apache.zookeeper.ClientCnxn  - Opening socket connection to server 127.0.0.1/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
912851 [gremlin-server-session-1-SendThread(127.0.0.1:2181)] INFO  org.apache.hadoop.hbase.shaded.org.apache.zookeeper.ClientCnxn  - Socket connection established to 127.0.0.1/127.0.0.1:2181, initiating session
912854 [gremlin-server-session-1-SendThread(127.0.0.1:2181)] INFO  org.apache.hadoop.hbase.shaded.org.apache.zookeeper.ClientCnxn  - Session establishment complete on server 127.0.0.1/127.0.0.1:2181, sessionid = 0x1659d856dcb0022, negotiated timeout = 40000
914145 [gremlin-server-session-1] INFO  org.apache.hadoop.hbase.client.HBaseAdmin  - Created graph1
914295 [gremlin-server-session-1] INFO  org.janusgraph.core.util.ReflectiveConfigOptionLoader  - Loaded and initialized config classes: 13 OK out of 13 attempts in PT0.123S
914436 [gremlin-server-session-1] INFO  org.reflections.Reflections  - Reflections took 79 ms to scan 3 urls, producing 0 keys and 0 values 
914467 [gremlin-server-session-1] INFO  org.janusgraph.graphdb.configuration.GraphDatabaseConfiguration  - Set timestamps to MILLI according to storage backend preference
914470 [gremlin-server-session-1] INFO  org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation  - Closing master protocol: MasterService
914477 [gremlin-server-session-1] INFO  org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation  - Closing zookeeper sessionid=0x1659d856dcb0022
914478 [gremlin-server-session-1] INFO  org.apache.hadoop.hbase.shaded.org.apache.zookeeper.ZooKeeper  - Session: 0x1659d856dcb0022 closed
914478 [gremlin-server-session-1-EventThread] INFO  org.apache.hadoop.hbase.shaded.org.apache.zookeeper.ClientCnxn  - EventThread shut down
914489 [gremlin-server-session-1] INFO  org.janusgraph.graphdb.configuration.GraphDatabaseConfiguration  - Generated unique-instance-id=0a41cf6467316-shopee-graph-test002
914527 [gremlin-server-session-1] INFO  org.janusgraph.diskstorage.hbase.HBaseStoreManager  - Copied host list from root.storage.hostname to hbase.zookeeper.quorum: 127.0.0.1
914528 [gremlin-server-session-1] INFO  org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper  - Process identifier=hconnection-0xa445a64 connecting to ZooKeeper ensemble=127.0.0.1:2181
914528 [gremlin-server-session-1] INFO  org.apache.hadoop.hbase.shaded.org.apache.zookeeper.ZooKeeper  - Initiating client connection, connectString=127.0.0.1:2181 sessionTimeout=90000 watcher=hconnection-0xa445a640x0, quorum=127.0.0.1:2181, baseZNode=/hbase
914530 [gremlin-server-session-1-SendThread(127.0.0.1:2181)] INFO  org.apache.hadoop.hbase.shaded.org.apache.zookeeper.ClientCnxn  - Opening socket connection to server 127.0.0.1/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
914531 [gremlin-server-session-1-SendThread(127.0.0.1:2181)] INFO  org.apache.hadoop.hbase.shaded.org.apache.zookeeper.ClientCnxn  - Socket connection established to 127.0.0.1/127.0.0.1:2181, initiating session
914533 [gremlin-server-session-1-SendThread(127.0.0.1:2181)] INFO  org.apache.hadoop.hbase.shaded.org.apache.zookeeper.ClientCnxn  - Session establishment complete on server 127.0.0.1/127.0.0.1:2181, sessionid = 0x1659d856dcb0023, negotiated timeout = 40000
914583 [gremlin-server-session-1] INFO  org.janusgraph.diskstorage.Backend  - Initiated backend operations thread pool of size 96
914599 [gremlin-server-session-1] INFO  org.apache.hadoop.hbase.client.HBaseAdmin  - Started disable of graph1
916818 [gremlin-server-session-1] INFO  org.apache.hadoop.hbase.client.HBaseAdmin  - Disabled graph1
918690 [gremlin-server-session-1] INFO  org.apache.hadoop.hbase.client.HBaseAdmin  - Started enable of graph1
919913 [gremlin-server-session-1] INFO  org.apache.hadoop.hbase.client.HBaseAdmin  - Enabled graph1
919947 [gremlin-server-session-1] INFO  org.apache.hadoop.hbase.client.HBaseAdmin  - Started disable of graph1
922157 [gremlin-server-session-1] INFO  org.apache.hadoop.hbase.client.HBaseAdmin  - Disabled graph1
924011 [gremlin-server-session-1] INFO  org.apache.hadoop.hbase.client.HBaseAdmin  - Started enable of graph1
925219 [gremlin-server-session-1] INFO  org.apache.hadoop.hbase.client.HBaseAdmin  - Enabled graph1
925234 [gremlin-server-session-1] INFO  org.apache.hadoop.hbase.client.HBaseAdmin  - Started disable of graph1
927443 [gremlin-server-session-1] INFO  org.apache.hadoop.hbase.client.HBaseAdmin  - Disabled graph1
929296 [gremlin-server-session-1] INFO  org.apache.hadoop.hbase.client.HBaseAdmin  - Started enable of graph1
930504 [gremlin-server-session-1] INFO  org.apache.hadoop.hbase.client.HBaseAdmin  - Enabled graph1
930526 [gremlin-server-session-1] INFO  org.apache.hadoop.hbase.client.HBaseAdmin  - Started disable of graph1
932735 [gremlin-server-session-1] INFO  org.apache.hadoop.hbase.client.HBaseAdmin  - Disabled graph1
934588 [gremlin-server-session-1] INFO  org.apache.hadoop.hbase.client.HBaseAdmin  - Started enable of graph1
935796 [gremlin-server-session-1] INFO  org.apache.hadoop.hbase.client.HBaseAdmin  - Enabled graph1
935811 [gremlin-server-session-1] INFO  org.apache.hadoop.hbase.client.HBaseAdmin  - Started disable of graph1
938019 [gremlin-server-session-1] INFO  org.apache.hadoop.hbase.client.HBaseAdmin  - Disabled graph1
939874 [gremlin-server-session-1] INFO  org.apache.hadoop.hbase.client.HBaseAdmin  - Started enable of graph1
941081 [gremlin-server-session-1] INFO  org.apache.hadoop.hbase.client.HBaseAdmin  - Enabled graph1
941101 [gremlin-server-session-1] INFO  org.apache.hadoop.hbase.client.HBaseAdmin  - Started disable of graph1
942807 [gremlin-server-worker-1] WARN  org.apache.tinkerpop.gremlin.server.op.AbstractEvalOpProcessor  - Script evaluation exceeded the configured threshold for request [RequestMessage{, requestId=b5d76307-c948-4e52-9bc3-dcd472b5a407, op='eval', processor='session', args={gremlin=graph = ConfiguredGraphFactory.open("graph1"), session=2165ab2a-27c9-4375-8caa-7d208126868b, bindings={}, manageTransaction=false, batchSize=64}}]
java.util.concurrent.TimeoutException: Script evaluation exceeded the configured 'scriptEvaluationTimeout' threshold of 30000 ms or evaluation was otherwise cancelled directly for request [graph = ConfiguredGraphFactory.open("graph1")]
    at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.lambda$eval$1(GremlinExecutor.java:310)
    at io.netty.util.concurrent.PromiseTask$RunnableAdapter.call(PromiseTask.java:38)
    at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:120)
    at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:399)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:464)
    at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:131)
    at java.lang.Thread.run(Thread.java:745)

为了验证错误,我使用hbase shell跟踪表并得到以下结果

hbase(main):012:0> list
TABLE                                                                                                                                                 
ConfigurationManagementGraph                                                                                                                          
graph1                                                                                                                                                
janusgraph                                                                                                                                            
3 row(s) in 0.0170 seconds

=> ["ConfigurationManagementGraph", "graph1", "janusgraph"]
hbase(main):013:0> scan 'graph1'
ROW                                    COLUMN+CELL                                                                                                    

ERROR: graph1 is disabled.

我杀死janusgraph服务器并用(c)重新打开,它就不能正常启动了

6568 [gremlin-server-boss-1] ERROR org.apache.tinkerpop.gremlin.server.GremlinServer  - Gremlin Server was unable to start and will now begin shutdown: Could not bind to 127.0.0.1 and 8182 - perhaps something else is bound to that address.
6569 [gremlin-server-boss-1] INFO  org.apache.tinkerpop.gremlin.server.GremlinServer  - Shutting down OpProcessor[]
6569 [gremlin-server-boss-1] INFO  org.apache.tinkerpop.gremlin.server.GremlinServer  - Shutting down OpProcessor[session]
6571 [gremlin-server-boss-1] INFO  org.apache.tinkerpop.gremlin.server.GremlinServer  - Shutting down OpProcessor[traversal]
6572 [gremlin-server-boss-1] INFO  org.apache.tinkerpop.gremlin.server.GremlinServer  - Shutting down thread pools.
6658 [pool-10-thread-1] INFO  org.janusgraph.diskstorage.hbase.HBaseStoreManager  - Copied host list from root.storage.hostname to hbase.zookeeper.quorum: 127.0.0.1
6659 [pool-10-thread-1] INFO  org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper  - Process identifier=hconnection-0x5a9577b2 connecting to ZooKeeper ensemble=127.0.0.1:2181
6660 [pool-10-thread-1] INFO  org.apache.hadoop.hbase.shaded.org.apache.zookeeper.ZooKeeper  - Initiating client connection, connectString=127.0.0.1:2181 sessionTimeout=90000 watcher=hconnection-0x5a9577b20x0, quorum=127.0.0.1:2181, baseZNode=/hbase
6661 [pool-10-thread-1-SendThread(127.0.0.1:2181)] INFO  org.apache.hadoop.hbase.shaded.org.apache.zookeeper.ClientCnxn  - Opening socket connection to server 127.0.0.1/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
6662 [pool-10-thread-1-SendThread(127.0.0.1:2181)] INFO  org.apache.hadoop.hbase.shaded.org.apache.zookeeper.ClientCnxn  - Socket connection established to 127.0.0.1/127.0.0.1:2181, initiating session
6665 [pool-10-thread-1-SendThread(127.0.0.1:2181)] INFO  org.apache.hadoop.hbase.shaded.org.apache.zookeeper.ClientCnxn  - Session establishment complete on server 127.0.0.1/127.0.0.1:2181, sessionid = 0x1659d856dcb002a, negotiated timeout = 40000
6759 [pool-10-thread-1] INFO  org.janusgraph.core.util.ReflectiveConfigOptionLoader  - Loaded and initialized config classes: 13 OK out of 13 attempts in PT0.06S
6844 [pool-10-thread-1] INFO  org.reflections.Reflections  - Reflections took 48 ms to scan 3 urls, producing 0 keys and 0 values
6960 [pool-10-thread-1] INFO  org.janusgraph.diskstorage.util.BackendOperation  - Temporary exception during backend operation [getConfiguration]. Attempting backoff retry.
org.janusgraph.diskstorage.TemporaryBackendException: Temporary failure in storage backend
    at org.janusgraph.diskstorage.hbase.HBaseKeyColumnValueStore.getHelper(HBaseKeyColumnValueStore.java:204)
    at org.janusgraph.diskstorage.hbase.HBaseKeyColumnValueStore.getSlice(HBaseKeyColumnValueStore.java:92)
    at org.janusgraph.diskstorage.configuration.backend.KCVSConfiguration$1.call(KCVSConfiguration.java:98)
    at org.janusgraph.diskstorage.configuration.backend.KCVSConfiguration$1.call(KCVSConfiguration.java:95)
    at org.janusgraph.diskstorage.util.BackendOperation.execute(BackendOperation.java:147)
    at org.janusgraph.diskstorage.util.BackendOperation$1.call(BackendOperation.java:161)
    at org.janusgraph.diskstorage.util.BackendOperation.executeDirect(BackendOperation.java:68)
    at org.janusgraph.diskstorage.util.BackendOperation.execute(BackendOperation.java:54)
    at org.janusgraph.diskstorage.util.BackendOperation.execute(BackendOperation.java:158)
    at org.janusgraph.diskstorage.configuration.backend.KCVSConfiguration.get(KCVSConfiguration.java:95)
    at org.janusgraph.diskstorage.configuration.BasicConfiguration.isFrozen(BasicConfiguration.java:105)
    at org.janusgraph.graphdb.configuration.GraphDatabaseConfiguration.<init>(GraphDatabaseConfiguration.java:1274)
    at org.janusgraph.core.ConfiguredGraphFactory.lambda$open$1(ConfiguredGraphFactory.java:115)
    at org.janusgraph.graphdb.management.JanusGraphManager.openGraph(JanusGraphManager.java:259)
    at org.janusgraph.core.ConfiguredGraphFactory.open(ConfiguredGraphFactory.java:115)
    at org.janusgraph.graphdb.management.JanusGraphManager$GremlinExecutorGraphBinder.lambda$run$0(JanusGraphManager.java:122)
    at java.lang.Iterable.forEach(Iterable.java:75)
    at org.janusgraph.graphdb.management.JanusGraphManager$GremlinExecutorGraphBinder.run(JanusGraphManager.java:120)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

我可以知道我是否做错了什么,或者这个功能还没有用hbase进行彻底的测试吗?我是否可以遵循其他步骤来实现我的目标,即使用不同的键空间创建多个图形

bzzcjhmw

bzzcjhmw1#

我认为要在一开始创建一个图,您必须使用janusgraphfactory,这将创建一个新的键空间,然后要绑定其他示例janusgraph,请在janusgraph.properties文件中使用graph.replace-instance-if-exists=true。最后,要创建多个图形,请在gremlin-server.yaml中添加其他conf文件的路径:

graphs: {
  graph: /janusgraph-config/janusgraph.properties
  graph2: /janusgraph-config/janusgraph2.properties
}

相关问题