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 @@ private class Monitor implements Runnable {
public void run() {
StopWatch sw = new StopWatch();
Map<String, GcTimes> gcTimesBeforeSleep = getGcTimes();
LOG.info("Starting JVM pause monitor");
while (shouldRun) {
sw.reset().start();
try {

View File

@ -1822,6 +1822,9 @@ Release 2.8.0 - UNRELEASED
HDFS-9415. Document dfs.cluster.administrators and
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
HDFS-8026. Trace FSOutputSummer#writeChecksumChunks rather than

View File

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