kafka/checkstyle
Colin Patrick McCabe 7bc84d6ced
KAFKA-12467: Implement QuorumController snapshot generation (#10366)
Implement controller-side snapshot generation.Implement QuorumController snapshot
generation.  Note that this PR does not handle KRaft integration, just the internal 
snapshot record generation and consumption logic.

Reading a snapshot is relatively straightforward.  When the  QuorumController
starts up, it loads the most recent snapshot.  This is just a series of records
that we replay, plus a log offset ("snapshot epoch") that we advance to.

Writing a snapshot is more complex.  There are several components:
the SnapshotWriter which persists the snapshot, the SnapshotGenerator
which manages writing each batch of records, and the SnapshotGeneratorManager
which interfaces the preceding two classes with the event queue.

Controller snapshots are done incrementally.  In order to avoid blocking the
controller thread for a long time, we pull a few record batches at a time from
our record batch iterators.  These iterators are implemented by controller
manager classes such as ReplicationControlManager, ClusterControlManager, etc.

Finally, this PR adds ControllerTestUtils#deepSortRecords and
ControllerTestUtils#assertBatchIteratorContains, which make it easier to write
unit tests.  Since records are often constructed from unsorted data structures,
it is often useful to sort them before comparing them.

Reviewers: David Arthur <mumrah@gmail.com>
2021-04-06 10:18:06 -07:00
..
.scalafmt.conf MINOR: Add Scalafmt to Streams Scala API (#4965) 2018-07-09 16:48:34 -07:00
checkstyle.xml KAFKA-12375: don't reuse thread.id until a thread has fully shut down (#10215) 2021-03-02 16:28:15 -08:00
import-control-core.xml KAFKA-12383: Get RaftClusterTest.java and other KIP-500 junit tests working (#10220) 2021-03-22 11:45:56 -04:00
import-control-jmh-benchmarks.xml MINOR: Replace BrokerStates.scala with BrokerState.java (#10028) 2021-02-03 13:41:38 -08:00
import-control.xml KAFKA-12459; Use property testing library for raft event simulation tests (#10323) 2021-03-17 19:20:07 -07:00
java.header MINOR: improve license header check by providing head file instead of (prefix) header regex 2017-02-28 12:35:04 -08:00
suppressions.xml KAFKA-12467: Implement QuorumController snapshot generation (#10366) 2021-04-06 10:18:06 -07:00