From a51ef0757a6b8dced0c421838996211a283a0b18 Mon Sep 17 00:00:00 2001 From: domgarguilo Date: Mon, 23 Aug 2021 11:07:11 -0400 Subject: [PATCH] Remove external comps. and replace foreach --- conf/accumulo-testing.properties | 5 ++++- .../accumulo/testing/continuous/CreateTable.java | 13 +++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/conf/accumulo-testing.properties b/conf/accumulo-testing.properties index 98b78a80..4f0e7493 100644 --- a/conf/accumulo-testing.properties +++ b/conf/accumulo-testing.properties @@ -42,7 +42,10 @@ test.ci.common.auths= # Accumulo tserver properties to set when creating a table test.ci.common.accumulo.server.props=\ tserver.compaction.major.service.cs1.planner=org.apache.accumulo.core.spi.compaction.DefaultCompactionPlanner \ -tserver.compaction.major.service.cs1.planner.opts.executors=[{"name":"small","type":"internal","maxSize":"32M","numThreads":4},{"name":"medium","type":"internal","maxSize":"128M","numThreads":2},{"name":"large","type":"external","queue":"DCQ1"}] +tserver.compaction.major.service.cs1.planner.opts.executors=\ +[{"name":"small","type":"internal","maxSize":"16M","numThreads":8},\ +{"name":"medium","type":"internal","maxSize":"128M","numThreads":4},\ +{"name":"large","type":"internal","numThreads":2}] # Accumulo table properties to set when creating table test.ci.common.accumulo.table.props=\ diff --git a/src/main/java/org/apache/accumulo/testing/continuous/CreateTable.java b/src/main/java/org/apache/accumulo/testing/continuous/CreateTable.java index d9211287..831d315f 100644 --- a/src/main/java/org/apache/accumulo/testing/continuous/CreateTable.java +++ b/src/main/java/org/apache/accumulo/testing/continuous/CreateTable.java @@ -59,13 +59,14 @@ public static void main(String[] args) throws Exception { // retrieve and set tserver props Map props = getProps(env, TestProps.CI_COMMON_ACCUMULO_SERVER_PROPS); - props.forEach((k, v) -> { - try { - client.instanceOperations().setProperty(k, v); - } catch (AccumuloException | AccumuloSecurityException e) { - e.printStackTrace(); + try { + for (Map.Entry entry : props.entrySet()) { + client.instanceOperations().setProperty(entry.getKey(), entry.getValue()); } - }); + } catch (AccumuloException | AccumuloSecurityException e) { + log.error("Failed to set tserver props"); + throw new Exception(e); + } SortedSet splits = new TreeSet<>(); final int numSplits = numTablets - 1;