hive第一次启动时,常出现的错误以及解决办法

报错1:

hive> CREATE TABLE dummy(value STRING);
FAILED: Error in metadata: javax.jdo.JDOFatalInternalException:Error creating transactional connection factory
NestedThrowables:
java.lang.reflect.InvocationTargetException
FAILED: Execution Error, return code 1 fromorg.apache.hadoop.hive.ql.exec.DDLTask

解决方法:下载mysql的jar包mysql-connector-java-5.1.10-bin.jar,放在hive安装目录的lib下。

 

报错2:

hive> show tables;
FAILED: Error in metadata: javax.jdo.JDOFatalDataStoreException:Access denied for user 'hive'@'10.210.74.152' (usingpassword: YES)
NestedThrowables:
java.sql.SQLException: Access denied for user 'hive'@'10.210.74.152' (usingpassword: YES)
FAILED: Execution Error, return code 1 fromorg.apache.hadoop.hive.ql.exec.DDLTask

这是因为mysql不允许远程访问的问题,没有对用户进行授权。

执行 grant all on *.*  to 'root'@'%' identified by'root',这个命令我的测试机上不能用。

 

报错3:

Exception in thread "Thread-24" java.lang.RuntimeException:Error while reading from task log url
       atorg.apache.hadoop.hive.ql.exec.errors.TaskLogProcessor.getStackTracesFAILED:Execution Error, return code 2 fromorg.apache.hadoop.hive.ql.exec.MapRedTask

错误原因:没有传递python脚本到mysql上面。

你可能感兴趣的:(hadoop)