Skip to content

Commit

Permalink
Merge branch '2.1' into 3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dlmarion committed Dec 5, 2024
2 parents 1224686 + 355b0d7 commit a413560
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ public ThreadPoolExecutorBuilder getPoolBuilder(@NonNull final ThreadPoolNames p
}

/**
* Fet a fluent-style pool builder.
* Get a fluent-style pool builder.
*
* @param name the pool name - the name trimed and prepended with the ACCUMULO_POOL_PREFIX so that
* pool names begin with a consistent prefix.
Expand All @@ -370,7 +370,11 @@ public ThreadPoolExecutorBuilder getPoolBuilder(@NonNull final String name) {
if (trimmed.startsWith(ACCUMULO_POOL_PREFIX.poolName)) {
return new ThreadPoolExecutorBuilder(trimmed);
} else {
return new ThreadPoolExecutorBuilder(ACCUMULO_POOL_PREFIX.poolName + trimmed);
if (trimmed.startsWith(".")) {
return new ThreadPoolExecutorBuilder(ACCUMULO_POOL_PREFIX.poolName + trimmed);
} else {
return new ThreadPoolExecutorBuilder(ACCUMULO_POOL_PREFIX.poolName + "." + trimmed);
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ private static ServerAddress createNonBlockingServer(HostAndPort address, TProce
private static ThreadPoolExecutor createSelfResizingThreadPool(final String serverName,
final int executorThreads, long threadTimeOut, final AccumuloConfiguration conf,
long timeBetweenThreadChecks) {
String poolName = ACCUMULO_POOL_PREFIX.poolName + serverName.toLowerCase() + ".client";
String poolName = ACCUMULO_POOL_PREFIX.poolName + "." + serverName.toLowerCase() + ".client";
final ThreadPoolExecutor pool =
ThreadPools.getServerThreadPools().getPoolBuilder(poolName).numCoreThreads(executorThreads)
.withTimeOut(threadTimeOut, MILLISECONDS).enableThreadPoolMetrics().build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ public SubmittedJob submit(CompactionServiceId csid, CompactionJob job, Compacta

public void setThreads(int numThreads) {
ThreadPools.resizePool(threadPool, () -> numThreads,
ACCUMULO_POOL_PREFIX.poolName + "accumulo.pool.compaction." + ceid);
ACCUMULO_POOL_PREFIX.poolName + ".accumulo.pool.compaction." + ceid);
}

@Override
Expand Down

0 comments on commit a413560

Please sign in to comment.