accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mmil...@apache.org
Subject [accumulo] branch master updated: Fix #405 Utilize NewTableConfiguration in ITs (#1160)
Date Tue, 14 May 2019 19:54:34 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
     new ca7493e  Fix #405 Utilize NewTableConfiguration in ITs (#1160)
ca7493e is described below

commit ca7493edeb1e60ccb4027a9abff3582b5daa9808
Author: hkeebler <49656678+hkeebler@users.noreply.github.com>
AuthorDate: Tue May 14 15:54:29 2019 -0400

    Fix #405 Utilize NewTableConfiguration in ITs (#1160)
---
 .../test/functional/ConfigurableCompactionIT.java  |  25 +++--
 .../accumulo/test/functional/LargeRowIT.java       |  11 +-
 .../test/functional/RegexGroupBalanceIT.java       |  19 ++--
 .../test/functional/SessionDurabilityIT.java       |  18 ++--
 .../apache/accumulo/test/functional/SplitIT.java   |  28 +++--
 .../apache/accumulo/test/functional/TabletIT.java  |  10 +-
 .../test/replication/KerberosReplicationIT.java    |  23 +++--
 .../replication/MultiInstanceReplicationIT.java    | 114 +++++++++++----------
 .../accumulo/test/replication/ReplicationIT.java   |  86 ++++++++--------
 .../UnorderedWorkAssignerReplicationIT.java        | 113 ++++++++++----------
 10 files changed, 233 insertions(+), 214 deletions(-)

diff --git a/test/src/main/java/org/apache/accumulo/test/functional/ConfigurableCompactionIT.java b/test/src/main/java/org/apache/accumulo/test/functional/ConfigurableCompactionIT.java
index bca2593..4cfb5ce 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/ConfigurableCompactionIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/ConfigurableCompactionIT.java
@@ -16,6 +16,7 @@
  */
 package org.apache.accumulo.test.functional;
 
+import static java.util.Collections.singletonMap;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
@@ -23,7 +24,7 @@ import java.io.File;
 import java.io.IOException;
 import java.security.SecureRandom;
 import java.util.Arrays;
-import java.util.Collections;
+import java.util.HashMap;
 import java.util.Map;
 import java.util.Random;
 import java.util.TreeSet;
@@ -32,6 +33,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.Mutation;
 import org.apache.accumulo.core.metadata.MetadataTable;
