Java Code Examples for org.apache.flink.runtime.io.network.api.writer.ResultPartitionWriter#setup()
The following examples show how to use
org.apache.flink.runtime.io.network.api.writer.ResultPartitionWriter#setup() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: StreamNetworkBenchmarkEnvironment.java From flink with Apache License 2.0 | 6 votes |
protected ResultPartitionWriter createResultPartition( JobID jobId, ResultPartitionID partitionId, NettyShuffleEnvironment environment, int channels) throws Exception { ResultPartitionWriter resultPartitionWriter = new ResultPartitionBuilder() .setResultPartitionId(partitionId) .setResultPartitionType(ResultPartitionType.PIPELINED_BOUNDED) .setNumberOfSubpartitions(channels) .setResultPartitionManager(environment.getResultPartitionManager()) .setupBufferPoolFactoryFromNettyShuffleEnvironment(environment) .build(); ResultPartitionWriter consumableNotifyingPartitionWriter = new ConsumableNotifyingResultPartitionWriterDecorator( new NoOpTaskActions(), jobId, resultPartitionWriter, new NoOpResultPartitionConsumableNotifier()); consumableNotifyingPartitionWriter.setup(); return consumableNotifyingPartitionWriter; }
Example 2
Source File: StreamNetworkBenchmarkEnvironment.java From flink with Apache License 2.0 | 6 votes |
public ResultPartitionWriter createResultPartitionWriter(int partitionIndex) throws Exception { ResultPartitionWriter resultPartitionWriter = new ResultPartitionBuilder() .setResultPartitionId(partitionIds[partitionIndex]) .setResultPartitionType(ResultPartitionType.PIPELINED_BOUNDED) .setNumberOfSubpartitions(channels) .setResultPartitionManager(senderEnv.getResultPartitionManager()) .setupBufferPoolFactoryFromNettyShuffleEnvironment(senderEnv) .build(); ResultPartitionWriter consumableNotifyingPartitionWriter = new ConsumableNotifyingResultPartitionWriterDecorator( new NoOpTaskActions(), jobId, resultPartitionWriter, new NoOpResultPartitionConsumableNotifier()); consumableNotifyingPartitionWriter.setup(); return consumableNotifyingPartitionWriter; }
Example 3
Source File: Task.java From flink with Apache License 2.0 | 5 votes |
@VisibleForTesting public static void setupPartitionsAndGates( ResultPartitionWriter[] producedPartitions, InputGate[] inputGates) throws IOException, InterruptedException { for (ResultPartitionWriter partition : producedPartitions) { partition.setup(); } // InputGates must be initialized after the partitions, since during InputGate#setup // we are requesting partitions for (InputGate gate : inputGates) { gate.setup(); } }
Example 4
Source File: Task.java From flink with Apache License 2.0 | 5 votes |
@VisibleForTesting public static void setupPartitionsAndGates( ResultPartitionWriter[] producedPartitions, InputGate[] inputGates) throws IOException { for (ResultPartitionWriter partition : producedPartitions) { partition.setup(); } // InputGates must be initialized after the partitions, since during InputGate#setup // we are requesting partitions for (InputGate gate : inputGates) { gate.setup(); } }