From notifications-return-49735-archive-asf-public=cust-asf.ponee.io@accumulo.apache.org Mon May 6 17:43:59 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 5DCCC18060F for ; Mon, 6 May 2019 19:43:59 +0200 (CEST) Received: (qmail 80935 invoked by uid 500); 6 May 2019 17:43:58 -0000 Mailing-List: contact notifications-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jira@apache.org Delivered-To: mailing list notifications@accumulo.apache.org Received: (qmail 80924 invoked by uid 99); 6 May 2019 17:43:58 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 May 2019 17:43:58 +0000 From: GitBox To: notifications@accumulo.apache.org Subject: [GitHub] [accumulo] hkeebler commented on issue #405: Utilize NewTableConfiguration in ITs Message-ID: <155716463875.20557.11556745600858860853.gitbox@gitbox.apache.org> Date: Mon, 06 May 2019 17:43:58 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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