Package org.apache.cassandra.metrics
Class SamplingManager
- java.lang.Object
-
- org.apache.cassandra.metrics.SamplingManager
-
public class SamplingManager extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SamplingManager.ResultBuilder
-
Constructor Summary
Constructors Constructor Description SamplingManager()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.String>
allJobs()
static java.lang.String
formatResult(SamplingManager.ResultBuilder resultBuilder)
static java.lang.Iterable<ColumnFamilyStore>
getTables(java.lang.String ks, java.lang.String table)
boolean
register(java.lang.String ks, java.lang.String table, int duration, int interval, int capacity, int count, java.util.List<java.lang.String> samplers)
Register the samplers for the keyspace and table.boolean
unregister(java.lang.String ks, java.lang.String table)
-
-
-
Method Detail
-
formatResult
public static java.lang.String formatResult(SamplingManager.ResultBuilder resultBuilder)
-
getTables
public static java.lang.Iterable<ColumnFamilyStore> getTables(java.lang.String ks, java.lang.String table)
-
register
public boolean register(java.lang.String ks, java.lang.String table, int duration, int interval, int capacity, int count, java.util.List<java.lang.String> samplers)
Register the samplers for the keyspace and table.- Parameters:
ks
- Keyspace. Nullable. If null, the scheduled sampling is on all keyspaces and tablestable
- Nullable. If null, the scheduled sampling is on all tables of the specified keyspaceduration
- Duration of each scheduled sampling job in millisecondsinterval
- Interval of each scheduled sampling job in millisecondscapacity
- Capacity of the sampler, higher for more accuracycount
- Number of the top samples to listsamplers
- a list of samplers to enable- Returns:
- true if the scheduled sampling is started successfully. Otherwise return fasle
-
unregister
public boolean unregister(java.lang.String ks, java.lang.String table)
-
allJobs
public java.util.List<java.lang.String> allJobs()
-
-