You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by mm...@apache.org on 2018/03/16 20:13:10 UTC

[accumulo] branch 1.8 updated (ea1ef5e -> 4c7785b)

This is an automated email from the ASF dual-hosted git repository.

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


    from ea1ef5e  Merge branch '1.7' into 1.8
     add acc74c7  Fix ChaoticBalancerIT (#401)
     new 4c7785b  Merge branch '1.7' into 1.8

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


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

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

[accumulo] 01/01: Merge branch '1.7' into 1.8

Posted by mm...@apache.org.
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 <mm...@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.