loader数据导致scylla节点挂掉
请问
数据库节点一共5个 ,每个节点2T闪存 ,
一个hugegraph服务节点 并且在这个服务节点loader数据,这个节点也是2T闪存
一共5亿的数据,做数据加载当loader到200W以上 速度明显变慢,当loader到3399064 load数据量停止了
有啥办法加快速度 并且使loader数据不停止吗
具体命令如下
bin/hugegraph-loader -g hugegraph -f vertex_person/rt_person_vertex_struct.json -s vertex_person/rt_person_vertex_schema.groovy --max-parse-errors 500000000 --max-insert-errors 500000000 -h 10.50.1.194 -p 8080 >> vertex_person/vertex_person20181204.log &
rt_person_vertex_struct.json { "vertices": [ { "label": "rt_person", "input": { "type": "file", "path": "/mnt/data_1/graph/f_graph_rt_person_vertex_di/vertex_person.csv", "format": "CSV", "header": [ "id", "name" ], "charset": "UTF-8" }, "id": "id" } ] } rt_person_vertex_schema.groovy schema.propertyKey("name").asText().ifNotExist().create(); schema.vertexLabel("rt_person").useCustomizeStringId().properties("name").ifNotExist().create();
数据文件vertex_person.csv id,name
第一次数据节点挂了 到300多万停止 第二次数据节点没挂 也是到300多万数据停止
我记得之前在 https://github.com/hugegraph/hugegraph/issues/166 这个帖子里面给了一个版本的loader 不过我现在换成给的 hugegraph-loader-0.7.0 报错了 Exception in thread "main" java.lang.IllegalStateException: The version 0.31.0.0 of 'hugegraph-api in server' is not in [0.27, 0.28)
现在用的组建都是0.8.0版本 都是到300多万数据就停了 @Linary @javeme
第二次跑的时候数据库的节点都是可用的 Datacenter: datacenter1
Status=Up/Down |/ State=Normal/Leaving/Joining/Moving -- Address Load Tokens Owns Host ID Rack UN 10.50.1.195 288.43 MB 256 ? 8dd078d8-0871-462e-9980-38dead5f05cd rack1 UN 10.50.1.198 268.73 MB 256 ? 4fda2707-1da9-40da-bdd6-13bfae721842 rack1 UN 10.50.1.199 293.76 MB 256 ? b4d63169-c2d5-40a1-86d7-a34db46cb5c7 rack1 UN 10.50.1.196 300.34 MB 256 ? e7f78037-6816-42e7-8fb4-4edb38b09587 rack1 UN 10.50.1.197 254.24 MB 256 ? f0cfd398-a53a-4e9c-8861-2fb16cdc87f2 rack1
Note: Non-system keyspaces don't have the same replication settings, effective ownership information is meaningless
目前所有磁盘是xfs的 但是也必须开这个模式 /usr/lib/scylla/scylla_dev_mode_setup --developer-mode 1
300多万停止之后重新loader其他数据 一条多进不去了
loader里面的logs部分如下 at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121] Caused by: com.baidu.hugegraph.exception.ServerException$ServerCause: com.datastax.driver.core.exceptions.WriteTimeoutException: Cassandra timeout during write query at consistency LOCAL_ONE (1 replica were required but only 0 acknowledged the write) 2018-12-04 17:11:40 111588 [pool-3-thread-6] [ERROR] com.baidu.hugegraph.loader.task.TaskManager [] - Vertex insert error com.baidu.hugegraph.exception.ServerException: Failed to commit 2 statements: 'UPDATE graph_vertices SET LABEL=7,PROPERTIES=PROPERTIES+{18:'"郭懿萱"'} WHERE ID='S10499024';'... at com.baidu.hugegraph.exception.ServerException.fromResponse(ServerException.java:44) ~[hugegraph-client-1.6.4.jar:1.6.4.0] at com.baidu.hugegraph.client.RestClient.checkStatus(RestClient.java:63) ~[hugegraph-client-1.6.4.jar:1.6.4.0] at com.baidu.hugegraph.rest.RestClient.post(RestClient.java:119) ~[hugegraph-common-1.5.3.jar:1.5.3.0] at com.baidu.hugegraph.rest.RestClient.post(RestClient.java:79) ~[hugegraph-common-1.5.3.jar:1.5.3.0] at com.baidu.hugegraph.rest.RestClient.post(RestClient.java:74) ~[hugegraph-common-1.5.3.jar:1.5.3.0] at com.baidu.hugegraph.api.graph.VertexAPI.create(VertexAPI.java:48) ~[hugegraph-client-1.6.4.jar:1.6.4.0] at com.baidu.hugegraph.driver.GraphManager.addVertex(GraphManager.java:56) ~[hugegraph-client-1.6.4.jar:1.6.4.0] at com.baidu.hugegraph.loader.task.TaskManager.lambda$submitVerticesInSingleMode$0(TaskManager.java:206) ~[hugegraph-loader-0.8.0.jar:?] at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:108) [guava-19.0.jar:?] at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:41) [guava-19.0.jar:?] at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:77) [guava-19.0.jar:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_121] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_121] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121] Caused by: com.baidu.hugegraph.exception.ServerException$ServerCause: com.datastax.driver.core.exceptions.WriteTimeoutException: Cassandra timeout during write query at consistency ONE (1 replica were required but only 0 acknowledged the write) 2018-12-04 17:11:41 111867 [pool-3-thread-8] [ERROR] com.baidu.hugegraph.loader.task.TaskManager [] - Vertex insert error com.baidu.hugegraph.exception.ServerException: Failed to commit 2 statements: 'UPDATE graph_vertices SET LABEL=7,PROPERTIES=PROPERTIES+{18:'"刘汉光"'} WHERE ID='S00070831';'... at com.baidu.hugegraph.exception.ServerException.fromResponse(ServerException.java:44) ~[hugegraph-client-1.6.4.jar:1.6.4.0] at com.baidu.hugegraph.client.RestClient.checkStatus(RestClient.java:63) ~[hugegraph-client-1.6.4.jar:1.6.4.0] at com.baidu.hugegraph.rest.RestClient.post(RestClient.java:119) ~[hugegraph-common-1.5.3.jar:1.5.3.0] at com.baidu.hugegraph.rest.RestClient.post(RestClient.java:79) ~[hugegraph-common-1.5.3.jar:1.5.3.0] at com.baidu.hugegraph.rest.RestClient.post(RestClient.java:74) ~[hugegraph-common-1.5.3.jar:1.5.3.0] at com.baidu.hugegraph.api.graph.VertexAPI.create(VertexAPI.java:48) ~[hugegraph-client-1.6.4.jar:1.6.4.0] at com.baidu.hugegraph.driver.GraphManager.addVertex(GraphManager.java:56) ~[hugegraph-client-1.6.4.jar:1.6.4.0] at com.baidu.hugegraph.loader.task.TaskManager.lambda$submitVerticesInSingleMode$0(TaskManager.java:206) ~[hugegraph-loader-0.8.0.jar:?] at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:108) [guava-19.0.jar:?] at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:41) [guava-19.0.jar:?] at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:77) [guava-19.0.jar:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_121] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_121] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121] Caused by: com.baidu.hugegraph.exception.ServerException$ServerCause: com.datastax.driver.core.exceptions.WriteTimeoutException: Cassandra timeout during write query at consistency LOCAL_ONE (1 replica were required but only 0 acknowledged the write)
断了第一次导入 重新开一次之后所有节点的状态就变得时常挂掉了 晕了 DN 10.50.1.195 288.43 MB 256 ? 8dd078d8-0871-462e-9980-38dead5f05cd rack1 UN 10.50.1.198 268.73 MB 256 ? 4fda2707-1da9-40da-bdd6-13bfae721842 rack1 UN 10.50.1.199 293.76 MB 256 ? b4d63169-c2d5-40a1-86d7-a34db46cb5c7 rack1 DN 10.50.1.196 300.34 MB 256 ? e7f78037-6816-42e7-8fb4-4edb38b09587 rack1 UN 10.50.1.197 254.24 MB 256 ? f0cfd398-a53a-4e9c-8861-2fb16cdc87f2 rack1
@eternalxj scylladb版本是多少呢?
@javeme 1.7.4
从3亿多数据变到300多万 是到3w多不动了
好像是loader到百分之一的时候就停止不继续loader了
记得之前发生过类似的问题 https://github.com/hugegraph/hugegraph/issues/166 这个里面发的loader0.7 改好了 不过0.7现在用不了
--batch-size 5000 调到5000 然后出了其他问题了 Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
@javeme @Linary 生产的五台数据库和一台server的内存都是 64g 1个物理cpu 一个cpu4核 8个逻辑cpu 请问loader的问题有方法解决吗
@eternalxj loader里有错误日志吗?还有建议不要把 --max-parse-errors 500000000 --max-insert-errors 500000000 设得这么大。
@Linary vertex_insert_error.data INSERT ERROR: Failed to commit 2 statements: 'UPDATE graph_vertices SET LABEL=7,PROPERTIES=PROPERTIES+{18:' hugegraph-loader.log 166932 [pool-3-thread-4] [ERROR] com.baidu.hugegraph.loader.task.TaskManager [] - Vertex insert error com.baidu.hugegraph.exception.ServerException: Failed to commit 2 statements: 'UPDATE graph_vertices SET LABEL=7,PROPERTIES=PROPERTIES+{18:'"陈竑彣"'} WHERE ID='S1';'... at com.baidu.hugegraph.exception.ServerException.fromResponse(ServerException.java:44) ~[hugegraph-client-1.6.4.jar:1.6.4.0] at com.baidu.hugegraph.client.RestClient.checkStatus(RestClient.java:63) ~[hugegraph-client-1.6.4.jar:1.6.4.0] at com.baidu.hugegraph.rest.RestClient.post(RestClient.java:119) ~[hugegraph-common-1.5.3.jar:1.5.3.0] at com.baidu.hugegraph.rest.RestClient.post(RestClient.java:79) ~[hugegraph-common-1.5.3.jar:1.5.3.0] at com.baidu.hugegraph.rest.RestClient.post(RestClient.java:74) ~[hugegraph-common-1.5.3.jar:1.5.3.0] at com.baidu.hugegraph.api.graph.VertexAPI.create(VertexAPI.java:48) ~[hugegraph-client-1.6.4.jar:1.6.4.0] at com.baidu.hugegraph.driver.GraphManager.addVertex(GraphManager.java:56) ~[hugegraph-client-1.6.4.jar:1.6.4.0] at com.baidu.hugegraph.loader.task.TaskManager.lambda$submitVerticesInSingleMode$0(TaskManager.java:206) ~[hugegraph-loader-0.8.0.jar:?] at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:108) [guava-19.0.jar:?] at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:41) [guava-19.0.jar:?] at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:77) [guava-19.0.jar:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_121] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_121] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121] Caused by: com.baidu.hugegraph.exception.ServerException$ServerCause: com.datastax.driver.core.exceptions.WriteTimeoutException: Cassandra timeout during write query at consistency LOCAL_ONE (1 replica were required but only 0 acknowledged the write) 2018-12-05 15:57:32 167419 [pool-3-thread-8] [ERROR] com.baidu.hugegraph.loader.task.TaskManager [] - Vertex insert error com.baidu.hugegraph.exception.ServerException: Failed to commit 2 statements: 'UPDATE graph_vertices SET LABEL=7,PROPERTIES=PROPERTIES+{18:'"刘文武"'} WHERE ID='S1101';'... at com.baidu.hugegraph.exception.ServerException.fromResponse(ServerException.java:44) ~[hugegraph-client-1.6.4.jar:1.6.4.0] at com.baidu.hugegraph.client.RestClient.checkStatus(RestClient.java:63) ~[hugegraph-client-1.6.4.jar:1.6.4.0] at com.baidu.hugegraph.rest.RestClient.post(RestClient.java:119) ~[hugegraph-common-1.5.3.jar:1.5.3.0] at com.baidu.hugegraph.rest.RestClient.post(RestClient.java:79) ~[hugegraph-common-1.5.3.jar:1.5.3.0] at com.baidu.hugegraph.rest.RestClient.post(RestClient.java:74) ~[hugegraph-common-1.5.3.jar:1.5.3.0] at com.baidu.hugegraph.api.graph.VertexAPI.create(VertexAPI.java:48) ~[hugegraph-client-1.6.4.jar:1.6.4.0] at com.baidu.hugegraph.driver.GraphManager.addVertex(GraphManager.java:56) ~[hugegraph-client-1.6.4.jar:1.6.4.0] at com.baidu.hugegraph.loader.task.TaskManager.lambda$submitVerticesInSingleMode$0(TaskManager.java:206) ~[hugegraph-loader-0.8.0.jar:?] at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:108) [guava-19.0.jar:?] at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:41) [guava-19.0.jar:?] at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:77) [guava-19.0.jar:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_121] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_121] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121] Caused by: com.baidu.hugegraph.exception.ServerException$ServerCause: com.datastax.driver.core.exceptions.OperationTimedOutException: [/10.50.1.199:9042] Timed out waiting for server response
@Linary 这次是重跑一个300W的数据顶点文件 之前这个文件跑到3W就不动了
@eternalxj 请参考一下这个链接 https://github.com/scylladb/scylla/issues/882 ,看看能否换为scylladb 2.1试试。
@javeme @Linary scylladb 2.1升级很麻烦 特别是在生产环境,我尝试一下 ,请问 hugegraph的loader升级到0.8版本 是否解决包含之前 https://github.com/hugegraph/hugegraph/issues/166 的问题 ?
@eternalxj loader尾部变慢那个问题0.8已解决。从这个日志分析来看这个问题是scylla超时导致的。