我正在嘗試連接到遠(yuǎn)程 compose-janusgraph 服務(wù)器以創(chuàng)建圖形并添加頂點。請注意,我無權(quán)訪問服務(wù)器配置或更改服務(wù)器設(shè)置。我可以通過我的本地 gremlin 控制臺執(zhí)行此操作:remote connect tinkerpop.server conf/compose.yaml session:remote consolegraph=ConfiguredGraphFactory.create("mygraph")graph=ConfiguredGraphFactory.open("mygraph")g.addV("pat")g.tx().commit()我想對使用 GraphTraversalSource 的 Java 客戶端做同樣的事情。在 Java 中,我可以使用 Cluser->Client->submit 選項成功提交 groovy 字符串。但是我使用 GraphTraversalSource 一直沒有成功,出現(xiàn)了各種錯誤。我用來配置 gremlin 控制臺的 conf/compose.yaml 如下,與我在遠(yuǎn)程圖形gremlin.remote.driver.clusterFile配置中使用的相同hosts: [portal-xxx.composedb.com] port: 15290 username: admin password: pass connectionPool: { enableSsl: true } serializer: { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0, config: { serializeResultToString: true } }遠(yuǎn)程圖屬性看起來像gremlin.remote.remoteConnectionClass=org.apache.tinkerpop.gremlin.driver.remote.DriverRemoteConnection# cluster file has the remote server configuration#gremlin.remote.driver.clusterFile=gremlin-console.yamlgremlin.remote.driver.clusterFile=/Users/julian.stephen/ibm.github/privacy-secbu/Privacy-DataViz/src/main/resources/gremlin-console.yaml# source name is the global graph traversal source defined on the servergremlin.remote.driver.sourceName=mygraph如果我嘗試Graph graph = EmptyGraph.instance();GraphTraversalSource g = graph.traversal().withRemote(conf);g.addV("Java Remote Test");g.close();代碼無異常運行,但圖中未創(chuàng)建頂點。我認(rèn)為這是因為 tx() 沒有提交。因此,我嘗試獲取 ConfiguredGraphFactory 而不是 Empty 圖形,但以下所有選項都會導(dǎo)致異常。JanusGraph graph = ConfiguredGraphFactory.open("mygraph");而不是 EmptyGraph 會導(dǎo)致錯誤(與接下來描述的錯誤相同)。當(dāng)我創(chuàng)建配置ConfiguredGraphFactory.createConfiguration(new MapConfiguration(map));,然后嘗試打開圖表時,我收到一個錯誤,例如Please add a key named "ConfigurationManagementGraph" to the "graphs" property in your YAML file and restart the server to be able to use the functionality of the ConfigurationManagementGraph class.我無法訪問服務(wù)器,如前所述。我還嘗試了使用 JanusGraphFactory 的不同變體,但無濟于事。有人可以幫忙嗎?
1 回答

浮云間
TA貢獻(xiàn)1829條經(jīng)驗 獲得超4個贊
原來這是channelizer
Janusgraph 服務(wù)器中設(shè)置的錯誤配置,它沒有為使用 GraphConfiguration Factory 創(chuàng)建的新圖創(chuàng)建動態(tài)遍歷綁定。一旦服務(wù)器團(tuán)隊糾正了這一點并更新了部署,動態(tài)遍歷就會被綁定并且代碼開始工作。
添加回答
舉報
0/150
提交
取消