org.apache.ignite.internal.processors.cache.verify

## Class IdleVerifyUtility

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.verify.IdleVerifyUtility

    public class IdleVerifyUtility
    extends Object

Utility class for idle verify command.

### Nested Class Summary

Nested Classes
`static class` `IdleVerifyUtility.IdleChecker` Idle checker.

### Field Summary

Fields
`static String` `GRID_NOT_IDLE_MSG` Cluster not idle message.

### Method Summary

All Methods Static Methods Concrete Methods
`static void` `checkPartitionsPageCrcSum(FilePageStore pageStore, CacheGroupContext grpCtx, int partId, byte pageType)` Checks CRC sum of pages with `pageType` page type stored in partiion with `partId` id and assosiated with cache group.
`static void` `checkPartitionsPageCrcSum(@Nullable FilePageStoreManager pageStoreMgr, CacheGroupContext grpCtx, int partId, byte pageType)` See `checkPartitionsPageCrcSum(FilePageStore, CacheGroupContext, int, byte)`.
`static List<Integer>` `compareUpdateCounters(IgniteEx ign, Map<Integer,Map<Integer,PartitionUpdateCounter>> cntrsIn, Integer grpId)` Compares two sets with partitions and upd counters per group distribution.
`static List<Integer>` `compareUpdateCounters(IgniteEx ign, Map<Integer,Map<Integer,PartitionUpdateCounter>> cntrsEth, Map<Integer,Map<Integer,PartitionUpdateCounter>> curCntrs)` Compares two sets with partitions and upd counters per group distribution.
`static String` `formatUpdateCountersDiff(IgniteEx ig, List<Integer> diff)` Prints diff between incoming update counters snapshots.
`static Map<Integer,Map<Integer,PartitionUpdateCounter>>` `getUpdateCountersSnapshot(IgniteEx ign, Set<Integer> grpIds)` Gather updateCounters info.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### GRID_NOT_IDLE_MSG

    public static final String GRID_NOT_IDLE_MSG

Cluster not idle message.

See Also:
  Constant Field Values

### Method Detail

#### checkPartitionsPageCrcSum

    public static void checkPartitionsPageCrcSum(@Nullable
                                                 @Nullable FilePageStoreManager pageStoreMgr,
                                                 CacheGroupContext grpCtx,
                                                 int partId,
                                                 byte pageType)
                                          throws IgniteCheckedException,
                                                 GridNotIdleException

See `checkPartitionsPageCrcSum(FilePageStore, CacheGroupContext, int, byte)`.

Throws:
  `IgniteCheckedException`
  `GridNotIdleException`

#### checkPartitionsPageCrcSum

    public static void checkPartitionsPageCrcSum(FilePageStore pageStore,
                                                 CacheGroupContext grpCtx,
                                                 int partId,
                                                 @Deprecated
                                                 byte pageType)
                                          throws IgniteCheckedException,
                                                 GridNotIdleException

Checks CRC sum of pages with `pageType` page type stored in partiion with `partId` id and assosiated with cache group.
Method could be invoked only on idle cluster!

Parameters:
  `pageStore` - Page store.
  `grpCtx` - Passed cache group context.
  `partId` - Partition id.
  `pageType` - Page type. Possible types `PageIdAllocator.FLAG_DATA`, `PageIdAllocator.FLAG_IDX` and `PageIdAllocator.FLAG_AUX`.
Throws:
  `IgniteCheckedException` - If reading page failed.
  `GridNotIdleException` - If cluster not idle.

#### getUpdateCountersSnapshot

    public static Map<Integer,Map<Integer,PartitionUpdateCounter>> getUpdateCountersSnapshot(IgniteEx ign,
                                                                                             Set<Integer> grpIds)

Gather updateCounters info. Holds `PartitionUpdateCounter.copy()` of update counters.

Parameters:
  `ign` - Ignite instance.
  `grpIds` - Group Id`s.
Returns:
  Current groups distribution with update counters per partitions.

#### formatUpdateCountersDiff

    public static String formatUpdateCountersDiff(IgniteEx ig,
                                                  List<Integer> diff)

Prints diff between incoming update counters snapshots.

Parameters:
  `ig` - Ignite instance.
  `diff` - Compared groups diff.
Returns:
  Formatted diff representation.

#### compareUpdateCounters

    public static List<Integer> compareUpdateCounters(IgniteEx ign,
                                                      Map<Integer,Map<Integer,PartitionUpdateCounter>> cntrsIn,
                                                      Integer grpId)

Compares two sets with partitions and upd counters per group distribution.

Parameters:
  `ign` - Ignite instance.
  `cntrsIn` - Group id`s with counters per partitions per groups distribution.
  `grpId` - Group id to compare.
Returns:
  Diff with grpId info between two sets.

#### compareUpdateCounters

    public static List<Integer> compareUpdateCounters(IgniteEx ign,
                                                      Map<Integer,Map<Integer,PartitionUpdateCounter>> cntrsEth,
                                                      Map<Integer,Map<Integer,PartitionUpdateCounter>> curCntrs)

Compares two sets with partitions and upd counters per group distribution.

Parameters:
  `ign` - Ignite instance.
  `cntrsEth` - Ethalon group id`s with counters per partitions per groups distribution.
  `curCntrs` - Group id`s with counters per partitions per groups distribution compare with.
Returns:
  Diff with grpId info between two sets.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.10.0
Release Date | : March 10 2021