【问题标题】:Set seeds IP in cassandra.yaml file with a command/script使用命令/脚本在 cassandra.yaml 文件中设置种子 IP
【发布时间】:2016-03-09 19:18:05
【问题描述】:

我正在使用 AWS CloudFormation 创建一个 3 节点 Datastax Cassandra 集群。在我所有节点上的 ec2-user 主目录中,我在文本文件 (seeds.txt) 中创建种子 IP。集群正在按预期创建。 Node1 是种子节点。但是 Node2 和 Node3 将它们各自的私有 IP 设置为种子 IP。有谁知道在 node2 和 node3 上的 cassandra.yaml 文件中设置种子 IP 的脚本/命令? 我尝试了 sed 命令从 ec2-user 主目录 cat seed.txt 并修改 cassandra.yaml 文件,但它不起作用。这是我的 cassandra.yaml 文件的一部分,

seed_provider:
    # Addresses of hosts that are deemed contact points.
    # Cassandra nodes use this list of hosts to find each other and learn
    # the topology of the ring.  You must change this if you are running
    # multiple nodes!
    - class_name: org.apache.cassandra.locator.SimpleSeedProvider
      parameters:
          # seeds is actually a comma-delimited list of addresses.
          # Ex: "<ip1>,<ip2>,<ip3>"
          - seeds: "1.2.3.4"

【问题讨论】:

    标签: cassandra aws-ec2


    【解决方案1】:

    我们有类似的设置并使用 etcd 和 etcd-seed provider 来找出我们的种子节点。

    这意味着您必须在 etcd 集群中启动期间注册您的种子节点。我们通过调整 cassandra 的启动脚本解决了这个问题。

    参见(第 62 行): https://github.com/zalando/stups-cassandra/blob/master/stups-cassandra.sh

    最好的问候,

    马耳他

    【讨论】:

      【解决方案2】:

      你可以看看 https://github.com/riptano/ComboAMI 正在为 DS Cassandra AMI 做事。 简而言之,他们使用的是集中式反射器服务,所有节点都通过 HTTP 连接到该服务。

      【讨论】:

        猜你喜欢
        • 2015-03-18
        • 2011-04-02
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2016-03-23
        • 2020-03-26
        • 1970-01-01
        • 2022-01-12
        相关资源
        最近更新 更多