-Review for HBASE-7568 [replication] Create an interface for replication queues
Chris Trezzo 2013-03-28, 20:40
I recently posted a patch for HBASE-7568 and it would be great if I could
get some feedback/eyes on it. If you need a higher-level context, the
parent issue HBASE-7564 has a brief document that outlines the intended
class structure of the refactor. I have split the refactor into multiple
patches to hopefully make this more digestible. This patch only covers
state related to replication queues. State for replication peers will be
split out in a follow on patch (HBASE-7567) that is almost ready.
Some of the major motivations for refactoring the replication code are:
1. Make it more testable. With clear interfaces we can easily unit test how
replication maintains its state.
2. Make the code more understandable. In the code's current form, there is
a lot of complexity in the interaction between ReplicationZookeeper,
ReplicationSource and ReplicationSourceManager. Hopefully, the refactor
will make these interactions more explicit.
3. Make the code more flexible for alternate implementations. If in the
future we wanted to store replication queues in something other than
Zookeeper (not saying we necessarily want to do this), having the
interfaces will make this easier.
Jean-Daniel Cryans 2013-03-28, 21:10
Chris Trezzo 2013-03-28, 21:17