X

News, tips, partners, and perspectives for the Oracle Solaris operating system

How to Build and Run Apache Cassandra 3.9 on Solaris SPARC & x86

Parnian Taidi
Product Marketing Manager

Apache Cassandra, a leading NoSQL database, excels in linear
horizontal scalability, mixed workloads and update/write efficiency. It is
written in pure Java although it supports all major languages.

Here is a quick starter’s
guide for getting it running on Oracle Solaris.

Download

Download Cassandra from http://cassandra.apache.org/download/
Sources are also available for download in this page (git is required).







Prerequisites for building Cassandra

Build is only needed if you like to do your own development or apply code changes. Otherwise the compiled bytecode is compatible and ready to use on Solaris with Oracle JVM. 

You will need: 

  1. Java 8 (download from here).
    To verify that you have the
    correct version of java installed, run  
    # java -version.
  2. Ant  1.8 or later
  3. Download Cassandra sources by

# git clone
http://git-wip-us.apache.org/repos/asf/cassandra.git

Add Java and Ant bin directory to PATH.

Build

As we discussed, no need to build unless you like to do your own development or code
changes. You can skip this otherwise.

  1. untar the downloaded tarball 
  2. Change directory to Cassandra installation
    location.
  3. Run

# ant

Install

To install just
untar the tarball if you haven’t done
this already.

Adjust

  1.  Cassandra's shell scripts Shebang (first
    script line  starts with #!) is /bin/sh,
    but they actually use Debian dash shell. On Solaris, use the bash shell instead.
    Bash may be seen as a super set of dash.   
    As of Cassandra 3.9 (current latest), these are the scripts which uses
    /bin/sh and should use /bin/bash (replace all #!/bin/sh by #!/bin/bash):    bin/cassandra, bin/cqlsh, bin/cqlsh.py, bin/debug-cql, bin/nodetool,
    bin/sstableloader, bin/sstablescrub, bin/sstableupgrade, bin/sstableutil,
    bin/sstableverifytools/bin/cassandra-stress, tools/bin/cassandra-stressd,
    tools/bin/compaction-stress, tools/bin/sstabledump,
    tools/bin/sstableexpiredblockers, tools/bin/sstablelevelreset,
    tools/bin/sstablemetadata, tools/bin/sstableofflinerelevel,
    tools/bin/sstablerepairedset, tools/bin/sstablesplit
  2. The conf/Cassandra-env.sh
    uses ‘grep –A’ which is not supported by the default Solaris grep. All ‘grep
    –A’ occurrences should be replaced by ‘
    /usr/gnu/bin/grep
    –A’
    .
  3. Using the default JVM stack size setting (256KB)
    on SPARC may cause StackOverflow exception during Cassandra initialization.
    Increasing stack size to 512KB will fix that.
    In conf/jvm.options, change:

# Per-thread stack
size.

-Xss256k

to:

# Per-thread stack
size.

-Xss512k

Runtime Prerequisites

  1. Java
    8.0.
    To verify that you have the
    correct version of java installed, type
    java -version.
  2. For using cqlsh, the latest version of Python 2.7. To
    verify that you have the correct version of Python installed, type
    python --version. Cassandra uses dozens of third party open source libraries. They are all
    included in the downloaded package for convenience.

Run

Type

# <Cassandra-Installation-directory>/bin/cassandra –f

Verify

Assuming a single node Cassandra cluster, the first sanity
test should be running nodetool :

# nodetool status clone

Output should be as the following:

Datacenter:
datacenter1

=======================

Status=Up/Down

|/
State=Normal/Leaving/Joining/Moving

--  Address   
Load       Tokens       Owns (effective)  Host ID                               Rack

UN  127.0.0.1  236.61 MiB 
256          100.0%           
eebb4e6b-406b-4f50-a836-fce962e892f7 
rack1

-------

UN means Up and Normal.

Further Tests

Cassandra query language shell, cqlsh and Cassandra-stress
are further built-in convenient tools your can use for verifying and testing.

Deploying Cassandra Cluster on Solaris

An excellent reading on how to deploy Cassandra node cluster
on Solaris, including systems, virtualization and storage setting is here.


Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha

Recent Content

Oracle

Integrated Cloud Applications & Platform Services