From 6c376146db100e9a97c37e54059c9bc121cc0cb2 Mon Sep 17 00:00:00 2001 From: Dom Garguilo Date: Mon, 21 Oct 2024 14:03:28 -0400 Subject: [PATCH] Fix compilation error. Use new IO API --- .../accumulo/testing/performance/tests/SplitBalancingPT.java | 4 +--- .../accumulo/testing/randomwalk/bulk/SelectiveQueueing.java | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/apache/accumulo/testing/performance/tests/SplitBalancingPT.java b/src/main/java/org/apache/accumulo/testing/performance/tests/SplitBalancingPT.java index 1ab20a60..48d79b18 100644 --- a/src/main/java/org/apache/accumulo/testing/performance/tests/SplitBalancingPT.java +++ b/src/main/java/org/apache/accumulo/testing/performance/tests/SplitBalancingPT.java @@ -25,7 +25,6 @@ import org.apache.accumulo.core.client.AccumuloClient; import org.apache.accumulo.core.client.Scanner; -import org.apache.accumulo.core.client.admin.servers.ServerId; import org.apache.accumulo.core.data.Key; import org.apache.accumulo.core.data.Range; import org.apache.accumulo.core.data.Value; @@ -61,8 +60,7 @@ public Report runTest(final Environment env) throws Exception { client.tableOperations().addSplits(TABLE_NAME, getSplits()); client.instanceOperations().waitForBalance(); - int totalTabletServers = - client.instanceOperations().getServers(ServerId.Type.TABLET_SERVER).size(); + int totalTabletServers = client.instanceOperations().getTabletServers().size(); int expectedAllocation = NUM_SPLITS / totalTabletServers; int min = expectedAllocation - MARGIN; int max = expectedAllocation + MARGIN; diff --git a/src/main/java/org/apache/accumulo/testing/randomwalk/bulk/SelectiveQueueing.java b/src/main/java/org/apache/accumulo/testing/randomwalk/bulk/SelectiveQueueing.java index 186cfbb1..8ef6567b 100644 --- a/src/main/java/org/apache/accumulo/testing/randomwalk/bulk/SelectiveQueueing.java +++ b/src/main/java/org/apache/accumulo/testing/randomwalk/bulk/SelectiveQueueing.java @@ -21,7 +21,6 @@ import java.util.concurrent.ThreadPoolExecutor; import org.apache.accumulo.core.client.AccumuloClient; -import org.apache.accumulo.core.client.admin.servers.ServerId; import org.apache.accumulo.testing.randomwalk.RandWalkEnv; import org.apache.accumulo.testing.randomwalk.State; import org.slf4j.Logger; @@ -38,7 +37,7 @@ public static boolean shouldQueueOperation(State state, RandWalkEnv env) { final ThreadPoolExecutor pool = (ThreadPoolExecutor) state.get("pool"); long queuedThreads = pool.getTaskCount() - pool.getActiveCount() - pool.getCompletedTaskCount(); final AccumuloClient client = env.getAccumuloClient(); - int numTservers = client.instanceOperations().getServers(ServerId.Type.TABLET_SERVER).size(); + int numTservers = client.instanceOperations().getTabletServers().size(); if (!shouldQueue(queuedThreads, numTservers)) { log.info("Not queueing because of " + queuedThreads + " outstanding tasks");