public class IgniteStatisticsRepository extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
STAT_LOCAL_DATA_VIEW |
static String |
STAT_LOCAL_DATA_VIEW_DESC |
static String |
STAT_PART_DATA_VIEW |
static String |
STAT_PART_DATA_VIEW_DESC |
| Constructor and Description |
|---|
IgniteStatisticsRepository(IgniteStatisticsStore store,
GridSystemViewManager sysViewMgr,
IgniteStatisticsHelper helper,
Function<Class<?>,IgniteLogger> logSupplier)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static <T extends ObjectStatisticsImpl> |
add(T base,
T add)
Add new statistics into base one (with overlapping of existing data).
|
void |
addRowsModified(StatisticsKey key,
int partId,
byte[] changedKey)
Try to count modified to specified object and partition.
|
ObjectStatisticsImpl |
aggregatedLocalStatistics(Set<Integer> parts,
StatisticsObjectConfiguration cfg)
Scan local partitioned statistic and aggregate local statistic for specified statistic object.
|
void |
checkObsolescenceInfo(Map<StatisticsObjectConfiguration,Set<Integer>> cfg)
Load or update obsolescence info cache to fit specified cfg.
|
void |
clearLocalPartitionsStatistics(StatisticsKey key,
Set<String> colNames)
Clear partition statistics for specified object.
|
void |
clearLocalPartitionStatistics(StatisticsKey key,
int partId)
Clear partition statistics.
|
void |
clearLocalStatistics(StatisticsKey key)
Clear local object statistics.
|
void |
clearLocalStatistics(StatisticsKey key,
Set<String> colNames)
Clear local object statistics.
|
Collection<ObjectPartitionStatisticsImpl> |
getLocalPartitionsStatistics(StatisticsKey key)
Get local partition statistics by specified object.
|
ObjectPartitionStatisticsImpl |
getLocalPartitionStatistics(StatisticsKey key,
int partId)
Get partition statistics.
|
ObjectStatisticsImpl |
getLocalStatistics(StatisticsKey key)
Get local statistics.
|
void |
loadObsolescenceInfo(Map<StatisticsObjectConfiguration,Set<Integer>> cfg)
Load obsolescence info from local metastorage and cache it.
|
void |
refreshObsolescence(StatisticsKey key,
int partId)
Refresh statistics obsolescence after partition gathering.
|
void |
removeObsolescenceInfo(StatisticsKey key)
Remove statistics obsolescence info by the given key.
|
void |
replaceLocalPartitionStatistics(StatisticsKey key,
ObjectPartitionStatisticsImpl statistics)
Save specified local partition statistics.
|
void |
saveLocalPartitionsStatistics(StatisticsKey key,
Collection<ObjectPartitionStatisticsImpl> statistics)
Replace all object statistics with specified ones.
|
void |
saveLocalPartitionStatistics(StatisticsKey key,
ObjectPartitionStatisticsImpl statistics)
Save specified local partition statistics.
|
void |
saveLocalStatistics(StatisticsKey key,
ObjectStatisticsImpl statistics)
Save local object statistics.
|
Map<StatisticsKey,IntMap<ObjectPartitionStatisticsObsolescence>> |
saveObsolescenceInfo()
Save all modified obsolescence info to local metastorage.
|
void |
start()
Start repository.
|
IgniteStatisticsStore |
statisticsStore() |
void |
stop()
Stop repository.
|
static <T extends ObjectStatisticsImpl> |
subtract(T base,
Set<String> cols)
Remove specified columns from clone of base ObjectStatistics object.
|
void |
updateObsolescenceInfo(Map<StatisticsObjectConfiguration,Set<Integer>> cfg)
Update obsolescence info cache to fit specified cfg.
|
public static final String STAT_PART_DATA_VIEW
public static final String STAT_PART_DATA_VIEW_DESC
public static final String STAT_LOCAL_DATA_VIEW
public static final String STAT_LOCAL_DATA_VIEW_DESC
public IgniteStatisticsRepository(IgniteStatisticsStore store, GridSystemViewManager sysViewMgr, IgniteStatisticsHelper helper, Function<Class<?>,IgniteLogger> logSupplier)
store - Ignite statistics store to use.sysViewMgr - Grid system view manager.helper - IgniteStatisticsHelper.logSupplier - Ignite logger supplier to get logger from.public Collection<ObjectPartitionStatisticsImpl> getLocalPartitionsStatistics(StatisticsKey key)
key - Object to get statistics by.public void clearLocalPartitionsStatistics(StatisticsKey key, Set<String> colNames)
key - Object to clear statistics by.colNames - if specified - only statistics by specified columns will be cleared.public void saveLocalPartitionStatistics(StatisticsKey key, ObjectPartitionStatisticsImpl statistics)
key - Object key.statistics - Statistics to save.public void refreshObsolescence(StatisticsKey key, int partId)
key - Statistics key.partId - Partition id.public void replaceLocalPartitionStatistics(StatisticsKey key, ObjectPartitionStatisticsImpl statistics)
key - Object key.statistics - Statistics to save.public void saveLocalPartitionsStatistics(StatisticsKey key, Collection<ObjectPartitionStatisticsImpl> statistics)
key - Object key.statistics - Collection of tables partition statistics.public ObjectPartitionStatisticsImpl getLocalPartitionStatistics(StatisticsKey key, int partId)
key - Object key.partId - Partition id.null if there are no statistics collected for such partition.public void clearLocalPartitionStatistics(StatisticsKey key, int partId)
key - Object key.partId - Partition id.public void saveLocalStatistics(StatisticsKey key, ObjectStatisticsImpl statistics)
key - Object key.statistics - Statistics to save.public ObjectStatisticsImpl getLocalStatistics(StatisticsKey key)
key - Object key to load statistics by.null if there are no statistics collected for such object.public void clearLocalStatistics(StatisticsKey key)
key - Object key to clear local statistics by.public void clearLocalStatistics(StatisticsKey key, Set<String> colNames)
key - Object key to clear local statistics by.colNames - Only statistics by specified columns will be cleared.public IgniteStatisticsStore statisticsStore()
public static <T extends ObjectStatisticsImpl> T add(T base, T add)
T - Statistics type (partition or object one).base - Old statistics.add - Updated statistics.public static <T extends ObjectStatisticsImpl> T subtract(T base, Set<String> cols)
base - ObjectStatistics to remove columns from.cols - Columns to remove.public ObjectStatisticsImpl aggregatedLocalStatistics(Set<Integer> parts, StatisticsObjectConfiguration cfg)
parts - Partitions numbers to aggregate,cfg - Statistic configuration to specify statistic object to aggregate.public void stop()
public void start()
public void loadObsolescenceInfo(Map<StatisticsObjectConfiguration,Set<Integer>> cfg)
cfg - Partitions configuration.public void updateObsolescenceInfo(Map<StatisticsObjectConfiguration,Set<Integer>> cfg)
cfg - Obsolescence configuration.public void checkObsolescenceInfo(Map<StatisticsObjectConfiguration,Set<Integer>> cfg)
cfg - Map object statistics configuration to primary partitions set.public void addRowsModified(StatisticsKey key, int partId, byte[] changedKey)
key - Statistics key.partId - Partition id.changedKey - Changed key bytes.public Map<StatisticsKey,IntMap<ObjectPartitionStatisticsObsolescence>> saveObsolescenceInfo()
public void removeObsolescenceInfo(StatisticsKey key)
key - Statistics key to remove obsolescence info by.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 8.8.9 Release Date : September 29 2021