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

Jorge Machado commented on ACCUMULO-4729:
-----------------------------------------

Yes that was what end up doing. 

I have a very small code for that 
{code:java}
/**
 * Serves as entry point for using MiniAccumulo cluster.
 */
public class SailMiniAccumuloCluster {

    private static MiniAccumuloCluster mini;

    private SailMiniAccumuloCluster(){}

    public static MiniAccumuloCluster getInstance(MiniAccumuloConfig conf)
            throws InterruptedException, AccumuloException, 
AccumuloSecurityException, IOException
    {
        if (mini ==null){
            mini = new MiniAccumuloCluster(conf);
            mini.start();
        }
        return mini;
    }
}
{code}
then the before and after classes  just stop it. 

But would be nice if we have like a helper were we could extend on  

> MiniAccumuloCluster should have a Singleton
> -------------------------------------------
>
>                 Key: ACCUMULO-4729
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-4729
>             Project: Accumulo
>          Issue Type: New Feature
>          Components: mini
>    Affects Versions: 1.8.1
>            Reporter: Jorge Machado
>            Priority: Minor
>
> As developer I would like to have something like 
> MiniAccumuloCluster.getInstance() 
> That I can share with multiple tests



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to