Class IgniteGlobalStatisticsManager
- java.lang.Object
-
- org.apache.ignite.internal.processors.query.stat.IgniteGlobalStatisticsManager
-
- All Implemented Interfaces:
EventListener,GridMessageListener
public class IgniteGlobalStatisticsManager extends Object implements GridMessageListener
Global statistics manager. Cache global statistics and collect it.
-
-
Constructor Summary
Constructors Constructor Description IgniteGlobalStatisticsManager(IgniteStatisticsManagerImpl statMgr, GridSystemViewManager sysViewMgr, IgniteThreadPoolExecutor mgmtPool, GridDiscoveryManager discoMgr, GridClusterStateProcessor cluster, GridCachePartitionExchangeManager<?,?> exchange, IgniteStatisticsHelper helper, GridIoManager ioMgr, Function<Class<?>,IgniteLogger> logSupplier)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearGlobalStatistics(StatisticsKey key, Set<String> colNames)Clear global object statistics.ObjectStatisticsImplgetGlobalStatistics(StatisticsKey key)Get global statistics for the given key.voidonConfigChanged(StatisticsObjectConfiguration cfg)Process statistics configuration changes: 1) Remove all outbound activity by specified key, inbound may be suspended due to lack of requested configuration. 2) Remove all inbound activity by changed key if reqiest col cfg versions lower than configuration col cfg versions. 3.1) If there are no live column's config - remove cached global statistics. 3.2) If there are some live columns config and global statistics cache contains statistics for the given key - start to collect it again.voidonLocalStatisticsAggregated(StatisticsKey key, ObjectStatisticsImpl statistics, AffinityTopologyVersion topVer)After collecting local statistics - check if there are some pending request for it and send responces.voidonMessage(UUID nodeId, Object msg, byte plc)Notification for received messages.voidstart()Start operations.voidstop()Stop operations.
-
-
-
Constructor Detail
-
IgniteGlobalStatisticsManager
public IgniteGlobalStatisticsManager(IgniteStatisticsManagerImpl statMgr, GridSystemViewManager sysViewMgr, IgniteThreadPoolExecutor mgmtPool, GridDiscoveryManager discoMgr, GridClusterStateProcessor cluster, GridCachePartitionExchangeManager<?,?> exchange, IgniteStatisticsHelper helper, GridIoManager ioMgr, Function<Class<?>,IgniteLogger> logSupplier)
Constructor.- Parameters:
statMgr- Statistics manager.sysViewMgr- System view manager.mgmtPool- Statistics management pool.discoMgr- Grid discovery manager.cluster- Cluster state processor.exchange- Partition exchange manager.helper- Statistics helper.ioMgr- Communication manager.logSupplier- Log supplier.
-
-
Method Detail
-
start
public void start()
Start operations. Shouldn't be called twice.
-
stop
public void stop()
Stop operations. Shouldn't be called twice.
-
getGlobalStatistics
public ObjectStatisticsImpl getGlobalStatistics(StatisticsKey key)
Get global statistics for the given key. If there is no cached statistics, but there is cache record with empty object - no additional collection will be started.- Parameters:
key- Statistics key.- Returns:
- Global object statistics or
nullif there is no global statistics available.
-
onMessage
public void onMessage(UUID nodeId, Object msg, byte plc)
Notification for received messages.- Specified by:
onMessagein interfaceGridMessageListener- Parameters:
nodeId- ID of node that sent the message. Note that may have already left topology by the time this message is received.msg- Message received.plc- Message policy (pool).
-
onConfigChanged
public void onConfigChanged(StatisticsObjectConfiguration cfg)
Process statistics configuration changes: 1) Remove all outbound activity by specified key, inbound may be suspended due to lack of requested configuration. 2) Remove all inbound activity by changed key if reqiest col cfg versions lower than configuration col cfg versions. 3.1) If there are no live column's config - remove cached global statistics. 3.2) If there are some live columns config and global statistics cache contains statistics for the given key - start to collect it again.
-
clearGlobalStatistics
public void clearGlobalStatistics(StatisticsKey key, Set<String> colNames)
Clear global object statistics.- Parameters:
key- Object key to clear global statistics by.colNames- Only statistics by specified columns will be cleared.
-
onLocalStatisticsAggregated
public void onLocalStatisticsAggregated(StatisticsKey key, ObjectStatisticsImpl statistics, AffinityTopologyVersion topVer)
After collecting local statistics - check if there are some pending request for it and send responces.- Parameters:
key- Statistics key on which local statistics was aggregated.statistics- Collected statistics by key.topVer- Topology version which aggregated statistics stands for.
-
-