You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "Josh Elser (JIRA)" <ji...@apache.org> on 2015/01/22 17:33:35 UTC

[jira] [Commented] (ACCUMULO-3507) NamingThreadFactory.newThread should not wrap runnable with TraceRunnable

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

Josh Elser commented on ACCUMULO-3507:
--------------------------------------

Great catch, Billie!

> NamingThreadFactory.newThread should not wrap runnable with TraceRunnable
> -------------------------------------------------------------------------
>
>                 Key: ACCUMULO-3507
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-3507
>             Project: Accumulo
>          Issue Type: Bug
>          Components: trace
>            Reporter: Billie Rinaldi
>            Assignee: Billie Rinaldi
>             Fix For: 1.7.0
>
>
> NamingThreadFactory has the following implementation of newThread:
> {noformat}
>   public Thread newThread(Runnable r) {
>     return new Daemon(new LoggingRunnable(log, new TraceRunnable(r)), ...);
>   }
> {noformat}
> The runnable passed to newThread by ThreadPoolExecutor is a Worker that will run multiple tasks over its lifetime.  It is unlikely that we want to trace the entire execution of a reused thread in one of our thread pools, as opposed to tracing individual tasks.  We should change this to new LoggingRunnable(log, r).
> Some of our thread pools already trace individual tasks by wrapping a ThreadPoolExecutor in TraceExecutorService.  Other pools that want to introduce task tracing may use that method as well.  (The pools currently tracing threads but not tracing tasks are scanner read ahead, add splits, bloom loader, LRU block cache stats, gc deleting, walog sort starter, multiple bulk import pools, problem reporting, and others that are using SimpleThreadPool.)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)