Example usage for javax.management NotCompliantMBeanException printStackTrace

List of usage examples for javax.management NotCompliantMBeanException printStackTrace

Introduction

In this page you can find the example usage for javax.management NotCompliantMBeanException printStackTrace.

Prototype

public void printStackTrace() 

Source Link

Document

Prints this throwable and its backtrace to the standard error stream.

Usage

From source file:org.apache.hadoop.raid.RaidNode.java

public void registerMBean() {
    StandardMBean bean;/*w  w  w.ja  v  a2 s  .  c  om*/
    try {
        beanName = VersionInfo.registerJMX("RaidNode");
        bean = new StandardMBean(this, RaidNodeStatusMBean.class);
        raidnodeMXBeanName = MBeanUtil.registerMBean("RaidNode", "RaidNodeState", bean);
    } catch (NotCompliantMBeanException e) {
        e.printStackTrace();
    }
    LOG.info("Registered RaidNodeStatusMBean");
}

From source file:org.apache.hadoop.hdfs.server.datanode.FSDataset.java

/**
 * Register the FSDataset MBean using the name
 *        "hadoop:service=DataNode,name=FSDatasetState-<storageid>"
 *///  w  ww . j  a v  a  2 s .  c  o  m
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");
}

From source file:org.apache.hadoop.dfs.FSNamesystem.java

/**
 * Register the FSNamesystem MBean//from w ww .j ava 2s.co m
 */
void registerMBean(Configuration conf) {
    // 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 {
        myFSMetrics = new FSNamesystemMetrics(conf);
        bean = new StandardMBean(this, FSNamesystemMBean.class);
        mbeanName = MBeanUtil.registerMBean("NameNode", "FSNamesystemStatus", bean);
    } catch (NotCompliantMBeanException e) {
        e.printStackTrace();
    }

    LOG.info("Registered FSNamesystemStatusMBean");
}

From source file:org.apache.jxtadoop.hdfs.server.namenode.FSNamesystem.java

/**
 * Register the FSNamesystem MBean using the name
 *        "hadoop:service=NameNode,name=FSNamesystemState"
 *///from  w w  w  .j a  v  a  2s.  co  m
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");
}

From source file:org.apache.hadoop.hdfs.server.namenode.FSNamesystem.java

/**
 * Register the FSNamesystem MBean using the name
 *        "hadoop:service=NameNode,name=FSNamesystemState"
 * Register the FSNamesystem MXBean using the name
 *        "hadoop:service=NameNode,name=NameNodeInfo"
 */// w  w  w . j a  va  2s  . c o  m
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 {
        bean = new StandardMBean(this, FSNamesystemMBean.class);
        mbeanName = MBeans.register("NameNode", "FSNamesystemState", bean);
    } catch (NotCompliantMBeanException e) {
        e.printStackTrace();
    }
    mxBean = MBeans.register("NameNode", "NameNodeInfo", this);

    LOG.info("Registered FSNamesystemStateMBean and NameNodeMXBean");
}