Line 27: | Line 27: | ||
'''End''' | '''End''' | ||
− | ==Configuring Cassandra== | + | ==Configuring Cassandra with Multiple Nodes== |
This procedure shows you how to configure a three-node Cassandra cluster in a single datacenter. | This procedure shows you how to configure a three-node Cassandra cluster in a single datacenter. | ||
<!-- Available styles: (default)-Important, 2-Tip, 3-Warning --> | <!-- Available styles: (default)-Important, 2-Tip, 3-Warning --> | ||
<!-- Important: equal signs (=) will not work in a note. Use the equivalent HTML code (=) instead.--> | <!-- Important: equal signs (=) will not work in a note. Use the equivalent HTML code (=) instead.--> | ||
{{NoteFormat|The files modified in this procedure are typically found in the <tt>[Cassandra install dir]/conf</tt> directory.}} | {{NoteFormat|The files modified in this procedure are typically found in the <tt>[Cassandra install dir]/conf</tt> directory.}} | ||
− | + | '''Prerequisites''' | |
+ | * [[InstallingAndDeployingCassandra#Installing_Cassandra|Installing Cassandra]] | ||
'''Start'''<br/> | '''Start'''<br/> | ||
Complete the following steps for each Cassandra node: | Complete the following steps for each Cassandra node: | ||
Line 70: | Line 71: | ||
'''End''' | '''End''' | ||
− | ==Configuring Cassandra with | + | ==Configuring Cassandra with One Node== |
− | This procedure shows you how to configure a | + | This procedure shows you how to configure a single Cassandra node. This could be valuable for a lab or a simple test installation. |
<!-- Available styles: (default)-Important, 2-Tip, 3-Warning --> | <!-- Available styles: (default)-Important, 2-Tip, 3-Warning --> | ||
<!-- Important: equal signs (=) will not work in a note. Use the equivalent HTML code (=) instead.--> | <!-- Important: equal signs (=) will not work in a note. Use the equivalent HTML code (=) instead.--> | ||
{{NoteFormat|The files modified in this procedure are typically found in the <tt>[Cassandra install dir]/conf</tt> directory.}} | {{NoteFormat|The files modified in this procedure are typically found in the <tt>[Cassandra install dir]/conf</tt> directory.}} | ||
− | + | '''Prerequisites''' | |
− | '''Start''' | + | * [[InstallingAndDeployingCassandra#Installing_Cassandra|Installing Cassandra]] |
− | + | '''Start''' | |
<ol> | <ol> | ||
<li>Modify the <tt>cassandra.yaml</tt> file:</li> | <li>Modify the <tt>cassandra.yaml</tt> file:</li> | ||
Line 95: | Line 96: | ||
==Verifying the Cassandra Installation== | ==Verifying the Cassandra Installation== | ||
+ | '''Prerequisites''' | ||
+ | * [[InstallingAndDeployingCassandra#Configuring_Cassandra_with_Multiple_Nodes|Configuring Cassandra with Multiple Nodes]] or [[InstallingAndDeployingCassandra#Configuring_Cassandra_with_One_Node|Configuring Cassandra with One Node]] | ||
'''Start'''<br/> | '''Start'''<br/> | ||
<ol> | <ol> | ||
Line 102: | Line 105: | ||
<pre>[cassandra install dir]/bin/nodetool -h [cassandra host] ring</pre> | <pre>[cassandra install dir]/bin/nodetool -h [cassandra host] ring</pre> | ||
− | The following is sample output for a | + | The following is sample output for a multiple Cassandra node scenario: |
<pre> | <pre> | ||
Line 113: | Line 116: | ||
− | The following is sample output for a | + | The following is sample output for a single Cassandra node scenario: |
<pre> | <pre> | ||
/genesys/apache-cassandra-1.2/bin$ ./nodetool ring | /genesys/apache-cassandra-1.2/bin$ ./nodetool ring |
Revision as of 15:22, March 10, 2015
Installing and Configuring Cassandra
Contents
Cassandra version 1.2 is mandatory for Workspace Web Edition & Web Services and must be installed and configured prior to starting the installation and configuration of Workspace Web Edition & Web Services.
The procedures on this page are intended to serve as a quick guide to installing and configuring Cassandra.
Installing Cassandra
Complete this procedure for each Cassandra node.
Prerequisites
- You have installed the latest Java 1.7 JDK 64bit for Linux. For more information, refer to the Java documentation.
Start
- Download the latest 1.2.x version of Cassandra.
- Copy the Cassandra archive to the installation directory. For example, /usr/local
- Use a tar utility to extract the files. For example, tar -zxvf apache-cassandra-1.2.15-bin.tar.gz
- Add directories for data, commitlog, and saved_caches. You can create these directories anywhere or in the default locations configured in the cassandra.yaml. For example:
- /var/lib/cassandra/data
- /var/lib/cassandra/commitlog
- /var/lib/cassandra/saved_caches
- Add a directory for logging. You can create this directory anywhere, such as /var/log/cassandra/.
End
Configuring Cassandra with Multiple Nodes
This procedure shows you how to configure a three-node Cassandra cluster in a single datacenter.
Prerequisites
Start
Complete the following steps for each Cassandra node:
- Modify the cassandra.yaml file:
- Set the cluster_name. It must be the same name on all nodes.
- Set the initial_token according to the node's place in ring. It must be one of the following:
- Set seeds to the list of host names of all nodes. For example: -seeds: “node1, node2, node3”
- Set listen_address and rpc_address to the host name.
- Set data_file_directories, commitlog_directory, and saved_caches_directory to the directories you created in Step 4 of the Installing Cassandra procedure.
- Change endpoint_snitch to PropertyFileSnitch.
- Save your changes and close the file.
- Open the log4j-server.properties file and set the log4j.appender.R.File property to the directory you created in Step 5 of the Installing Cassandra procedure.
- Save your changes and close the file.
- Open the cassandra-topology.properties file and update for you cluster topology. For each node in your cluster, add the following line:
Node #1: -9223372036854775808 Node #2: -3074457345618258603 Node #3: 3074457345618258602
[node]=[datacenter]:[rack]
- [node] — The IP address of the node
- [datacenter] — The name of the datacenter for this node.
- [rack] — The name of the rack for this node.
The following is a sample cassandra-topology.properties file for a Single Datacenter scenario:
192.0.2.10=datacenter1:rack1 192.0.2.11=datacenter1:rack1 192.0.2.12=datacenter1:rack1
End
Configuring Cassandra with One Node
This procedure shows you how to configure a single Cassandra node. This could be valuable for a lab or a simple test installation.
Prerequisites
Start
- Modify the cassandra.yaml file:
- Set the cluster_name. It must be the same name on all nodes.
- Set seeds to the list of host names of all nodes. For example: -seeds: “127.0.0.1”
- Set listen_address and rpc_address to the host name.
- Set data_file_directories, commitlog_directory, and saved_caches_directory to the directories you created in Step 4 of the Installing Cassandra procedure.
- Save your changes and close the file.
- Open the log4j-server.properties file and set the log4j.appender.R.File property to the directory you created in Step 5 of the Installing Cassandra procedure.
- Save your changes and close the file.
- Save your changes and close the file.
End
Verifying the Cassandra Installation
Prerequisites
Start
- Start all Cassandra nodes using the following command:
- Use the nodetool utility to verify that all nodes have connected by entering the following command:
[cassandra install dir]/bin/cassandra
[cassandra install dir]/bin/nodetool -h [cassandra host] ring
The following is sample output for a multiple Cassandra node scenario:
/genesys/apache-cassandra-1.2/bin$ ./nodetool ring Address DC Rack Status State Load Owns Token 192.0.2.10 datacenter1 rack1 Up Normal 14.97 MB 100.00% -9223372036854775808 192.0.2.11 datacenter1 rack1 Up Normal 14.97 MB 100.00% -3074457345618258603 192.0.2.12 datacenter1 rack1 Up Normal 14.97 MB 100.00% 3074457345618258602
The following is sample output for a single Cassandra node scenario:
/genesys/apache-cassandra-1.2/bin$ ./nodetool ring Address DC Rack Status State Load Effective-Ownership Token 127.0.0.1 datacenter1 rack1 Up Normal 1.89 MB 100.00% 76880863635469966884037445232169973201
End