首先,我按照以下步骤在 JanusGraph 中创建一个图形。
conf/janusgraph-cassandra-configurationgraph.propertiesindex.search.backend = elasticsearch
index.search.hostname = 127.0.0.1
index.search.elasticsearch.transport-scheme = http
Run Code Online (Sandbox Code Playgroud)
将 gremlin-server-configuration.yaml 中的“ConfigurationManagementGraph:conf/janusgraph-cql-configurationgraph.properties”更改为“ConfigurationManagementGraph:conf/janusgraph-cassandra-configurationgraph.properties”
将 conf/gremlin-server/gremlin-server.yaml 更改为 conf/gremlin-server/gremlin-server.yaml.orig
将 conf/gremlin-server/gremlin-server-configuration.yaml 更改为 conf/gremlin-server/gremlin-server.yaml
运行 bin/janusgraph.sh start
运行 bin/gremlin.sh
跑
:remote connect tinkerpop.server conf/remote.yaml session
:remote console
map = new HashMap<String, Object>();
map.put("storage.backend", "cassandrathrift");
map.put("storage.hostname", "127.0.0.1");
map.put("graph.graphname", "KG");
map.put("index.search.backend", "elasticsearch");
map.put("index.search.hostname", "127.0.0.1");
map.put("index.search.elasticsearch.transport-scheme", "http");
ConfiguredGraphFactory.createConfiguration(new MapConfiguration(map));
graph=ConfiguredGraphFactory.open("KG");
g=graph.traversal();
ConfiguredGraphFactory.getGraphNames()
Run Code Online (Sandbox Code Playgroud)
关闭 janusgraph,运行 bin/janusgraph.sh 停止
将 conf/janusgraph-cassandra-es.properties 复制到 conf/KG.properties
在 conf/KG.properties 顶部添加以下两行
gremlin.graph=org.janusgraph.core.ConfiguredGraphFactory
graph.graphname=KG
Run Code Online (Sandbox Code Playgroud)
KG: conf/KG.properties
Run Code Online (Sandbox Code Playgroud)
将“scripts/empty-sample.groovy”添加到“org.apache.tinkerpop.gremlin.jsr223.ScriptFileGremlinPlugin:”
打开 script/empty-sample.groovy,将最后一行修改为: …
我正在使用新的ReactiveCocoa + ReactiveSwift编写Swift.我正在尝试使用新的ReactiveCocoa框架执行以下操作(在ReactiveCocoa 2.5中):
[[RACObserve(user, username) skip:1] subscribeNext:^(NSString *newUserName) {
// perform actions...
}];
Run Code Online (Sandbox Code Playgroud)
经过一些研究,我仍然无法弄清楚如何做到这一点.请帮忙!非常感谢你!