Java源码示例:org.apache.flink.runtime.iterative.concurrent.SuperstepBarrier
示例1
private SuperstepBarrier initSuperstepBarrier() {
SuperstepBarrier barrier = new SuperstepBarrier(getUserCodeClassLoader());
TaskEventDispatcher taskEventDispatcher = getEnvironment().getTaskEventDispatcher();
ResultPartitionID partitionId = toSyncPartitionId;
taskEventDispatcher.subscribeToEvent(partitionId, barrier, AllWorkersDoneEvent.class);
taskEventDispatcher.subscribeToEvent(partitionId, barrier, TerminationEvent.class);
return barrier;
}
示例2
private SuperstepBarrier initSuperstepBarrier() {
SuperstepBarrier barrier = new SuperstepBarrier(getUserCodeClassLoader());
TaskEventDispatcher taskEventDispatcher = getEnvironment().getTaskEventDispatcher();
ResultPartitionID partitionId = toSyncPartitionId;
taskEventDispatcher.subscribeToEvent(partitionId, barrier, AllWorkersDoneEvent.class);
taskEventDispatcher.subscribeToEvent(partitionId, barrier, TerminationEvent.class);
return barrier;
}
示例3
private SuperstepBarrier initSuperstepBarrier() {
SuperstepBarrier barrier = new SuperstepBarrier(getUserCodeClassLoader());
TaskEventDispatcher taskEventDispatcher = getEnvironment().getTaskEventDispatcher();
ResultPartitionID partitionId = toSyncPartitionId;
taskEventDispatcher.subscribeToEvent(partitionId, barrier, AllWorkersDoneEvent.class);
taskEventDispatcher.subscribeToEvent(partitionId, barrier, TerminationEvent.class);
return barrier;
}