Class PipeManagerWorker
- java.lang.Object
-
- org.apache.nemo.runtime.executor.data.PipeManagerWorker
-
@ThreadSafe public final class PipeManagerWorker extends java.lang.Object
Two threads use this class - Network thread: Saves pipe connections created from destination tasks. - Task executor thread: Creates new pipe connections to destination tasks (read), or retrieves a saved pipe connection (write)
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<OutputContext>
getOutputContexts(RuntimeEdge runtimeEdge, long srcTaskIndex)
(SYNCHRONIZATION) Called by task threads.Serializer
getSerializer(java.lang.String runtimeEdgeId)
void
notifyMaster(java.lang.String runtimeEdgeId, long srcTaskIndex)
void
onInputContext(ByteInputContext inputContext)
void
onOutputContext(ByteOutputContext outputContext)
(SYNCHRONIZATION) Called by network threads.java.util.concurrent.CompletableFuture<DataUtil.IteratorWithNumBytes>
read(int srcTaskIndex, RuntimeEdge runtimeEdge, int dstTaskIndex)
-
-
-
Method Detail
-
read
public java.util.concurrent.CompletableFuture<DataUtil.IteratorWithNumBytes> read(int srcTaskIndex, RuntimeEdge runtimeEdge, int dstTaskIndex)
-
notifyMaster
public void notifyMaster(java.lang.String runtimeEdgeId, long srcTaskIndex)
-
getOutputContexts
public java.util.List<OutputContext> getOutputContexts(RuntimeEdge runtimeEdge, long srcTaskIndex)
(SYNCHRONIZATION) Called by task threads.- Parameters:
runtimeEdge
- runtime edgesrcTaskIndex
- source task index- Returns:
- output contexts.
-
getSerializer
public Serializer getSerializer(java.lang.String runtimeEdgeId)
-
onOutputContext
public void onOutputContext(ByteOutputContext outputContext) throws com.google.protobuf.InvalidProtocolBufferException
(SYNCHRONIZATION) Called by network threads.- Parameters:
outputContext
- output context- Throws:
com.google.protobuf.InvalidProtocolBufferException
- protobuf exception
-
onInputContext
public void onInputContext(ByteInputContext inputContext) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
-