Details
-
Improvement
-
Status: In Progress
-
Minor
-
Resolution: Unresolved
-
2.7.2
-
None
-
None
-
None
Description
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
pauseMonitor = new JvmPauseMonitor();
addService(pauseMonitor);
jm.setPauseMonitor(pauseMonitor);
can be replaced with
addService(JvmPauseMonitor.getInstance());
And this code segment
pauseMonitor = new JvmPauseMonitor();
pauseMonitor.init(config);
pauseMonitor.start();
metrics.getJvmMetrics().setPauseMonitor(pauseMonitor);
can be replaced with
pauseMonitor = JvmPauseMonitor.getInstance(); pauseMonitor.init(config); pauseMonitor.start();
Attachments
Attachments
Issue Links
- relates to
-
HADOOP-12855 Add option to disable JVMPauseMonitor across services
- Resolved
-
HADOOP-12946 Ensure one JVMPauseMonitor thread per JVM
- Resolved