@@ -60,7 +62,7 @@ public class ConfigurableCompactionIT extends ConfigurableMacBase {
 
   @Override
   public void configure(MiniAccumuloConfigImpl cfg, Configuration hadoopCoreSite) {
-    cfg.setSiteConfig(Collections.singletonMap(Property.TSERV_MAJC_DELAY.getKey(), "1s"));
+    cfg.setSiteConfig(singletonMap(Property.TSERV_MAJC_DELAY.getKey(), "1s"));
   }
 
   public static class SimpleCompactionStrategy extends CompactionStrategy {
@@ -93,10 +95,11 @@ public class ConfigurableCompactionIT extends ConfigurableMacBase {
   public void test() throws Exception {
     try (AccumuloClient c = Accumulo.newClient().from(getClientProperties()).build()) {
       final String tableName = getUniqueNames(1)[0];
-      c.tableOperations().create(tableName);
-      c.tableOperations().setProperty(tableName, Property.TABLE_COMPACTION_STRATEGY.getKey(),
-          SimpleCompactionStrategy.class.getName());
+
+      c.tableOperations().create(tableName, new NewTableConfiguration().setProperties(singletonMap(
+          Property.TABLE_COMPACTION_STRATEGY.getKey(), SimpleCompactionStrategy.class.getName())));
       runTest(c, tableName, 3);
+
       c.tableOperations().setProperty(tableName,
           Property.TABLE_COMPACTION_STRATEGY_PREFIX.getKey() + "count", "" + 5);
       runTest(c, tableName, 5);
@@ -109,17 +112,17 @@ public class ConfigurableCompactionIT extends ConfigurableMacBase {
       final String tableName = getUniqueNames(1)[0];
       File destFile =
           installJar(getCluster().getConfig().getAccumuloDir(), "/TestCompactionStrat.jar");
-      c.tableOperations().create(tableName);
       c.instanceOperations().setProperty(
           Property.VFS_CONTEXT_CLASSPATH_PROPERTY.getKey() + "context1", destFile.toString());
-      c.tableOperations().setProperty(tableName, Property.TABLE_MAJC_RATIO.getKey(), "10");
-      c.tableOperations().setProperty(tableName, Property.TABLE_CLASSPATH.getKey(), "context1");
+      Map props = new HashMap<>();
+      props.put(Property.TABLE_MAJC_RATIO.getKey(), "10");
+      props.put(Property.TABLE_CLASSPATH.getKey(), "context1");
       // EfgCompactionStrat will only compact a tablet w/ end row of 'efg'. No other tablets are
       // compacted.
-      c.tableOperations().setProperty(tableName, Property.TABLE_COMPACTION_STRATEGY.getKey(),
+      props.put(Property.TABLE_COMPACTION_STRATEGY.getKey(),
           "org.apache.accumulo.test.EfgCompactionStrat");
-
-      c.tableOperations().addSplits(tableName, new TreeSet<>(Arrays.asList(new Text("efg"))));
+      c.tableOperations().create(tableName, new NewTableConfiguration().setProperties(props)
+          .withSplits(new TreeSet<>(Arrays.asList(new Text("efg")))));
 
       for (char ch = 'a'; ch < 'l'; ch++)
         writeFlush(c, tableName, ch + "");
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/LargeRowIT.java b/test/src/main/java/org/apache/accumulo/test/functional/LargeRowIT.java
index 48c2914..69eac71 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/LargeRowIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/LargeRowIT.java
@@ -17,6 +17,7 @@
 package org.apache.accumulo.test.functional;
 
 import static java.nio.charset.StandardCharsets.UTF_8;
+import static java.util.Collections.singletonMap;
 import static org.apache.accumulo.fate.util.UtilWaitThread.sleepUninterruptibly;
 import static org.junit.Assert.assertTrue;
 
@@ -30,6 +31,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;
@@ -125,11 +127,12 @@ public class LargeRowIT extends AccumuloClusterHarness {
     }
     try (AccumuloClient c = Accumulo.newClient().from(getClientProps()).build()) {
       c.tableOperations().create(REG_TABLE_NAME);
-      c.tableOperations().create(PRE_SPLIT_TABLE_NAME);
-      c.tableOperations().setProperty(PRE_SPLIT_TABLE_NAME,
-          Property.TABLE_MAX_END_ROW_SIZE.getKey(), "256K");
+      c.tableOperations().create(PRE_SPLIT_TABLE_NAME,
+          new NewTableConfiguration()
+              .setProperties(singletonMap(Property.TABLE_MAX_END_ROW_SIZE.getKey(), "256K"))
+              .withSplits(splitPoints));
+
       sleepUninterruptibly(3, TimeUnit.SECONDS);
-      c.tableOperations().addSplits(PRE_SPLIT_TABLE_NAME, splitPoints);
       test1(c);
       test2(c);
     }
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/RegexGroupBalanceIT.java b/test/src/main/java/org/apache/accumulo/test/functional/RegexGroupBalanceIT.java
index 7c2056b..8c2b690 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/RegexGroupBalanceIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/RegexGroupBalanceIT.java
@@ -19,6 +19,7 @@ package org.apache.accumulo.test.functional;
 
 import java.util.Collection;
 import java.util.Collections;
+import java.util.HashMap;
 import java.util.Map;
 import java.util.Map.Entry;
 import java.util.SortedSet;
@@ -28,6 +29,7 @@ import org.apache.accumulo.core.client.Accumulo;
 import org.apache.accumulo.core.client.AccumuloClient;
 import org.apache.accumulo.core.client.Scanner;
 import org.apache.accumulo.core.client.TableNotFoundException;
+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.TableId;
@@ -56,7 +58,6 @@ public class RegexGroupBalanceIT extends ConfigurableMacBase {
   public void testBalancing() throws Exception {
     try (AccumuloClient client = Accumulo.newClient().from(getClientProperties()).build()) {
       String tablename = getUniqueNames(1)[0];
-      client.tableOperations().create(tablename);
 
       SortedSet<Text> splits = new TreeSet<>();
       splits.add(new Text("01a"));
@@ -73,16 +74,14 @@ public class RegexGroupBalanceIT extends ConfigurableMacBase {
       splits.add(new Text("03m"));
       splits.add(new Text("03r"));
 
-      client.tableOperations().setProperty(tablename, RegexGroupBalancer.REGEX_PROPERTY,
-          "(\\d\\d).*");
-      client.tableOperations().setProperty(tablename, RegexGroupBalancer.DEFAUT_GROUP_PROPERTY,
-          "03");
-      client.tableOperations().setProperty(tablename, RegexGroupBalancer.WAIT_TIME_PROPERTY,
-          "50ms");
-      client.tableOperations().setProperty(tablename, Property.TABLE_LOAD_BALANCER.getKey(),
-          RegexGroupBalancer.class.getName());
+      HashMap<String,String> props = new HashMap<>();
+      props.put(RegexGroupBalancer.REGEX_PROPERTY, "(\\d\\d).*");
+      props.put(RegexGroupBalancer.DEFAUT_GROUP_PROPERTY, "03");
+      props.put(RegexGroupBalancer.WAIT_TIME_PROPERTY, "50ms");
+      props.put(Property.TABLE_LOAD_BALANCER.getKey(), RegexGroupBalancer.class.getName());
 
-      client.tableOperations().addSplits(tablename, splits);
+      client.tableOperations().create(tablename,
+          new NewTableConfiguration().setProperties(props).withSplits(splits));
 
       while (true) {
         Thread.sleep(250);
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/SessionDurabilityIT.java b/test/src/main/java/org/apache/accumulo/test/functional/SessionDurabilityIT.java
index bcc8c80..254659a 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/SessionDurabilityIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/SessionDurabilityIT.java
@@ -16,6 +16,7 @@
  */
 package org.apache.accumulo.test.functional;
 
+import static java.util.Collections.singletonMap;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
@@ -27,6 +28,7 @@ import org.apache.accumulo.core.client.ConditionalWriter;
 import org.apache.accumulo.core.client.ConditionalWriter.Status;
 import org.apache.accumulo.core.client.ConditionalWriterConfig;
 import org.apache.accumulo.core.client.Durability;
+import org.apache.accumulo.core.client.admin.NewTableConfiguration;
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.data.Condition;
 import org.apache.accumulo.core.data.ConditionalMutation;
@@ -55,8 +57,8 @@ public class SessionDurabilityIT extends ConfigurableMacBase {
     try (AccumuloClient c = Accumulo.newClient().from(getClientProperties()).build()) {
       String tableName = getUniqueNames(1)[0];
       // table default has no durability
-      c.tableOperations().create(tableName);
-      c.tableOperations().setProperty(tableName, Property.TABLE_DURABILITY.getKey(), "none");
+      c.tableOperations().create(tableName, new NewTableConfiguration()
+          .setProperties(singletonMap(Property.TABLE_DURABILITY.getKey(), "none")));
       // send durable writes
       BatchWriterConfig cfg = new BatchWriterConfig();
       cfg.setDurability(Durability.SYNC);
@@ -73,8 +75,8 @@ public class SessionDurabilityIT extends ConfigurableMacBase {
     try (AccumuloClient c = Accumulo.newClient().from(getClientProperties()).build()) {
       String tableName = getUniqueNames(1)[0];
       // table default is durable writes
-      c.tableOperations().create(tableName);
-      c.tableOperations().setProperty(tableName, Property.TABLE_DURABILITY.getKey(), "sync");
+      c.tableOperations().create(tableName, new NewTableConfiguration()
+          .setProperties(singletonMap(Property.TABLE_DURABILITY.getKey(), "sync")));
       // write with no durability
       BatchWriterConfig cfg = new BatchWriterConfig();
       cfg.setDurability(Durability.NONE);
@@ -105,8 +107,8 @@ public class SessionDurabilityIT extends ConfigurableMacBase {
     try (AccumuloClient c = Accumulo.newClient().from(getClientProperties()).build()) {
       String tableName = getUniqueNames(1)[0];
       // table default is durable writes
-      c.tableOperations().create(tableName);
-      c.tableOperations().setProperty(tableName, Property.TABLE_DURABILITY.getKey(), "sync");
+      c.tableOperations().create(tableName, new NewTableConfiguration()
+          .setProperties(singletonMap(Property.TABLE_DURABILITY.getKey(), "sync")));
       // write without durability
       ConditionalWriterConfig cfg = new ConditionalWriterConfig();
       cfg.setDurability(Durability.NONE);
@@ -124,8 +126,8 @@ public class SessionDurabilityIT extends ConfigurableMacBase {
     try (AccumuloClient c = Accumulo.newClient().from(getClientProperties()).build()) {
       String tableName = getUniqueNames(1)[0];
       // table default is durable writes
-      c.tableOperations().create(tableName);
-      c.tableOperations().setProperty(tableName, Property.TABLE_DURABILITY.getKey(), "none");
+      c.tableOperations().create(tableName, new NewTableConfiguration()
+          .setProperties(singletonMap(Property.TABLE_DURABILITY.getKey(), "none")));
       // write with durability
       ConditionalWriterConfig cfg = new ConditionalWriterConfig();
       cfg.setDurability(Durability.SYNC);
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/SplitIT.java b/test/src/main/java/org/apache/accumulo/test/functional/SplitIT.java
index 2fd3412..d987d9d 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/SplitIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/SplitIT.java
@@ -16,10 +16,12 @@
  */
 package org.apache.accumulo.test.functional;
 
+import static java.util.Collections.singletonMap;
 import static org.apache.accumulo.fate.util.UtilWaitThread.sleepUninterruptibly;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
+import java.util.HashMap;
 import java.util.Map;
 import java.util.Map.Entry;
 import java.util.concurrent.TimeUnit;
@@ -28,6 +30,7 @@ import org.apache.accumulo.core.client.Accumulo;
 import org.apache.accumulo.core.client.AccumuloClient;
 import org.apache.accumulo.core.client.Scanner;
 import org.apache.accumulo.core.client.admin.InstanceOperations;
+import org.apache.accumulo.core.client.admin.NewTableConfiguration;
 import org.apache.accumulo.core.conf.ConfigurationTypeHelper;
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.data.Key;
@@ -122,10 +125,12 @@ public class SplitIT extends AccumuloClusterHarness {
   public void tabletShouldSplit() throws Exception {
     try (AccumuloClient c = Accumulo.newClient().from(getClientProps()).build()) {
       String table = getUniqueNames(1)[0];
-      c.tableOperations().create(table);
-      c.tableOperations().setProperty(table, Property.TABLE_SPLIT_THRESHOLD.getKey(), "256K");
-      c.tableOperations().setProperty(table, Property.TABLE_FILE_COMPRESSED_BLOCK_SIZE.getKey(),
-          "1K");
+
+      Map props = new HashMap<>();
+      props.put(Property.TABLE_SPLIT_THRESHOLD.getKey(), "256K");
+      props.put(Property.TABLE_FILE_COMPRESSED_BLOCK_SIZE.getKey(), "1K");
+
+      c.tableOperations().create(table, new NewTableConfiguration().setProperties(props));
       VerifyParams params = new VerifyParams(getClientProps(), table, 100_000);
       TestIngest.ingest(c, params);
       VerifyIngest.verifyIngest(c, params);
@@ -159,10 +164,13 @@ public class SplitIT extends AccumuloClusterHarness {
   public void interleaveSplit() throws Exception {
     try (AccumuloClient c = Accumulo.newClient().from(getClientProps()).build()) {
       String tableName = getUniqueNames(1)[0];
-      c.tableOperations().create(tableName);
-      c.tableOperations().setProperty(tableName, Property.TABLE_SPLIT_THRESHOLD.getKey(), "10K");
-      c.tableOperations().setProperty(tableName, Property.TABLE_FILE_COMPRESSION_TYPE.getKey(),
-          "none");
+
+      Map props = new HashMap<>();
+      props.put(Property.TABLE_SPLIT_THRESHOLD.getKey(), "10K");
+      props.put(Property.TABLE_FILE_COMPRESSION_TYPE.getKey(), "none");
+
+      c.tableOperations().create(tableName, new NewTableConfiguration().setProperties(props));
+
       sleepUninterruptibly(5, TimeUnit.SECONDS);
       ReadWriteIT.interleaveTest(c, tableName);
       sleepUninterruptibly(5, TimeUnit.SECONDS);
@@ -180,8 +188,8 @@ public class SplitIT extends AccumuloClusterHarness {
   public void deleteSplit() throws Exception {
     try (AccumuloClient c = Accumulo.newClient().from(getClientProps()).build()) {
       String tableName = getUniqueNames(1)[0];
-      c.tableOperations().create(tableName);
-      c.tableOperations().setProperty(tableName, Property.TABLE_SPLIT_THRESHOLD.getKey(), "10K");
+      c.tableOperations().create(tableName, new NewTableConfiguration()
+          .setProperties(singletonMap(Property.TABLE_SPLIT_THRESHOLD.getKey(), "10K")));
       DeleteIT.deleteTest(c, getCluster(), tableName);
       c.tableOperations().flush(tableName, null, null, true);
       for (int i = 0; i < 5; i++) {
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 4d125fc..a465af7 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
@@ -17,6 +17,7 @@
 package org.apache.accumulo.test.functional;
 
 import static java.nio.charset.StandardCharsets.UTF_8;
+import static java.util.Collections.singletonMap;
 import static org.junit.Assert.assertEquals;
 
 import java.util.Map;
@@ -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;
@@ -76,10 +78,10 @@ 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,
+          new NewTableConfiguration()
+              .setProperties(singletonMap(Property.TABLE_SPLIT_THRESHOLD.getKey(), "200"))
+              .withSplits(keys));
       try (BatchWriter b = accumuloClient.createBatchWriter(tableName)) {
         // populate
         for (int i = 0; i < N; i++) {
diff --git a/test/src/main/java/org/apache/accumulo/test/replication/KerberosReplicationIT.java b/test/src/main/java/org/apache/accumulo/test/replication/KerberosReplicationIT.java
index 06b3f31..07c1445 100644
--- a/test/src/main/java/org/apache/accumulo/test/replication/KerberosReplicationIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/replication/KerberosReplicationIT.java
@@ -21,12 +21,15 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 
 import java.security.PrivilegedExceptionAction;
+import java.util.HashMap;
+import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Set;
 
 import org.apache.accumulo.cluster.ClusterUser;
 import org.apache.accumulo.core.client.AccumuloClient;
 import org.apache.accumulo.core.client.BatchWriter;
+import org.apache.accumulo.core.client.admin.NewTableConfiguration;
 import org.apache.accumulo.core.client.security.tokens.KerberosToken;
 import org.apache.accumulo.core.client.security.tokens.PasswordToken;
 import org.apache.accumulo.core.clientImpl.ClientInfo;
@@ -193,24 +196,24 @@ public class KerberosReplicationIT extends AccumuloITBase {
         String primaryTable1 = "primary", peerTable1 = "peer";
 
         // Create tables
-        primaryclient.tableOperations().create(primaryTable1);
-        String masterTableId1 = primaryclient.tableOperations().tableIdMap().get(primaryTable1);
-        assertNotNull(masterTableId1);
-
         peerclient.tableOperations().create(peerTable1);
         String peerTableId1 = peerclient.tableOperations().tableIdMap().get(peerTable1);
         assertNotNull(peerTableId1);
 
+        Map<String,String> props = new HashMap<>();
+        props.put(Property.TABLE_REPLICATION.getKey(), "true");
+        // Replicate this table to the peerClusterName in a table with the peerTableId table id
+        props.put(Property.TABLE_REPLICATION_TARGET.getKey() + PEER_NAME, peerTableId1);
+
+        primaryclient.tableOperations().create(primaryTable1,
+            new NewTableConfiguration().setProperties(props));
+        String masterTableId1 = primaryclient.tableOperations().tableIdMap().get(primaryTable1);
+        assertNotNull(masterTableId1);
+
         // Grant write permission
         peerclient.securityOperations().grantTablePermission(replicationUser.getPrincipal(),
             peerTable1, TablePermission.WRITE);
 
-        // Replicate this table to the peerClusterName in a table with the peerTableId table id
-        primaryclient.tableOperations().setProperty(primaryTable1,
-            Property.TABLE_REPLICATION.getKey(), "true");
-        primaryclient.tableOperations().setProperty(primaryTable1,
-            Property.TABLE_REPLICATION_TARGET.getKey() + PEER_NAME, peerTableId1);
-
         // Write some data to table1
         long masterTable1Records = 0L;
         try (BatchWriter bw = primaryclient.createBatchWriter(primaryTable1)) {
diff --git a/test/src/main/java/org/apache/accumulo/test/replication/MultiInstanceReplicationIT.java b/test/src/main/java/org/apache/accumulo/test/replication/MultiInstanceReplicationIT.java
index 4cf27fa..3d1c547 100644
--- a/test/src/main/java/org/apache/accumulo/test/replication/MultiInstanceReplicationIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/replication/MultiInstanceReplicationIT.java
@@ -39,6 +39,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.client.security.tokens.PasswordToken;
 import org.apache.accumulo.core.conf.ClientProperty;
 import org.apache.accumulo.core.conf.Property;
@@ -202,11 +203,7 @@ public class MultiInstanceReplicationIT extends ConfigurableMacBase {
 
       final String masterTable = "master", peerTable = "peer";
 
-      clientMaster.tableOperations().create(masterTable);
-      String masterTableId = clientMaster.tableOperations().tableIdMap().get(masterTable);
-      assertNotNull(masterTableId);
-
-      clientPeer.tableOperations().create(peerTable);
+      clientPeer.tableOperations().create(peerTable, new NewTableConfiguration());
       String peerTableId = clientPeer.tableOperations().tableIdMap().get(peerTable);
       assertNotNull(peerTableId);
 
@@ -214,10 +211,14 @@ public class MultiInstanceReplicationIT extends ConfigurableMacBase {
           TablePermission.WRITE);
 
       // Replicate this table to the peerClusterName in a table with the peerTableId table id
-      clientMaster.tableOperations().setProperty(masterTable, Property.TABLE_REPLICATION.getKey(),
-          "true");
-      clientMaster.tableOperations().setProperty(masterTable,
-          Property.TABLE_REPLICATION_TARGET.getKey() + peerClusterName, peerTableId);
+      Map<String,String> props = new HashMap<>();
+      props.put(Property.TABLE_REPLICATION.getKey(), "true");
+      props.put(Property.TABLE_REPLICATION_TARGET.getKey() + peerClusterName, peerTableId);
+
+      clientMaster.tableOperations().create(masterTable,
+          new NewTableConfiguration().setProperties(props));
+      String masterTableId = clientMaster.tableOperations().tableIdMap().get(masterTable);
+      assertNotNull(masterTableId);
 
       // Write some data to table1
       try (BatchWriter bw = clientMaster.createBatchWriter(masterTable)) {
@@ -374,39 +375,37 @@ public class MultiInstanceReplicationIT extends ConfigurableMacBase {
           peerTable2 = "peer2";
 
       // Create tables
-      clientMaster.tableOperations().create(masterTable1);
-      String masterTableId1 = clientMaster.tableOperations().tableIdMap().get(masterTable1);
-      assertNotNull(masterTableId1);
-
-      clientMaster.tableOperations().create(masterTable2);
-      String masterTableId2 = clientMaster.tableOperations().tableIdMap().get(masterTable2);
-      assertNotNull(masterTableId2);
-
-      clientPeer.tableOperations().create(peerTable1);
+      clientPeer.tableOperations().create(peerTable1, new NewTableConfiguration());
       String peerTableId1 = clientPeer.tableOperations().tableIdMap().get(peerTable1);
       assertNotNull(peerTableId1);
 
-      clientPeer.tableOperations().create(peerTable2);
+      clientPeer.tableOperations().create(peerTable2, new NewTableConfiguration());
       String peerTableId2 = clientPeer.tableOperations().tableIdMap().get(peerTable2);
       assertNotNull(peerTableId2);
 
-      // Grant write permission
+      Map<String,String> props1 = new HashMap<>();
+      props1.put(Property.TABLE_REPLICATION.getKey(), "true");
+      props1.put(Property.TABLE_REPLICATION_TARGET.getKey() + peerClusterName, peerTableId1);
+
+      clientMaster.tableOperations().create(masterTable1,
+          new NewTableConfiguration().setProperties(props1));
+      String masterTableId1 = clientMaster.tableOperations().tableIdMap().get(masterTable1);
+      assertNotNull(masterTableId1);
+      Map<String,String> props2 = new HashMap<>();
+      props2.put(Property.TABLE_REPLICATION.getKey(), "true");
+      props2.put(Property.TABLE_REPLICATION_TARGET.getKey() + peerClusterName, peerTableId2);
+
+      clientMaster.tableOperations().create(masterTable2,
+          new NewTableConfiguration().setProperties(props2));
+      String masterTableId2 = clientMaster.tableOperations().tableIdMap().get(masterTable2);
+      assertNotNull(masterTableId2);
+
+      // Give our replication user the ability to write to the tables
       clientPeer.securityOperations().grantTablePermission(peerUserName, peerTable1,
           TablePermission.WRITE);
       clientPeer.securityOperations().grantTablePermission(peerUserName, peerTable2,
           TablePermission.WRITE);
 
-      // Replicate this table to the peerClusterName in a table with the peerTableId table id
-      clientMaster.tableOperations().setProperty(masterTable1, Property.TABLE_REPLICATION.getKey(),
-          "true");
-      clientMaster.tableOperations().setProperty(masterTable1,
-          Property.TABLE_REPLICATION_TARGET.getKey() + peerClusterName, peerTableId1);
-
-      clientMaster.tableOperations().setProperty(masterTable2, Property.TABLE_REPLICATION.getKey(),
-          "true");
-      clientMaster.tableOperations().setProperty(masterTable2,
-          Property.TABLE_REPLICATION_TARGET.getKey() + peerClusterName, peerTableId2);
-
       // Write some data to table1
       long masterTable1Records = 0L;
       try (BatchWriter bw = clientMaster.createBatchWriter(masterTable1)) {
@@ -534,12 +533,7 @@ public class MultiInstanceReplicationIT extends ConfigurableMacBase {
           .setProperty(Property.REPLICATION_PEER_PASSWORD.getKey() + peerClusterName, peerPassword);
 
       String masterTable = "master", peerTable = "peer";
-
-      clientMaster.tableOperations().create(masterTable);
-      String masterTableId = clientMaster.tableOperations().tableIdMap().get(masterTable);
-      assertNotNull(masterTableId);
-
-      clientPeer.tableOperations().create(peerTable);
+      clientPeer.tableOperations().create(peerTable, new NewTableConfiguration());
       String peerTableId = clientPeer.tableOperations().tableIdMap().get(peerTable);
       assertNotNull(peerTableId);
 
@@ -547,11 +541,14 @@ public class MultiInstanceReplicationIT extends ConfigurableMacBase {
       clientPeer.securityOperations().grantTablePermission(peerUserName, peerTable,
           TablePermission.WRITE);
 
+      Map<String,String> props = new HashMap<>();
+      props.put(Property.TABLE_REPLICATION.getKey(), "true");
       // Replicate this table to the peerClusterName in a table with the peerTableId table id
-      clientMaster.tableOperations().setProperty(masterTable, Property.TABLE_REPLICATION.getKey(),
-          "true");
-      clientMaster.tableOperations().setProperty(masterTable,
-          Property.TABLE_REPLICATION_TARGET.getKey() + peerClusterName, peerTableId);
+      props.put(Property.TABLE_REPLICATION_TARGET.getKey() + peerClusterName, peerTableId);
+      clientMaster.tableOperations().create(masterTable,
+          new NewTableConfiguration().setProperties(props));
+      String masterTableId = clientMaster.tableOperations().tableIdMap().get(masterTable);
+      assertNotNull(masterTableId);
 
       // Write some data to table1
       try (BatchWriter bw = clientMaster.createBatchWriter(masterTable)) {
@@ -654,23 +651,33 @@ public class MultiInstanceReplicationIT extends ConfigurableMacBase {
 
       String masterTable1 = "master1", peerTable1 = "peer1", masterTable2 = "master2",
           peerTable2 = "peer2";
+      // Create tables
+      clientPeer.tableOperations().create(peerTable1, new NewTableConfiguration());
+      String peerTableId1 = clientPeer.tableOperations().tableIdMap().get(peerTable1);
+      assertNotNull(peerTableId1);
 
-      clientMaster.tableOperations().create(masterTable1);
+      clientPeer.tableOperations().create(peerTable2, new NewTableConfiguration());
+      String peerTableId2 = clientPeer.tableOperations().tableIdMap().get(peerTable2);
+      assertNotNull(peerTableId2);
+
+      Map<String,String> props1 = new HashMap<>();
+      props1.put(Property.TABLE_REPLICATION.getKey(), "true");
+      props1.put(Property.TABLE_REPLICATION_TARGET.getKey() + peerClusterName, peerTableId2);
+
+      clientMaster.tableOperations().create(masterTable1,
+          new NewTableConfiguration().setProperties(props1));
       String masterTableId1 = clientMaster.tableOperations().tableIdMap().get(masterTable1);
       assertNotNull(masterTableId1);
 
-      clientMaster.tableOperations().create(masterTable2);
+      Map<String,String> props2 = new HashMap<>();
+      props2.put(Property.TABLE_REPLICATION.getKey(), "true");
+      props2.put(Property.TABLE_REPLICATION_TARGET.getKey() + peerClusterName, peerTableId2);
+
+      clientMaster.tableOperations().create(masterTable2,
+          new NewTableConfiguration().setProperties(props2));
       String masterTableId2 = clientMaster.tableOperations().tableIdMap().get(masterTable2);
       assertNotNull(masterTableId2);
 
-      clientPeer.tableOperations().create(peerTable1);
-      String peerTableId1 = clientPeer.tableOperations().tableIdMap().get(peerTable1);
-      assertNotNull(peerTableId1);
-
-      clientPeer.tableOperations().create(peerTable2);
-      String peerTableId2 = clientPeer.tableOperations().tableIdMap().get(peerTable2);
-      assertNotNull(peerTableId2);
-
       // Give our replication user the ability to write to the tables
       clientPeer.securityOperations().grantTablePermission(peerUserName, peerTable1,
           TablePermission.WRITE);
@@ -678,13 +685,8 @@ public class MultiInstanceReplicationIT extends ConfigurableMacBase {
           TablePermission.WRITE);
 
       // Replicate this table to the peerClusterName in a table with the peerTableId table id
-      clientMaster.tableOperations().setProperty(masterTable1, Property.TABLE_REPLICATION.getKey(),
-          "true");
       clientMaster.tableOperations().setProperty(masterTable1,
           Property.TABLE_REPLICATION_TARGET.getKey() + peerClusterName, peerTableId1);
-
-      clientMaster.tableOperations().setProperty(masterTable2, Property.TABLE_REPLICATION.getKey(),
-          "true");
       clientMaster.tableOperations().setProperty(masterTable2,
           Property.TABLE_REPLICATION_TARGET.getKey() + peerClusterName, peerTableId2);
 
diff --git a/test/src/main/java/org/apache/accumulo/test/replication/ReplicationIT.java b/test/src/main/java/org/apache/accumulo/test/replication/ReplicationIT.java
index 12c3bef..1ace750 100644
--- a/test/src/main/java/org/apache/accumulo/test/replication/ReplicationIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/replication/ReplicationIT.java
@@ -17,6 +17,7 @@
 package org.apache.accumulo.test.replication;
 
 import static java.nio.charset.StandardCharsets.UTF_8;
+import static java.util.Collections.singletonMap;
 import static org.apache.accumulo.fate.util.UtilWaitThread.sleepUninterruptibly;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
@@ -29,6 +30,7 @@ import java.net.URISyntaxException;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.EnumSet;
+import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
@@ -51,6 +53,7 @@ import org.apache.accumulo.core.client.IteratorSetting.Column;
 import org.apache.accumulo.core.client.Scanner;
 import org.apache.accumulo.core.client.TableNotFoundException;
 import org.apache.accumulo.core.client.TableOfflineException;
+import org.apache.accumulo.core.client.admin.NewTableConfiguration;
 import org.apache.accumulo.core.client.admin.TableOperations;
 import org.apache.accumulo.core.clientImpl.ClientInfo;
 import org.apache.accumulo.core.conf.ClientProperty;
@@ -296,9 +299,9 @@ public class ReplicationIT extends ConfigurableMacBase {
   public void correctRecordsCompleteFile() throws Exception {
     try (AccumuloClient client = Accumulo.newClient().from(getClientProperties()).build()) {
       String table = "table1";
-      client.tableOperations().create(table);
-      // If we have more than one tserver, this is subject to a race condition.
-      client.tableOperations().setProperty(table, Property.TABLE_REPLICATION.getKey(), "true");
+      client.tableOperations().create(table, new NewTableConfiguration()
+          // If we have more than one tserver, this is subject to a race condition.
+          .setProperties(singletonMap(Property.TABLE_REPLICATION.getKey(), "true")));
 
       try (BatchWriter bw = client.createBatchWriter(table)) {
         for (int i = 0; i < 10; i++) {
@@ -563,28 +566,25 @@ public class ReplicationIT extends ConfigurableMacBase {
       });
 
       t.start();
+      HashMap<String,String> replicate_props = new HashMap<>();
+      replicate_props.put(Property.TABLE_REPLICATION.getKey(), "true");
+      replicate_props.put(Property.TABLE_REPLICATION_TARGET.getKey() + "cluster1", "1");
 
-      client.tableOperations().create(table1);
-      client.tableOperations().setProperty(table1, Property.TABLE_REPLICATION.getKey(), "true");
-      client.tableOperations().setProperty(table1,
-          Property.TABLE_REPLICATION_TARGET.getKey() + "cluster1", "1");
+      client.tableOperations().create(table1,
+          new NewTableConfiguration().setProperties(replicate_props));
       Thread.sleep(2000);
 
       // Write some data to table1
       writeSomeData(client, table1, 200, 500);
 
-      client.tableOperations().create(table2);
-      client.tableOperations().setProperty(table2, Property.TABLE_REPLICATION.getKey(), "true");
-      client.tableOperations().setProperty(table2,
-          Property.TABLE_REPLICATION_TARGET.getKey() + "cluster1", "1");
+      client.tableOperations().create(table2,
+          new NewTableConfiguration().setProperties(replicate_props));
       Thread.sleep(2000);
 
       writeSomeData(client, table2, 200, 500);
 
-      client.tableOperations().create(table3);
-      client.tableOperations().setProperty(table3, Property.TABLE_REPLICATION.getKey(), "true");
-      client.tableOperations().setProperty(table3,
-          Property.TABLE_REPLICATION_TARGET.getKey() + "cluster1", "1");
+      client.tableOperations().create(table3,
+          new NewTableConfiguration().setProperties(replicate_props));
       Thread.sleep(2000);
 
       writeSomeData(client, table3, 200, 500);
@@ -709,19 +709,19 @@ public class ReplicationIT extends ConfigurableMacBase {
           TablePermission.WRITE);
       client.tableOperations().deleteRows(ReplicationTable.NAME, null, null);
 
+      Map<String,String> replicate_props = new HashMap<>();
+      replicate_props.put(Property.TABLE_REPLICATION.getKey(), "true");
+      replicate_props.put(Property.TABLE_REPLICATION_TARGET.getKey() + "cluster1", "1");
+
       String table1 = "table1", table2 = "table2", table3 = "table3";
-      client.tableOperations().create(table1);
-      client.tableOperations().setProperty(table1, Property.TABLE_REPLICATION.getKey(), "true");
-      client.tableOperations().setProperty(table1,
-          Property.TABLE_REPLICATION_TARGET.getKey() + "cluster1", "1");
-      client.tableOperations().create(table2);
-      client.tableOperations().setProperty(table2, Property.TABLE_REPLICATION.getKey(), "true");
-      client.tableOperations().setProperty(table2,
-          Property.TABLE_REPLICATION_TARGET.getKey() + "cluster1", "1");
-      client.tableOperations().create(table3);
-      client.tableOperations().setProperty(table3, Property.TABLE_REPLICATION.getKey(), "true");
-      client.tableOperations().setProperty(table3,
-          Property.TABLE_REPLICATION_TARGET.getKey() + "cluster1", "1");
+      client.tableOperations().create(table1,
+          new NewTableConfiguration().setProperties(replicate_props));
+
+      client.tableOperations().create(table2,
+          new NewTableConfiguration().setProperties(replicate_props));
+
+      client.tableOperations().create(table3,
+          new NewTableConfiguration().setProperties(replicate_props));
 
       writeSomeData(client, table1, 200, 500);
 
@@ -750,14 +750,16 @@ public class ReplicationIT extends ConfigurableMacBase {
     try (AccumuloClient client = Accumulo.newClient().from(getClientProperties()).build()) {
 
       String table = "table";
-      client.tableOperations().create(table);
+      Map<String,String> replicate_props = new HashMap<>();
+      replicate_props.put(Property.TABLE_REPLICATION.getKey(), "true");
+      replicate_props.put(Property.TABLE_REPLICATION_TARGET.getKey() + "cluster1", "1");
+
+      client.tableOperations().create(table,
+          new NewTableConfiguration().setProperties(replicate_props));
       TableId tableId = TableId.of(client.tableOperations().tableIdMap().get(table));
 
       assertNotNull(tableId);
 
-      client.tableOperations().setProperty(table, Property.TABLE_REPLICATION.getKey(), "true");
-      client.tableOperations().setProperty(table,
-          Property.TABLE_REPLICATION_TARGET.getKey() + "cluster1", "1");
       // just sleep
       client.instanceOperations().setProperty(Property.REPLICATION_PEERS.getKey() + "cluster1",
           ReplicaSystemFactory.getPeerConfigurationValue(MockReplicaSystem.class, "50000"));
@@ -1150,29 +1152,27 @@ public class ReplicationIT extends ConfigurableMacBase {
       t.start();
 
       String table1 = "table1", table2 = "table2", table3 = "table3";
+      Map<String,String> replicate_props = new HashMap<>();
+      replicate_props.put(Property.TABLE_REPLICATION.getKey(), "true");
+      replicate_props.put(Property.TABLE_REPLICATION_TARGET.getKey() + "cluster1", "1");
 
       try {
-        client.tableOperations().create(table1);
-        client.tableOperations().setProperty(table1, Property.TABLE_REPLICATION.getKey(), "true");
-        client.tableOperations().setProperty(table1,
-            Property.TABLE_REPLICATION_TARGET.getKey() + "cluster1", "1");
+        client.tableOperations().create(table1,
+            new NewTableConfiguration().setProperties(replicate_props));
+
         client.instanceOperations().setProperty(Property.REPLICATION_PEERS.getKey() + "cluster1",
             ReplicaSystemFactory.getPeerConfigurationValue(MockReplicaSystem.class, null));
 
         // Write some data to table1
         writeSomeData(client, table1, 200, 500);
 
-        client.tableOperations().create(table2);
-        client.tableOperations().setProperty(table2, Property.TABLE_REPLICATION.getKey(), "true");
-        client.tableOperations().setProperty(table2,
-            Property.TABLE_REPLICATION_TARGET.getKey() + "cluster1", "1");
+        client.tableOperations().create(table2,
+            new NewTableConfiguration().setProperties(replicate_props));
 
         writeSomeData(client, table2, 200, 500);
 
-        client.tableOperations().create(table3);
-        client.tableOperations().setProperty(table3, Property.TABLE_REPLICATION.getKey(), "true");
-        client.tableOperations().setProperty(table3,
-            Property.TABLE_REPLICATION_TARGET.getKey() + "cluster1", "1");
+        client.tableOperations().create(table3,
+            new NewTableConfiguration().setProperties(replicate_props));
 
         writeSomeData(client, table3, 200, 500);
 
diff --git a/test/src/main/java/org/apache/accumulo/test/replication/UnorderedWorkAssignerReplicationIT.java b/test/src/main/java/org/apache/accumulo/test/replication/UnorderedWorkAssignerReplicationIT.java
index 026a71b..d8ded26 100644
--- a/test/src/main/java/org/apache/accumulo/test/replication/UnorderedWorkAssignerReplicationIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/replication/UnorderedWorkAssignerReplicationIT.java
@@ -39,6 +39,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.client.security.tokens.PasswordToken;
 import org.apache.accumulo.core.conf.ClientProperty;
 import org.apache.accumulo.core.conf.Property;
@@ -103,7 +104,7 @@ public class UnorderedWorkAssignerReplicationIT extends ConfigurableMacBase {
 
   @Override
   public int defaultTimeoutSeconds() {
-    return 60 * 5;
+    return 60 * 6;
   }
 
   @Override
@@ -207,23 +208,22 @@ public class UnorderedWorkAssignerReplicationIT extends ConfigurableMacBase {
 
       final String masterTable = "master", peerTable = "peer";
 
-      clientMaster.tableOperations().create(masterTable);
-      String masterTableId = clientMaster.tableOperations().tableIdMap().get(masterTable);
-      assertNotNull(masterTableId);
-
       clientPeer.tableOperations().create(peerTable);
       String peerTableId = clientPeer.tableOperations().tableIdMap().get(peerTable);
       assertNotNull(peerTableId);
 
+      Map<String,String> props = new HashMap<>();
+      props.put(Property.TABLE_REPLICATION.getKey(), "true");
+      props.put(Property.TABLE_REPLICATION_TARGET.getKey() + peerClusterName, peerTableId);
+
+      clientMaster.tableOperations().create(masterTable,
+          new NewTableConfiguration().setProperties(props));
+      String masterTableId = clientMaster.tableOperations().tableIdMap().get(masterTable);
+      assertNotNull(masterTableId);
+
       clientPeer.securityOperations().grantTablePermission(peerUserName, peerTable,
           TablePermission.WRITE);
 
-      // Replicate this table to the peerClusterName in a table with the peerTableId table id
-      clientMaster.tableOperations().setProperty(masterTable, Property.TABLE_REPLICATION.getKey(),
-          "true");
-      clientMaster.tableOperations().setProperty(masterTable,
-          Property.TABLE_REPLICATION_TARGET.getKey() + peerClusterName, peerTableId);
-
       // Wait for zookeeper updates (configuration) to propagate
       sleepUninterruptibly(3, TimeUnit.SECONDS);
 
@@ -371,13 +371,6 @@ public class UnorderedWorkAssignerReplicationIT extends ConfigurableMacBase {
           peerTable2 = "peer2";
 
       // Create tables
-      clientMaster.tableOperations().create(masterTable1);
-      String masterTableId1 = clientMaster.tableOperations().tableIdMap().get(masterTable1);
-      assertNotNull(masterTableId1);
-
-      clientMaster.tableOperations().create(masterTable2);
-      String masterTableId2 = clientMaster.tableOperations().tableIdMap().get(masterTable2);
-      assertNotNull(masterTableId2);
 
       clientPeer.tableOperations().create(peerTable1);
       String peerTableId1 = clientPeer.tableOperations().tableIdMap().get(peerTable1);
@@ -393,16 +386,23 @@ public class UnorderedWorkAssignerReplicationIT extends ConfigurableMacBase {
       clientPeer.securityOperations().grantTablePermission(peerUserName, peerTable2,
           TablePermission.WRITE);
 
-      // Replicate this table to the peerClusterName in a table with the peerTableId table id
-      clientMaster.tableOperations().setProperty(masterTable1, Property.TABLE_REPLICATION.getKey(),
-          "true");
-      clientMaster.tableOperations().setProperty(masterTable1,
-          Property.TABLE_REPLICATION_TARGET.getKey() + peerClusterName, peerTableId1);
+      Map<String,String> props1 = new HashMap<>();
+      props1.put(Property.TABLE_REPLICATION.getKey(), "true");
+      props1.put(Property.TABLE_REPLICATION_TARGET.getKey() + peerClusterName, peerTableId1);
+
+      clientMaster.tableOperations().create(masterTable1,
+          new NewTableConfiguration().setProperties(props1));
+      String masterTableId1 = clientMaster.tableOperations().tableIdMap().get(masterTable1);
+      assertNotNull(masterTableId1);
 
-      clientMaster.tableOperations().setProperty(masterTable2, Property.TABLE_REPLICATION.getKey(),
-          "true");
-      clientMaster.tableOperations().setProperty(masterTable2,
-          Property.TABLE_REPLICATION_TARGET.getKey() + peerClusterName, peerTableId2);
+      Map<String,String> props2 = new HashMap<>();
+      props2.put(Property.TABLE_REPLICATION.getKey(), "true");
+      props2.put(Property.TABLE_REPLICATION_TARGET.getKey() + peerClusterName, peerTableId2);
+
+      clientMaster.tableOperations().create(masterTable2,
+          new NewTableConfiguration().setProperties(props2));
+      String masterTableId2 = clientMaster.tableOperations().tableIdMap().get(masterTable2);
+      assertNotNull(masterTableId2);
 
       // Wait for zookeeper updates (configuration) to propagate
       sleepUninterruptibly(3, TimeUnit.SECONDS);
@@ -546,24 +546,23 @@ public class UnorderedWorkAssignerReplicationIT extends ConfigurableMacBase {
 
       String masterTable = "master", peerTable = "peer";
 
-      clientMaster.tableOperations().create(masterTable);
-      String masterTableId = clientMaster.tableOperations().tableIdMap().get(masterTable);
-      assertNotNull(masterTableId);
-
       clientPeer.tableOperations().create(peerTable);
       String peerTableId = clientPeer.tableOperations().tableIdMap().get(peerTable);
       assertNotNull(peerTableId);
 
+      Map<String,String> props = new HashMap<>();
+      props.put(Property.TABLE_REPLICATION.getKey(), "true");
+      props.put(Property.TABLE_REPLICATION_TARGET.getKey() + peerClusterName, peerTableId);
+
+      clientMaster.tableOperations().create(masterTable,
+          new NewTableConfiguration().setProperties(props));
+      String masterTableId = clientMaster.tableOperations().tableIdMap().get(masterTable);
+      assertNotNull(masterTableId);
+
       // Give our replication user the ability to write to the table
       clientPeer.securityOperations().grantTablePermission(peerUserName, peerTable,
           TablePermission.WRITE);
 
-      // Replicate this table to the peerClusterName in a table with the peerTableId table id
-      clientMaster.tableOperations().setProperty(masterTable, Property.TABLE_REPLICATION.getKey(),
-          "true");
-      clientMaster.tableOperations().setProperty(masterTable,
-          Property.TABLE_REPLICATION_TARGET.getKey() + peerClusterName, peerTableId);
-
       // Write some data to table1
       try (BatchWriter bw = clientMaster.createBatchWriter(masterTable)) {
         for (int rows = 0; rows < 5000; rows++) {
@@ -661,40 +660,38 @@ public class UnorderedWorkAssignerReplicationIT extends ConfigurableMacBase {
 
       String masterTable1 = "master1", peerTable1 = "peer1", masterTable2 = "master2",
           peerTable2 = "peer2";
+      clientPeer.tableOperations().create(peerTable1, new NewTableConfiguration());
+      String peerTableId1 = clientPeer.tableOperations().tableIdMap().get(peerTable1);
+      assertNotNull(peerTableId1);
+
+      clientPeer.tableOperations().create(peerTable2, new NewTableConfiguration());
+      String peerTableId2 = clientPeer.tableOperations().tableIdMap().get(peerTable2);
+      assertNotNull(peerTableId2);
+
+      Map<String,String> props1 = new HashMap<>();
+      props1.put(Property.TABLE_REPLICATION.getKey(), "true");
+      props1.put(Property.TABLE_REPLICATION_TARGET.getKey() + peerClusterName, peerTableId1);
 
-      clientMaster.tableOperations().create(masterTable1);
+      clientMaster.tableOperations().create(masterTable1,
+          new NewTableConfiguration().setProperties(props1));
       String masterTableId1 = clientMaster.tableOperations().tableIdMap().get(masterTable1);
       assertNotNull(masterTableId1);
 
-      clientMaster.tableOperations().create(masterTable2);
+      Map<String,String> props2 = new HashMap<>();
+      props2.put(Property.TABLE_REPLICATION.getKey(), "true");
+      props2.put(Property.TABLE_REPLICATION_TARGET.getKey() + peerClusterName, peerTableId2);
+
+      clientMaster.tableOperations().create(masterTable2,
+          new NewTableConfiguration().setProperties(props2));
       String masterTableId2 = clientMaster.tableOperations().tableIdMap().get(masterTable2);
       assertNotNull(masterTableId2);
 
-      clientPeer.tableOperations().create(peerTable1);
-      String peerTableId1 = clientPeer.tableOperations().tableIdMap().get(peerTable1);
-      assertNotNull(peerTableId1);
-
-      clientPeer.tableOperations().create(peerTable2);
-      String peerTableId2 = clientPeer.tableOperations().tableIdMap().get(peerTable2);
-      assertNotNull(peerTableId2);
-
       // Give our replication user the ability to write to the tables
       clientPeer.securityOperations().grantTablePermission(peerUserName, peerTable1,
           TablePermission.WRITE);
       clientPeer.securityOperations().grantTablePermission(peerUserName, peerTable2,
           TablePermission.WRITE);
 
-      // Replicate this table to the peerClusterName in a table with the peerTableId table id
-      clientMaster.tableOperations().setProperty(masterTable1, Property.TABLE_REPLICATION.getKey(),
-          "true");
-      clientMaster.tableOperations().setProperty(masterTable1,
-          Property.TABLE_REPLICATION_TARGET.getKey() + peerClusterName, peerTableId1);
-
-      clientMaster.tableOperations().setProperty(masterTable2, Property.TABLE_REPLICATION.getKey(),
-          "true");
-      clientMaster.tableOperations().setProperty(masterTable2,
-          Property.TABLE_REPLICATION_TARGET.getKey() + peerClusterName, peerTableId2);
-
       // Wait for zookeeper updates (configuration) to propagate
       sleepUninterruptibly(3, TimeUnit.SECONDS);
 


Mime
View raw message