See: Description
Interface | Description |
---|---|
KvStateRequestStats |
Simple statistics for
KvStateServer monitoring. |
Class | Description |
---|---|
AtomicKvStateRequestStats |
Atomic
KvStateRequestStats implementation. |
DisabledKvStateRequestStats |
Disabled
KvStateRequestStats implementation. |
KvStateClient |
Netty-based client querying
KvStateServer instances. |
KvStateServer |
Netty-based server answering
KvStateRequest messages. |
Exception | Description |
---|---|
UnknownKeyOrNamespace |
Thrown if the KvState does not hold any state for the given key or namespace.
|
UnknownKvStateID |
Thrown if no KvState with the given ID cannot found by the server handler.
|
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:
KvStateServer
KvStateServerHandler
KvStateClient
KvStateClientHandler
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:
Both server and client keep track of request statistics via KvStateRequestStats
.
See also:
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.