hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Zhuge (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HADOOP-12908) Make JvmPauseMonitor a singleton
Date Thu, 08 Jun 2017 21:28:18 GMT

     [ https://issues.apache.org/jira/browse/HADOOP-12908?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

John Zhuge updated HADOOP-12908:
--------------------------------
    Status: In Progress  (was: Patch Available)

> Make JvmPauseMonitor a singleton
> --------------------------------
>
>                 Key: HADOOP-12908
>                 URL: https://issues.apache.org/jira/browse/HADOOP-12908
>             Project: Hadoop Common
>          Issue Type: Improvement
>    Affects Versions: 2.7.2
>            Reporter: John Zhuge
>            Assignee: John Zhuge
>            Priority: Minor
>         Attachments: HADOOP-12908-001.patch, HADOOP-12908-002.patch, HADOOP-12908-003.patch,
HADOOP-12908-004.patch
>
>
> Make JvmPauseMonitor a singleton just as JvmMetrics because there is no use case to run
multiple instances per JVM. {{TestMetrics$setPauseMonitor}} becomes obsolete. Initialization
code for various components can be simplified.
> For example, this code segment
> {code}
>     pauseMonitor = new JvmPauseMonitor();
>     addService(pauseMonitor);
>     jm.setPauseMonitor(pauseMonitor);
> {code}
> can be replaced with
> {code}
>     addService(JvmPauseMonitor.getInstance());
> {code}
> And this code segment
> {code}
>       pauseMonitor = new JvmPauseMonitor();
>       pauseMonitor.init(config);
>       pauseMonitor.start();
>       metrics.getJvmMetrics().setPauseMonitor(pauseMonitor);
> {code}
> can be replaced with
> {code}
>       pauseMonitor = JvmPauseMonitor.getInstance();
>       pauseMonitor.init(config);
>       pauseMonitor.start();
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Mime
View raw message