Revision as of 01:17, March 1, 2016 by Sschlich (talk | contribs) (Created page with "=Maintaining your Cassandra database= __NOTOC__ Feature Server Cassandra database needs regular maintenance, to be certain that the database and its backups are all in sync. T...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Maintaining your Cassandra database

Feature Server Cassandra database needs regular maintenance, to be certain that the database and its backups are all in sync. These events are triggers for running themaintanance software routines:

  • A week has passed.
  • After a Feature Server restart caused by an upgrade.
  • After adding or removing new nodes to the ring.

====Weekly on all Feature Server nodes====

You can perform this procedure:

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

After a Feature Server restart caused by adding or removing Feature Server nodes in new or existing data center

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

If you remove a node, you must also remove the corresponding tokens. Use these two software routines:

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 remove token to remove nodes from 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
Comments or questions about this documentation? Contact us for support!