cassandra - 在 Cassandra 中更改集群名称

标签 cassandra rename

我有一个集群,有 2 台机器(centos7 和 cassandra 3.4),192.168.0.175 和 192.168.0.174。种子是 192.168.0.175。

我只想更改集群名称。和平的蛋糕应该。

我在每个集群上都做了:

  • update system.local set cluster_name = 'America2' where key='local';
  • 我做了 nodetool 刷新
  • 我用新名称更新了 cassandra.yaml
  • 重新启动 Cassandra 。

  • 当我 cqlsh any if 将我描述为连接到新的 cluster_name America2

    当我运行 nodetool describecluster 它显示旧的集群名称 America

    如果我在两台机器上停止 cassandra 并尝试重新启动它们,我会在日志中发现旧的错误:
    org.apache.cassandra.exceptions.ConfigurationException: Saved cluster name America != configured name America2
    所以......我做错了什么!?

    最佳答案

    更改集群名称之前

  • 从集群环中删除节点

    nodetool 停用
  • 停止节点并更改 cassandra.yaml 中的集群名称
  • 干净的节点

    须藤 rm -rf/var/lib/cassandra/*/var/log/cassandra/*
  • 启动 cassandra 节点

  • 更多信息请访问 academy.datastax.com

    关于cassandra - 在 Cassandra 中更改集群名称,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36737468/

    相关文章:

    cassandra - Cassandra 中的更新不是反模式吗?

    algorithm - 如何增加/减少随机(类型 4)UUID?

    linux - 使用 sed 重命名多个文件

    c++ - 跟踪文件名更改

    python - 批处理文件重命名: zero padding time with regex?

    regex - 在 linux : suppress part of string 中使用正则表达式重命名文件

    nosql - 构建cassandra数据库

    scala - 从 Cassandra 查询的数据无法再次在同一列上进行过滤 (InvalidQueryException)

    go - 使用 gocql 查询解码时间戳

    python - 重命名数据框列表中的列?