【发布时间】:2015-10-20 12:49:10
【问题描述】:
我在同一个内网中成功设置了两个节点。两台机器都在同一个集群中。我的意思是他们在cassandra.yaml 文件中都有这个属性集cluster_name: 'Test Cluster'。我读到这在链接节点时很重要。无论如何,我对以下指南感到非常困惑:http://wiki.apache.org/cassandra/GettingStarted
我正在尝试按照“配置多节点集群”部分的说明进行操作,但是关于如何执行此操作的详细信息或示例还不够。
# any class that implements the SeedProvider interface and has a
# constructor that takes a Map<String, String> of parameters will do.
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: "localhost"
以上是处理本节中提到的seeds 的cassandra.yaml 文件的一部分。我不确定是否 a) 我应该将我的机器的 IP 地址放在 seeds: 部分或 b) 我尝试连接的远程节点。
此外,本节还提到更改 listen_address 和 rpc_address。但是,他们没有解释我尝试连接的远程节点是否应该具有 listen_address 或者该地址是否应该是我自己的机器正在等待 tcp 数据包。我同样对 rpc_address 感到困惑。
下面会从cassandra.yaml 文件中找到相关条目:
listen_address: "localhost", rpc_address: localhost
我正在使用nodetool status 命令检查我是否已成功连接到远程节点,但目前程序只显示我的机器及其状态。
另外,我发现了一个类似的教程,到目前为止对我来说也没有多大意义。该教程的网址在这里:https://www.digitalocean.com/community/tutorials/how-to-configure-a-multi-node-cluster-with-cassandra-on-a-ubuntu-vps
最后,如果回答这个问题太难了,不那么直截了当,有人可以为我指出正确的方向,以获取有关如何执行此操作的更多信息吗?
感谢您阅读本文。
问候,
【问题讨论】:
标签: cassandra