accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mmil...@apache.org
Subject [accumulo] 01/01: Merge branch '1.7' into 1.8
Date Fri, 16 Mar 2018 20:13:11 GMT
This is an automated email from the ASF dual-hosted git repository.

mmiller pushed a commit to branch 1.8
in repository https://gitbox.apache.org/repos/asf/accumulo.git

commit 4c7785b91369c67cbe9755a272e6e826eb01fa66
Merge: ea1ef5e acc74c7
Author: Mike Miller <mmiller@apache.org>
AuthorDate: Fri Mar 16 16:03:03 2018 -0400

    Merge branch '1.7' into 1.8

 .../accumulo/server/master/balancer/ChaoticLoadBalancer.java       | 7 +------
 .../org/apache/accumulo/test/functional/ChaoticBalancerIT.java     | 3 ++-
 2 files changed, 3 insertions(+), 7 deletions(-)

diff --cc test/src/main/java/org/apache/accumulo/test/functional/ChaoticBalancerIT.java
index ede79dd,0000000..4b0580b
mode 100644,000000..100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/ChaoticBalancerIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/ChaoticBalancerIT.java
@@@ -1,84 -1,0 +1,85 @@@
 +/*
 + * 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.test.functional;
 +
 +import java.util.Map;
 +import java.util.SortedSet;
 +import java.util.TreeSet;
 +
 +import org.apache.accumulo.core.cli.BatchWriterOpts;
 +import org.apache.accumulo.core.cli.ScannerOpts;
 +import org.apache.accumulo.core.client.ClientConfiguration;
 +import org.apache.accumulo.core.client.Connector;
 +import org.apache.accumulo.core.conf.Property;
 +import org.apache.accumulo.harness.AccumuloClusterHarness;
 +import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl;
 +import org.apache.accumulo.server.master.balancer.ChaoticLoadBalancer;
 +import org.apache.accumulo.test.TestIngest;
 +import org.apache.accumulo.test.VerifyIngest;
 +import org.apache.hadoop.conf.Configuration;
 +import org.apache.hadoop.io.Text;
 +import org.junit.Test;
 +
 +public class ChaoticBalancerIT extends AccumuloClusterHarness {
 +
 +  @Override
 +  public void configureMiniCluster(MiniAccumuloConfigImpl cfg, Configuration hadoopCoreSite)
{
 +    Map<String,String> siteConfig = cfg.getSiteConfig();
 +    siteConfig.put(Property.TSERV_MAXMEM.getKey(), "10K");
 +    siteConfig.put(Property.TSERV_MAJC_DELAY.getKey(), "0");
++    // ChaoticLoadBalancer balances across all tables
++    siteConfig.put(Property.TABLE_LOAD_BALANCER.getKey(), ChaoticLoadBalancer.class.getName());
 +    cfg.setSiteConfig(siteConfig);
 +  }
 +
 +  @Override
 +  protected int defaultTimeoutSeconds() {
 +    return 4 * 60;
 +  }
 +
 +  @Test
 +  public void test() throws Exception {
 +    Connector c = getConnector();
 +    String[] names = getUniqueNames(2);
 +    String tableName = names[0], unused = names[1];
 +    c.tableOperations().create(tableName);
-     c.tableOperations().setProperty(tableName, Property.TABLE_LOAD_BALANCER.getKey(), ChaoticLoadBalancer.class.getName());
 +    c.tableOperations().setProperty(tableName, Property.TABLE_SPLIT_THRESHOLD.getKey(),
"10K");
 +    SortedSet<Text> splits = new TreeSet<>();
 +    for (int i = 0; i < 100; i++) {
 +      splits.add(new Text(String.format("%03d", i)));
 +    }
 +    c.tableOperations().create(unused);
 +    c.tableOperations().addSplits(unused, splits);
 +    TestIngest.Opts opts = new TestIngest.Opts();
 +    VerifyIngest.Opts vopts = new VerifyIngest.Opts();
 +    vopts.rows = opts.rows = 20000;
 +    opts.setTableName(tableName);
 +    vopts.setTableName(tableName);
 +    ClientConfiguration clientConfig = getCluster().getClientConfig();
 +    if (clientConfig.hasSasl()) {
 +      opts.updateKerberosCredentials(clientConfig);
 +      vopts.updateKerberosCredentials(clientConfig);
 +    } else {
 +      opts.setPrincipal(getAdminPrincipal());
 +      vopts.setPrincipal(getAdminPrincipal());
 +    }
 +    TestIngest.ingest(c, opts, new BatchWriterOpts());
 +    c.tableOperations().flush(tableName, null, null, true);
 +    VerifyIngest.verifyIngest(c, vopts, new ScannerOpts());
 +  }
 +
 +}

-- 
To stop receiving notification emails like this one, please contact
mmiller@apache.org.

Mime
View raw message