Class MPPDataExchangeManager

    • Constructor Summary

      Constructors 
      Constructor Description
      MPPDataExchangeManager​(LocalMemoryManager localMemoryManager, java.util.function.Supplier<org.apache.iotdb.tsfile.read.common.block.column.TsBlockSerde> tsBlockSerdeFactory, java.util.concurrent.ExecutorService executorService, org.apache.iotdb.commons.client.IClientManager<org.apache.iotdb.common.rpc.thrift.TEndPoint,​org.apache.iotdb.commons.client.sync.SyncDataNodeMPPDataExchangeServiceClient> mppDataExchangeServiceClientManager)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String createFullIdFrom​(org.apache.iotdb.mpp.rpc.thrift.TFragmentInstanceId fragmentInstanceId, java.lang.String suffix)  
      ISinkHandle createLocalSinkHandle​(org.apache.iotdb.mpp.rpc.thrift.TFragmentInstanceId localFragmentInstanceId, org.apache.iotdb.mpp.rpc.thrift.TFragmentInstanceId remoteFragmentInstanceId, java.lang.String remotePlanNodeId, FragmentInstanceContext instanceContext)  
      ISourceHandle createLocalSourceHandle​(org.apache.iotdb.mpp.rpc.thrift.TFragmentInstanceId localFragmentInstanceId, java.lang.String localPlanNodeId, org.apache.iotdb.mpp.rpc.thrift.TFragmentInstanceId remoteFragmentInstanceId, IMPPDataExchangeManagerCallback<java.lang.Throwable> onFailureCallback)  
      ISinkHandle createSinkHandle​(org.apache.iotdb.mpp.rpc.thrift.TFragmentInstanceId localFragmentInstanceId, org.apache.iotdb.common.rpc.thrift.TEndPoint remoteEndpoint, org.apache.iotdb.mpp.rpc.thrift.TFragmentInstanceId remoteFragmentInstanceId, java.lang.String remotePlanNodeId, FragmentInstanceContext instanceContext)
      Create a sink handle who sends data blocks to a remote downstream fragment instance in async manner.
      ISourceHandle createSourceHandle​(org.apache.iotdb.mpp.rpc.thrift.TFragmentInstanceId localFragmentInstanceId, java.lang.String localPlanNodeId, org.apache.iotdb.common.rpc.thrift.TEndPoint remoteEndpoint, org.apache.iotdb.mpp.rpc.thrift.TFragmentInstanceId remoteFragmentInstanceId, IMPPDataExchangeManagerCallback<java.lang.Throwable> onFailureCallback)
      Create a source handle who fetches data blocks from a remote upstream fragment instance for a plan node of a local fragment instance in async manner.
      void forceDeregisterFragmentInstance​(org.apache.iotdb.mpp.rpc.thrift.TFragmentInstanceId fragmentInstanceId)
      Release all the related resources, including data blocks that are not yet fetched by downstream fragment instances.
      org.apache.iotdb.db.mpp.execution.exchange.MPPDataExchangeManager.MPPDataExchangeServiceImpl getOrCreateMPPDataExchangeServiceImpl()  
      • Methods inherited from class java.lang.Object

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

      • MPPDataExchangeManager

        public MPPDataExchangeManager​(LocalMemoryManager localMemoryManager,
                                      java.util.function.Supplier<org.apache.iotdb.tsfile.read.common.block.column.TsBlockSerde> tsBlockSerdeFactory,
                                      java.util.concurrent.ExecutorService executorService,
                                      org.apache.iotdb.commons.client.IClientManager<org.apache.iotdb.common.rpc.thrift.TEndPoint,​org.apache.iotdb.commons.client.sync.SyncDataNodeMPPDataExchangeServiceClient> mppDataExchangeServiceClientManager)
    • Method Detail

      • getOrCreateMPPDataExchangeServiceImpl

        public org.apache.iotdb.db.mpp.execution.exchange.MPPDataExchangeManager.MPPDataExchangeServiceImpl getOrCreateMPPDataExchangeServiceImpl()
      • createSinkHandle

        public ISinkHandle createSinkHandle​(org.apache.iotdb.mpp.rpc.thrift.TFragmentInstanceId localFragmentInstanceId,
                                            org.apache.iotdb.common.rpc.thrift.TEndPoint remoteEndpoint,
                                            org.apache.iotdb.mpp.rpc.thrift.TFragmentInstanceId remoteFragmentInstanceId,
                                            java.lang.String remotePlanNodeId,
                                            FragmentInstanceContext instanceContext)
        Description copied from interface: IMPPDataExchangeManager
        Create a sink handle who sends data blocks to a remote downstream fragment instance in async manner.
        Specified by:
        createSinkHandle in interface IMPPDataExchangeManager
        Parameters:
        localFragmentInstanceId - ID of the local fragment instance who generates and sends data blocks to the sink handle.
        remoteEndpoint - Hostname and Port of the remote fragment instance where the data blocks should be sent to.
        remotePlanNodeId - The sink plan node ID of the remote fragment instance.
        instanceContext - The context of local fragment instance.
      • createSourceHandle

        public ISourceHandle createSourceHandle​(org.apache.iotdb.mpp.rpc.thrift.TFragmentInstanceId localFragmentInstanceId,
                                                java.lang.String localPlanNodeId,
                                                org.apache.iotdb.common.rpc.thrift.TEndPoint remoteEndpoint,
                                                org.apache.iotdb.mpp.rpc.thrift.TFragmentInstanceId remoteFragmentInstanceId,
                                                IMPPDataExchangeManagerCallback<java.lang.Throwable> onFailureCallback)
        Description copied from interface: IMPPDataExchangeManager
        Create a source handle who fetches data blocks from a remote upstream fragment instance for a plan node of a local fragment instance in async manner.
        Specified by:
        createSourceHandle in interface IMPPDataExchangeManager
        Parameters:
        localFragmentInstanceId - ID of the local fragment instance who receives data blocks from the source handle.
        localPlanNodeId - The local sink plan node ID.
        remoteEndpoint - Hostname and Port of the remote fragment instance where the data blocks should be received from.
        remoteFragmentInstanceId - ID of the remote fragment instance.
        onFailureCallback - The callback on failure.
      • forceDeregisterFragmentInstance

        public void forceDeregisterFragmentInstance​(org.apache.iotdb.mpp.rpc.thrift.TFragmentInstanceId fragmentInstanceId)
        Release all the related resources, including data blocks that are not yet fetched by downstream fragment instances.

        This method should be called when a fragment instance finished in an abnormal state.

        Specified by:
        forceDeregisterFragmentInstance in interface IMPPDataExchangeManager
        Parameters:
        fragmentInstanceId - ID of the fragment instance to be released.
      • createFullIdFrom

        public static java.lang.String createFullIdFrom​(org.apache.iotdb.mpp.rpc.thrift.TFragmentInstanceId fragmentInstanceId,
                                                        java.lang.String suffix)
        Parameters:
        suffix - should be like [PlanNodeId].SourceHandle/SinHandle