intra-mart Accel Platform / Quick Setup Guide

Version 3 2014-08-01

«  5.2. Web Application Server   ::   Contents   ::   5.4. Apache Solr  »

5.3. Apache Cassandra

5.3.1. Apache Cassandra Setting

5.3.1.1. Apache Cassandra Setup

Note

In this setup, Apache Cassandra is set up on the same machine with intra-mart Accel Platform.
  • Obtain Apache Cassandra.

    Apache Cassandra can be downloaded from the URL below.

  • After downloading, <apache-cassandra-1.1.12-bin.tar.gz> file is expanded to the arbitrary path.

    [*] Please use unzip tool that can expand zip file in TAR-GZ format for file expansion.

    Note

    Following directory is specified as an example in this document.

    [C:/apache-cassandra-1.1.12]

  • Open <C:/apache-cassandra-1.1.12/bin/cassandra.bat> file by the editor.

    • Memory value suitable for the installation environment is specified.

      Specify the minimum heap size to [Xms] property and the maximum heap size for [Xmx] property.

      Note

      set JAVA_OPTS=-ea^
      -javaagent:”%CASSANDRA_HOME%libjamm-0.2.5.jar”^
      -Xms512M^
      -Xmx512M^

      Warning

      The value to be set should be [512M] or larger.
      As Cassandra, it is recommended to set it to 1GB or above.
      If you set the value which is smaller than [512M], it may not work properly.
  • Add the home directory where JDK7 is installed to the Windows environment variable.

    Please set as follows according to the Windows OS manual.

    Variable

    JAVA_HOME

    Value

    Home directory where JDK is installed.

5.3.1.2. Editing Configuration File

  • Environment setting is to be made.

    *Open <C:/apache-cassandra-1.1.12/conf/cassandra.yaml> file by editor.

    Warning

    This file has read-only attribute immediately after file expansion, so please remove it in advance.

    • Specify save location of the data.
      If there is no specified directory, it would be automatically created at startup time.

      Specify the arbitrary path to [data_file_directories] property.

      Note

      Following contents should be specified as an example in this document.

      data_file_directories:
      - C:/apache-cassandra-1.1.12/data_file
    • Specify save location of CommitLog.
      If there is no specified directory, it would be automatically created at startup time.

      Specify arbitrary path to [commitlog_directory] property.

      Note

      Following contents are specified as an example in this document.

      # commit log
      commitlog_directory: C:/apache-cassandra-1.1.12/commit_log
    • Specify save location of cache data.
      If there is no specified directory, it would be automatically created at startup time.

      Specify arbitrary path to [saved_caches_directory] property.

      Note

      Following contents are specified as an example in this document.

      # saved caches
      saved_caches_directory: C:/apache-cassandra-1.1.12/saved_caches
    • Open <C:/apache-cassandra-1.1.12/conf/log4j-server.properties> file by editor.

      Warning

      This file has read-only attribute immediately after file expansion, so please remove it in advance.

      • Specify save location of system log.

        Specify arbitrary path to [log4j.appender.R.File] property.

        Note

        Following contens are specified as an example in this document.

        log4j.appender.R.File=C:/apache-cassandra-1.1.12/system.log

5.3.1.3. Apache Cassandra Startup

  • Start up Apache Cassandra.

    Double click <C:/apache-cassandra-1.1.12/bin/cassandra.bat>.

    Startup would be completed if the message below is displayed on the command prompt.

    INFO 12:55:11,319 Using synchronous/threadpool thrift server on localhost/127.0.0.1 : 9160
    INFO 12:55:11,320 Listening for thrift clients...
    

    Note

    When you start up Apache Cassandra, please change the port number setting if the following error occurs.

    Error : Agent throws the exception : java.rmi.server.ExportException: Port already in use: 7199;
    nested exception is: java.net.BindException: Address already in use: JVM_Bind
    

    Open <C:/apache-cassandra-1.1.12/bin/cassandra.bat> file by the editor.

    Please change [7199] that is set to Dcom.sun.management.jmxremote.port property
    to the port number which has not been used such as [7198].
    -Dcom.sun.management.jmxremote.port=7198^
    

    If the change was successful, please start up Apache Cassandra again.

    Note

    If the startup from the second and subsequent time does not work properly,

    Delete <C:/apache-cassandra-1.1.12/commit_log> directory and start up Apache Cassandra.

    Note

    How to stop Apache Cassandra

    Execute [Ctrl] + [C] command on the command prompt that appeared at startup time, and stop the process.

Please refer to [Cassandra Administrator Guide ] for more detailed settings.

Then, please proceed to [ Apache Solr ].

«  5.2. Web Application Server   ::   Contents   ::   5.4. Apache Solr  »