Class IgniteStatisticsHelper


  • public class IgniteStatisticsHelper
    extends Object
    Utility methods to statistics messages generation.
    • Constructor Detail

      • IgniteStatisticsHelper

        public IgniteStatisticsHelper​(UUID locNodeId,
                                      SchemaManager schemaMgr,
                                      Function<Class<?>,​IgniteLogger> logSupplier)
        Constructor.
        Parameters:
        locNodeId - Local node id.
        schemaMgr - Schema manager.
        logSupplier - Ignite logger supplier to get logger from.
    • Method Detail

      • aggregateLocalStatistics

        public ObjectStatisticsImpl aggregateLocalStatistics​(StatisticsObjectConfiguration cfg,
                                                             Collection<? extends ObjectStatisticsImpl> stats)
        Aggregate specified partition level statistics to local level statistics.
        Parameters:
        cfg - Statistics object configuration.
        stats - Collection of all local partition level or local level statistics by specified key to aggregate.
        Returns:
        Local level aggregated statistics.
      • calculateRowCount

        public static long calculateRowCount​(StatisticsObjectConfiguration cfg,
                                             long actualRowCnt)
        Calculate effective row count. If there are some overrides in statistics configuration - maximum value will be choosen. If not - will return actualRowCnt.
        Parameters:
        cfg - Statistics configuration to dig overrides row count from.
        actualRowCnt - Actual row count.
        Returns:
        Effective row count.
      • buildDefaultConfigurations

        public static StatisticsObjectConfiguration[] buildDefaultConfigurations​(StatisticsTarget... targets)
        Build object configurations array with all default parameters from specified targets.
        Parameters:
        targets - Targets to build configurations from.
        Returns:
        StatisticsObjectConfiguration array.
      • filterColumns

        public static List<T2<Integer,​String>> filterColumns​(GridQueryTypeDescriptor typeDescriptor,
                                                                   @Nullable
                                                                   @Nullable Collection<String> colNames)
        Filter columns by specified names.
        Parameters:
        typeDescriptor - Table descriptor.
        colNames - Column names.
        Returns:
        Column with specified names.