博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
hive报Unable to instantiate org.apache.hadoop.hive.
阅读量:6800 次
发布时间:2019-06-26

本文共 8334 字,大约阅读时间需要 27 分钟。

hot3.png

Logging initialized using configuration in jar:file:/usr/share/hive/lib/hive-common-0.13.1.jar!/hive-log4j.propertiesException in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient        at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:346)        at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:681)        at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:625)        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)        at java.lang.reflect.Method.invoke(Method.java:606)        at org.apache.hadoop.util.RunJar.main(RunJar.java:212)Caused by: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient        at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1412)        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.
(RetryingMetaStoreClient.java:62)        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:72)        at org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:2453)        at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:2465)        at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:340)        ... 7 moreCaused by: java.lang.reflect.InvocationTargetException        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)        at java.lang.reflect.Constructor.newInstance(Constructor.java:526)        at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1410)        ... 12 moreCaused by: javax.jdo.JDOException: Couldnt obtain a new sequence (unique id) : Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. InnoDB is limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED.NestedThrowables:java.sql.SQLException: Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. InnoDB is limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED.        at org.datanucleus.api.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:596)        at org.datanucleus.api.jdo.JDOPersistenceManager.jdoMakePersistent(JDOPersistenceManager.java:732)        at org.datanucleus.api.jdo.JDOPersistenceManager.makePersistent(JDOPersistenceManager.java:752)        at org.apache.hadoop.hive.metastore.ObjectStore.setMetaStoreSchemaVersion(ObjectStore.java:6389)        at org.apache.hadoop.hive.metastore.ObjectStore.checkSchema(ObjectStore.java:6299)        at org.apache.hadoop.hive.metastore.ObjectStore.verifySchema(ObjectStore.java:6277)        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)        at java.lang.reflect.Method.invoke(Method.java:606)        at org.apache.hadoop.hive.metastore.RawStoreProxy.invoke(RawStoreProxy.java:108)        at com.sun.proxy.$Proxy9.verifySchema(Unknown Source)        at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.getMS(HiveMetaStore.java:476)        at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.createDefaultDB(HiveMetaStore.java:523)        at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.init(HiveMetaStore.java:397)        at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.
(HiveMetaStore.java:356)        at org.apache.hadoop.hive.metastore.RetryingHMSHandler.
(RetryingHMSHandler.java:54)        at org.apache.hadoop.hive.metastore.RetryingHMSHandler.getProxy(RetryingHMSHandler.java:59)        at org.apache.hadoop.hive.metastore.HiveMetaStore.newHMSHandler(HiveMetaStore.java:4944)        at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.
(HiveMetaStoreClient.java:171)        ... 17 moreCaused by: java.sql.SQLException: Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. InnoDB is limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED.        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1084)        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4232)        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4164)        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2615)        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2776)        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2838)        at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2082)        at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2212)        at com.jolbox.bonecp.PreparedStatementHandle.executeQuery(PreparedStatementHandle.java:174)        at org.datanucleus.store.rdbms.ParamLoggingPreparedStatement.executeQuery(ParamLoggingPreparedStatement.java:381)        at org.datanucleus.store.rdbms.SQLController.executeStatementQuery(SQLController.java:504)        at org.datanucleus.store.rdbms.valuegenerator.SequenceTable.getNextVal(SequenceTable.java:198)        at org.datanucleus.store.rdbms.valuegenerator.TableGenerator.reserveBlock(TableGenerator.java:190)        at org.datanucleus.store.valuegenerator.AbstractGenerator.reserveBlock(AbstractGenerator.java:305)        at org.datanucleus.store.rdbms.valuegenerator.AbstractRDBMSGenerator.obtainGenerationBlock(AbstractRDBMSGenerator.java:170)        at org.datanucleus.store.valuegenerator.AbstractGenerator.obtainGenerationBlock(AbstractGenerator.java:197)        at org.datanucleus.store.valuegenerator.AbstractGenerator.next(AbstractGenerator.java:105)        at org.datanucleus.store.rdbms.RDBMSStoreManager.getStrategyValueForGenerator(RDBMSStoreManager.java:2005)        at org.datanucleus.store.AbstractStoreManager.getStrategyValue(AbstractStoreManager.java:1386)        at org.datanucleus.ExecutionContextImpl.newObjectId(ExecutionContextImpl.java:3827)        at org.datanucleus.state.JDOStateManager.setIdentity(JDOStateManager.java:2571)        at org.datanucleus.state.JDOStateManager.initialiseForPersistentNew(JDOStateManager.java:513)        at org.datanucleus.state.ObjectProviderFactoryImpl.newForPersistentNew(ObjectProviderFactoryImpl.java:232)        at org.datanucleus.ExecutionContextImpl.newObjectProviderForPersistentNew(ExecutionContextImpl.java:1414)        at org.datanucleus.ExecutionContextImpl.persistObjectInternal(ExecutionContextImpl.java:2218)        at org.datanucleus.ExecutionContextImpl.persistObjectWork(ExecutionContextImpl.java:2065)        at org.datanucleus.ExecutionContextImpl.persistObject(ExecutionContextImpl.java:1913)        at org.datanucleus.ExecutionContextThreadedImpl.persistObject(ExecutionContextThreadedImpl.java:217)        at org.datanucleus.api.jdo.JDOPersistenceManager.jdoMakePersistent(JDOPersistenceManager.java:727)        ... 35 more
  • 前提

        将hive的元数据的存储改为MySQL以后,运行hive命令报错,初步判断觉得应该是权限问题,后来看到这句话:

Caused by: java.sql.SQLException: Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. InnoDB is limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED.

  • 解决

    尝试修改了一下MySQL的日志格式:

    mysq -u  root -p

    mysql> set global binlog_format='MIXED';

    再试,Ok了。  记得必须是root用户才有权限更改的。

 

转载于:https://my.oschina.net/AlbertHa/blog/339022

你可能感兴趣的文章
如何让对方发给你需要的文件格式?
查看>>
php学习笔记--运算符号
查看>>
IPv6已分配地址中国仅占0.29%
查看>>
解决Lync2010和Lync2013转接电话断开的问题
查看>>
find grep wc awk sed sort uniq split指令详解
查看>>
高并发中的卡死状态 -HashMap
查看>>
http上传文件深度解析-高性能http传输
查看>>
Linux下配置Java环境变量
查看>>
HTTP State Management Mechanism(HTTP 状态管理机制)
查看>>
IOS之禁用UIWebView的默认交互行为
查看>>
绩效管理功能扩展包
查看>>
我的友情链接
查看>>
Android:NDK、JNI
查看>>
dl,dt,dd标记在网页中要充分利用
查看>>
Oracle非常规恢复(使用BBED跳过归档)
查看>>
c# 的四舍五入
查看>>
Java程序员从笨鸟到菜鸟之(七十二)细谈Spring(四)利用注解实现spring基本配置详解...
查看>>
Iperf带宽大小和TCP窗口测试
查看>>
linux命令总结-ls
查看>>
2013 SharePoint复习 -- CA之Application Management
查看>>