3

运行一些 HBase 代码时出现以下问题。看起来它起源于 MXBean 位。我对此一无所知,但看起来相当低级。

javax.management.NotCompliantMBeanException: org.apache.hadoop.hbase.master.MXBean: Method org.apache.hadoop.hbase.master.MXBean.getRegionServers has parameter or return type that cannot be translated into an open type
    at com.sun.jmx.mbeanserver.Introspector.throwException(Introspector.java:419)
    at com.sun.jmx.mbeanserver.MBeanAnalyzer.<init>(MBeanAnalyzer.java:118)
    at com.sun.jmx.mbeanserver.MBeanAnalyzer.analyzer(MBeanAnalyzer.java:104)
    at com.sun.jmx.mbeanserver.MXBeanIntrospector.getAnalyzer(MXBeanIntrospector.java:71)
    at com.sun.jmx.mbeanserver.MBeanIntrospector.getPerInterface(MBeanIntrospector.java:181)
    at com.sun.jmx.mbeanserver.MBeanSupport.<init>(MBeanSupport.java:136)
    at com.sun.jmx.mbeanserver.MXBeanSupport.<init>(MXBeanSupport.java:66)
    at com.sun.jmx.mbeanserver.Introspector.makeDynamicMBean(Introspector.java:184)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:936)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:330)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:516)
    at org.apache.hadoop.metrics.util.MBeanUtil.registerMBean(MBeanUtil.java:58)
    at org.apache.hadoop.hbase.master.HMaster.registerMBean(HMaster.java:1646)
    at org.apache.hadoop.hbase.master.HMaster.finishInitialization(HMaster.java:527)
    at org.apache.hadoop.hbase.master.HMaster.run(HMaster.java:336)
    at java.lang.Thread.run(Thread.java:679)
Caused by: java.lang.IllegalArgumentException: Method org.apache.hadoop.hbase.master.MXBean.getRegionServers has parameter or return type that cannot be translated into an open type
    at com.sun.jmx.mbeanserver.ConvertingMethod.from(ConvertingMethod.java:45)
    at com.sun.jmx.mbeanserver.MXBeanIntrospector.mFrom(MXBeanIntrospector.java:81)
    at com.sun.jmx.mbeanserver.MXBeanIntrospector.mFrom(MXBeanIntrospector.java:51)
    at com.sun.jmx.mbeanserver.MBeanAnalyzer.initMaps(MBeanAnalyzer.java:135)
    at com.sun.jmx.mbeanserver.MBeanAnalyzer.<init>(MBeanAnalyzer.java:116)
    ... 14 more
Caused by: javax.management.openmbean.OpenDataException: Cannot obtain array class
    at com.sun.jmx.mbeanserver.OpenConverter.openDataException(OpenConverter.java:1389)
    at com.sun.jmx.mbeanserver.OpenConverter.makeArrayOrCollectionConverter(OpenConverter.java:346)
    at com.sun.jmx.mbeanserver.OpenConverter.makeConverter(OpenConverter.java:295)
    at com.sun.jmx.mbeanserver.OpenConverter.toConverter(OpenConverter.java:277)
    at com.sun.jmx.mbeanserver.OpenConverter.makeTabularConverter(OpenConverter.java:376)
    at com.sun.jmx.mbeanserver.OpenConverter.makeParameterizedConverter(OpenConverter.java:417)
    at com.sun.jmx.mbeanserver.OpenConverter.makeConverter(OpenConverter.java:312)
    at com.sun.jmx.mbeanserver.OpenConverter.toConverter(OpenConverter.java:277)
    at com.sun.jmx.mbeanserver.OpenConverter.makeCompositeConverter(OpenConverter.java:482)
    at com.sun.jmx.mbeanserver.OpenConverter.makeConverter(OpenConverter.java:309)
    at com.sun.jmx.mbeanserver.OpenConverter.toConverter(OpenConverter.java:277)
    at com.sun.jmx.mbeanserver.OpenConverter.makeTabularConverter(OpenConverter.java:377)
    at com.sun.jmx.mbeanserver.OpenConverter.makeParameterizedConverter(OpenConverter.java:417)
    at com.sun.jmx.mbeanserver.OpenConverter.makeConverter(OpenConverter.java:312)
    at com.sun.jmx.mbeanserver.OpenConverter.toConverter(OpenConverter.java:277)
    at com.sun.jmx.mbeanserver.ConvertingMethod.<init>(ConvertingMethod.java:197)
    at com.sun.jmx.mbeanserver.ConvertingMethod.from(ConvertingMethod.java:40)
    ... 18 more
Caused by: java.lang.ClassNotFoundException: [Lbyte;
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:186)
    at com.sun.jmx.mbeanserver.OpenConverter.makeArrayOrCollectionConverter(OpenConverter.java:344)
    ... 33 more
4

2 回答 2

0

看起来这已经在 HBase JIRA 上报告过了

https://issues.apache.org/jira/browse/HBASE-5718

他们认为这是一个 JMX 问题,我在查看下面的源代码后倾向于同意这一点。请注意关于从未见过原始数组的评论。不知何故,一个原始数组进入了这里,并被视为一个对象类。

  323       /* Make the converter for an array type, or a collection such as
  324        * List<String> or Set<Integer>.  We never see one-dimensional
  325        * primitive arrays (e.g. int[]) here because they use the identity
  326        * converter and are registered as such in the static initializer.
  327        */
  328       private static OpenConverter
  329           makeArrayOrCollectionConverter(Type collectionType, Type elementType)
  330               throws OpenDataException {
  331   
  332           final OpenConverter elementConverter = toConverter(elementType);
  333           final OpenType<?> elementOpenType = elementConverter.getOpenType();
  334           final ArrayType<?> openType = ArrayType.getArrayType(elementOpenType);
  335           final Class<?> elementOpenClass = elementConverter.getOpenClass();
  336   
  337           final Class<?> openArrayClass;
  338           final String openArrayClassName;
  339           if (elementOpenClass.isArray())
  340               openArrayClassName = "[" + elementOpenClass.getName();
  341           else
  342               openArrayClassName = "[L" + elementOpenClass.getName() + ";";
  343           try {
  344               openArrayClass = Class.forName(openArrayClassName);
于 2012-04-05T01:48:23.370 回答
0

验证您没有使用 OpenJDK 来运行 HBase。虽然从在线文档的先决条件列表中看不明显,但显然一些较旧的 Hbase 版本可能需要 Oracle Java。请参阅此链接

于 2015-01-29T23:21:35.573 回答