incubator-hugegraph icon indicating copy to clipboard operation
incubator-hugegraph copied to clipboard

后端Cassandra,用Loader导入数据时报错

Open Lilydark opened this issue 6 years ago • 1 comments

2020-07-15 18:53:31 [main] [INFO ] com.baidu.hugegraph.loader.struct.GraphStruct [] - Checking vertex struct descriptions 2020-07-15 18:53:31 [main] [INFO ] com.baidu.hugegraph.loader.struct.GraphStruct [] - Checking edge struct descriptions 2020-07-15 18:53:33 [main] [INFO ] com.baidu.hugegraph.loader.HugeGraphLoader [] - Start loading vertices 2020-07-15 18:53:33 [main] [INFO ] com.baidu.hugegraph.loader.reader.file.FileReader [] - Opening struct 'VertexStruct(Address-2ee3860f)' 2020-07-15 18:53:33 [main] [INFO ] com.baidu.hugegraph.loader.HugeGraphLoader [] - Start parsing and loading 'VertexStruct(Address-2ee3860f)' 2020-07-15 18:53:33 [batch-worker-2] [ERROR] com.baidu.hugegraph.loader.task.TaskManager [] - Batch insert has been retried more than 0 times 2020-07-15 18:53:33 [batch-worker-3] [ERROR] com.baidu.hugegraph.loader.task.TaskManager [] - Batch insert has been retried more than 0 times 2020-07-15 18:53:33 [batch-worker-2] [WARN ] com.baidu.hugegraph.loader.task.TaskManager [] - Batch insert VERTEX error, try single insert java.util.concurrent.CompletionException: class com.baidu.hugegraph.backend.BackendException: Failed to commit 1000 statements: 'UPDATE g_v SET LABEL=2,PROPERTIES=PROPERTIES+{3:0x23e58c97e4baace5b882e5b487e69687e58cbae9be99e9a1bbe6b29fe8b7af3233e58fb7,5:0x03353031} WHERE ID=0x84323a353031;'... at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273) ~[?:1.8.0_251] at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280) [?:1.8.0_251] at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1643) [?:1.8.0_251] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_251] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_251] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_251] Caused by: com.baidu.hugegraph.exception.ServerException: Failed to commit 1000 statements: 'UPDATE g_v SET LABEL=2,PROPERTIES=PROPERTIES+{3:0x23e58c97e4baace5b882e5b487e69687e58cbae9be99e9a1bbe6b29fe8b7af3233e58fb7,5:0x03353031} WHERE ID=0x84323a353031;'... at com.baidu.hugegraph.exception.ServerException.fromResponse(ServerException.java:44) ~[hugegraph-client-1.8.0.jar:1.8.0.0] at com.baidu.hugegraph.client.RestClient.checkStatus(RestClient.java:100) ~[hugegraph-client-1.8.0.jar:1.8.0.0] at com.baidu.hugegraph.rest.RestClient.post(RestClient.java:156) ~[hugegraph-common-1.6.11.jar:1.6.11.0] at com.baidu.hugegraph.rest.RestClient.post(RestClient.java:138) ~[hugegraph-common-1.6.11.jar:1.6.11.0] at com.baidu.hugegraph.api.graph.VertexAPI.create(VertexAPI.java:56) ~[hugegraph-client-1.8.0.jar:1.8.0.0] at com.baidu.hugegraph.driver.GraphManager.addVertices(GraphManager.java:83) ~[hugegraph-client-1.8.0.jar:1.8.0.0] at com.baidu.hugegraph.loader.task.BatchInsertTask.addBatch(BatchInsertTask.java:90) ~[hugegraph-loader-0.10.0.jar:?] at com.baidu.hugegraph.loader.task.BatchInsertTask.run(BatchInsertTask.java:59) ~[hugegraph-loader-0.10.0.jar:?] at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1640) ~[?:1.8.0_251] ... 3 more Caused by: com.baidu.hugegraph.exception.ServerException$ServerCause: com.datastax.driver.core.exceptions.InvalidQueryException: Batch too large 2020-07-15 18:53:33 [batch-worker-3] [WARN ] com.baidu.hugegraph.loader.task.TaskManager [] - Batch insert VERTEX error, try single insert java.util.concurrent.CompletionException: class com.baidu.hugegraph.backend.BackendException: Failed to commit 1000 statements: 'UPDATE g_v SET LABEL=2,PROPERTIES=PROPERTIES+{3:0x41e58c97e4baace5b882e4b89ce59f8ee58cbae4b89ce4baa4e6b091e5b7b7e794b23233e58fb7e4b89ce4baa4e6b091e5b7b7e9a5ade5ba97393036e688bfe997b4,5:0x0431303031} WHERE ID=0x85323a31303031;'... at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273) ~[?:1.8.0_251] at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280) [?:1.8.0_251] at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1643) [?:1.8.0_251] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_251] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_251] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_251]

Lilydark avatar Jul 15 '20 11:07 Lilydark

已解决,在load命令时加入batch-size然后把数值调低即可

Lilydark avatar Jul 16 '20 05:07 Lilydark