Java Code Examples for org.apache.hadoop.metrics.util.MBeanUtil#registerMBean()
The following examples show how to use
org.apache.hadoop.metrics.util.MBeanUtil#registerMBean() .
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 hadoop-gpu with Apache License 2.0 | 6 votes |
/** * Register the FSDataset MBean using the name * "hadoop:service=DataNode,name=FSDatasetState-<storageid>" */ void registerMBean(final String storageId) { // We wrap to bypass standard mbean naming convetion. // This wraping can be removed in java 6 as it is more flexible in // package naming for mbeans and their impl. StandardMBean bean; String storageName; if (storageId == null || storageId.equals("")) {// Temp fix for the uninitialized storage storageName = "UndefinedStorageId" + rand.nextInt(); } else { storageName = storageId; } try { bean = new StandardMBean(this,FSDatasetMBean.class); mbeanName = MBeanUtil.registerMBean("DataNode", "FSDatasetState-" + storageName, bean); } catch (NotCompliantMBeanException e) { e.printStackTrace(); } DataNode.LOG.info("Registered FSDatasetStatusMBean"); }
Example 2
Source File: SimulatedFSDataset.java From RDFS with Apache License 2.0 | 6 votes |
/** * Register the FSDataset MBean using the name * "hadoop:service=DataNode,name=FSDatasetState-<storageid>" * We use storage id for MBean name since a minicluster within a single * Java VM may have multiple Simulated Datanodes. */ void registerMBean(final String storageId) { // We wrap to bypass standard mbean naming convetion. // This wraping can be removed in java 6 as it is more flexible in // package naming for mbeans and their impl. StandardMBean bean; try { bean = new StandardMBean(this,FSDatasetMBean.class); mbeanName = MBeanUtil.registerMBean("DataNode", "FSDatasetState-" + storageId, bean); } catch (NotCompliantMBeanException e) { e.printStackTrace(); } DataNode.LOG.info("Registered FSDatasetStatusMBean"); }
Example 3
Source File: FSNamesystem.java From hadoop-gpu with Apache License 2.0 | 6 votes |
/** * Register the FSNamesystem MBean using the name * "hadoop:service=NameNode,name=FSNamesystemState" */ void registerMBean(Configuration conf) { // We wrap to bypass standard mbean naming convention. // This wraping can be removed in java 6 as it is more flexible in // package naming for mbeans and their impl. StandardMBean bean; try { myFSMetrics = new FSNamesystemMetrics(conf); bean = new StandardMBean(this,FSNamesystemMBean.class); mbeanName = MBeanUtil.registerMBean("NameNode", "FSNamesystemState", bean); } catch (NotCompliantMBeanException e) { e.printStackTrace(); } LOG.info("Registered FSNamesystemStatusMBean"); }
Example 4
Source File: SimulatedFSDataset.java From hadoop-gpu with Apache License 2.0 | 6 votes |
/** * Register the FSDataset MBean using the name * "hadoop:service=DataNode,name=FSDatasetState-<storageid>" * We use storage id for MBean name since a minicluster within a single * Java VM may have multiple Simulated Datanodes. */ void registerMBean(final String storageId) { // We wrap to bypass standard mbean naming convetion. // This wraping can be removed in java 6 as it is more flexible in // package naming for mbeans and their impl. StandardMBean bean; try { bean = new StandardMBean(this,FSDatasetMBean.class); mbeanName = MBeanUtil.registerMBean("DataNode", "FSDatasetState-" + storageId, bean); } catch (NotCompliantMBeanException e) { e.printStackTrace(); } DataNode.LOG.info("Registered FSDatasetStatusMBean"); }
Example 5
Source File: FSDataset.java From RDFS with Apache License 2.0 | 6 votes |
/** * Register the FSDataset MBean using the name * "hadoop:service=DataNode,name=FSDatasetState-<storageid>" */ void registerMBean(final String storageId) { // We wrap to bypass standard mbean naming convetion. // This wraping can be removed in java 6 as it is more flexible in // package naming for mbeans and their impl. StandardMBean bean; String storageName; if (storageId == null || storageId.equals("")) {// Temp fix for the uninitialized storage storageName = "UndefinedStorageId" + rand.nextInt(); } else { storageName = storageId; } try { bean = new StandardMBean(this,FSDatasetMBean.class); mbeanName = MBeanUtil.registerMBean("DataNode", "FSDatasetState-" + storageName, bean); versionBeanName = VersionInfo.registerJMX("DataNode"); } catch (NotCompliantMBeanException e) { e.printStackTrace(); } DataNode.LOG.info("Registered FSDatasetStatusMBean"); }
Example 6
Source File: DataNodeActivityMBean.java From hadoop-gpu with Apache License 2.0 | 5 votes |
public DataNodeActivityMBean(final MetricsRegistry mr, final String storageId) { super(mr, "Activity statistics at the DataNode"); String storageName; if (storageId.equals("")) {// Temp fix for the uninitialized storage storageName = "UndefinedStorageId" + rand.nextInt(); } else { storageName = storageId; } mbeanName = MBeanUtil.registerMBean("DataNode", "DataNodeActivity-" + storageName, this); }
Example 7
Source File: RpcActivityMBean.java From hadoop-gpu with Apache License 2.0 | 5 votes |
/** * * @param mr - the metrics registry that has all the metrics * @param serviceName - the service name for the rpc service * @param port - the rpc port. */ public RpcActivityMBean(final MetricsRegistry mr, final String serviceName, final String port) { super(mr, "Rpc layer statistics"); mbeanName = MBeanUtil.registerMBean(serviceName, "RpcActivityForPort" + port, this); }
Example 8
Source File: RpcMgt.java From hadoop-gpu with Apache License 2.0 | 5 votes |
RpcMgt(final String serviceName, final String port, final RpcMetrics metrics, Server server) { myMetrics = metrics; myServer = server; mbeanName = MBeanUtil.registerMBean(serviceName, "RpcStatisticsForPort" + port, this); }
Example 9
Source File: DataNodeActivityMBean.java From RDFS with Apache License 2.0 | 5 votes |
public DataNodeActivityMBean(final MetricsRegistry mr, final String storageId) { super(mr, "Activity statistics at the DataNode"); String storageName; if (storageId.equals("")) {// Temp fix for the uninitialized storage storageName = "UndefinedStorageId" + rand.nextInt(); } else { storageName = storageId; } mbeanName = MBeanUtil.registerMBean("DataNode", "DataNodeActivity-" + storageName, this); }
Example 10
Source File: RpcActivityMBean.java From RDFS with Apache License 2.0 | 5 votes |
/** * * @param mr - the metrics registry that has all the metrics * @param serviceName - the service name for the rpc service * @param port - the rpc port. */ public RpcActivityMBean(final MetricsRegistry mr, final String serviceName, final String port) { super(mr, "Rpc layer statistics"); mbeanName = MBeanUtil.registerMBean(serviceName, "RpcActivityForPort" + port, this); }
Example 11
Source File: RpcMgt.java From RDFS with Apache License 2.0 | 5 votes |
RpcMgt(final String serviceName, final String port, final RpcMetrics metrics, Server server) { myMetrics = metrics; myServer = server; mbeanName = MBeanUtil.registerMBean(serviceName, "RpcStatisticsForPort" + port, this); }
Example 12
Source File: VersionInfo.java From RDFS with Apache License 2.0 | 5 votes |
public static ObjectName registerJMX(String daemon) { StandardMBean versionBean; ObjectName versionBeanName = null; try { versionBean = new StandardMBean(new VersionInfo(), VersionInfoMBean.class); versionBeanName = MBeanUtil.registerMBean(daemon, "Version", versionBean); } catch (NotCompliantMBeanException e) { e.printStackTrace(); } return versionBeanName; }
Example 13
Source File: JMXContext.java From RDFS with Apache License 2.0 | 5 votes |
@Override public synchronized void startMonitoring() throws IOException { for (Map.Entry<String, JMXContextMBean> beanEntry : JMXBeans.entrySet()) { ObjectName registeredName = MBeanUtil.registerMBean(getContextName(), beanEntry.getKey(), beanEntry.getValue()); beanHandles.put(beanEntry.getValue(), registeredName); } super.startMonitoring(); }
Example 14
Source File: JMXContext.java From RDFS with Apache License 2.0 | 5 votes |
private synchronized JMXContextMBean getOrCreateMBean(String recordName) { JMXContextMBean bean = JMXBeans.get(recordName); if (bean == null) { bean = new JMXContextMBean(recordName); JMXBeans.put(recordName, bean); if (isMonitoring()) { ObjectName registeredName = MBeanUtil.registerMBean(getContextName(), recordName, bean); beanHandles.put(bean, registeredName); } } return bean; }
Example 15
Source File: HighTideNodeActivityMBean.java From RDFS with Apache License 2.0 | 4 votes |
protected HighTideNodeActivityMBean(final MetricsRegistry mr) { super(mr, "Activity statistics at the HighTideNode"); mbeanName = MBeanUtil.registerMBean("HighTideNode", "HighTideNodeActivity", this); }
Example 16
Source File: NameNodeActivtyMBean.java From RDFS with Apache License 2.0 | 4 votes |
protected NameNodeActivtyMBean(final MetricsRegistry mr) { super(mr, "Activity statistics at the NameNode"); mbeanName = MBeanUtil.registerMBean("NameNode", "NameNodeActivity", this); }
Example 17
Source File: DataNode.java From RDFS with Apache License 2.0 | 4 votes |
/** * Register DataNodeMXBean */ private void registerMXBean() { this.pulseChecker = PulseChecker.create(this, "DataNode"); datanodeMXBeanName = MBeanUtil.registerMBean("DataNode", "DataNodeInfo", this); }
Example 18
Source File: SepMetrics.java From hbase-indexer with Apache License 2.0 | 4 votes |
public SepMetricsMXBean(MetricsRegistry registry) { super(registry, "HBase Side-Effect Processor Metrics"); mbeanName = MBeanUtil.registerMBean("SEP", recordName, this); }
Example 19
Source File: BeanTracker.java From RDFS with Apache License 2.0 | 4 votes |
public void register(Object beanObject) { StandardMBean bean = this.createBean(beanObject); beanName = MBeanUtil.registerMBean(serviceName, name, bean); }
Example 20
Source File: NameNodeActivtyMBean.java From hadoop-gpu with Apache License 2.0 | 4 votes |
protected NameNodeActivtyMBean(final MetricsRegistry mr) { super(mr, "Activity statistics at the NameNode"); mbeanName = MBeanUtil.registerMBean("NameNode", "NameNodeActivity", this); }