Cassandra

Modified: 26 Sep 2019 21:20 UTC

The Joyent Cassandra image is a SmartOS base64 image preconfigured with Apache Cassandra.

You can find more information about Apache Cassandra at the Cassandra website. You can learn about using Apache Cassandra in the Getting started guide.



Overview

Apache Cassandra, and its dependencies, comes pre-isntalled via pkgsrc:

    # pkgin se cassandra
    apache-cassandra-1.2.4 = Highly scalable, distributed structured key-value store

The Apache Cassandra service is managed via SMF:

    # svcs cassandra
    STATE          STIME    FMRI
    online         15:27:05 svc:/pkgsrc/cassandra:default

You can stop and restart the service with:

    # svcadm disable cassandra

And you can restart the service with:

    # svcadm restart cassandra

By default, the Apache Cassandra service is set configured to listen on localhost. You can change that by setting the listen_address: value in /opt/local/share/cassandra/conf/cassandra.yaml. Once changed, restart the Apache Cassandra service:

    # svcadm restart cassandra

You can access cassandra-cli easily via:

    # cassandra-cli

The location of all the Cassandra binaries (see Log in and data locations) has been added to PATH variable for convenience.

Configuration, log, and data locations

Files Location
Java home /opt/local/java/sun6/
Cassandra binaries (such as cassandra-cli) /opt/local/share/cassandra/bin/
Configuration files /opt/local/share/cassandra/conf/
Logs /var/log/cassandra/
Data /var/lib/cassandra/data/
Commit log /var/lib/cassandra/commitlog/
Saved caches /var/lib/cassandra/saved_caches/

Gathering statistics

Apache Cassandra comes by default with the nodetool utility that can be used to gather information, statistics from a node or cluster.

nodetool status - Print cluster information (state, load, IDs, ...)

    # nodetool status
    prtconf: devinfo facility not available
    Datacenter: datacenter1
    =======================
    Status=Up/Down
    |/ State=Normal/Leaving/Joining/Moving
    --  Address    Load       Tokens  Owns   Host ID                               Rack
    UN  127.0.0.1  105.53 KB  256     100.0%  4c822bb7-cdd8-4e47-8b73-78084604084c  rack1

nodetool info - Print node information (uptime, load ..)

    # nodetool info
    prtconf: devinfo facility not available
    Token            : (invoke with -T/--tokens to see all 256 tokens)
    ID               : 4c822bb7-cdd8-4e47-8b73-78084604084c
    Gossip active    : true
    Thrift active    : true
    Native Transport active: true
    Load             : 105.53 KB
    Generation No    : 1400164260
    Uptime (seconds) : 4408
    Heap Memory (MB) : 163.02 / 998.44
    Data Center      : datacenter1
    Rack             : rack1
    Exceptions       : 1
    Key Cache        : size 1752 (bytes), capacity 51380224 (bytes), 4592 hits, 4610 requests, 0.999 recent hit rate, 14400 save period in seconds
    Row Cache        : size 0 (bytes), capacity 0 (bytes), 0 hits, 0 requests, NaN recent hit rate, 0 save period in seconds

nodetool netstats - Print network information on provided host

    # nodetool netstats
    prtconf: devinfo facility not available
    Mode: NORMAL
    Not sending any streams.
    Read Repair Statistics:
    Attempted: 29
    Mismatch (Blocking): 0
    Mismatch (Background): 0
    Pool Name                    Active   Pending      Completed
    Commands                        n/a         1              0
    Responses                       n/a         0              0

Metadata keys

With the Apache Cassandra image are metadata keys that can be pre-defined during provision to provide additional customization to the instance.

Metadata Key Description
cassandra_cluster_name Apache Cassandra cluster name

Version 15.x.x

15.1.1

Name cassandra
Description A SmartOS 64-bit image that comes with Apache Cassandra (2.1.2) and OpenJDK7 (1.7.76) pre-installed and configured.
UUID 41856510-088e-11e5-aa02-4b4b4947e4b1
Based on base-64-lts
Pkgsrc 2015Q1
What's New In This Image
Software Included In This Image

Software installed as pkgsrc packages:

apache-cassandra-2.1.2
bzip2-1.0.6nb1
curl-7.42.0
db4-4.8.30
dtracetools-0.7
gcc47-libs-4.7.4nb1
gtar-base-1.28nb1
htop-1.0.1
nodejs-0.12.4
openssl-1.0.2a
perl-5.20.2
pkgin-0.8.0
postfix-2.11.4
python27-2.7.9nb1
smtools-20150312
sqlite3-3.8.10
sudo-1.7.10p9
unzip-6.0nb4
wget-1.16.3
zip-3.0nb2
zoneinit-1.6.8

