代码之家  ›  专栏  ›  技术社区  ›  Varun Tahin

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

  •  0
  • Varun Tahin  · 技术社区  · 6 年前

    https://github.com/Azure-Samples/azure-cosmos-db-graph-java-getting-started ).

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

    创建边:

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

    0 回复  |  直到 6 年前