Search in sources :

Example 1 with ChannelStateWriter

use of org.apache.flink.runtime.checkpoint.channel.ChannelStateWriter in project flink by apache.

the class StreamTask method injectChannelStateWriterIntoChannels.

private void injectChannelStateWriterIntoChannels() {
    final Environment env = getEnvironment();
    final ChannelStateWriter channelStateWriter = subtaskCheckpointCoordinator.getChannelStateWriter();
    for (final InputGate gate : env.getAllInputGates()) {
        gate.setChannelStateWriter(channelStateWriter);
    }
    for (ResultPartitionWriter writer : env.getAllWriters()) {
        if (writer instanceof ChannelStateHolder) {
            ((ChannelStateHolder) writer).setChannelStateWriter(channelStateWriter);
        }
    }
}
Also used : ChannelStateWriter(org.apache.flink.runtime.checkpoint.channel.ChannelStateWriter) ResultPartitionWriter(org.apache.flink.runtime.io.network.api.writer.ResultPartitionWriter) Environment(org.apache.flink.runtime.execution.Environment) ChannelStateHolder(org.apache.flink.runtime.io.network.partition.ChannelStateHolder) InputGate(org.apache.flink.runtime.io.network.partition.consumer.InputGate) IndexedInputGate(org.apache.flink.runtime.io.network.partition.consumer.IndexedInputGate)

Aggregations

ChannelStateWriter (org.apache.flink.runtime.checkpoint.channel.ChannelStateWriter)1 Environment (org.apache.flink.runtime.execution.Environment)1 ResultPartitionWriter (org.apache.flink.runtime.io.network.api.writer.ResultPartitionWriter)1 ChannelStateHolder (org.apache.flink.runtime.io.network.partition.ChannelStateHolder)1 IndexedInputGate (org.apache.flink.runtime.io.network.partition.consumer.IndexedInputGate)1 InputGate (org.apache.flink.runtime.io.network.partition.consumer.InputGate)1