通过gremlin java客户端将数据远程推入Azure Cosmos db时出错

通过gremlin java客户端将数据远程推入Azure Cosmos db时出错,java,azure,groovy,azure-cosmosdb,gremlin,Java,Azure,Groovy,Azure Cosmosdb,Gremlin,我正试图通过gremlinjava客户端()的帮助解析一个CSV文件,并在cosmosdb中创建节点和边 我在此程序中更改了一些查询: 要添加数据,请执行以下操作: 提交此Gremlin 87246查询: g、 V().具有('id','1120-L合并明细表L')。折叠().合并(展开(),添加V('sub_明细表')。属性('id','1120-L合并明细表L')。属性('name','1120-L合并明细表L')) 要创建边,请执行以下操作: g、 V().hasLabel('parent

我正试图通过gremlinjava客户端()的帮助解析一个CSV文件,并在cosmosdb中创建节点和边

我在此程序中更改了一些查询: 要添加数据,请执行以下操作: 提交此Gremlin 87246查询:

g、 V().具有('id','1120-L合并明细表L')。折叠().合并(展开(),添加V('sub_明细表')。属性('id','1120-L合并明细表L')。属性('name','1120-L合并明细表L'))

要创建边,请执行以下操作:

g、 V().hasLabel('parent')。has('id','1120')。addE('has')。to(g.V().hasLabel('state')。has('id','FD'))

在成功运行了近6个小时后,会出现奇怪的错误:

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查询时,它确实会抛出错误。
有人能告诉我哪里出了问题吗?

你知道它关闭时运行的是什么查询吗?感觉查询失败并导致服务器关闭您的连接。。。您可以添加一些调试来减少数据集吗?没有特定的查询会失败。我已经运行了4次,当我记录这是最后一次进入服务器的查询:g.V().has('id','1120-L合并计划L').fold().coalesce(unfold(),addV('sub_SCHEDULE')。property('id','1120-L合并计划L')。property('name','1120-L合并计划L'))。但它在第一次尝试时成功运行。所以同样没有特别的疑问。这一次,它只运行了30K个查询。通过对每个连接的数据进行批处理,它得到了解决。谢谢但是,如果要进行远程测试,则需要构建重试逻辑。