hbase开发问题-hbase版本号报错

由于使用了自定义的classloader,导致报错。

  private static void checkDefaultsVersion(Configuration conf) {
if (conf.getBoolean("hbase.defaults.for.version.skip", Boolean.FALSE)) return;
String defaultsVersion = conf.get("hbase.defaults.for.version");
String thisVersion = VersionInfo.getVersion();
if (!thisVersion.equals(defaultsVersion)) {
throw new RuntimeException(
"hbase-default.xml file seems to be for and old version of HBase (" +
defaultsVersion + "), this version is " + thisVersion);
}
}


java.lang.ExceptionInInitializerError
at org.apache.hadoop.hbase.client.HTable.(HTable.java:154)
at org.apache.hadoop.hbase.client.HTableFactory.createHTableInterface(HTableFactory.java:36)
at org.apache.hadoop.hbase.client.HTablePool.createHTable(HTablePool.java:268)
at org.apache.hadoop.hbase.client.HTablePool.findOrCreateTable(HTablePool.java:198)
at org.apache.hadoop.hbase.client.HTablePool.getTable(HTablePool.java:173)
at com.alipay.simplehbase.config.HBaseDataSource.getHTable(HBaseDataSource.java:92)
at com.alipay.simplehbase.client.SimpleHbaseClientBase.htableInterface(SimpleHbaseClientBase.java:43)
at com.alipay.simplehbase.client.SimpleHbaseClientImpl.findObjectAndKeyList_internal(SimpleHbaseClientImpl.java:254)
at com.alipay.simplehbase.client.SimpleHbaseClientImpl.findObjectAndKeyList(SimpleHbaseClientImpl.java:212)
at com.alipay.simplehbase.client.SimpleHbaseClientImpl.findObjectList(SimpleHbaseClientImpl.java:170)
at com.alipay.consumecenter.common.dal.hbase.daoimpl.HbaseConsumeRecordRedoDAO.findTopN(HbaseConsumeRecordRedoDAO.java:52)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at com.alipay.consumecenter.common.dal.common.DalMonitorInterceptor.invoke(DalMonitorInterceptor.java:60)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy41.findTopN(Unknown Source)
at com.alipay.consumecenter.biz.redo.HbaseConsumeRedoTask.run(HbaseConsumeRedoTask.java:66)
at com.alipay.consumecenter.biz.redo.schedule.Loader4ConsumeRedo$1.run(Loader4ConsumeRedo.java:53)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.RuntimeException: hbase-default.xml file seems to be for and old version of HBase (null), this version is 0.94-adh3u2.2
at org.apache.hadoop.hbase.HBaseConfiguration.checkDefaultsVersion(HBaseConfiguration.java:68)
at org.apache.hadoop.hbase.HBaseConfiguration.addHbaseResources(HBaseConfiguration.java:100)
at org.apache.hadoop.hbase.HBaseConfiguration.create(HBaseConfiguration.java:111)
at org.apache.hadoop.hbase.client.HConnectionManager.(HConnectionManager.java:148)

你可能感兴趣的:(hbase_hadoop)