hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Daniel Cryans <jdcry...@apache.org>
Subject Re: Review for HBASE-7568 [replication] Create an interface for replication queues
Date Thu, 28 Mar 2013 21:10:08 GMT
Two general comments about the patch. The code itself looks good.


On Thu, Mar 28, 2013 at 1:40 PM, Chris Trezzo <ctrezzo@gmail.com> wrote:
> Hi All,
> 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.
> Review: https://reviews.apache.org/r/9987/
> 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.

I think your argument for a refactoring would be a lot stronger if the
patch was adding new tests, at least to demonstrate the added

> 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.

If we want to be able to add other implementations, should it be
better giving more accurate names to the current ones? If what we have
is ZK-based, I would then replace "Impl" in the class names with "ZK"
or something like that.

> Thanks!
> Chris Trezzo

View raw message