Skip navigation links

Back to Flink Website

Package org.apache.flink.runtime.query.netty

This package contains all Netty-based client/server classes used to query KvState instances.

See: Description

Package org.apache.flink.runtime.query.netty Description

This package contains all Netty-based client/server classes used to query KvState instances.

Server and Client

Both server and client expect received binary messages to contain a frame length field. Netty's LengthFieldBasedFrameDecoder is used to fully receive the frame before giving it to the respective client or server handler.

Connection establishment and release happens by the client. The server only closes a connection if a fatal failure happens that cannot be resolved otherwise.

The is a single server per task manager and a single client can be shared by multiple Threads.

See also:

Serialization

The exchanged binary messages have the following format:

                     <------ Frame ------------------------->
                    +----------------------------------------+
                    |        HEADER (8)      | PAYLOAD (VAR) |
 +------------------+----------------------------------------+
 | FRAME LENGTH (4) | VERSION (4) | TYPE (4) | CONTENT (VAR) |
 +------------------+----------------------------------------+
 

For frame decoding, both server and client use Netty's LengthFieldBasedFrameDecoder. Message serialization is done via static helpers in KvStateRequestSerializer. The serialization helpers return ByteBuf instances, which are ready to be sent to the client or server respectively as they contain the frame length.

See also:

Statistics

Both server and client keep track of request statistics via KvStateRequestStats.

See also:

Skip navigation links

Back to Flink Website

Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.