HDFS-9655. NN should start JVM pause monitor before loading fsimage. (John Zhuge via Lei (Eddy) Xu)

This commit is contained in:
Lei Xu 2016-01-20 14:26:11 -08:00
parent 7905788db9
commit 2ec438e8f7
3 changed files with 10 additions and 6 deletions

View File

@ -185,6 +185,7 @@ public class JvmPauseMonitor extends AbstractService {
public void run() { public void run() {
StopWatch sw = new StopWatch(); StopWatch sw = new StopWatch();
Map<String, GcTimes> gcTimesBeforeSleep = getGcTimes(); Map<String, GcTimes> gcTimesBeforeSleep = getGcTimes();
LOG.info("Starting JVM pause monitor");
while (shouldRun) { while (shouldRun) {
sw.reset().start(); sw.reset().start();
try { try {

View File

@ -1822,6 +1822,9 @@ Release 2.8.0 - UNRELEASED
HDFS-9415. Document dfs.cluster.administrators and HDFS-9415. Document dfs.cluster.administrators and
dfs.permissions.superusergroup. (Xiaobing Zhou via Arpit Agarwal) dfs.permissions.superusergroup. (Xiaobing Zhou via Arpit Agarwal)
HDFS-9655. NN should start JVM pause monitor before loading fsimage.
(John Zhuge via Lei (Eddy) Xu)
OPTIMIZATIONS OPTIMIZATIONS
HDFS-8026. Trace FSOutputSummer#writeChecksumChunks rather than HDFS-8026. Trace FSOutputSummer#writeChecksumChunks rather than

View File

@ -671,6 +671,11 @@ public class NameNode implements NameNodeStatusMXBean {
NameNode.initMetrics(conf, this.getRole()); NameNode.initMetrics(conf, this.getRole());
StartupProgressMetrics.register(startupProgress); StartupProgressMetrics.register(startupProgress);
pauseMonitor = new JvmPauseMonitor();
pauseMonitor.init(conf);
pauseMonitor.start();
metrics.getJvmMetrics().setPauseMonitor(pauseMonitor);
if (NamenodeRole.NAMENODE == role) { if (NamenodeRole.NAMENODE == role) {
startHttpServer(conf); startHttpServer(conf);
} }
@ -690,12 +695,7 @@ public class NameNode implements NameNodeStatusMXBean {
httpServer.setNameNodeAddress(getNameNodeAddress()); httpServer.setNameNodeAddress(getNameNodeAddress());
httpServer.setFSImage(getFSImage()); httpServer.setFSImage(getFSImage());
} }
pauseMonitor = new JvmPauseMonitor();
pauseMonitor.init(conf);
pauseMonitor.start();
metrics.getJvmMetrics().setPauseMonitor(pauseMonitor);
startCommonServices(conf); startCommonServices(conf);
startMetricsLogger(conf); startMetricsLogger(conf);
} }