Class SamplingManager


  • public class SamplingManager
    extends java.lang.Object
    • 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)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SamplingManager

        public SamplingManager()
    • Method Detail

      • 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 tables
        table - Nullable. If null, the scheduled sampling is on all tables of the specified keyspace
        duration - Duration of each scheduled sampling job in milliseconds
        interval - Interval of each scheduled sampling job in milliseconds
        capacity - Capacity of the sampler, higher for more accuracy
        count - Number of the top samples to list
        samplers - 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()