Class PipeTaskInfo
java.lang.Object
org.apache.iotdb.confignode.persistence.pipe.PipeTaskInfo
- All Implemented Interfaces:
SnapshotProcessor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionalterPipe(AlterPipePlanV2 plan) booleanbooleanbooleancheckAndUpdateRequestBeforeAlterPipe(TAlterPipeReq alterPipeRequest) booleancheckBeforeCreatePipe(TCreatePipeReq createPipeRequest) voidcheckBeforeDropPipe(String pipeName) voidcheckBeforeStartPipe(String pipeName) voidcheckBeforeStopPipe(String pipeName) voidClear the exceptions of a pipe locally after it starts successfully.createPipe(CreatePipePlanV2 plan) longdropPipe(DropPipePlanV2 plan) booleanlonggetPipeMetaByPipeName(String pipeName) Handle the region leader change event and update the pipe task meta accordingly.voidinthashCode()booleanisEmpty()booleanisPipeExisted(String pipeName) booleanisPipeRunning(String pipeName) booleanisPipeStoppedByUser(String pipeName) booleanisStoppedByRuntimeException(String pipeName) voidprocessLoadSnapshot(File snapshotDir) booleanprocessTakeSnapshot(File snapshotDir) booleanRecord the exceptions of all pipes locally if they encountered failure when pushingPipeMetas to dataNodes.voidremovePipeMeta(String pipeName) longvoidsetIsStoppedByRuntimeExceptionToFalse(String pipeName) toString()voidCaller should ensure that the method is called in the lockacquireWriteLock().longvoidvalidatePipePluginUsageByPipe(String pluginName)
-
Constructor Details
-
PipeTaskInfo
public PipeTaskInfo()
-
-
Method Details
-
updateLastSyncedVersion
public void updateLastSyncedVersion()Caller should ensure that the method is called in the lockacquireWriteLock(). -
canSkipNextSync
public boolean canSkipNextSync() -
checkBeforeCreatePipe
- Throws:
PipeException
-
checkAndUpdateRequestBeforeAlterPipe
public boolean checkAndUpdateRequestBeforeAlterPipe(TAlterPipeReq alterPipeRequest) throws PipeException - Throws:
PipeException
-
checkBeforeStartPipe
- Throws:
PipeException
-
checkBeforeStopPipe
- Throws:
PipeException
-
checkBeforeDropPipe
-
isPipeExisted
-
isPipeRunning
-
isPipeStoppedByUser
-
validatePipePluginUsageByPipe
-
createPipe
-
operateMultiplePipes
-
alterPipe
-
setPipeStatus
-
dropPipe
-
showPipes
-
getPipeMetaList
-
getPipeMetaByPipeName
-
isEmpty
public boolean isEmpty() -
handleLeaderChange
Handle the region leader change event and update the pipe task meta accordingly. -
handleMetaChanges
- Parameters:
plan- The plan containing all thePipeMetas from leaderConfigNode- Returns:
TSStatusCode.SUCCESS_STATUS
-
isStoppedByRuntimeException
-
clearExceptionsAndSetIsStoppedByRuntimeExceptionToFalse
Clear the exceptions of a pipe locally after it starts successfully.If there are exceptions cleared or flag changed, the messages will then be updated to all the nodes through
PipeHandleMetaChangeProcedure.- Parameters:
pipeName- The name of the pipe to be clear exception
-
setIsStoppedByRuntimeExceptionToFalse
-
recordDataNodePushPipeMetaExceptions
Record the exceptions of all pipes locally if they encountered failure when pushingPipeMetas to dataNodes.If there are exceptions recorded, the related pipes will be stopped, and the exception messages will then be updated to all the nodes through
PipeHandleMetaChangeProcedure.- Parameters:
respMap- The responseMap after pushing pipe meta- Returns:
trueif there are exceptions encountered
-
autoRestart
public boolean autoRestart() -
handleSuccessfulRestart
public void handleSuccessfulRestart() -
removePipeMeta
-
processTakeSnapshot
- Specified by:
processTakeSnapshotin interfaceSnapshotProcessor- Throws:
IOException
-
processLoadSnapshot
- Specified by:
processLoadSnapshotin interfaceSnapshotProcessor- Throws:
IOException
-
hashCode
public int hashCode() -
equals
-
toString
-
runningPipeCount
public long runningPipeCount() -
droppedPipeCount
public long droppedPipeCount() -
userStoppedPipeCount
public long userStoppedPipeCount() -
exceptionStoppedPipeCount
public long exceptionStoppedPipeCount()
-