You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Joe McDonnell (Jira)" <ji...@apache.org> on 2023/01/26 19:03:00 UTC
[jira] [Created] (IMPALA-11865) Set thread names for Java thread pools
Joe McDonnell created IMPALA-11865:
--------------------------------------
Summary: Set thread names for Java thread pools
Key: IMPALA-11865
URL: https://issues.apache.org/jira/browse/IMPALA-11865
Project: IMPALA
Issue Type: Improvement
Components: Frontend
Affects Versions: Impala 4.3.0
Reporter: Joe McDonnell
When I do a jstack on catalogd, a lot of the thread names are very generic:
{noformat}
"pool-9-thread-1" #29 prio=5 os_prio=0 tid=0x000000000d60e000 nid=0x1eb754 waiting on condition [0x00007f8364536000]
{noformat}
There was already work done on this in IMPALA-7450, which adds information when the threads are processing work. I think we should set the thread name as part of the thread pool definition so that idle threads are easy to identify.
Here are some locations:
[https://github.com/apache/impala/blob/master/fe/src/main/java/org/apache/impala/catalog/CatalogServiceCatalog.java#L267]
[https://github.com/apache/impala/blob/master/fe/src/main/java/org/apache/impala/catalog/TableLoadingMgr.java#L151]
[https://github.com/apache/impala/blob/master/fe/src/main/java/org/apache/impala/catalog/TableLoadingMgr.java#L165]
[https://github.com/apache/impala/blob/master/fe/src/main/java/org/apache/impala/catalog/TableLoadingMgr.java#L267]
[https://github.com/apache/impala/blob/master/fe/src/main/java/org/apache/impala/catalog/metastore/CatalogMetastoreServer.java#L111]
[https://github.com/apache/impala/blob/master/fe/src/main/java/org/apache/impala/hooks/QueryEventHookManager.java#L120]
[https://github.com/apache/impala/blob/master/fe/src/main/java/org/apache/impala/service/Frontend.java#L397]
[https://github.com/apache/impala/blob/master/fe/src/main/java/org/apache/impala/service/Frontend.java#L443-L447]
We do this in other locations by setting a ThreadFactory, for example in CatalogHmsAPIHelper.java:
{noformat}
private static final ExecutorService fallbackFdLoaderPool = Executors
.newFixedThreadPool(20,
new ThreadFactoryBuilder().setDaemon(true)
.setNameFormat("HMS-Filemetadata-loader-%d").build());{noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org