/**
* get single value by key
*/
public String getValue(String key) throws Exception {
Object val = null;
for (ObjectName oname : hadoopObjectNames) {
try {
val = mbsc.getAttribute(oname, key);
} catch (AttributeNotFoundException anfe) {
/* just go to the next */
continue;
} catch (ReflectionException re) {
if (re.getCause() instanceof NoSuchMethodException) {
continue;
}
}
err("Info: key = " + key + "; val = " +
(val == null ? "null" : val.getClass()) + ":" + val);
break;
}
return (val == null) ? "" : val.toString();
}
JMXGet.java 文件源码
java
阅读 30
收藏 0
点赞 0
评论 0
项目:hadoop
作者:
评论列表
文章目录