Class IgniteStatisticsInMemoryStoreImpl
- java.lang.Object
-
- org.apache.ignite.internal.processors.query.stat.IgniteStatisticsInMemoryStoreImpl
-
- All Implemented Interfaces:
IgniteStatisticsStore
public class IgniteStatisticsInMemoryStoreImpl extends Object implements IgniteStatisticsStore
Sql statistics storage in metastore. Will store all statistics related objects with prefix "stats." Store only partition level statistics.
-
-
Constructor Summary
Constructors Constructor Description IgniteStatisticsInMemoryStoreImpl(Function<Class<?>,IgniteLogger> logSupplier)Constructor.
-
Method Summary
-
-
-
Constructor Detail
-
IgniteStatisticsInMemoryStoreImpl
public IgniteStatisticsInMemoryStoreImpl(Function<Class<?>,IgniteLogger> logSupplier)
Constructor.- Parameters:
logSupplier- Logger getting function.
-
-
Method Detail
-
clearAllStatistics
public void clearAllStatistics()
Clear statistics of any type for any objects;- Specified by:
clearAllStatisticsin interfaceIgniteStatisticsStore
-
getAllLocalPartitionsStatistics
public Map<StatisticsKey,Collection<ObjectPartitionStatisticsImpl>> getAllLocalPartitionsStatistics(String schema)
Get all local partition statistics.- Specified by:
getAllLocalPartitionsStatisticsin interfaceIgniteStatisticsStore- Parameters:
schema- Schema name, ifnull- returl local partitions statistics for all schemas.- Returns:
- Map with all local partitions statistics.
-
replaceLocalPartitionsStatistics
public void replaceLocalPartitionsStatistics(StatisticsKey key, Collection<ObjectPartitionStatisticsImpl> statistics)
Replace all tables partition statistics with specified ones.- Specified by:
replaceLocalPartitionsStatisticsin interfaceIgniteStatisticsStore- Parameters:
key- Statistics key to replace statistics by.statistics- Collection of partition level statistics.
-
getLocalPartitionsStatistics
public Collection<ObjectPartitionStatisticsImpl> getLocalPartitionsStatistics(StatisticsKey key)
Get local partition statistics by specified object.- Specified by:
getLocalPartitionsStatisticsin interfaceIgniteStatisticsStore- Parameters:
key- Key to get statistics by.- Returns:
- Collection of partitions statistics.
-
clearLocalPartitionsStatistics
public void clearLocalPartitionsStatistics(StatisticsKey key)
Clear partition statistics for specified object.- Specified by:
clearLocalPartitionsStatisticsin interfaceIgniteStatisticsStore- Parameters:
key- Key to clear statistics by.
-
saveLocalPartitionStatistics
public void saveLocalPartitionStatistics(StatisticsKey key, ObjectPartitionStatisticsImpl statistics)
Save partition statistics.- Specified by:
saveLocalPartitionStatisticsin interfaceIgniteStatisticsStore- Parameters:
key- Object which partition statistics belongs to.statistics- Statistics to save.
-
saveObsolescenceInfo
public void saveObsolescenceInfo(Map<StatisticsKey,IntMap<ObjectPartitionStatisticsObsolescence>> obsolescence)
- Specified by:
saveObsolescenceInfoin interfaceIgniteStatisticsStore- Parameters:
obsolescence- Statistics key to partId to obsolescence info map to save.
-
saveObsolescenceInfo
public void saveObsolescenceInfo(StatisticsKey key, int partId, ObjectPartitionStatisticsObsolescence partObs)
Save obsolescence info.- Specified by:
saveObsolescenceInfoin interfaceIgniteStatisticsStore- Parameters:
key- Statistics key which it is belongs to.partId- Partition id.partObs- Info to save.
-
clearObsolescenceInfo
public void clearObsolescenceInfo(StatisticsKey key, Collection<Integer> partIds)
Remove obsolescence info for the given key and partitions (if specified).- Specified by:
clearObsolescenceInfoin interfaceIgniteStatisticsStore- Parameters:
key- Statistics key to remove obsolescense info by.partIds- Partition ids, ifnull- remove all partitions info for specified key.
-
loadAllObsolescence
public Map<StatisticsKey,IntMap<ObjectPartitionStatisticsObsolescence>> loadAllObsolescence()
Load all obsolescence info from store.- Specified by:
loadAllObsolescencein interfaceIgniteStatisticsStore- Returns:
- StatisticsKey to partitionId to obsolescence info map.
-
getLocalPartitionStatistics
public ObjectPartitionStatisticsImpl getLocalPartitionStatistics(StatisticsKey key, int partId)
Get partition statistics.- Specified by:
getLocalPartitionStatisticsin interfaceIgniteStatisticsStore- Parameters:
key- Key to get partition statistics by.partId- Partition id.- Returns:
- Object partition statistics or
nullif there are no statistics collected for such partition.
-
clearLocalPartitionStatistics
public void clearLocalPartitionStatistics(StatisticsKey key, int partId)
Clear partition statistics.- Specified by:
clearLocalPartitionStatisticsin interfaceIgniteStatisticsStore- Parameters:
key- Object which statistics needs to be cleaned.partId- Partition id.
-
clearLocalPartitionsStatistics
public void clearLocalPartitionsStatistics(StatisticsKey key, Collection<Integer> partIds)
Clear partitions statistics.- Specified by:
clearLocalPartitionsStatisticsin interfaceIgniteStatisticsStore- Parameters:
key- Object which statistics need to be cleaned.partIds- Collection of partition ids.
-
loadLocalPartitionMap
public Collection<Integer> loadLocalPartitionMap(StatisticsKey key)
Load partitions map by key.- Specified by:
loadLocalPartitionMapin interfaceIgniteStatisticsStore- Parameters:
key- Staistics key to load map by.- Returns:
- Collection of all partition ids for which there are local partitions statistics.
-
-