use of org.apache.flink.runtime.io.network.netty.NettyMessage.NettyMessageEncoder in project flink by apache.
the class NettyMessageClientSideSerializationTest method setup.
@Before
public void setup() throws IOException, InterruptedException {
networkBufferPool = new NetworkBufferPool(8, BUFFER_SIZE);
inputGate = createSingleInputGate(1, networkBufferPool);
RemoteInputChannel inputChannel = createRemoteInputChannel(inputGate, new TestingPartitionRequestClient());
inputChannel.requestSubpartition();
inputGate.setInputChannels(inputChannel);
inputGate.setup();
CreditBasedPartitionRequestClientHandler handler = new CreditBasedPartitionRequestClientHandler();
handler.addInputChannel(inputChannel);
channel = new EmbeddedChannel(// For outbound messages
new NettyMessageEncoder(), // For inbound messages
new NettyMessageClientDecoderDelegate(handler));
inputChannelId = inputChannel.getInputChannelId();
}
Aggregations