本文整理了Java中org.apache.hadoop.metrics2.util.MBeans.getMBeanName()
方法的一些代码示例,展示了MBeans.getMBeanName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MBeans.getMBeanName()
方法的具体详情如下:
包路径:org.apache.hadoop.metrics2.util.MBeans
类名称:MBeans
方法名:getMBeanName
暂无
代码示例来源:origin: org.apache.hadoop/hadoop-common
"JMX bean properties should not be null for "
+ "bean registration.");
ObjectName name = getMBeanName(serviceName, nameName, properties);
if (name != null) {
try {
代码示例来源:origin: io.fabric8/fabric-hadoop
/**
* Register the MBean using our standard MBeanName format
* "hadoop:service=<serviceName>,name=<nameName>"
* Where the <serviceName> and <nameName> are the supplied parameters
*
* @param serviceName
* @param nameName
* @param theMbean - the MBean to register
* @return the named used to register the MBean
*/
static public ObjectName register(String serviceName, String nameName,
Object theMbean) {
final MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
ObjectName name = getMBeanName(serviceName, nameName);
try {
mbs.registerMBean(theMbean, name);
return name;
} catch (InstanceAlreadyExistsException ie) {
LOG.warn(name, ie);
} catch (Exception e) {
LOG.warn("Error registering "+ name, e);
}
return null;
}
代码示例来源:origin: ch.cern.hadoop/hadoop-common
/**
* Register the MBean using our standard MBeanName format
* "hadoop:service=<serviceName>,name=<nameName>"
* Where the <serviceName> and <nameName> are the supplied parameters
*
* @param serviceName
* @param nameName
* @param theMbean - the MBean to register
* @return the named used to register the MBean
*/
static public ObjectName register(String serviceName, String nameName,
Object theMbean) {
final MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
ObjectName name = getMBeanName(serviceName, nameName);
try {
mbs.registerMBean(theMbean, name);
LOG.debug("Registered "+ name);
return name;
} catch (InstanceAlreadyExistsException iaee) {
if (LOG.isTraceEnabled()) {
LOG.trace("Failed to register MBean \""+ name + "\"", iaee);
} else {
LOG.warn("Failed to register MBean \""+ name
+ "\": Instance already exists.");
}
} catch (Exception e) {
LOG.warn("Failed to register MBean \""+ name + "\"", e);
}
return null;
}
代码示例来源:origin: io.hops/hadoop-common
/**
* Register the MBean using our standard MBeanName format
* "hadoop:service=<serviceName>,name=<nameName>"
* Where the <serviceName> and <nameName> are the supplied parameters
*
* @param serviceName
* @param nameName
* @param theMbean - the MBean to register
* @return the named used to register the MBean
*/
static public ObjectName register(String serviceName, String nameName,
Object theMbean) {
final MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
ObjectName name = getMBeanName(serviceName, nameName);
try {
mbs.registerMBean(theMbean, name);
LOG.debug("Registered "+ name);
return name;
} catch (InstanceAlreadyExistsException iaee) {
if (LOG.isTraceEnabled()) {
LOG.trace("Failed to register MBean \""+ name + "\"", iaee);
} else {
LOG.warn("Failed to register MBean \""+ name
+ "\": Instance already exists.");
}
} catch (Exception e) {
LOG.warn("Failed to register MBean \""+ name + "\"", e);
}
return null;
}
代码示例来源:origin: com.github.jiayuhan-it/hadoop-common
/**
* Register the MBean using our standard MBeanName format
* "hadoop:service=<serviceName>,name=<nameName>"
* Where the <serviceName> and <nameName> are the supplied parameters
*
* @param serviceName
* @param nameName
* @param theMbean - the MBean to register
* @return the named used to register the MBean
*/
static public ObjectName register(String serviceName, String nameName,
Object theMbean) {
final MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
ObjectName name = getMBeanName(serviceName, nameName);
try {
mbs.registerMBean(theMbean, name);
LOG.debug("Registered "+ name);
return name;
} catch (InstanceAlreadyExistsException iaee) {
if (LOG.isTraceEnabled()) {
LOG.trace("Failed to register MBean \""+ name + "\"", iaee);
} else {
LOG.warn("Failed to register MBean \""+ name
+ "\": Instance already exists.");
}
} catch (Exception e) {
LOG.warn("Failed to register MBean \""+ name + "\"", e);
}
return null;
}
代码示例来源:origin: io.prestosql.hadoop/hadoop-apache
/**
* Register the MBean using our standard MBeanName format
* "hadoop:service=<serviceName>,name=<nameName>"
* Where the <serviceName> and <nameName> are the supplied parameters
*
* @param serviceName
* @param nameName
* @param theMbean - the MBean to register
* @return the named used to register the MBean
*/
static public ObjectName register(String serviceName, String nameName,
Object theMbean) {
final MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
ObjectName name = getMBeanName(serviceName, nameName);
try {
mbs.registerMBean(theMbean, name);
LOG.debug("Registered "+ name);
return name;
} catch (InstanceAlreadyExistsException iaee) {
if (LOG.isTraceEnabled()) {
LOG.trace("Failed to register MBean \""+ name + "\"", iaee);
} else {
LOG.warn("Failed to register MBean \""+ name
+ "\": Instance already exists.");
}
} catch (Exception e) {
LOG.warn("Failed to register MBean \""+ name + "\"", e);
}
return null;
}
内容来源于网络,如有侵权,请联系作者删除!