youngkangrui

Results comments of youngkangrui

> @youngkangrui 通过`setProperty(k,v)`也是可以的,请检查一下代码。另外,开发环境也可以通过命令行传参数的。 `PropertiesConfiguration conf = new PropertiesConfiguration(); conf.setProperty("backend","hbase"); conf.setProperty("serializer","hbase"); conf.setProperty("hbase.hosts","192.168.199.215,192.168.199.216,192.168.199.217"); conf.setProperty("hbase.port","2181"); conf.setProperty("hbase.znode_parent","/hbase"); HugeGraph hugeGraph = HugeFactory.open(conf);` 这样写报错 “Exception in thread "main" com.baidu.hugegraph.config.ConfigException: Unable to load config file: null”, 看源码好像是要读文件地址

> > @youngkangrui 通过`setProperty(k,v)`也是可以的,请检查一下代码。另外,开发环境也可以通过命令行传参数的。 > > `PropertiesConfiguration conf = new PropertiesConfiguration(); conf.setProperty("backend","hbase"); conf.setProperty("serializer","hbase"); conf.setProperty("hbase.hosts","192.168.199.215,192.168.199.216,192.168.199.217"); conf.setProperty("hbase.port","2181"); conf.setProperty("hbase.znode_parent","/hbase"); HugeGraph hugeGraph = HugeFactory.open(conf);` > 这样写报错 > “Exception in thread "main" com.baidu.hugegraph.config.ConfigException: Unable to...

我更换到这段代码后,cpu正常,由于我使用hbase存储,hbase的随机写要快于随机读,所以要将读替换成写 ``` sourceVertex = hugeGraph.addVertex(T.label,sourceLabel,sourceKey, sourceValue); targetVertex = hugeGraph.addVertex(T.label,targetLabel,targetKey,targetValue); sourceVertex.addEdge(edgeLabel,targetVertex); hugeGraph.tx().commit(); ```

> @youngkangrui 大佬你好 > 程序之前使用gremlin语法查询单个点耗时比较长 > > > 2020-03-12 16:15:37 180082579 [gremlin-server-exec-15] [WARN ] org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine [] - Script compilation g.V().has("eid","e66c7ce822a9ab65f687ab9ef2116b8b") took 12301ms > > 现在想换成hugeGraph.traversal().V(),看大佬你也是这么操作的,但在操作的时候遇到一点问题不知道怎么搞,就是使用hugegraph-api中hugegraph时,不知道具体参数需要传什么,麻烦大佬帮忙解答一下或者方便的话贴一下大佬你操作hugegraph这块代码参考一下,非常感谢。hugegraph代码如下: > > > HugeConfig hugeConfig...

> @youngkangrui 如果是需要纯粹的console控制台,可以启用gremlin-console(通过执行命令`bin/gremlin-console.sh`);如果要集成到web页面,请使用gremlin rest api或者web-socket api。不过大部分情况使用hugegraph-studio或hugegraph-hubble界面会更加方便。 可以在spring中管理gremlin console吗?

> @youngkangrui 可以集成到spring的,通过gremlin rest api的话,使用java-client即可: > > ```java > HugeClient client = new HugeClient("http://localhost:8080", "hugegraph"); > GremlinManager gremlin = client.gremlin(); > ResultSet resultSet = gremlin.gremlin("g.V().outE().path()").execute(); > ``` 多谢回复,我的需求是提供rpc服务,最后采用了下面这种方式,试了下没有问题,请问可以这么用吗? `HugeScriptTraversal traversal...