accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [accumulo] hkeebler commented on issue #405: Utilize NewTableConfiguration in ITs
Date Mon, 06 May 2019 17:43:58 GMT
hkeebler commented on issue #405: Utilize NewTableConfiguration in ITs
URL: https://github.com/apache/accumulo/issues/405#issuecomment-489709461
 
 
   @milleruntime is this the kind of change you are requesting here?  We could also maybe
add  the getTableConfig(props) to the AccumuloClusterHarness or AccumuloITBase class.
   ```
   diff --git a/test/src/main/java/org/apache/accumulo/test/functional/TabletIT.java b/test/src/main/java/org/apache/accumulo/test/functional/TabletIT.java
   index 4d125fcb2..8a7055725 100644
   --- a/test/src/main/java/org/apache/accumulo/test/functional/TabletIT.java
   +++ b/test/src/main/java/org/apache/accumulo/test/functional/TabletIT.java
   @@ -19,6 +19,7 @@ package org.apache.accumulo.test.functional;
    import static java.nio.charset.StandardCharsets.UTF_8;
    import static org.junit.Assert.assertEquals;
    
   +import java.util.Collections;
    import java.util.Map;
    import java.util.Map.Entry;
    import java.util.TreeSet;
   @@ -27,6 +28,7 @@ import org.apache.accumulo.core.client.Accumulo;
    import org.apache.accumulo.core.client.AccumuloClient;
    import org.apache.accumulo.core.client.BatchWriter;
    import org.apache.accumulo.core.client.Scanner;
   +import org.apache.accumulo.core.client.admin.NewTableConfiguration;
    import org.apache.accumulo.core.conf.Property;
    import org.apache.accumulo.core.data.Key;
    import org.apache.accumulo.core.data.Mutation;
   @@ -56,6 +58,11 @@ public class TabletIT extends AccumuloClusterHarness {
        return 2 * 60;
      }
    
   +  private NewTableConfiguration getTableConfig() {
   +    return new NewTableConfiguration()
   +        .setProperties(Collections.singletonMap(Property.TABLE_SPLIT_THRESHOLD.getKey(),
"200"));
   +  }
   +
      @Test
      public void createTableTest() throws Exception {
        try (AccumuloClient client = Accumulo.newClient().from(getClientProps()).build())
{
   @@ -76,10 +83,8 @@ public class TabletIT extends AccumuloClusterHarness {
          }
    
          // presplit
   -      accumuloClient.tableOperations().create(tableName);
   -      accumuloClient.tableOperations().setProperty(tableName,
   -          Property.TABLE_SPLIT_THRESHOLD.getKey(), "200");
   -      accumuloClient.tableOperations().addSplits(tableName, keys);
   +      accumuloClient.tableOperations().create(tableName, getTableConfig().withSplits(keys));
   
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message