Get single-node replication test to pass, plus various nits

There is a relatively slow (2 second running time) integration test in the c5-general-replication maven module -- logsToASingleQuorumReplicatorUsingTheGeneralizedInterface. The test asserts that a single-node "general" replication service can start up and replicate some data. This PR implements the code to make that test pass.

Some background: the test bootstraps and operates a real replication service ("real" meaning with a port connected to netty), albeit one separate from c5db. The service is "general" in that it implements a minimal and generic interface for the local jvm to use, GeneralizedReplicationService.

This differs from previous efforts: the preexisting c5db single-node tests ran a full c5 database server, with a tablet and a regionserver everything; in contrast, this just runs the replication portion. There were also replication tests before, but they verified the replication logic worked at a low level, wiring the replicators together with jetlang; they didn't integrate with "Discovery", or netty, etc. Also, this test doesn't check any replication logic except the most basic success case.

Good call... this could use a lot more comments. Will patch accordingly.

*JOSHUA GREENBERG* HBASE ENGINEER

*T *267-242-6223
*E* josh@wandisco.com

*www.wandisco.com <http://www.wandisco.com/>*


On Mon, Sep 15, 2014 at 12:53 PM, Alex Newman <notifications@github.com>
wrote:

> In
> c5db-replicator/src/main/java/c5db/replication/C5GeneralizedReplicator.java:
>
> > @@ -128,6 +154,19 @@ private void handleCommitNotice(IndexCommitNotice notice) {
> >      }
> >    }
> >
> > +  @FiberOnly
> > +  private void handleEventNotice(ReplicatorInstanceEvent eventNotice) {
> > +    if (availableFuture != null
> > +        && eventNotice.instance == replicator
> > +        && eventNotice.eventType == ReplicatorInstanceEvent.EventType.LEADER_ELECTED
>
> Maybe a comment here? Not sure what's going on.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/OhmData/c5/pull/289/files#r17553754>.
>

-- 


Listed on the London Stock Exchange: WAND 
<http://www.bloomberg.com/quote/WAND:LN>

THIS MESSAGE AND ANY ATTACHMENTS ARE CONFIDENTIAL, PROPRIETARY, AND MAY BE 
PRIVILEGED.  If this message was misdirected, WANdisco, Inc. and its 
subsidiaries, ("WANdisco") does not waive any confidentiality or privilege. 
 If you are not the intended recipient, please notify us immediately and 
destroy the message without disclosing its contents to anyone.  Any 
distribution, use or copying of this e-mail or the information it contains 
by other than an intended recipient is unauthorized.  The views and 
opinions expressed in this e-mail message are the author's own and may not 
reflect the views and opinions of WANdisco, unless the author is authorized 
by WANdisco to express such views or opinions on its behalf.  All email 
sent to or from this address is subject to electronic storage and review by 
WANdisco.  Although WANdisco operates anti-virus programs, it does not 
accept responsibility for any damage whatsoever caused by viruses being 
passed.