accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ACCUMULO-3000) Allow use of existing ZK service in MiniAccumuloCluster
Date Tue, 21 Apr 2015 15:34:59 GMT

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

ASF GitHub Bot commented on ACCUMULO-3000:
------------------------------------------

Github user joshelser commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/29#discussion_r28789943
  
    --- Diff: minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterExistingZooKeepersTest.java
---
    @@ -0,0 +1,100 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.accumulo.minicluster;
    +
    +import static org.junit.Assert.assertTrue;
    +
    +import java.io.File;
    +import java.io.IOException;
    +
    +import org.apache.accumulo.core.client.Connector;
    +import org.apache.commons.io.FileUtils;
    +import org.apache.curator.test.TestingServer;
    +import org.junit.After;
    +import org.junit.Before;
    +import org.junit.Rule;
    +import org.junit.Test;
    +import org.junit.rules.TestName;
    +import org.slf4j.Logger;
    +import org.slf4j.LoggerFactory;
    +
    +public class MiniAccumuloClusterExistingZooKeepersTest {
    +
    +  private static final Logger log = LoggerFactory.getLogger(MiniAccumuloClusterExistingZooKeepersTest.class);
    +  private File baseDir = new File(System.getProperty("user.dir") + "/target/mini-tests/"
+ this.getClass().getName());
    +  private TestingServer zooKeeper;
    +  private MiniAccumuloCluster accumulo;
    +
    +  @Rule
    +  public TestName testName = new TestName();
    +
    +  @Before
    +  public void setupTestCluster() throws Exception {
    +    assertTrue(baseDir.mkdirs() || baseDir.isDirectory());
    +    File testDir = new File(baseDir, testName.getMethodName());
    +    FileUtils.deleteQuietly(testDir);
    +    assertTrue(testDir.mkdir());
    +
    +    zooKeeper = new TestingServer();
    +
    +    MiniAccumuloConfig config = new MiniAccumuloConfig(testDir, "superSecret");
    --- End diff --
    
    Would be nice to make `"superSecret"` a static final constant


> Allow use of existing ZK service in MiniAccumuloCluster
> -------------------------------------------------------
>
>                 Key: ACCUMULO-3000
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-3000
>             Project: Accumulo
>          Issue Type: Improvement
>          Components: mini
>    Affects Versions: 1.5.1, 1.6.0
>            Reporter: Josh Elser
>            Assignee: Trent Nadeau
>            Priority: Minor
>              Labels: newbie
>             Fix For: 1.8.0
>
>
> A test harness may have already started ZooKeeper for other testing. MiniAccumuloCluster
could use that same ZooKepeer instance, instead of creating its own, but it is currently not
possible given what MAC does now.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message