Class TsFilePipe

  • All Implemented Interfaces:
    Pipe

    public class TsFilePipe
    extends java.lang.Object
    implements Pipe
    • Constructor Detail

      • TsFilePipe

        public TsFilePipe​(long createTime,
                          java.lang.String name,
                          PipeSink pipeSink,
                          long dataStartTime,
                          boolean syncDelOp)
    • Method Detail

      • start

        public void start()
                   throws PipeException
        Description copied from interface: Pipe
        Start this pipe, so it can collect data from IoTDB continuously.
        Specified by:
        start in interface Pipe
        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 *
        Specified by:
        take in interface Pipe
        Returns:
        A PipeData.
        Throws:
        java.lang.InterruptedException - Be Interrupted when waiting for new PipeData.
      • pull

        public java.util.List<PipeData> pull​(long serialNumber)
      • commit

        public void commit()
        Description copied from interface: Pipe
        Used for ISyncClient to commit all PipeDatas which are taken but not be committed yet.
        Specified by:
        commit in interface Pipe
      • getOrCreateSyncManager

        public ISyncManager getOrCreateSyncManager​(java.lang.String dataRegionId)
        Description copied from interface: Pipe
        Get ISyncManager by dataRegionId. If ISyncManager does not exist, it will be created automatically.
        Specified by:
        getOrCreateSyncManager in interface Pipe
        Parameters:
        dataRegionId - string of DataRegionId
        Returns:
        ISyncManager
      • deleteSyncManager

        public void deleteSyncManager​(java.lang.String dataRegionId)
        Specified by:
        deleteSyncManager in interface Pipe
      • commit

        public void commit​(long serialNumber)
      • stop

        public void stop()
                  throws PipeException
        Description copied from interface: Pipe
        Stop this pipe, but it will not stop collecting data from IoTDB.
        Specified by:
        stop in interface Pipe
        Throws:
        PipeException - This pipe is dropped or some inside error happens.
      • drop

        public void drop()
                  throws PipeException
        Description copied from interface: Pipe
        Drop this pipe, delete all information about this pipe on disk.
        Specified by:
        drop in interface Pipe
        Throws:
        PipeException - Some inside error happens(such as IOException about disk).
      • close

        public void close()
                   throws PipeException
        Description copied from interface: Pipe
        Close 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:
        close in interface Pipe
        Throws:
        PipeException - Some inside error happens(such as IOException about disk).
      • getName

        public java.lang.String getName()
        Description copied from interface: Pipe
        Get the name of this pipe.
        Specified by:
        getName in interface Pipe
        Returns:
        The name of this pipe.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object