hive metastore 报错 binlog mode 不对问题

2015-11-16 16:33:55,701 WARN  metastore.HiveMetaStoreClient (HiveMetaStoreClient.java:executeWithRetry(2472)) - Got Unknown Exception: javax.jdo.JDOException: Couldnt o
btain a new sequence (unique id) : Binary logging not possible. Message: Transaction level 'READ-COMMITTED' in InnoDB is not safe for binlog mode 'STATEMENT'
    at org.datanucleus.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:434)
    at org.datanucleus.jdo.JDOPersistenceManager.jdoMakePersistent(JDOPersistenceManager.java:660)
    at org.datanucleus.jdo.JDOPersistenceManager.makePersistent(JDOPersistenceManager.java:680)
    at org.apache.hadoop.hive.metastore.ObjectStore.addPartition(ObjectStore.java:1019)
    at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.append_partition_common(HiveMetaStore.java:1381)
    at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.access$900(HiveMetaStore.java:139)
    at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler$20.run(HiveMetaStore.java:1411)
    at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler$20.run(HiveMetaStore.java:1408)
    at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.executeWithRetry(HiveMetaStore.java:358)
    at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.append_partition(HiveMetaStore.java:1408)
    at org.apache.hadoop.hive.metastore.HiveMetaStoreClient$5.run(HiveMetaStoreClient.java:379)
    at org.apache.hadoop.hive.metastore.HiveMetaStoreClient$5.run(HiveMetaStoreClient.java:376)
    at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.executeWithRetry(HiveMetaStoreClient.java:2414)
    at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.appendPartition(HiveMetaStoreClient.java:376)
    at org.apache.hadoop.hive.ql.metadata.Hive.getPartition(Hive.java:1559)
    at org.apache.hadoop.hive.ql.metadata.Hive.loadPartition(Hive.java:1275)
    at org.apache.hadoop.hive.ql.exec.MoveTask.execute(MoveTask.java:308)
    at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:140)
    at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:57)
    at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1481)
    at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1271)
    at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1068)
    at org.apache.hadoop.hive.ql.processors.ImpalaProcessor.run(ImpalaProcessor.java:163)
    at org.apache.hadoop.hive.service.HiveServer$HiveServerHandler.execute(HiveServer.java:242)
    at org.apache.hadoop.hive.service.ThriftHive$Processor$execute.getResult(ThriftHive.java:645)
    at org.apache.hadoop.hive.service.ThriftHive$Processor$execute.getResult(ThriftHive.java:629)
    at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
    at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
    at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:225)
    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)
NestedThrowablesStackTrace:
java.sql.SQLException: Binary logging not possible. Message: Transaction level 'READ-COMMITTED' in InnoDB is not safe for binlog mode 'STATEMENT'
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)

 

解决:

因为,READ-COMMITTED需要把bin-log以mixed方式来记录,用以下命令来修改:进入mysql 

set global binlog_format='MIXED';

你可能感兴趣的:(hive metastore 报错 binlog mode 不对问题)