accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubbsii <>
Subject [GitHub] accumulo pull request: ACCUMULO-3000: Added config option and impl...
Date Wed, 13 May 2015 20:18:47 GMT
Github user ctubbsii commented on a diff in the pull request:
    --- Diff: minicluster/src/test/java/org/apache/accumulo/minicluster/
    @@ -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
    + *
    + *
    + *
    + * 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 org.apache.accumulo.core.client.Connector;
    +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 --
    It would be good to set up something directly in this ZooKeeper that would affect Accumulo's
behavior in a way we can detect, so we can verify that it's actually using the same instance.
Maybe set the table offline by writing directly to ZooKeeper, and checking the Accumulo API
to see if the table is online or offline? Alternatively, set a per-table custom property by
writing directly to Zookeeper, which can be checked from the API.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message