You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "Miguel Pereira (JIRA)" <ji...@apache.org> on 2013/06/10 14:28:21 UTC
[jira] [Updated] (ACCUMULO-1499) Move sanity checks from
MiniAccumuloCluster constructor into MiniAccumuloConfig.initialize method.
[ https://issues.apache.org/jira/browse/ACCUMULO-1499?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Miguel Pereira updated ACCUMULO-1499:
-------------------------------------
Attachment: ACCUMULO-1499.patch
This seems kind of pointless for such a simple issue but I will do it for practice :P
I moved the described code to a new method in MiniAccumuloConfig class called initialize which returns the configuration if it passes the sanity checks.
Cheers
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