I am about to use simple cassnadra cluster (3 nodes, x.x.x.104-106). I'm using CentOS7, so i used datastax repository, Cassandra 3.0. I read on forum, it is better to install the cassandra-stress outside the cluster, otherwise it consumes CPU of the node.
Could you please help me, how to install it?
I tried to copied cassandra-stress.sh separately, but it is dependent on some cassandra files (probably created during installation).
So I decided to install whole Cassandra on separate server, in the same network space. Now, I'm struggling with the correct setup, how to run cassandra-stress tool against the cassandra cluster.
In cassandra.yaml I setup Cassandra name, listen_adress to public_ip, rpc_address to loopback address, I set seeds to cassandra cluster nodes (x.x.x.104-106)... but in general it does not make sense to set it up, since I dont wan't create another node in the Cassandra cluster.
Could you please help me?
Edit: Maybe using something like this might be the correct way?
cassandra-stress user profile=/usr/cassandra/stress-file.yaml ops(insert=1,books=1) n=10000 -node x.x.x.104,x.x.x.105,x.x.x.106 -port native= ? Telnet [cassandra_node_ip_ddress] 7000 works fine
答案 0 :(得分:0)
如果您的Cassandra群集在适当的端口打开的情况下运行(默认情况下,客户端为9042,JMX为7199),并且在另一台计算机上具有Cassandra目录,那么您应该能够从外部运行cassandra-stress
只需通过向群集中的一个节点(例如xxx104)的IP传递-node
选项,即可将群集与群集相对。例如,
$CASSANDRA_HOME/tools/bin/cassandra-stress write -node x.x.x.104
应该工作。您可以使用
查看更多选项$CASSANDRA_HOME/tools/bin/cassandra-stress help
答案 1 :(得分:0)
在每个节点上: 在cassandra.yaml中将rpc_address设置为IP地址 在cassanda-env.sh中设置LOCAL_JMX = no和jmx选项autenticate = false 打开防火墙端口7199 重新启动防火墙和cassandra
在Cassandra压力服务器上:
cassandra-stress user profile=/usr/cassandra/stress-books.yaml ops\
(insert=1,books=1\)
n=10000 -node 172.16.20.104,172.16.20.105,172.16.20.106 -port native=9042
thrift=9160 jmx=7199
注意! JMX通信不安全