1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
| $ java -jar jmxterm-1.0.1-uber.jar --url localhost:7199 Welcome to JMX terminal. Type "help" for available commands. $>domain org.apache.cassandra.db #设置当前domain #domain is set to org.apache.cassandra.db $>bean org.apache.cassandra.db:columnfamily=image,keyspace=reis,type=ColumnFamilies #设置当前mbean #bean is set to org.apache.cassandra.db:columnfamily=image,keyspace=reis,type=ColumnFamilies $>info #显示当前mbean的信息 #mbean = org.apache.cassandra.db:columnfamily=image,keyspace=reis,type=ColumnFamilies #class name = org.apache.cassandra.db.ColumnFamilyStore # attributes %0 - AutoCompactionDisabled (boolean, r) %1 - BuiltIndexes (java.util.List, r) %2 - ColumnFamilyName (java.lang.String, r) %3 - CompactionParameters (java.util.Map, rw) %4 - CompactionParametersJson (java.lang.String, rw) %5 - CompactionStrategyClass (java.lang.String, rw) %6 - CompressionParameters (java.util.Map, rw) %7 - CrcCheckChance (double, w) %8 - DroppableTombstoneRatio (double, r) %9 - MaximumCompactionThreshold (int, rw) %10 - MinimumCompactionThreshold (int, rw) %11 - SSTableCountPerLevel (\[I, r) %12 - UnleveledSSTables (int, r) # operations %0 - void beginLocalSampling(java.lang.String p1,int p2) %1 - long estimateKeys() %2 - javax.management.openmbean.CompositeData finishLocalSampling(java.lang.String p1,int p2) %3 - void forceMajorCompaction(boolean p1) %4 - java.util.List getSSTablesForKey(java.lang.String p1) %5 - void loadNewSSTables() %6 - void setCompactionThresholds(int p1,int p2) %7 - long trueSnapshotsSize() #there's no notifications $>get CompactionStrategyClass # 查询compaction当前策略类 #mbean = org.apache.cassandra.db:columnfamily=mytable,keyspace=mykeyspace,type=ColumnFamilies: CompactionStrategyClass = org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy; $>set CompactionStrategyClass "org.apache.cassandra.db.compaction.LeveledCompactionStrategy" #设置compaction策略类为LCS #Value of attribute CompactionStrategyClass is set to "org.apache.cassandra.db.compaction.LeveledCompactionStrategy" $>get CompactionParametersJson #查询LCS的CompactionParametersJson参数 #mbean = org.apache.cassandra.db:columnfamily=image,keyspace=reis,type=ColumnFamilies: CompactionParametersJson = {"class":"LeveledCompactionStrategy","sstable_size_in_mb":"160"};
$>set CompactionParametersJson #设置LCS的CompactionParametersJson参数 \\{"class":"LeveledCompactionStrategy","sstable_size_in_mb":"200"\\} #Value of attribute CompactionParametersJson is set to {"class":"LeveledCompactionStrategy","sstable_size_in_mb":"200"}
|