[ https://issues.apache.org/jira/browse/HADOOP-14331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15976291#comment-15976291 ]
Gabriel Reid commented on HADOOP-14331: --------------------------------------- FWIW, I discovered this issue when I started leveraging the code in HadoopScheduledThreadPoolExecutor for an external project. I made a few unsuccessful attempts to fix the issue in the code as it's currently implemented, but in the end found that it was a lot easier to just re-implement HadoopScheduledThreadPoolExecutor and HadoopThreadPoolExecutor to just wrap all submitted Runnables and Callables with a wrapper which catches and logs any exception thrown from the underlying Runnable/Callable. This is the approach that I would suggest here -- if that sounds good, let me know and I'll add a patch to do this. > HadoopScheduledThreadPoolExecutor broken for periodic task running > ------------------------------------------------------------------ > > Key: HADOOP-14331 > URL: https://issues.apache.org/jira/browse/HADOOP-14331 > Project: Hadoop Common > Issue Type: Bug > Components: common > Affects Versions: 3.0.0-alpha3 > Reporter: Gabriel Reid > Attachments: HADOOP-14331_demonstrate_bug.patch > > > The HadoopScheduledThreadPoolExecutor (introduced in HADOOP-12749) is broken > for the scheduling of periodic tasks (i.e. for tasks submitted with > {{scheduleAtFixedRate}} and {{scheduleAfterFixedDelay}}). > The behavior of the executor with these methods is that the underlying task > is executed once, and then blocks the running thread indefinitely in > {{ExecutorHelper::logThrowableFromAfterExecute}}, meaning further executions > of the task won't run, and will also block the running thread from running > any other tasks. > A quick scan of the source has shown me that these methods are used on > HadoopScheduledThreadPoolExecutor instances in several places in the code > base, at least in {{JobHistory}} and {{CleanerService}}, which appears to > mean that these classes also no longer function correctly. -- This message was sent by Atlassian JIRA (v6.3.15#6346) --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org