Add streaming interface to NormalizedNodeDataInput 09/82009/24
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 13 May 2019 05:44:05 +0000 (07:44 +0200)
committerRobert Varga <nite@hq.sk>
Mon, 8 Jul 2019 08:48:19 +0000 (08:48 +0000)
commitc7e9379c4e2f3b2e916d94c938623df7966c7fa0
tree90a234cddb9db5e71962bdb24ea371ab2fdca375
parent609076e66a0298d0d3c912ade66e813a464c4c8a
Add streaming interface to NormalizedNodeDataInput

NormalizedNodeDataInput allows reading NormalizedNodes, which is
wired directly to immutable node builders, providing little
flexibility.

This inflexibility requires us to re-stream the data set through
NormalizedNodePruner, effectively doubling memory requirements
during recovery.

Extend NormalizedNodeDataInput to have a NormalizedNodeStreamWriter
to be plugged in, so that the byte stream becomes a source of
NormalizedNodeStreamWriter events, which can be routed through
a custom-built pipeline.

readNormalizedNode() becomes a simple default wrapper, which
pipes the stream into an ImmutableNormalizedNodeStreamWriter.

JIRA: CONTROLLER-1889
Change-Id: Ic732ba9105dd7e27d5612853b931aba66bdd83a5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/ForwardingNormalizedNodeDataInput.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/LithiumNormalizedNodeInputStreamReader.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/NormalizedNodeDataInput.java