(Update with the copy of version: 8.5.2DRAFT) |
|||
Line 1: | Line 1: | ||
= Initializing Cassandra= | = Initializing Cassandra= | ||
__TOC__ | __TOC__ | ||
− | ==Creating the Cassandra | + | ==Creating the Cassandra keyspace== |
The procedures below describe how to create the Cassandra keyspace for the following scenarios: | The procedures below describe how to create the Cassandra keyspace for the following scenarios: | ||
Line 16: | Line 16: | ||
<div class="cloud-wrapper"> | <div class="cloud-wrapper"> | ||
<div class="cloud-left" style="padding-top:0;"> | <div class="cloud-left" style="padding-top:0;"> | ||
− | ===Creating the Cassandra | + | ===Creating the Cassandra keyspace (1 Cassandra node)=== |
'''Start''' | '''Start''' | ||
<ol> | <ol> | ||
<li>Copy the '''ks-schema-local.txt''' file from '''''installation_CD''/data''' to the Cassandra node host.</li> | <li>Copy the '''ks-schema-local.txt''' file from '''''installation_CD''/data''' to the Cassandra node host.</li> | ||
− | <li>By default, the replication factor is set to <tt>1</tt>. Since this is a single node deployment, you don't need to modify this value. Refer to the | + | <li>By default, the replication factor is set to <tt>1</tt>. Since this is a single node deployment, you don't need to modify this value. Refer to the {{#Widget:ExtLink|link=http://www.datastax.com/documentation/cassandra/1.2/cassandra/architecture/architectureDataDistributeReplication_c.html|displaytext=Cassandra documentation}} for more information about replication factors.</li> |
<source lang="text"> | <source lang="text"> | ||
and strategy_options = {replication_factor : 1} | and strategy_options = {replication_factor : 1} | ||
Line 38: | Line 38: | ||
<div class="cloud-wrapper"> | <div class="cloud-wrapper"> | ||
<div class="cloud-left" style="padding-top:0;"> | <div class="cloud-left" style="padding-top:0;"> | ||
− | ===Creating the Cassandra | + | ===Creating the Cassandra keyspace (1 datacenter)=== |
Complete the following procedure on one node in your Cassandra cluster. | Complete the following procedure on one node in your Cassandra cluster. | ||
Line 45: | Line 45: | ||
<ol> | <ol> | ||
<li>Copy the '''ks-schema-prod.txt''' file from '''''installation_CD''/data''' to the Cassandra node host.</li> | <li>Copy the '''ks-schema-prod.txt''' file from '''''installation_CD''/data''' to the Cassandra node host.</li> | ||
− | <li>For fault tolerance, Genesys recommends that you use at least 3 Cassandra nodes and set the replication factor to <tt>3</tt>. Refer to the | + | <li>For fault tolerance, Genesys recommends that you use at least 3 Cassandra nodes and set the replication factor to <tt>3</tt>. Refer to the {{#Widget:ExtLink|link=http://www.datastax.com/documentation/cassandra/1.2/cassandra/architecture/architectureDataDistributeReplication_c.html|displaytext=Cassandra documentation}} for more information about replication factors. To modify this value, change the following line:</li> |
<source lang="text"> | <source lang="text"> | ||
and strategy_options = {replication_factor : <replication-factor-in-your-lab>} | and strategy_options = {replication_factor : <replication-factor-in-your-lab>} | ||
Line 62: | Line 62: | ||
<div class="cloud-wrapper"> | <div class="cloud-wrapper"> | ||
<div class="cloud-left" style="padding-top:0;"> | <div class="cloud-left" style="padding-top:0;"> | ||
− | ===Creating the Cassandra | + | ===Creating the Cassandra keyspace (2 datacenters)=== |
Complete the following procedure on one node in your Cassandra cluster. | Complete the following procedure on one node in your Cassandra cluster. | ||
Line 85: | Line 85: | ||
198.51.100.12 datacenter2 rack1 Up Normal 14.97 MB 100.00% 113427455640312821154458202477256070484 | 198.51.100.12 datacenter2 rack1 Up Normal 14.97 MB 100.00% 113427455640312821154458202477256070484 | ||
</source> | </source> | ||
− | <li>Add the replication factor. Refer to the | + | <li>Add the replication factor. Refer to the {{#Widget:ExtLink|link=http://www.datastax.com/documentation/cassandra/1.2/cassandra/architecture/architectureDataDistributeReplication_c.html|displaytext=Cassandra documentation}} for more information about replication factors.</li> |
</ol> | </ol> | ||
Based on the nodetool output above, your line might be: | Based on the nodetool output above, your line might be: | ||
Line 101: | Line 101: | ||
</tabber> | </tabber> | ||
− | ==Creating the | + | ==Creating the column families== |
Complete the following procedure on one node in your Cassandra cluster. | Complete the following procedure on one node in your Cassandra cluster. | ||
Line 115: | Line 115: | ||
'''End''' | '''End''' | ||
− | ==Next | + | ==Next step== |
− | *[[DeployWebApp|Deploying the | + | *[[DeployWebApp|Deploying the web application]] |
[[Category:V:HTCC:8.5.2]] | [[Category:V:HTCC:8.5.2]] |
Revision as of 19:57, January 22, 2016
Initializing Cassandra
Contents
Creating the Cassandra keyspace
The procedures below describe how to create the Cassandra keyspace for the following scenarios:
- Development — 1 Cassandra node (appropriate for a development or lab environment)
- Single Datacenter — 1 datacenter with a minimum of three Cassandra nodes
- Two Datacenters — 2 datacenters with a minimum of three Cassandra nodes in each datacenter
Select a tab below for the procedure that matches your deployment scenario.
Creating the Cassandra keyspace (1 Cassandra node)
Start
- Copy the ks-schema-local.txt file from installation_CD/data to the Cassandra node host.
- By default, the replication factor is set to 1. Since this is a single node deployment, you don't need to modify this value. Refer to the Cassandra documentation for more information about replication factors.
- Run the following command to create the Cassandra schema:
and strategy_options = {replication_factor : 1}
cassandra_install_dir/bin/cassandra-cli -h cassandra_host --file ks-schema-local.txt
- cassandra_host is the host name (fully qualified domain name) or IP address of the Cassandra node.
End
Creating the Cassandra keyspace (1 datacenter)
Complete the following procedure on one node in your Cassandra cluster.
Start
- Copy the ks-schema-prod.txt file from installation_CD/data to the Cassandra node host.
- For fault tolerance, Genesys recommends that you use at least 3 Cassandra nodes and set the replication factor to 3. Refer to the Cassandra documentation for more information about replication factors. To modify this value, change the following line:
- Run the following command to create the Cassandra schema:
and strategy_options = {replication_factor : <replication-factor-in-your-lab>}
cassandra_install_dir/bin/cassandra-cli -h cassandra_host --file ks-schema-prod.txt
- cassandra_host is the host name (fully qualified domain name) or IP address of the Cassandra node
End
Creating the Cassandra keyspace (2 datacenters)
Complete the following procedure on one node in your Cassandra cluster.
Start
- Copy the ks-schema-prod_HA.txt file from installation_CD/data to the Cassandra node host.
- Modify the following line:
with strategy_options ={ AZ1 : 3, AZ2 : 3 }
- Add the datacenter name. You can use nodetool to find the name of the datacenter by examining the output of "nodetool ring" (the tool is located in the bin directory of Cassandra). The following is sample output from the nodetool:
- Add the replication factor. Refer to the Cassandra documentation for more information about replication factors.
/genesys/apache-cassandra-1.1.6/bin$ ./nodetool ring Address DC Rack Status State Load Owns Token 192.0.2.10 datacenter1 rack1 Up Normal 14.97 MB 100.00% 0 198.51.100.10 datacenter2 rack1 Up Normal 14.97 MB 100.00% 100 192.0.2.11 datacenter1 rack1 Up Normal 14.97 MB 100.00% 56713727820156410577229101238628035242 198.51.100.11 datacenter2 rack1 Up Normal 14.97 MB 100.00% 56713727820156410577229101238628035242 192.0.2.12 datacenter1 rack1 Up Normal 14.97 MB 100.00% 113427455640312821154458202477256070484 198.51.100.12 datacenter2 rack1 Up Normal 14.97 MB 100.00% 113427455640312821154458202477256070484
Based on the nodetool output above, your line might be:
with strategy_options ={ datacenter1 : 3, datacenter2 : 3 }
- Run the following command to create the Cassandra schema:
- cassandra_host is the host name (fully qualified domain name) or IP address of the Cassandra node
cassandra_install_dir/bin/cassandra-cli -h cassandra_host --file ks-schema-prod_HA.txt</nowiki>
End
Creating the column families
Complete the following procedure on one node in your Cassandra cluster.
Start
- Copy the cf-schema.txt file from installation_CD/data to the Cassandra node host.
- Run the following command to create the Cassandra schema:
cassandra_install_dir/bin/cassandra-cli -h cassandra_host --file cf-schema.txt
- cassandra_host is the host name (fully qualified domain name) or IP address of the Cassandra node
End
Next step