Revision as of 23:25, March 7, 2016 by Sschlich (talk | contribs)
Jump to: navigation, search

Maintaining your Cassandra database

You should perform regular maintenance on your Feature Server Cassandra database, to be certain that the database and its backups are all in sync. When any of these events occur, run the corresponding maintenance software routine:

Run weekly on all Feature Server nodes

You can perform this procedure:

STEVE ASKS: Are machine and site names and directories phony? They must be.

cd /genesys/fs/work/jetty0.0.0.08080fs.
war_
fsany/
webapp/WEBINF/
lib
java cp
libthrift0.7.0.
jar:cassandrathrift1.1.6.
jar:commonscli1.1.
jar:cassandraall1.1.6.
jar org.apache.cassandra.tools.NodeCmd h
localhost p
9192 repair

Run after a Feature Server restart

You can trigger a restart by adding or removing Feature Server nodes, in a new or existing data center.

STEVE ASKS: How do I run this procedure: Command line? app?

cd /genesys/fs/work/jetty0.0.0.08080fs.
war_
fsany/
webapp/WEBINF/
lib
java cp
libthrift0.7.0.
jar:cassandrathrift1.1.6.
jar:commonscli1.1.
jar:cassandraall1.1.6.
jar org.apache.cassandra.tools.NodeCmd h
localhost p
9192 repair

Ring Maintenance

When you remove a node from the ring, you must also remove the corresponding tokens. Use these software procedures:

STEVE ASKS: How do these procedures know which Cassandra database to modify?

Run nodetool ring to obtain tokens

java cp
libthrift0.7.0.
jar:cassandrathrift1.1.6.
jar:commonscli1.1.
jar:cassandraall1.1.6.
jar org.apache.cassandra.tools.NodeCmd h
localhost p
9192 ring
10.51.29.117 usw1 RAC2 Up Normal 1.29 MB 100.00% 26003787676682001822918611294472056316
10.51.28.221 usw1 RAC1 Up Normal 1.17 MB 66.65% 167086018864645871692761019448293152722
10.52.89.189 aps2 RAC1 Down Normal 1.15 MB 25.90% 41007983964572150951275225962045789866
10.52.88.190 aps2 RAC2 Down Normal 1.16 MB 7.45% 53685600614278234503162023330018045221

Run nodetool removetoken to remove nodes from the ring

java cp
libthrift0.7.0.
jar:cassandrathrift1.1.6.
jar:commonscli1.1.
jar:cassandraall1.1.6.
jar org.apache.cassandra.tools.NodeCmd h
localhost p
9192 removetoken53685600614278234503162023330018045221
java cp
libthrift0.7.0.
jar:cassandrathrift1.1.6.
jar:commonscli1.1.
jar:cassandraall1.1.6.
jar org.apache.cassandra.tools.NodeCmd h
localhost p
9192 removetoken41007983964572150951275225962045789866

Run nodetool repair

java cp
libthrift0.7.0.
jar:cassandrathrift1.1.6.
jar:commonscli1.1.
jar:cassandraall1.1.6.
jar org.apache.cassandra.tools.NodeCmd h
localhost p
9192 repair

Run nodetool ring to validate updated topology

java cp
libthrift0.7.0.
jar:cassandrathrift1.1.6.
jar:commonscli1.1.
jar:cassandraall1.1.6.
jar org.apache.cassandra.tools.NodeCmd h
localhost p
9192 ring sipfs
10.51.29.117 usw1 RAC2 Up Normal 1.31 MB 100.00% 26003787676682001822918611294472056316
10.51.28.221 usw1 RAC1 Up Normal 1.3 MB 100.00% 167086018864645871692761019448293152722



Nodetool is a Cassandra utility embedded in Feature Server. To run it, first change directories to
<Feature Server Installation Directory>/work/jetty-<vms_host>-<port>-fs.war-_fs-any-/webapp/WEB-INF/lib Example: xxxxxxxxxx/fs/work/jetty-0.0.0.0-8080-fs.war-_fs-any-/webapp/WEB-INF/lib

Feature Server has Cassandra embedded, so running nodetool on Feature Server requires a specific steps. 1. Change directory to <Feature Server Installation Directory>/work/jetty-<vms_host>-<port>-fs.war-_fs-any-/webapp/WEB-INF/lib

<Feature Server Installation Directory> - This is directory where Feature Server is installed, e.g. genesys/fs <vms_host> This is vms_host parameter Feature Server started with, 0.0.0.0 is a default value <port> This is vms_port parameter Feature Server started with, 8080 is a default value

As a result, user has change directory as following cd genesys/fs/work/jetty-0.0.0.0-8080-fs.war-_fs-any-/webapp/WEB-INF/lib

2. After that user can actually run nodetool utility by issuing the following command java -cp libthrift-0.7.0.jar:cassandra-thrift-1.1.6.jar:commons-cli-1.1.jar:cassandra-all-1.1.6.jar org.apache.cassandra.tools.NodeCmd -h localhost -p 9192 <nodetool command>

<nodetool command> can be flush, repair, ring [keyspace name], etc.
Comments or questions about this documentation? Contact us for support!