You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Erik Krogen (JIRA)" <ji...@apache.org> on 2018/12/18 17:58:00 UTC
[jira] [Commented] (HADOOP-16013) DecayRpcScheduler decay thread
should run as a daemon
[ https://issues.apache.org/jira/browse/HADOOP-16013?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16724305#comment-16724305 ]
Erik Krogen commented on HADOOP-16013:
--------------------------------------
Attaching a v000 patch which simply uses this constructor for {{Timer}} instead of the no-arg:
{code}
/**
* Creates a new timer whose associated thread may be specified to
* {@linkplain Thread#setDaemon run as a daemon}.
* A daemon thread is called for if the timer will be used to
* schedule repeating "maintenance activities", which must be
* performed as long as the application is running, but should not
* prolong the lifetime of the application.
*
* @param isDaemon true if the associated thread should run as a daemon.
*/
public Timer(boolean isDaemon) {
this("Timer-" + serialNumber(), isDaemon);
}
{code}
> DecayRpcScheduler decay thread should run as a daemon
> -----------------------------------------------------
>
> Key: HADOOP-16013
> URL: https://issues.apache.org/jira/browse/HADOOP-16013
> Project: Hadoop Common
> Issue Type: Bug
> Components: ipc
> Affects Versions: 3.3.0
> Reporter: Erik Krogen
> Assignee: Erik Krogen
> Priority: Major
> Attachments: HADOOP-16013.000.patch
>
>
> {{DecayRpcScheduler}} sets up a {{Timer}} to schedule a decay of the weights it tracks:
> {code}
> // Setup delay timer
> Timer timer = new Timer();
> DecayTask task = new DecayTask(this, timer);
> timer.scheduleAtFixedRate(task, decayPeriodMillis, decayPeriodMillis);
> {code}
> However this Timer is not set up as a daemon thread. I have seen this cause my JVM to refuse to exit when running, for example, NNThroughputBenchmark with FairCallQueue enabled.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org