How to Configure multiple node cluster with Cassandra on Windows 7 64 bit?

1.1k views Asked by At

Hi I am trying to setup multiple node for my cluster in windows machine , I have found various tutorials regarding Configuring multiple nodes for Ubuntu, but I am not able to find a proper step by step tutorial for setting up multiple node for my single windows machine.

If someone had added multiple nodes to their windows machine , please help me guide the Process.....

I know we need to tweak the cassandra.yaml file for this but dont know the correct way to do that .

1

There are 1 answers

2
Lyuben Todorov On

ccm is the tool you're after. There has been a number of patches to enable windows support.

Failing that (since the install isn't the simplest thing) You can try to emulate what ccm does. Which is to modify the rpc_port in cassandra.yaml, the storage port (storage_port), native_transport_port, the JMX port . These need to be modified for each server.

Failing that you'll need to modify a number of options in cassandra.yaml for each node on the machine. These settings are as follows (i'll give 2 examples for each)

  • data_file_directories [/var/lib/cassandra/1/data, /var/lib/cassandra/2/data]
  • commitlog_directory [/var/lib/cassandra/1/commitlog, /var/lib/cassandra/2/commitlog]
  • saved_caches_directory [/var/lib/cassandra/1/saved_caches, /var/lib/cassandra/2/saved_caches]
  • listen_address: [127.0.0.1, 127.0.0.2]
  • rpc_address: [127.0.0.1. 127.0.0.2]
  • JMX_PORT - This one is a bit more complicated as you must edint cassandra.bat. Open up the batch file and search for -Dcom.sun.management.jmxremote.port=7199^. For each server change the port to 7x00 where the x represents the number of the node. E.g. node1 = 7100, node2 = 7200 etc.

These should be all the settings to configure multiple nodes manually, but I'd advise you to play around with python 2.7 and configure ccm. The tool is brilliant and can save you lots of dev time. Automation ftw.