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 Modifier and Type Class Description static classIdleVerifyUtility.IdleCheckerIdle checker.static classIdleVerifyUtility.VerifyPartitionContext
-
Field Summary
Fields Modifier and Type Field Description static StringGRID_NOT_IDLE_MSGCluster not idle message.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static @Nullable PartitionHashRecordV2calculatePartitionHash(PartitionKeyV2 partKey, Object updCntr, Object consId, GridDhtPartitionState state, boolean isPrimary, long partSize, GridIterator<CacheDataRow> it)static voidcheckPartitionsPageCrcSum(IgniteThrowableSupplier<FilePageStore> pageStoreSup, int partId, byte pageType)Checks CRC sum of pages withpageTypepage type stored in partition withpartIdid and associated with cache group.static voidcheckPartitionsPageCrcSum(IgniteThrowableSupplier<FilePageStore> pageStoreSup, int partId, byte pageType, @Nullable BiConsumer<Long,ByteBuffer> pagePostProc)Checks CRC sum of pages withpageTypepage type stored in partition withpartIdid and associated with cache group.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 StringformatUpdateCountersDiff(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.
-
-
-
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(IgniteThrowableSupplier<FilePageStore> pageStoreSup, int partId, byte pageType)
Checks CRC sum of pages withpageTypepage type stored in partition withpartIdid and associated with cache group.- Parameters:
pageStoreSup- Page store supplier.partId- Partition id.pageType- Page type. Possible typesPageIdAllocator.FLAG_DATA,PageIdAllocator.FLAG_IDXandPageIdAllocator.FLAG_AUX.
-
checkPartitionsPageCrcSum
public static void checkPartitionsPageCrcSum(IgniteThrowableSupplier<FilePageStore> pageStoreSup, int partId, byte pageType, @Nullable @Nullable BiConsumer<Long,ByteBuffer> pagePostProc)
Checks CRC sum of pages withpageTypepage type stored in partition withpartIdid and associated with cache group.- Parameters:
pageStoreSup- Page store supplier.partId- Partition id.pageType- Page type. Possible typesPageIdAllocator.FLAG_DATA,PageIdAllocator.FLAG_IDXandPageIdAllocator.FLAG_AUX.pagePostProc- Page post processor closure.
-
getUpdateCountersSnapshot
public static Map<Integer,Map<Integer,PartitionUpdateCounter>> getUpdateCountersSnapshot(IgniteEx ign, Set<Integer> grpIds)
Gather updateCounters info. HoldsPartitionUpdateCounter.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.
-
calculatePartitionHash
@Nullable public static @Nullable PartitionHashRecordV2 calculatePartitionHash(PartitionKeyV2 partKey, Object updCntr, Object consId, GridDhtPartitionState state, boolean isPrimary, long partSize, GridIterator<CacheDataRow> it) throws IgniteCheckedException
- Parameters:
partKey- Partition key.updCntr- Partition update counter prior check.consId- Local node consistent id.state- Partition state to check.isPrimary-trueif partition is primary.partSize- Partition size on disk.it- Iterator though partition data rows.- Returns:
- Map of calculated partition.
- Throws:
IgniteCheckedException- If fails.
-
-