cloud-software-foundation / c5

c5
Apache License 2.0
12 stars 8 forks source link

Log readers for non-C5DB replicator clients #282

Closed joshua-g closed 10 years ago

joshua-g commented 10 years ago

The commits in this PR work towards creating a general-purpose reader for our replicator log.

Although OLogReader already existed, it exposed implementation details such as the control entries in the log, as well as the type of log entry itself (i.e. OLogEntry). This genericizes OLogReader, and it introduces a new simplified kind of "entry" for the replicator client to use -- ReplicatorEntry. ReplicatorEntry only knows about sequence number and data -- nothing else such as "terms" or "quorums". The commits in this PR then implement decoding the log into instances of ReplicatorEntry.

The motivation is to support an interface abstract enough that if our replicator implementation is used for some arbitrary non-C5DB use, such as replicating HBase WALs, the user will not be tied to implementation details.

posix4e commented 10 years ago

This all looks good. Let's just handle all of the nits in a follow-on commit.