Class DataNodeRegionTaskExecutor<Q,R>
java.lang.Object
org.apache.iotdb.confignode.procedure.impl.schema.DataNodeRegionTaskExecutor<Q,R>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ConfigManagerprotected final BiFunction<TDataNodeLocation,List<TConsensusGroupId>, Q> protected final CnToDnAsyncRequestTypeprotected final booleanprotected final Map<TConsensusGroupId,TRegionReplicaSet> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDataNodeRegionTaskExecutor(ConfigManager configManager, Map<TConsensusGroupId, TRegionReplicaSet> targetRegionGroup, boolean executeOnAllReplicaset, CnToDnAsyncRequestType dataNodeRequestType, BiFunction<TDataNodeLocation, List<TConsensusGroupId>, Q> dataNodeRequestGenerator) protectedDataNodeRegionTaskExecutor(ConfigNodeProcedureEnv env, Map<TConsensusGroupId, TRegionReplicaSet> targetRegionGroup, boolean executeOnAllReplicaset, CnToDnAsyncRequestType dataNodeRequestType, BiFunction<TDataNodeLocation, List<TConsensusGroupId>, Q> dataNodeRequestGenerator) -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidprotected abstract voidonAllReplicasetFailure(TConsensusGroupId consensusGroupId, Set<TDataNodeLocation> dataNodeLocationSet) When all replicas failed on executing given task, the process defined by subclass will be executed.protected abstract List<TConsensusGroupId>processResponseOfOneDataNode(TDataNodeLocation dataNodeLocation, List<TConsensusGroupId> consensusGroupIdList, R response) The subclass could process response of given DataNode and should return the group id of region with execution failure.
-
Field Details
-
configManager
-
targetRegionGroup
-
executeOnAllReplicaset
protected final boolean executeOnAllReplicaset -
dataNodeRequestType
-
dataNodeRequestGenerator
-
-
Constructor Details
-
DataNodeRegionTaskExecutor
protected DataNodeRegionTaskExecutor(ConfigManager configManager, Map<TConsensusGroupId, TRegionReplicaSet> targetRegionGroup, boolean executeOnAllReplicaset, CnToDnAsyncRequestType dataNodeRequestType, BiFunction<TDataNodeLocation, List<TConsensusGroupId>, Q> dataNodeRequestGenerator) -
DataNodeRegionTaskExecutor
protected DataNodeRegionTaskExecutor(ConfigNodeProcedureEnv env, Map<TConsensusGroupId, TRegionReplicaSet> targetRegionGroup, boolean executeOnAllReplicaset, CnToDnAsyncRequestType dataNodeRequestType, BiFunction<TDataNodeLocation, List<TConsensusGroupId>, Q> dataNodeRequestGenerator)
-
-
Method Details
-
interruptTask
protected final void interruptTask() -
processResponseOfOneDataNode
protected abstract List<TConsensusGroupId> processResponseOfOneDataNode(TDataNodeLocation dataNodeLocation, List<TConsensusGroupId> consensusGroupIdList, R response) The subclass could process response of given DataNode and should return the group id of region with execution failure. -
onAllReplicasetFailure
protected abstract void onAllReplicasetFailure(TConsensusGroupId consensusGroupId, Set<TDataNodeLocation> dataNodeLocationSet) When all replicas failed on executing given task, the process defined by subclass will be executed.
-