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 Wed, 13 May 2015 21:50:00 GMT

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

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

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

    https://github.com/apache/accumulo/pull/29#discussion_r30279997
  
    --- Diff: minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterExistingZooKeepersTest.java
---
    @@ -0,0 +1,91 @@
    +/*
    + * 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 File BASE_DIR = new File(System.getProperty("user.dir") + "/target/mini-tests/"
    +      + MiniAccumuloClusterExistingZooKeepersTest.class.getName());
    +
    +  private static final String SECRET = "superSecret";
    +
    +  private static final Logger log = LoggerFactory.getLogger(MiniAccumuloClusterExistingZooKeepersTest.class);
    +  private TestingServer zooKeeper;
    +  private MiniAccumuloCluster accumulo;
    +
    +  @Rule
    +  public TestName testName = new TestName();
    +
    +  @Before
    +  public void setupTestCluster() throws Exception {
    +    assertTrue(BASE_DIR.mkdirs() || BASE_DIR.isDirectory());
    +    File testDir = new File(BASE_DIR, testName.getMethodName());
    +    FileUtils.deleteQuietly(testDir);
    +    assertTrue(testDir.mkdir());
    +
    +    zooKeeper = new TestingServer();
    --- End diff --
    
    Added the ZK path check.


> 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