Class TsFilePipe
- java.lang.Object
-
- org.apache.iotdb.db.sync.sender.pipe.TsFilePipe
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.iotdb.db.sync.sender.pipe.Pipe
Pipe.PipeStatus
-
-
Constructor Summary
Constructors Constructor Description TsFilePipe(long createTime, java.lang.String name, PipeSink pipeSink, long dataStartTime, boolean syncDelOp)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close this pipe, stop collecting data from IoTDB, but do not delete information about this pipe on disk.voidcollectRealTimeDeletion(Deletion deletion, java.lang.String sgName)voidcollectRealTimeResource(java.io.File tsFile)voidcollectRealTimeTsFile(java.io.File tsFile)voidcommit()Used for ISyncClient to commit all PipeDatas which are taken but not be committed yet.voidcommit(long serialNumber)java.io.FilecreateHistoryTsFileHardlink(java.io.File tsFile, long modsOffset)voiddeleteSyncManager(java.lang.String dataRegionId)voiddrop()Drop this pipe, delete all information about this pipe on disk.booleanequals(java.lang.Object o)longgetCreateTime()Get the creation time of this pipe with unit of IoTDBConfig.getTimestampPrecision() .java.lang.StringgetName()Get the name of this pipe.ISyncManagergetOrCreateSyncManager(java.lang.String dataRegionId)Get ISyncManager by dataRegionId.PipeSinkgetPipeSink()Get the PipeSink of this pipe.Pipe.PipeStatusgetStatus()Get the Pipe.PipeStatus of this pipe.inthashCode()java.util.List<PipeData>pull(long serialNumber)voidstart()Start this pipe, so it can collect data from IoTDB continuously.voidstop()Stop this pipe, but it will not stop collecting data from IoTDB.PipeDatatake()transport data *java.lang.StringtoString()
-
-
-
Constructor Detail
-
TsFilePipe
public TsFilePipe(long createTime, java.lang.String name, PipeSink pipeSink, long dataStartTime, boolean syncDelOp)
-
-
Method Detail
-
start
public void start() throws PipeExceptionDescription copied from interface:PipeStart this pipe, so it can collect data from IoTDB continuously.- Specified by:
startin interfacePipe- Throws:
PipeException- This pipe is dropped or some inside error happens.
-
createHistoryTsFileHardlink
public java.io.File createHistoryTsFileHardlink(java.io.File tsFile, long modsOffset)
-
collectRealTimeDeletion
public void collectRealTimeDeletion(Deletion deletion, java.lang.String sgName)
-
collectRealTimeTsFile
public void collectRealTimeTsFile(java.io.File tsFile)
-
collectRealTimeResource
public void collectRealTimeResource(java.io.File tsFile)
-
take
public PipeData take() throws java.lang.InterruptedException
transport data *
-
pull
public java.util.List<PipeData> pull(long serialNumber)
-
commit
public void commit()
Description copied from interface:PipeUsed for ISyncClient to commit all PipeDatas which are taken but not be committed yet.
-
getOrCreateSyncManager
public ISyncManager getOrCreateSyncManager(java.lang.String dataRegionId)
Description copied from interface:PipeGet ISyncManager by dataRegionId. If ISyncManager does not exist, it will be created automatically.- Specified by:
getOrCreateSyncManagerin interfacePipe- Parameters:
dataRegionId- string of DataRegionId- Returns:
- ISyncManager
-
deleteSyncManager
public void deleteSyncManager(java.lang.String dataRegionId)
- Specified by:
deleteSyncManagerin interfacePipe
-
commit
public void commit(long serialNumber)
-
stop
public void stop() throws PipeExceptionDescription copied from interface:PipeStop this pipe, but it will not stop collecting data from IoTDB.- Specified by:
stopin interfacePipe- Throws:
PipeException- This pipe is dropped or some inside error happens.
-
drop
public void drop() throws PipeExceptionDescription copied from interface:PipeDrop this pipe, delete all information about this pipe on disk.- Specified by:
dropin interfacePipe- Throws:
PipeException- Some inside error happens(such as IOException about disk).
-
close
public void close() throws PipeExceptionDescription copied from interface:PipeClose this pipe, stop collecting data from IoTDB, but do not delete information about this pipe on disk. Used for SyncService.shutdown(long). Do not change the status of this pipe.- Specified by:
closein interfacePipe- Throws:
PipeException- Some inside error happens(such as IOException about disk).
-
getName
public java.lang.String getName()
Description copied from interface:PipeGet the name of this pipe.
-
getPipeSink
public PipeSink getPipeSink()
Description copied from interface:PipeGet the PipeSink of this pipe.- Specified by:
getPipeSinkin interfacePipe- Returns:
- The PipeSink of this pipe.
-
getCreateTime
public long getCreateTime()
Description copied from interface:PipeGet the creation time of this pipe with unit of IoTDBConfig.getTimestampPrecision() .- Specified by:
getCreateTimein interfacePipe- Returns:
- A time with unit of IoTDBConfig.getTimestampPrecision().
-
getStatus
public Pipe.PipeStatus getStatus()
Description copied from interface:PipeGet the Pipe.PipeStatus of this pipe. When a pipe is created, the status should be Pipe.PipeStatus.STOP
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-