Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Accumulo, mail # dev - Review Request 16427: ACCUMULO-2076 add Instance builder based on classpath resources


Copy link to this message
-
Re: Review Request 16427: ACCUMULO-2076 add Instance builder based on classpath resources
Mike Drob 2013-12-26, 18:29


> On Dec. 22, 2013, 5:51 p.m., Bill Havanki wrote:
> > Instead of creating a static method on ZooKeeperInstance, I'd prefer to see a ZooKeeperInstanceFactory object with a non-static version of the method in it. Benefits: makes it easier to mock instance creation for testing; allows for alternative implementations if they all implement the same interface (e.g., InstanceFactory); encourages easier-to-use API, like a fluent interface or merely setting named fields, as the number of parameters grows.
> >
> > ZooKeeperInstance zki = new ClasspathZooKeeperInstanceFactory().siteConf("accumulo-site.xml").getInstance();

Done.
- Mike
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16427/#review30800
-----------------------------------------------------------
On Dec. 20, 2013, 9:52 p.m., Mike Drob wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16427/
> -----------------------------------------------------------
>
> (Updated Dec. 20, 2013, 9:52 p.m.)
>
>
> Review request for accumulo.
>
>
> Bugs: ACCUMULO-2076
>     https://issues.apache.org/jira/browse/ACCUMULO-2076
>
>
> Repository: accumulo
>
>
> Description
> -------
>
> Writing client code for retrieving zookeeper and instance information is both tedious and error prone. It would be great to remove this boiler-plate burden from users.
>
>
> Diffs
> -----
>
>   src/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java fcadd384cc150b8422c3f5c33970c26efe142132
>
> Diff: https://reviews.apache.org/r/16427/diff/
>
>
> Testing
> -------
>
> None, yet. :)
>
>
> Thanks,
>
> Mike Drob
>
>