Bug 7521: Convert install snapshot chunking to use streams 44/50744/7
authorTom Pantelis <tpanteli@brocade.com>
Fri, 20 Jan 2017 20:32:37 +0000 (15:32 -0500)
committerTom Pantelis <tpanteli@brocade.com>
Fri, 10 Feb 2017 12:16:15 +0000 (12:16 +0000)
commit5fd4213b5bfaf2db21f1b37139f6b98535a872c0
tree335f58158c0f5977af02197cfb8dc3a67bf51a8e
parent2faf656bf68dd3843fd59520b27a7ec2abbdcc68
Bug 7521: Convert install snapshot chunking to use streams

On the leader side, converted LeaderInstallSnapshotState to use
the InputStream from the ByteSource instead of a ByteString to
chunk the data.

On the follower side, converted the SnapshotTracker, which is used
to reassemble the install snapshot chunks, to write the chunks to
an OutputStream instead of a ByteString. Currently a
ByteArrayOutputStream is used by will be changed to a
FileBackedOutputStream in a subsequent patch.

Change-Id: I7a16ad5d44a530e260aa332d91145fbc3fb95f5f
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/FollowerLogInformationImpl.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/AbstractLeader.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/Follower.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/LeaderInstallSnapshotState.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/SnapshotTracker.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/behaviors/LeaderTest.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/behaviors/SnapshotTrackerTest.java

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.