Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normalize metrics names #4535

Open
wants to merge 2 commits into
base: 2.1
Choose a base branch
from

Conversation

EdColeman
Copy link
Contributor

  • updates pool prefix so that pools report as accumulo.pool....
  • change names that had names with spaces to use dot notation.
  • removed metrics from pools where no user provided properties are used

 - updates pool prefix so that pools report as accumulo.pool....
 - change names that had names with spaces to use dot notation.
 - removed metrics from pools where no user provided properties are used
@EdColeman EdColeman self-assigned this May 8, 2024
@EdColeman EdColeman added this to In progress in 3.1.0 via automation May 8, 2024
@EdColeman EdColeman added this to In progress in 2.1.3 via automation May 8, 2024
@EdColeman EdColeman requested a review from ddanielr May 8, 2024 21:35
ExecutorService executor =
context.threadPools().getPoolBuilder("addSplits").numCoreThreads(16).build();
ExecutorService executor = context.threadPools()
.getPoolBuilder(METRICS_POOL_PREFIX + "table.ops.add.splits").numCoreThreads(16).build();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this thread pool will emit metrics because metrics are not being turned on in the builder. So this change will just impact the name of the thread as seen in jstack, was that the intention?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The goal was to try to be consistent across all names. It would make is easier to recognize that it was a pool It seemed adopting a convention would help anywhere the name could show up, logs, jstacks,...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds like a nice goal. Was asking because the description of the PR was focused on metrics.

context.threadPools().getPoolBuilder("batch scanner " + batchReaderInstance + "-")
.numCoreThreads(numQueryThreads).build();
queryThreadPool = context.threadPools()
.getPoolBuilder(METRICS_POOL_PREFIX + "tserver.batch.reader.scanner" + batchReaderInstance)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could drop tserver in the name as these threads run in client code, usually outside if tserver. Could use client instead to indicate a client side thread pool.

executor = service = context.threadPools().getPoolBuilder("BulkImportThread")
.numCoreThreads(numThreads).build();
executor = service =
context.threadPools().getPoolBuilder(METRICS_POOL_PREFIX + "bulk.import.service")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a client side thread pool for bulk load, could use the following name

Suggested change
context.threadPools().getPoolBuilder(METRICS_POOL_PREFIX + "bulk.import.service")
context.threadPools().getPoolBuilder(METRICS_POOL_PREFIX + "client.bulk.load")

ExecutorService threadPool = ThreadPools.getServerThreadPools().getPoolBuilder("estimateSizes")
.numCoreThreads(numThreads).build();
ExecutorService threadPool = ThreadPools.getServerThreadPools()
.getPoolBuilder("bulk.import.estimate.sizes.pool").numCoreThreads(numThreads).build();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this use the METRICS_POOL_PREFIX?

@@ -45,8 +46,8 @@ public class PropCacheCaffeineImpl implements PropCache {
public static final int EXPIRE_MIN = 60;
private static final Logger log = LoggerFactory.getLogger(PropCacheCaffeineImpl.class);
private static final Executor executor =
ThreadPools.getServerThreadPools().getPoolBuilder("caffeine-tasks").numCoreThreads(1)
.numMaxThreads(20).withTimeOut(60L, SECONDS).build();
ThreadPools.getServerThreadPools().getPoolBuilder(METRICS_POOL_PREFIX + "caffeine.task")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be useful to include something in the name that indicates the pool is used for a cache that is related to properties?

.numCoreThreads(0).numMaxThreads(1).withTimeOut(1, SECONDS)
.enableThreadPoolMetrics(enableMetrics).build();
splitThreadPool = ThreadPools.getServerThreadPools()
.getPoolBuilder(METRICS_POOL_PREFIX + "tserver.minor.compactor").numCoreThreads(0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is misnamed, should indicate split in the name and not minor compaction.

@@ -335,31 +340,31 @@ public TabletServerResourceManager(ServerContext context, TabletHostingServer ts
Property.TSERV_ASSIGNMENT_MAXCONCURRENT, enableMetrics);
modifyThreadPoolSizesAtRuntime(
() -> context.getConfiguration().getCount(Property.TSERV_ASSIGNMENT_MAXCONCURRENT),
"tablet assignment", assignmentPool);
"tserver.tablet.assignment.pool", assignmentPool);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this change made? Getting lost in the diffs trying to understand the bigger picture.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
2.1.3
In progress
3.1.0
In progress
Status: No status
Development

Successfully merging this pull request may close these issues.

None yet

2 participants