Java Code Examples for org.apache.hadoop.metrics.util.MBeanUtil#unregisterMBean()

The following examples show how to use org.apache.hadoop.metrics.util.MBeanUtil#unregisterMBean() . 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: FSDataset.java    From RDFS with Apache License 2.0 5 votes vote down vote up
public void shutdown() {
  if (mbeanName != null)
    MBeanUtil.unregisterMBean(mbeanName);
  if (versionBeanName != null) {
    MBeanUtil.unregisterMBean(versionBeanName);
  }
  if (asyncDiskService != null) {
    asyncDiskService.shutdown();
  }

  if(volumes != null) {
    lock.writeLock().lock();
    try {
      if (volumes.scannersExecutor != null) {
        volumes.scannersExecutor.shutdown();
      }

      for (FSVolume volume : volumes.getVolumes()) {
        if(volume != null) {
          volume.shutdown();
        }
      }
    } finally {
      lock.writeLock().unlock();
    }
  }
}
 
Example 2
Source File: FSDataset.java    From hadoop-gpu with Apache License 2.0 5 votes vote down vote up
public void shutdown() {
  if (mbeanName != null)
    MBeanUtil.unregisterMBean(mbeanName);
  
  if(volumes != null) {
    for (FSVolume volume : volumes.volumes) {
      if(volume != null) {
        volume.dfsUsage.shutdown();
      }
    }
  }
}
 
Example 3
Source File: DataNode.java    From RDFS with Apache License 2.0 5 votes vote down vote up
private void shutdownMXBean() {
  if (datanodeMXBeanName != null) {
    MBeanUtil.unregisterMBean(datanodeMXBeanName);
  }
  if (pulseChecker != null) {
    pulseChecker.shutdown();
  }
}
 
Example 4
Source File: JobTracker.java    From RDFS with Apache License 2.0 5 votes vote down vote up
void close() throws IOException {
  if (this.infoServer != null) {
    LOG.info("Stopping infoServer");
    try {
      this.infoServer.stop();
    } catch (Exception ex) {
      LOG.warn("Exception shutting down JobTracker", ex);
    }
  }
  if (this.interTrackerServer != null) {
    LOG.info("Stopping interTrackerServer");
    this.interTrackerServer.stop();
  }

  shutdown = true;

  closeThread(this.expireTrackersThread);
  closeThread(this.retireJobsThread);
  closeThread(this.jobUpdaterThread);

  if (taskScheduler != null) {
    taskScheduler.terminate();
  }

  closeThread(this.expireLaunchingTaskThread);
  closeThread(this.completedJobsStoreThread);
  if (versionBeanName != null) {
    MBeanUtil.unregisterMBean(versionBeanName);
  }
  LOG.info("stopped all jobtracker services");
  return;
}
 
Example 5
Source File: JMXContext.java    From RDFS with Apache License 2.0 5 votes vote down vote up
@Override
public synchronized void stopMonitoring() {
  for (ObjectName name : beanHandles.values()) {
    MBeanUtil.unregisterMBean(name);
  }
  beanHandles.clear();
  super.stopMonitoring();
}
 
Example 6
Source File: JMXContext.java    From RDFS with Apache License 2.0 5 votes vote down vote up
@Override
protected void remove(MetricsRecordImpl record) {
  super.remove(record);
  
  String recordName = record.getRecordName();
  
  JMXContextMBean bean = JMXBeans.remove(recordName);
  if (bean == null) {
    return;
  }
  // Currently - one bean per record, so remove the bean
  ObjectName name = beanHandles.remove(bean);
  MBeanUtil.unregisterMBean(name);
}
 
Example 7
Source File: BeanTracker.java    From RDFS with Apache License 2.0 4 votes vote down vote up
public void unregister() {
  if (serviceName != null && name != null) {
    MBeanUtil.unregisterMBean(beanName);
  }
}
 
Example 8
Source File: RpcMgt.java    From RDFS with Apache License 2.0 4 votes vote down vote up
public void shutdown() {
  if (mbeanName != null)
    MBeanUtil.unregisterMBean(mbeanName);
}
 
Example 9
Source File: RpcActivityMBean.java    From RDFS with Apache License 2.0 4 votes vote down vote up
public void shutdown() {
  if (mbeanName != null)
    MBeanUtil.unregisterMBean(mbeanName);
}
 
Example 10
Source File: NameNodeActivtyMBean.java    From RDFS with Apache License 2.0 4 votes vote down vote up
public void shutdown() {
  if (mbeanName != null)
    MBeanUtil.unregisterMBean(mbeanName);
}
 
Example 11
Source File: HighTideNodeActivityMBean.java    From RDFS with Apache License 2.0 4 votes vote down vote up
public void shutdown() {
  if (mbeanName != null)
    MBeanUtil.unregisterMBean(mbeanName);
}
 
Example 12
Source File: DataNodeActivityMBean.java    From RDFS with Apache License 2.0 4 votes vote down vote up
public void shutdown() {
  if (mbeanName != null)
    MBeanUtil.unregisterMBean(mbeanName);
}
 
Example 13
Source File: SepMetrics.java    From hbase-indexer with Apache License 2.0 4 votes vote down vote up
public void shutdown() {
    if (mbeanName != null)
        MBeanUtil.unregisterMBean(mbeanName);
}
 
Example 14
Source File: SimulatedFSDataset.java    From hadoop-gpu with Apache License 2.0 4 votes vote down vote up
public void shutdown() {
  if (mbeanName != null)
    MBeanUtil.unregisterMBean(mbeanName);
}
 
Example 15
Source File: RpcMgt.java    From hadoop-gpu with Apache License 2.0 4 votes vote down vote up
public void shutdown() {
  if (mbeanName != null)
    MBeanUtil.unregisterMBean(mbeanName);
}
 
Example 16
Source File: RpcActivityMBean.java    From hadoop-gpu with Apache License 2.0 4 votes vote down vote up
public void shutdown() {
  if (mbeanName != null)
    MBeanUtil.unregisterMBean(mbeanName);
}
 
Example 17
Source File: NameNodeActivtyMBean.java    From hadoop-gpu with Apache License 2.0 4 votes vote down vote up
public void shutdown() {
  if (mbeanName != null)
    MBeanUtil.unregisterMBean(mbeanName);
}
 
Example 18
Source File: FSNamesystem.java    From hadoop-gpu with Apache License 2.0 4 votes vote down vote up
/**
 * shutdown FSNamesystem
 */
public void shutdown() {
  if (mbeanName != null)
    MBeanUtil.unregisterMBean(mbeanName);
}
 
Example 19
Source File: DataNodeActivityMBean.java    From hadoop-gpu with Apache License 2.0 4 votes vote down vote up
public void shutdown() {
  if (mbeanName != null)
    MBeanUtil.unregisterMBean(mbeanName);
}
 
Example 20
Source File: SimulatedFSDataset.java    From RDFS with Apache License 2.0 4 votes vote down vote up
public void shutdown() {
  if (mbeanName != null)
    MBeanUtil.unregisterMBean(mbeanName);
}