This is an automated email from the ASF dual-hosted git repository.

kturner pushed a commit to branch elasticity
in repository https://gitbox.apache.org/repos/asf/accumulo-testing.git


The following commit(s) were added to refs/heads/elasticity by this push:
     new b9809b0  removes use of newly deprecated methods (#284)
b9809b0 is described below

commit b9809b0f4791273c02d809cb847ab581c1bfefac
Author: Keith Turner <ktur...@apache.org>
AuthorDate: Fri Oct 18 10:36:21 2024 -0400

    removes use of newly deprecated methods (#284)
---
 .../apache/accumulo/testing/performance/tests/SplitBalancingPT.java   | 4 +++-
 .../apache/accumulo/testing/randomwalk/bulk/SelectiveQueueing.java    | 3 ++-
 2 files changed, 5 insertions(+), 2 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 48d79b1..1ab20a6 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,6 +25,7 @@ import java.util.TreeSet;
 
 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;
@@ -60,7 +61,8 @@ public class SplitBalancingPT implements PerformanceTest {
     client.tableOperations().addSplits(TABLE_NAME, getSplits());
     client.instanceOperations().waitForBalance();
 
-    int totalTabletServers = 
client.instanceOperations().getTabletServers().size();
+    int totalTabletServers =
+        
client.instanceOperations().getServers(ServerId.Type.TABLET_SERVER).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 8ef6567..186cfbb 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,6 +21,7 @@ package org.apache.accumulo.testing.randomwalk.bulk;
 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;
@@ -37,7 +38,7 @@ public class SelectiveQueueing {
     final ThreadPoolExecutor pool = (ThreadPoolExecutor) state.get("pool");
     long queuedThreads = pool.getTaskCount() - pool.getActiveCount() - 
pool.getCompletedTaskCount();
     final AccumuloClient client = env.getAccumuloClient();
-    int numTservers = client.instanceOperations().getTabletServers().size();
+    int numTservers = 
client.instanceOperations().getServers(ServerId.Type.TABLET_SERVER).size();
 
     if (!shouldQueue(queuedThreads, numTservers)) {
       log.info("Not queueing because of " + queuedThreads + " outstanding 
tasks");

Reply via email to