我一直在努力提高一些Java的水平,我也在努力更新基础知识,所以我一直在学习《山姆的24小时java》这本书。其中一个熟悉描述对象的项目给出了如下代码: package com.java24hours;
public class GremlinLab {
public static void main(String[] arguments) {
int numGremlins = Integer.parseInt(arguments[0]);
if (numGremlins > 0) {
Gremlin[] gremli
gremlin> a = graph.addVertex("name", "alice")
gremlin> b = graph.addVertex("name", "bobby")
gremlin> c = graph.addVertex("name", "cindy")
gremlin> d = graph.addVertex("name", "david")
gremlin> e = graph.addVertex("nam
我使用gremlin -console( janusgraph)远程连接到gremlin服务器,但是当我创建一个变量并访问它时,它不工作。我的最终目标是使用gremlin-console创建索引...
gremlin> :remote connect tinkerpop.server conf/remote.yaml
==>Configured localhost/127.0.0.1:8182
gremlin> :remote console
==>All scripts will now be sent to Gremlin Server -
[localhost/
更新:我觉得很傻。决定只在db中查询所有名称的列表,然后list_of_names_in_db = g.V().hasLabel('Person').values('name').toList()将list_of_name_in_db与batch进行比较,并且只添加两个列表中没有的顶点。
在学习Gremlin一周多一点之后,我和我有了一个顶点表,我正在遍历这个表中的每个顶点,我正在检查它是否已经存在。如果没有,就创建它。我已经看过许多示例,但是没有一个示例使用inject()与coalesce协作。这是不可能的事,还是我做错了?以下是我尝试过的:
from g
在我们的大型Titan Graph数据库中,我注意到以下行为:
\,,,/
(o o)
-----oOOo-(_)-oOOo-----
14:16:35 WARN org.apache.hadoop.util.NativeCodeLoader - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
gremlin> g = TitanFactory.open('/home/willem/wo
服务器正在工作,过了一段时间(我不确定更改了什么,所以我无法判断),我得到了告诉您的错误
711 [main] ERROR org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor - Could not invoke
constructor on class org.janusgraph.graphdb.management.JanusGraphManager
(defined by the 'graphManager' setting) with one argument of class Sett
当我尝试添加当前存在的边时,例如:
g.addE('person-ip').from(g.V('customer:testID')).to(g.V('tel:5555555555')).property(id, 'testEdgeId').next()
我得到一个类似这样的错误
{"message":"Edge with id already exists: testEdgeId","Exception-Class":"java.lang.IllegalArgumentExc
我试图使用连接到远程JanusGraph服务器的gremlin框架在两个顶点之间添加一个边缘。在创建此边缘时,仍然会得到一个"org.apache.tinkerpop.shaded.kryo.KryoException: java.lang.NegativeArraySizeException“错误异常”。
边界和顶点确实会被创建,但是错误仍然会被抛出,并且我无法捕捉它。我正在使用JanusGraph 0.3.1,并尝试使用不同版本的scala (3.3,3.4),所有这些都会导致相同的错误。
val serializer = new GryoMessageSerializerV3d0
码头-ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
83b1503d2e7c app_nginx "nginx -g 'daemon ..." 2 hours ago Up 2 hours 0.0.0.0:80->80/tcp app_ngi
在使用Gremlin Java的应用程序上执行负载测试时,我们得到了下面的异常。如何解决这个问题? 例外: java.lang.IllegalStateException: org.apache.tinkerpop.gremlin.process.remote.RemoteConnectionException: java.lang.RuntimeException: java.lang.RuntimeException: java.util.concurrent.TimeoutException: Timed out while waiting for an available host