intra-mart Accel Platform / Cassandra Administrator Guide

Version 8 2014-04-01

«  4.1. Obtaining Apache Cassandra   ::   Contents   ::   4.3. Registration/Deletion to Windows Service  »

4.2. Cassandra Setup for Windows

In this section the setup method of Cassandra in Windows environment is described.

4.2.1. File Expansion

<apache-cassandra-1.1.12-bin.tar.gz> file which has been downloaded by Obtaining Apache Cassandra should be expanded to the arbitrary path.
[*] For the expansion of files, please use the decompression tool that can expand the compressed file in TAR-GZ format.

Note

In this document the directory below is specified as an example.

[C:/cassandra/apache-cassandra-1.1.12]

Directory to which Cassandra has been expanded is hereafter abbreviated as %CASSANDRA_HOME%.

4.2.2. Various Settings

  • Following settings should be in place before starting Cassandra.

4.2.2.1. Cassandra Setting

  • Please open <%CASSANDRA_HOME%/conf/cassandra.yaml> file which states the setting of Cassandra by the editor, and edit it.
  • For the details about cassandra.yaml file, please refer to [cassandra.yaml Major Items List] of [Cassandra Reference Information].
  1. Specifying Cluster Name

    Arbitrary cluster name should be specified to [cluster_name] property.
    cluster_name: 'IMBox Cluster'
    

    Warning

    In case multiple Cassandra servers exist, cluster may be configured by looking at the cluster name to judge if it is the Cassandra of the same cluster.
    Therefore, it is recommended to change the initial value, when intra-mart Accel Platform is newly built.
  2. Specifying Data Storage Location

    Please specify arbitrary path to [data_file_directories] property.
    If there is no directory specified, it will be automatically created at startup time.
    data_file_directories:
       - C:/cassandra/data
    
  3. Specifying Commit Log Storage Location

    Please specify arbitrary path to [commitlog_directory] property.
    If there is no directory specified, it will be automatically created at startup time.
    # commit log
    commitlog_directory: %CASSANDRA_HOME%/commit_log
    
  4. Specifying Cache Data Storage Location

    Please specify arbitrary path to [saved_caches_directory] property.
    If there is no directory specified, it will be automatically created at startup time.
    # saved caches
    saved_caches_directory: %CASSANDRA_HOME%/saved_caches
    

    Note

    When the version upgrade of Cassandra is to be made, data on the previous version should be migrated to the new version for use.
    Please refer to Cassandra Version Upgrade for the details about version upgrade.
  5. Specifying Communication Address for communication with other Cassandra

    Cassandra communicates with other Cassandra’s with the IP address obtained by Java InetAddress.getLocalHost(). If there are multiple addresses, it is necessary to explicitly specify the IP address to be used for such communication.
    listen_address: 192.168.xxx.xxx(arbitrary IP address)
    
    rpc_address: 192.168.xxx.xxx(arbitrary IP address)
    
  6. Specifying System Log

    Please open <%CASSANDRA_HOME%/conf/log4j-server.properties> file by the editor, and set arbitrary path to [log4j.appender.R.File] property.
    log4j.appender.R.File=%CASSANDRA_HOME%/system.log
    

4.2.2.2. Memory Setting

Memory value which is appropriate for the installation environment should be set.
Please open <%CASSANDRA_HOME%/bin/cassandra.bat> file by the editor.
Minimum heap size is set to [Xms] property, and the maximum heap size is set to [Xmx] property. The values specified should not be smaller than the ones in the example below.
set JAVA_OPTS=-ea^
 -javaagent:”%CASSANDRA_HOME%lib\jamm-0.2.5.jar”^
 -Xms512M^
 -Xmx512M^

Warning

The values to be set should be [512M] or more.
If the values smaller than [512M] are set, it may not function properly.
In Cassandra it is recommended to set the value no smaller than 1GB.

4.2.2.3. Environment Variable Setting

Home directory at which JDK has been installed should be added to Windows environment variable.
Please follow the descriptions of WindowsOS manual, and do the settings shown below.
Variable JAVA_HOME
Value Home Directory at which JDK has been installed

Note

  • Please install JDK6 or JDK7 in advance.

«  4.1. Obtaining Apache Cassandra   ::   Contents   ::   4.3. Registration/Deletion to Windows Service  »