【问题标题】:Cassandra: Coordinator node timed out waiting for replica nodes' responsesCassandra:协调节点超时等待副本节点的响应
【发布时间】:2016-01-16 15:29:54
【问题描述】:

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

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.

我已经看到了这个问题: Coordinator node timed out waiting for replica nodes in Cassandra Datastax while insert data

但这并不能解释为什么当复制因子为 1 并且它是一个 1 节点集群时,协调器会期望存在副本节点。

更多信息:

节点状态

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;

【问题讨论】:

    标签: cassandra cassandra-2.0


    【解决方案1】:

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

    【讨论】:

    • 感谢您的回复。在我发布这个问题几天后,我开始使用一个将数据加载到 Cassandra 的工具,该工具安装了原生的 COPY 命令。但如果我需要再次使用COPY,我会尝试一下。
    • 如果你回来试试,效果很好,但你必须记住它吃内存,所以很好,但有一些弱点。
    猜你喜欢
    • 2021-04-29
    • 2015-08-15
    • 2020-02-04
    • 2019-07-14
    • 2017-08-21
    • 2021-03-19
    • 2020-11-06
    • 2015-12-28
    • 1970-01-01
    相关资源
    最近更新 更多