Class SnapshotPartitionsQuickVerifyHandler
- java.lang.Object
-
- org.apache.ignite.internal.processors.cache.persistence.snapshot.SnapshotPartitionsVerifyHandler
-
- org.apache.ignite.internal.processors.cache.persistence.snapshot.SnapshotPartitionsQuickVerifyHandler
-
- All Implemented Interfaces:
SnapshotHandler<Map<PartitionKeyV2,PartitionHashRecordV2>>,Extension
public class SnapshotPartitionsQuickVerifyHandler extends SnapshotPartitionsVerifyHandler
Quick partitions verifier. Warns if partiton counters or size are different among the nodes what can be caused by canceled/failed DataStreamer. Skips checking if the DataStreamer warning is detected.
-
-
Field Summary
Fields Modifier and Type Field Description static StringWRN_MSG-
Fields inherited from class org.apache.ignite.internal.processors.cache.persistence.snapshot.SnapshotPartitionsVerifyHandler
cctx
-
-
Constructor Summary
Constructors Constructor Description SnapshotPartitionsQuickVerifyHandler(GridCacheSharedContext<?,?> cctx)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcomplete(String name, Collection<SnapshotHandlerResult<Map<PartitionKeyV2,PartitionHashRecordV2>>> results)Processing the results of theSnapshotHandler.invoke(SnapshotHandlerContext)method received from all nodes.Map<PartitionKeyV2,PartitionHashRecordV2>invoke(SnapshotHandlerContext opCtx)Local processing of a snapshot operation.protected booleanskipHash()Provides flag of full hash calculation.SnapshotHandlerTypetype()Snapshot handler type.-
Methods inherited from class org.apache.ignite.internal.processors.cache.persistence.snapshot.SnapshotPartitionsVerifyHandler
isPunchHoleEnabled
-
-
-
-
Field Detail
-
WRN_MSG
public static final String WRN_MSG
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SnapshotPartitionsQuickVerifyHandler
public SnapshotPartitionsQuickVerifyHandler(GridCacheSharedContext<?,?> cctx)
- Parameters:
cctx- Shared context.
-
-
Method Detail
-
type
public SnapshotHandlerType type()
Snapshot handler type.- Specified by:
typein interfaceSnapshotHandler<Map<PartitionKeyV2,PartitionHashRecordV2>>- Overrides:
typein classSnapshotPartitionsVerifyHandler
-
invoke
public Map<PartitionKeyV2,PartitionHashRecordV2> invoke(SnapshotHandlerContext opCtx) throws IgniteCheckedException
Local processing of a snapshot operation. Called on every node that contains snapshot data.- Specified by:
invokein interfaceSnapshotHandler<Map<PartitionKeyV2,PartitionHashRecordV2>>- Overrides:
invokein classSnapshotPartitionsVerifyHandler- Parameters:
opCtx- Snapshot handler context.- Returns:
- Result of local processing. This result will be returned in
SnapshotHandlerResult.data()method passed intoSnapshotHandler.complete(String, Collection)handler method. - Throws:
IgniteCheckedException
-
complete
public void complete(String name, Collection<SnapshotHandlerResult<Map<PartitionKeyV2,PartitionHashRecordV2>>> results) throws IgniteCheckedException
Processing the results of theSnapshotHandler.invoke(SnapshotHandlerContext)method received from all nodes. This method is called on coordinator node forSnapshotHandlerType.CREATEhandler type and on the random node containing the snapshot data forSnapshotHandlerType.RESTORE.Note: If this method fails, the entire cluster-wide snapshot operation will be aborted and the changes made by it will be rolled back.
- Specified by:
completein interfaceSnapshotHandler<Map<PartitionKeyV2,PartitionHashRecordV2>>- Overrides:
completein classSnapshotPartitionsVerifyHandler- Parameters:
name- Snapshot name.results- Results from all nodes.- Throws:
SnapshotWarningException- If a warning of snapshot operation occurred.IgniteCheckedException- See Also:
SnapshotHandlerResult
-
skipHash
protected boolean skipHash()
Provides flag of full hash calculation.- Overrides:
skipHashin classSnapshotPartitionsVerifyHandler- Returns:
Trueif full partition hash calculation is required.Falseotherwise.
-
-