accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Havanki (JIRA)" <>
Subject [jira] [Commented] (ACCUMULO-2497) InstanceFactory
Date Thu, 20 Mar 2014 17:00:59 GMT


Bill Havanki commented on ACCUMULO-2497:

I am, in fact, working on unit tests for {{MetadataTableUtil}} under ACCUMULO-2470, and {{InstanceFactory}}
popped out of that work. (My gist example is a simplified form of where I am now.) The trial
by fire of using it for testing is definitely better than just taking a shot in the dark.

I had thought of combining my unit test and {{InstanceFactory}} under one ticket, but figured
it would be easier to digest on its own. I'm fine with pushing them together, once it seems
good to go. I should note that I believe I'll need a {{WriterFactory}} as well. :)

I'd like to, over time, just gradually introduce use of factories, or similar refactorings,
where it makes sense for testing (or otherwise). It'd be way too big and risky of a job to
convert everything, say, to {{InstanceFactory}} at once.

> InstanceFactory
> ---------------
>                 Key: ACCUMULO-2497
>                 URL:
>             Project: Accumulo
>          Issue Type: Improvement
>          Components: client
>            Reporter: Bill Havanki
>            Assignee: Bill Havanki
>            Priority: Minor
>              Labels: factory, static, testability
>             Fix For: 1.6.1, 1.7.0
> Working on ACCUMULO-2470 (unit tests for server/base) is made difficult by the heavy
dependence on static method calls in our architecture. This ticket is for introducing an {{InstanceFactory}}
interface that will greatly ease testing of code that currently retrieves instances via static
methods (e.g., {{HdfsZooInstance.getInstance()}}).
> Limitations:
> * Work here should be limited to creating {{InstanceFactory}} and its implementations,
and not integrating it into existing code (yet).
> * Work is limited to 1.6 and later. To avoid perturbing the 1.6.0 release no new code
may be introduced into the public API ({{Instance}} is in the public API).
> * A refactoring of the client API is being considered (see ACCUMULO-2128), so this change
should not further complicate - and should hopefully help - that future effort.

This message was sent by Atlassian JIRA

View raw message