Software installed as npm packages:

json@9.0.3
manta@1.5.1
smartdc@7.3.1

Version 14.x.x

14.4.0

Name cassandra
Description A SmartOS 64-bit image that comes with Apache Cassandra (2.1.2) and OpenJDK7 (1.7.71) pre-installed and configured.
UUID 7bef196a-cd76-11e4-940a-cfee7788b6c8
Based on base-64-lts
Pkgsrc 2014Q4
What's new in this image
Software included in this image

Software installed as pkgsrc packages:

apache-cassandra-2.1.2
bzip2-1.0.6nb1
curl-7.39.0nb1
db4-4.8.30
dtracetools-0.7
gcc47-libs-4.7.3nb7
gtar-base-1.28
htop-1.0.1
nodejs-0.12.0
openssl-1.0.1k
perl-5.20.1
pkgin-0.7.0
postfix-2.11.3
python27-2.7.9
smtools-20150226
sqlite3-3.8.7.4
sudo-1.7.10p9
unzip-6.0nb2
wget-1.16.1
zip-3.0nb2
zoneinit-1.6.8

Software installed as npm packages:

json@9.0.3
manta@1.5.0
smartdc@7.3.1

14.2.0

Name cassandra
Description A SmartOS 64-bit image that comes with Apache Cassandra (2.0.6) and OpenJDK7 (1.7.60) pre-installed and configured.
UUID 5c83d5ae-17f8-11e4-a658-73d42b8331cd
Based on base64 14.2.0
pkgsrc 2014Q2
What's new in this image
Software included in this image

Software installed as pkgsrc packages:

    apache-cassandra-2.0.6
    bzip2-1.0.6nb1
    curl-7.37.0nb1
    db4-4.8.30
    gcc47-libs-4.7.3nb4
    gtar-base-1.27.1nb1
    nodejs-0.10.29
    openssl-1.0.1h
    perl-5.20.0nb1
    pkgin-0.6.4nb7
    postfix-2.11.1nb1
    python27-2.7.7nb2
    smtools-20140728
    sqlite3-3.8.5
    sudo-1.7.10p8
    unzip-6.0nb1
    wget-1.15nb2
    zip-3.0nb2
    zoneinit-1.6.8

Software installed as npm packages

    jsontool@7.0.2
    manta@1.4.2
    smartdc@7.3.0

14.1.0

Name cassandra
Description A SmartOS 64-bit image that comes with Apache Cassandra (2.0.6) and OpenJDK7 (1.7.51) pre-installed and configured.
UUID e65e0c4c-dc4b-11e3-b843-93672a0b57d8
Based on base64 14.1.0
pkgsrc 2014Q1
What's new in this image
Software included in this image

Software installed as pkgsrc packages:

    apache-cassandra-2.0.6
    bzip2-1.0.6nb1
    curl-7.36.0
    db4-4.8.30
    duo-unix-1.9.7
    gcc47-libs-4.7.3nb3
    gtar-base-1.27.1nb1
    nodejs-0.10.28
    openssl-1.0.1g
    perl-5.18.2nb1
    pkgin-0.6.4nb5
    postfix-2.11.0nb1
    python27-2.7.6nb3
    smtools-20140509
    sqlite3-3.8.4.1
    sudo-1.7.10p8
    unzip-6.0nb1
    wget-1.15nb1
    zip-3.0nb2
    zoneinit-1.6.7

Software installed as npm packages

    jsontool@7.0.2
    manta@1.2.7
    smartdc@7.2.1

Version 13.x.x

13.1.0

Name cassandra
Description A SmartOS 64-bit image that comes with Apache Cassandra (1.2.4) and the Java JDK (1.6.0_26) pre-installed and configured.
UUID bae3f528-e01f-11e2-b2cb-1360087a7d5f
Based on base64 13.1.0
pkgsrc 2013Q1
What's new in this release
Software included in this release
    apache-cassandra-1.2.4
    bzip2-1.0.6
    gtar-base-1.26nb2
    nodejs-0.10.12
    openssl-1.0.1e
    pkgin-0.6.3.1.1
    postfix-2.9.6nb1
    python27-2.7.3nb3
    smtools-20130621
    sqlite3-3.7.15.2nb2
    sudo-1.7.10p7
    sun-jre6-6.0.26