accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From keith-turner <>
Subject [GitHub] accumulo pull request #121: ACCUMULO-4353: Stabilize tablet assignment durin...
Date Fri, 01 Jul 2016 01:18:26 GMT
Github user keith-turner commented on a diff in the pull request:
    --- Diff: test/src/main/java/org/apache/accumulo/test/master/ ---
    @@ -0,0 +1,256 @@
    + * 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.test.master;
    +import java.util.HashMap;
    +import java.util.Iterator;
    +import java.util.Map;
    +import java.util.Objects;
    +import java.util.SortedSet;
    +import java.util.TreeSet;
    +import java.util.concurrent.Callable;
    +import java.util.concurrent.ExecutorService;
    +import java.util.concurrent.Executors;
    +import java.util.concurrent.FutureTask;
    +import java.util.concurrent.ThreadFactory;
    +import static java.util.concurrent.TimeUnit.MILLISECONDS;
    +import static java.util.concurrent.TimeUnit.MINUTES;
    +import static java.util.concurrent.TimeUnit.NANOSECONDS;
    +import static java.util.concurrent.TimeUnit.SECONDS;
    +import java.util.concurrent.TimeoutException;
    +import java.util.concurrent.atomic.AtomicInteger;
    +import org.apache.accumulo.core.client.Connector;
    +import org.apache.accumulo.core.client.Instance;
    +import org.apache.accumulo.core.client.ZooKeeperInstance;
    +import org.apache.accumulo.core.client.impl.ClientContext;
    +import org.apache.accumulo.core.client.impl.Credentials;
    +import org.apache.accumulo.core.conf.Property;
    +import org.apache.accumulo.minicluster.ServerType;
    +import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl;
    +import org.apache.accumulo.minicluster.impl.ProcessReference;
    +import org.apache.accumulo.server.master.state.MetaDataTableScanner;
    +import org.apache.accumulo.server.master.state.TabletLocationState;
    +import org.apache.accumulo.test.functional.ConfigurableMacBase;
    +import org.apache.hadoop.conf.Configuration;
    +import org.junit.AfterClass;
    +import org.junit.Assert;
    +import org.junit.BeforeClass;
    +import org.junit.Test;
    +import org.slf4j.Logger;
    +import org.slf4j.LoggerFactory;
    +public class SuspendedTabletsIT extends ConfigurableMacBase {
    +  private static final Logger log = LoggerFactory.getLogger(SuspendedTabletsIT.class);
    +  private static ExecutorService threadPool;
    +  public static final int TSERVERS = 5;
    +  public static final long SUSPEND_DURATION = MILLISECONDS.convert(2, MINUTES);
    +  public static final int TABLETS = 100;
    +  @Override
    +  public void configure(MiniAccumuloConfigImpl cfg, Configuration fsConf) {
    +    cfg.setProperty(Property.TABLE_SUSPEND_DURATION, SUSPEND_DURATION + "ms");
    +    cfg.setNumTservers(TSERVERS);
    +  }
    +  @Test
    +  public void suspendAndResumeTserver() throws Exception {
    --- End diff --
    Very nice test.

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