Skip to content

Commit

Permalink
Fix compilation error. Use new IO API
Browse files Browse the repository at this point in the history
  • Loading branch information
DomGarguilo committed Oct 21, 2024
1 parent 5063a88 commit 6c37614
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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");
Expand Down

0 comments on commit 6c37614

Please sign in to comment.