Class IgniteStatisticsManagerImpl

    • Constructor Detail

      • IgniteStatisticsManagerImpl

        public IgniteStatisticsManagerImpl​(GridKernalContext ctx)
        Constructor.
        Parameters:
        ctx - Kernal context.
    • Method Detail

      • getLocalStatistics

        public ObjectStatisticsImpl getLocalStatistics​(StatisticsKey key,
                                                       AffinityTopologyVersion topVer)
        Get local statitsics with specified topology version if exists.
        Parameters:
        key - Key to get statistics by.
        topVer - Required topology version.
        Returns:
        Local object statistics or null if there are no statistics with requested topology version.
      • onRowUpdated

        public void onRowUpdated​(String schemaName,
                                 String objName,
                                 int partId,
                                 byte[] keyBytes)
        To track statistics invalidation. Skip value if no statistics for the given table exists.
        Specified by:
        onRowUpdated in interface IgniteStatisticsManager
        Parameters:
        schemaName - Schema name.
        objName - Object name.
        partId - Partition id.
        keyBytes - Row key bytes.
      • processObsolescence

        public void processObsolescence()
        Save dirty obsolescence info to local metastore. Check if statistics need to be refreshed and schedule it. 1) Get all dirty partition statistics. 2) Make separate tasks for each key to avoid saving obsolescence info for removed partition (race). 3) Check if partition should be recollected and add it to list in its tables task. 4) Submit tasks. Actually obsolescence info will be stored during task processing.
      • subscribeToLocalStatistics

        public void subscribeToLocalStatistics​(Consumer<ObjectStatisticsEvent> subscriber)
        Subscribe to all local statistics changes.
        Parameters:
        subscriber - Local statitics subscriber.
      • subscribeToStatisticsConfig

        public void subscribeToStatisticsConfig​(Consumer<StatisticsObjectConfiguration> subscriber)
        Subscribe to all statistics configuration changed.
        Parameters:
        subscriber - Statistics configuration subscriber.
      • ensureActive

        public void ensureActive​(String op)
        Check that cluster is active.
        Parameters:
        op - Operation name.