Class ExtPipePlugin


  • public class ExtPipePlugin
    extends java.lang.Object
    This class handles 1 external plugin's work, including multiple working threads. All StorageGroups will be distributed to different thread according to hash value. Every working thread is responsible for put several StorageGroups' data into external sink.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getDataCommitIndex​(java.lang.String sgName)
      Get the data committed index of dedicated StorageGroup
      ExternalPipeStatus getStatus()
      Collect the status of External Pipe.
      boolean isAlive()  
      void notifyNewDataArrive​(java.lang.String sgName, long newDataBeginIndex, long newDataCount)
      Notify every working thread task that new data arrive
      void setPipeSinkWriterFactory​(org.apache.iotdb.pipe.external.api.IExternalPipeSinkWriterFactory pipeSinkWriterFactory)  
      void start()
      start and init all working threads
      void stop()
      Stop all working threads
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ExtPipePlugin

        public ExtPipePlugin​(java.lang.String extPipeTypeName,
                             java.util.Map<java.lang.String,​java.lang.String> sinkParams,
                             ExtPipePluginManager extPipePluginManager,
                             PipeOpManager pipeOpManager)
      • ExtPipePlugin

        public ExtPipePlugin​(java.lang.String Name,
                             org.apache.iotdb.pipe.external.api.IExternalPipeSinkWriterFactory factory,
                             ExtPipePluginConfiguration conf,
                             TsFilePipe tsFilePipe)
    • Method Detail

      • setPipeSinkWriterFactory

        public void setPipeSinkWriterFactory​(org.apache.iotdb.pipe.external.api.IExternalPipeSinkWriterFactory pipeSinkWriterFactory)
      • start

        public void start()
                   throws java.io.IOException
        start and init all working threads
        Throws:
        java.io.IOException
      • stop

        public void stop()
        Stop all working threads
      • isAlive

        public boolean isAlive()
      • getStatus

        public ExternalPipeStatus getStatus()
        Collect the status of External Pipe.
        Returns:
      • getDataCommitIndex

        public long getDataCommitIndex​(java.lang.String sgName)
        Get the data committed index of dedicated StorageGroup
        Parameters:
        sgName -
        Returns:
      • notifyNewDataArrive

        public void notifyNewDataArrive​(java.lang.String sgName,
                                        long newDataBeginIndex,
                                        long newDataCount)
        Notify every working thread task that new data arrive
        Parameters:
        sgName -
        newDataBeginIndex -
        newDataCount -