You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Pankaj Kumar (Jira)" <ji...@apache.org> on 2019/09/04 14:22:00 UTC

[jira] [Commented] (HBASE-22930) Set unique name to longCompactions/shortCompactions threads

    [ https://issues.apache.org/jira/browse/HBASE-22930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16922548#comment-16922548 ] 

Pankaj Kumar commented on HBASE-22930:
--------------------------------------

Thanks [~anoop.hbase] for looking into this issue, sorry for late reply.

ThreadFactoryBuilder internally has the its own counter, but to have the counter in the thread name we need to define the format in setNameFormat(), something like below..

{code}

new ThreadFactoryBuilder().setNameFormat(n + "-longCompactions-%d");  

{code}  

ThreadFactoryBuilder was introduced in HBASE-22881.

> Set unique name to longCompactions/shortCompactions threads
> -----------------------------------------------------------
>
>                 Key: HBASE-22930
>                 URL: https://issues.apache.org/jira/browse/HBASE-22930
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Pankaj Kumar
>            Assignee: Pankaj Kumar
>            Priority: Minor
>
> Sometime observed multiple compaction threads have the same name which is misleading while analysing the log.
> Currently we just append the current timestamp which can be same for multiple threads,
> [https://github.com/apache/hbase/blob/ec68bf30ba91ea7484d3b56b0809ff5434f9406e/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplit.java#L144]



--
This message was sent by Atlassian Jira
(v8.3.2#803003)