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

后端存储是hbase,loader加载数据一段时间后报错退出,请问是什么原因造成?怎么能使不出现这个问题?

Open 597477803 opened this issue 6 years ago • 5 comments

2020-04-15 11:54:30 [main] [INFO ] com.baidu.hugegraph.loader.HugeGraphLoader [] - Parsing 382161 'VertexStruct(Live-e33ab588)' with average rate: 3197/s 2020-04-15 11:54:30 [main] [INFO ] com.baidu.hugegraph.loader.HugeGraphLoader [] - Loading 382000 'VertexStruct(Live-e33ab588)' with average rate: 3190/s 2020-04-15 11:54:30 [main] [INFO ] com.baidu.hugegraph.loader.reader.file.FileReader [] - Opening struct 'VertexStruct(User-92d53e51)' 2020-04-15 11:54:30 [main] [INFO ] com.baidu.hugegraph.loader.HugeGraphLoader [] - Start parsing and loading 'VertexStruct(User-92d53e51)' 2020-04-15 11:55:33 [batch-worker-20] [ERROR] com.baidu.hugegraph.loader.task.TaskManager [] - Batch insert has been retried more than 0 times 2020-04-15 11:55:33 [batch-worker-20] [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, there may be inconsistent states for HBase at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273) ~[?:1.8.0_191] at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280) [?:1.8.0_191] at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1629) [?:1.8.0_191] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_191] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_191] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_191] Caused by: com.baidu.hugegraph.exception.ServerException: Failed to commit, there may be inconsistent states for HBase 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:1626) ~[?:1.8.0_191] ... 3 more Caused by: com.baidu.hugegraph.exception.ServerException$ServerCause: java.io.InterruptedIOException 2020-04-15 11:55:33 [single-worker-1] [INFO ] com.baidu.hugegraph.loader.executor.LoadContext [] - Create failure logger for struct 'VertexStruct(User-92d53e51)' 2020-04-15 11:57:48 [batch-worker-13] [ERROR] com.baidu.hugegraph.loader.task.TaskManager [] - Batch insert has been retried more than 0 times 2020-04-15 11:57:48 [batch-worker-22] [ERROR] com.baidu.hugegraph.loader.task.TaskManager [] - Batch insert has been retried more than 0 times 2020-04-15 11:57:48 [batch-worker-23] [ERROR] com.baidu.hugegraph.loader.task.TaskManager [] - Batch insert has been retried more than 0 times 2020-04-15 11:57:48 [batch-worker-23] [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, there may be inconsistent states for HBase at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273) ~[?:1.8.0_191] at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280) [?:1.8.0_191] at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1629) [?:1.8.0_191] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_191] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_191] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_191] Caused by: com.baidu.hugegraph.exception.ServerException: Failed to commit, there may be inconsistent states for HBase at com.baidu.hugegraph.exception.ServerException.fromResponse(ServerException.java:44) ~[hugegraph-client-1.8.0.jar:1.8.0.0]

后端存储是hbase,loader加载数据一段时间后报错退出,请问是什么原因造成?怎么能使不出现这个问题? 日志见上方

597477803 avatar Apr 15 '20 06:04 597477803

@597477803 看起来是超时导致的,请查看下HBase负载是否过高。需要的话可以使用配置项rate_limit进行限速,比如rate_limit=5000限制5000条每秒。

javeme avatar Apr 16 '20 08:04 javeme

rate_limit

没看到有个这个配置项呀?在哪的?

597477803 avatar Apr 16 '20 11:04 597477803

增加一行即可,详细配置项文档请参考:https://hugegraph.github.io/hugegraph-doc/config/config-option.html

javeme avatar Apr 16 '20 12:04 javeme

@597477803 你的这个问题解决了吗 我loader之后的hbase g_v 这个表的数据全部都写到同一台机器的上 你们会有这个问题吗

lingxingzhang avatar Jul 08 '20 07:07 lingxingzhang

Due to the lack of activity, the current issue is marked as stale and will be closed after 20 days, any update will remove the stale label

github-actions[bot] avatar Aug 13 '21 21:08 github-actions[bot]