我试图解析CSV文件,并通过gremlin-java客户端(https://github.com/Azure-Samples/azure-cosmos-db-graph-java-getting-started)的帮助创建节点和边缘到Cosmos数据库 .

我在此程序中更改了一些查询:添加数据:提交此Gremlin 87246查询:

gV() . has('id','1120-L CONSOLIDATED SCHEDULE L') . fold() . coalesce(unfold(),addV('sub_schedule') . property('id','1120-L CONSOLIDATED SCHEDULE L ') . property('name','1120-L CONSOLIDATED SCHEDULE L'))

对于创建边缘:

gV() . hasLabel('parent') . has('id','1120') . addE('has') . to(gV() . hasLabel('state') . has('id','FD “))

After running it almost for 6 hours successfully it gives weird error:

Exception in thread "main" java.util.concurrent.ExecutionException: java.io.IOException: An existing connection was forcibly closed by the remote host
at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
at GetStarted.WriteWithOriginalCSVData.main(WriteWithOriginalCSVData.java:158)
Caused by: java.io.IOException: An existing connection was forcibly closed by the remote host
at sun.nio.ch.SocketDispatcher.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
at sun.nio.ch.IOUtil.read(IOUtil.java:192)
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
at io.netty.buffer.PooledUnsafeDirectByteBuf.setBytes(PooledUnsafeDirectByteBuf.java:221)
at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:899)
at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:275)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:119)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:652)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:575)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:489)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:451)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:140)
at java.lang.Thread.run(Thread.java:745)

有人可以告诉我可能的原因吗?

提到我通过开放式连接从我的笔记本电脑远程调用这个java客户端并点击azure服务(在不同的位置) .

首先我认为这可能是因为我的互联网连接 . 但是当它完成了一些87-88k gremlin查询时,它确实会引发错误 . 有人可以让我知道我在哪里错了吗?