accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Miguel Pereira (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ACCUMULO-1499) Move sanity checks from MiniAccumuloCluster constructor into MiniAccumuloConfig.initialize method.
Date Tue, 11 Jun 2013 18:08:20 GMT

    [ https://issues.apache.org/jira/browse/ACCUMULO-1499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13680506#comment-13680506
] 

Miguel Pereira commented on ACCUMULO-1499:
------------------------------------------

Hi Eric,

Jira isn't loading for me. But of the top of my head the
MiniAccumuloCluster has-a configuration and it should not have to know how
to determine if it is a valid configuration only that it can ask the
configuration class which encapsulates the configuration if it is valid.

Long explanation for saying improved readability and decreased coupling?
which is my understanding of what was intended when the ticket was created
by David.

maybe instead of naming the method initialize it should be named isValid or
passesSanityChecks..

-Miguel




                
> Move sanity checks from MiniAccumuloCluster constructor into MiniAccumuloConfig.initialize
method.
> --------------------------------------------------------------------------------------------------
>
>                 Key: ACCUMULO-1499
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-1499
>             Project: Accumulo
>          Issue Type: Improvement
>    Affects Versions: 1.6.0
>            Reporter: David Medinets
>            Priority: Trivial
>             Fix For: 1.6.0
>
>         Attachments: ACCUMULO-1499.patch
>
>
> The code below seems like it should be in the config class:
>     if (config.getDir().exists() && !config.getDir().isDirectory())
>       throw new IllegalArgumentException("Must pass in directory, " + config.getDir()
+ " is a file");
>     if (config.getDir().exists() && config.getDir().list().length != 0)
>       throw new IllegalArgumentException("Directory " + config.getDir() + " is not empty");
>     this.config = config.initialize();
> Any objections to this change?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message