Cassandra:协调器节点等待副本节点响应超时 [英] Cassandra: Coordinator node timed out waiting for replica nodes' responses

查看:27
本文介绍了Cassandra:协调器节点等待副本节点响应超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 COPY 从 CSV 导入了大约 400 万行.进入该过程 90 分钟后,我收到以下错误,这表明在等待副本节点时出现了一些问题.Keyspace 设置复制因子为 1,集群中只有一个节点.那么为什么协调器必须等待任何其他节点?

I was importing about 4 million rows from CSV using COPY. 90 minutes into the process, I got the following error which suggests some problem in waiting for replica nodes. The Keyspace is setup with replication factor of 1 and there is only one node in the cluster. So why does the coordinator have to wait for any other node?

Processed 4050000 rows; Write: 624.27 rows/ss
code=1100 [Coordinator node timed out waiting for replica nodes' responses] message="Operation timed out - received only 0 responses." info=

{'received_responses': 0, 'required_responses': 1, 'write_type': 0, 'consistency': 1}
Aborting import at record #4050617. Previously-inserted values still present.
4050671 rows imported in 1 hour, 26 minutes, and 43.649 seconds.

我已经看过这个问题了:协调器节点等待副本节点超时在 Cassandra Datastax 中插入数据

I have already seen this question: Coordinator node timed out waiting for replica nodes in Cassandra Datastax while insert data

但这并没有回答为什么当复制因子为 1 并且它是一个 1 节点集群时,协调器会期望存在副本节点.

But that does not answer why would a coordinator expect replica nodes to be present when the replication factor is 1 and it is a 1 node cluster.

更多信息:

节点状态

student@cascor:~$ nodetool status
Datacenter: datacenter1
=======================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
--  Address    Load       Tokens  Owns    Host ID                               Rack
UN  127.0.0.1  1.64 GB    256     ?       f550e955-00f3-49a4-bc2d-c7f775079359  rack1

Note: Non-system keyspaces don't have the same replication settings, effective ownership information is meaningless

键空间配置

cqlsh:excelsior> desc keyspace;

CREATE KEYSPACE excelsior WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '1'}  AND durable_writes = true;

推荐答案

是解释一下:'received_responses': 0, 'required_responses': 1所以你有一个节点,但它可以像你有很多一样工作.所以它无法响应.因为写操作需要时间,当你一次导入这么多数据时,它会杀死 CPU 并且写操作需要更长的时间,所以超时,节点响应我不保存这些数据"所以有 1 个节点没有响应所以你得到这个错误.我有同样的问题,改变这个 (write_request_timeout_in_ms) 帮助我,我做数百万条记录的 COPY 导入.

Is explain it: 'received_responses': 0, 'required_responses': 1 so u have one node, but it working as u have many. So it can not respond. And it because writing operation need time, when u import so many data in one go it kill CPU and write operation take longer time, so get time out, and node respond "i not save this data" so having 1 node make none respond so u get this error. I had same problem, and changing this (write_request_timeout_in_ms) help me, i to do COPY import of millions of record.

这篇关于Cassandra:协调器节点等待副本节点响应超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