Java Code Examples for org.apache.hadoop.metrics2.source.JvmMetrics#initSingleton()

The following examples show how to use org.apache.hadoop.metrics2.source.JvmMetrics#initSingleton() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ApplicationHistoryServer.java    From hadoop with Apache License 2.0 6 votes vote down vote up
@Override
protected void serviceInit(Configuration conf) throws Exception {
  // init timeline services first
  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.initSingleton("ApplicationHistoryServer", null);
  super.serviceInit(conf);
}
 
Example 2
Source File: ApplicationHistoryServer.java    From big-c with Apache License 2.0 6 votes vote down vote up
@Override
protected void serviceInit(Configuration conf) throws Exception {
  // init timeline services first
  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.initSingleton("ApplicationHistoryServer", null);
  super.serviceInit(conf);
}
 
Example 3
Source File: AMSApplicationServer.java    From ambari-metrics with Apache License 2.0 5 votes vote down vote up
@Override
protected void serviceStart() throws Exception {
  DefaultMetricsSystem.initialize("AmbariMetricsSystem");
  JvmMetrics.initSingleton("AmbariMetricsSystem", null);

  startWebApp();
  super.serviceStart();
}
 
Example 4
Source File: JobHistoryServer.java    From XLearning with Apache License 2.0 5 votes vote down vote up
@Override
protected void serviceStart() throws Exception {
  DefaultMetricsSystem.initialize("JobHistoryServer");
  JvmMetrics.initSingleton("JobHistoryServer", null);
  super.serviceStart();

  deleteLogManager = new Thread(new deleteLogMonitor());
  deleteLogManager.setName("Log-delete-monitor");
  deleteLogManager.setDaemon(true);
  deleteLogManager.start();
}
 
Example 5
Source File: SharedCacheManager.java    From hadoop with Apache License 2.0 5 votes vote down vote up
@Override
protected void serviceInit(Configuration conf) throws Exception {

  this.store = createSCMStoreService(conf);
  addService(store);

  CleanerService cs = createCleanerService(store);
  addService(cs);

  SharedCacheUploaderService nms =
      createNMCacheUploaderSCMProtocolService(store);
  addService(nms);

  ClientProtocolService cps = createClientProtocolService(store);
  addService(cps);

  SCMAdminProtocolService saps = createSCMAdminProtocolService(cs);
  addService(saps);

  SCMWebServer webUI = createSCMWebServer(this);
  addService(webUI);

  // init metrics
  DefaultMetricsSystem.initialize("SharedCacheManager");
  JvmMetrics.initSingleton("SharedCacheManager", null);

  super.serviceInit(conf);
}
 
Example 6
Source File: SharedCacheManager.java    From big-c with Apache License 2.0 5 votes vote down vote up
@Override
protected void serviceInit(Configuration conf) throws Exception {

  this.store = createSCMStoreService(conf);
  addService(store);

  CleanerService cs = createCleanerService(store);
  addService(cs);

  SharedCacheUploaderService nms =
      createNMCacheUploaderSCMProtocolService(store);
  addService(nms);

  ClientProtocolService cps = createClientProtocolService(store);
  addService(cps);

  SCMAdminProtocolService saps = createSCMAdminProtocolService(cs);
  addService(saps);

  SCMWebServer webUI = createSCMWebServer(this);
  addService(webUI);

  // init metrics
  DefaultMetricsSystem.initialize("SharedCacheManager");
  JvmMetrics.initSingleton("SharedCacheManager", null);

  super.serviceInit(conf);
}
 
Example 7
Source File: BaseSourceImpl.java    From hbase with Apache License 2.0 5 votes vote down vote up
synchronized void init(String name) {
  if (inited) {
    return;
  }

  inited = true;
  DefaultMetricsSystem.initialize(HBASE_METRICS_SYSTEM_NAME);
  JvmMetrics.initSingleton(name, "");
  // initialize hbase-metrics module based metric system as well. GlobalMetricRegistriesSource
  // initialization depends on the metric system being already initialized, that is why we are
  // doing it here. Once BaseSourceSourceImpl is removed, we should do the initialization of
  // these elsewhere.
  GlobalMetricRegistriesAdapter.init();
}
 
Example 8
Source File: MRAppMetrics.java    From hadoop with Apache License 2.0 4 votes vote down vote up
public static MRAppMetrics create(MetricsSystem ms) {
  JvmMetrics.initSingleton("MRAppMaster", null);
  return ms.register(new MRAppMetrics());
}
 
Example 9
Source File: JobHistoryServer.java    From hadoop with Apache License 2.0 4 votes vote down vote up
@Override
protected void serviceStart() throws Exception {
  DefaultMetricsSystem.initialize("JobHistoryServer");
  JvmMetrics.initSingleton("JobHistoryServer", null);
  super.serviceStart();
}
 
Example 10
Source File: MRAppMetrics.java    From big-c with Apache License 2.0 4 votes vote down vote up
public static MRAppMetrics create(MetricsSystem ms) {
  JvmMetrics.initSingleton("MRAppMaster", null);
  return ms.register(new MRAppMetrics());
}
 
Example 11
Source File: JobHistoryServer.java    From big-c with Apache License 2.0 4 votes vote down vote up
@Override
protected void serviceStart() throws Exception {
  DefaultMetricsSystem.initialize("JobHistoryServer");
  JvmMetrics.initSingleton("JobHistoryServer", null);
  super.serviceStart();
}
 
Example 12
Source File: GlobalMetricRegistriesAdapter.java    From phoenix with Apache License 2.0 4 votes vote down vote up
private GlobalMetricRegistriesAdapter() {
    DefaultMetricsSystem.initialize("Phoenix");
    JvmMetrics.initSingleton("Phoenix", "");
}