Cassandra

From Anthony Pastor Wiki Notes - Verba volant, scripta manent
Revision as of 17:24, 26 April 2016 by Anthoanthop (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Change Compaction Strategy for a single node

You've to do deal with JMX:

root@myserver[PROD:172.16.20.4]:~$ java -jar jmxterm-1.0-alpha-4-uber.jargl

$>open localhost:7199   
#Connection to localhost:7199 is opened

$>domain org.apache.cassandra.db
#domain is set to org.apache.cassandra.db

$>bean org.apache.cassandra.db:columnfamily=viewer,keyspace=delivery_engine,type=ColumnFamilies
#bean is set to org.apache.cassandra.db:columnfamily=viewer,keyspace=delivery_engine,type=ColumnFamilies

$>get CompactionStrategyClass
#mbean = org.apache.cassandra.db:columnfamily=viewer,keyspace=delivery_engine,type=ColumnFamilies:
CompactionStrategyClass = org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy;

$>set CompactionStrategyClass "org.apache.cassandra.db.compaction.LeveledCompactionStrategy"
#Value of attribute CompactionStrategyClass is set to "org.apache.cassandra.db.compaction.LeveledCompactionStrategy"

$>get CompactionStrategyClass                                                               
#mbean = org.apache.cassandra.db:columnfamily=viewer,keyspace=delivery_engine,type=ColumnFamilies:
CompactionStrategyClass = org.apache.cassandra.db.compaction.LeveledCompactionStrategy;