Search in sources :

Example 11 with JvmPauseMonitor

use of org.apache.hadoop.util.JvmPauseMonitor in project hadoop by apache.

the class JobHistoryServer method serviceInit.

@Override
protected void serviceInit(Configuration conf) throws Exception {
    Configuration config = new YarnConfiguration(conf);
    config.setBoolean(Dispatcher.DISPATCHER_EXIT_ON_ERROR_KEY, true);
    // This is required for WebApps to use https if enabled.
    MRWebAppUtil.initialize(getConfig());
    try {
        doSecureLogin(conf);
    } catch (IOException ie) {
        throw new YarnRuntimeException("History Server Failed to login", ie);
    }
    jobHistoryService = new JobHistory();
    historyContext = (HistoryContext) jobHistoryService;
    stateStore = createStateStore(conf);
    this.jhsDTSecretManager = createJHSSecretManager(conf, stateStore);
    clientService = createHistoryClientService();
    aggLogDelService = new AggregatedLogDeletionService();
    hsAdminServer = new HSAdminServer(aggLogDelService, jobHistoryService);
    addService(stateStore);
    addService(new HistoryServerSecretManagerService());
    addService(jobHistoryService);
    addService(clientService);
    addService(aggLogDelService);
    addService(hsAdminServer);
    DefaultMetricsSystem.initialize("JobHistoryServer");
    JvmMetrics jm = JvmMetrics.initSingleton("JobHistoryServer", null);
    pauseMonitor = new JvmPauseMonitor();
    addService(pauseMonitor);
    jm.setPauseMonitor(pauseMonitor);
    super.serviceInit(config);
}
Also used : YarnRuntimeException(org.apache.hadoop.yarn.exceptions.YarnRuntimeException) HSAdminServer(org.apache.hadoop.mapreduce.v2.hs.server.HSAdminServer) YarnConfiguration(org.apache.hadoop.yarn.conf.YarnConfiguration) Configuration(org.apache.hadoop.conf.Configuration) YarnConfiguration(org.apache.hadoop.yarn.conf.YarnConfiguration) JvmMetrics(org.apache.hadoop.metrics2.source.JvmMetrics) AggregatedLogDeletionService(org.apache.hadoop.yarn.logaggregation.AggregatedLogDeletionService) IOException(java.io.IOException) JvmPauseMonitor(org.apache.hadoop.util.JvmPauseMonitor)

Example 12 with JvmPauseMonitor

use of org.apache.hadoop.util.JvmPauseMonitor in project hadoop by apache.

the class ApplicationHistoryServer method serviceInit.

@Override
protected void serviceInit(Configuration conf) throws Exception {
    // do security login first.
    try {
        doSecureLogin(conf);
    } catch (IOException ie) {
        throw new YarnRuntimeException("Failed to login", ie);
    }
    // init timeline services
    timelineStore = createTimelineStore(conf);
    addIfService(timelineStore);
    secretManagerService = createTimelineDelegationTokenSecretManagerService(conf);
    addService(secretManagerService);
    timelineDataManager = createTimelineDataManager(conf);
    addService(timelineDataManager);
    // init generic history service afterwards
    aclsManager = createApplicationACLsManager(conf);
    historyManager = createApplicationHistoryManager(conf);
    ahsClientService = createApplicationHistoryClientService(historyManager);
    addService(ahsClientService);
    addService((Service) historyManager);
    DefaultMetricsSystem.initialize("ApplicationHistoryServer");
    JvmMetrics jm = JvmMetrics.initSingleton("ApplicationHistoryServer", null);
    pauseMonitor = new JvmPauseMonitor();
    addService(pauseMonitor);
    jm.setPauseMonitor(pauseMonitor);
    super.serviceInit(conf);
}
Also used : YarnRuntimeException(org.apache.hadoop.yarn.exceptions.YarnRuntimeException) JvmMetrics(org.apache.hadoop.metrics2.source.JvmMetrics) IOException(java.io.IOException) JvmPauseMonitor(org.apache.hadoop.util.JvmPauseMonitor)

Aggregations

JvmPauseMonitor (org.apache.hadoop.util.JvmPauseMonitor)12 Configuration (org.apache.hadoop.conf.Configuration)7 Test (org.junit.Test)5 IOException (java.io.IOException)4 JvmMetrics (org.apache.hadoop.metrics2.source.JvmMetrics)3 YarnRuntimeException (org.apache.hadoop.yarn.exceptions.YarnRuntimeException)3 ServiceStateException (org.apache.hadoop.service.ServiceStateException)2 YarnConfiguration (org.apache.hadoop.yarn.conf.YarnConfiguration)2 SaslDataTransferClient (org.apache.hadoop.hdfs.protocol.datatransfer.sasl.SaslDataTransferClient)1 SaslDataTransferServer (org.apache.hadoop.hdfs.protocol.datatransfer.sasl.SaslDataTransferServer)1 BlockPoolTokenSecretManager (org.apache.hadoop.hdfs.security.token.block.BlockPoolTokenSecretManager)1 ErasureCodingWorker (org.apache.hadoop.hdfs.server.datanode.erasurecode.ErasureCodingWorker)1 DataNodeDiskMetrics (org.apache.hadoop.hdfs.server.datanode.metrics.DataNodeDiskMetrics)1 HSAdminServer (org.apache.hadoop.mapreduce.v2.hs.server.HSAdminServer)1 MetricsCollector (org.apache.hadoop.metrics2.MetricsCollector)1 MetricsRecordBuilder (org.apache.hadoop.metrics2.MetricsRecordBuilder)1 JvmMetricsInfo (org.apache.hadoop.metrics2.source.JvmMetricsInfo)1 DiskErrorException (org.apache.hadoop.util.DiskChecker.DiskErrorException)1 AsyncDispatcher (org.apache.hadoop.yarn.event.AsyncDispatcher)1 AggregatedLogDeletionService (org.apache.hadoop.yarn.logaggregation.AggregatedLogDeletionService)1