hive错误记录

系统环境:

hadoop CDH3u2

hive 0.71 3u4

错误1

使用默认的derby数据库,当查询数据库的时候,比如使用 show tables,报错如下:

 写道
FAILED: Error in metadata: javax.jdo.JDOFatalDataStoreException: Cannot get a connection, pool error Could not create a validated object, cause: A read-only user or a user in a read-only database is not permitted to disable read-only mode on a connection.
NestedThrowables:
org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool error Could not create a validated object, cause: A read-only user or a user in a read-only database is not permitted to disable read-only mode on a connection.
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask

解决办法:通过conf/hive-site.xml文件找到derby数据库的路径,在cdh3中为"/var/lib/hive/metastore/metastore_db",然后执行sudo chown -R hadoop:hadoop /var/lib/hive/,这里假设我运行用户名为hadoop。

问题原因:root用户创建了derby数据库锁,hadoop用户无法操作root用户锁文件。

错误2

查询使用RegexSerDe的表出现如下错误:

Hive ClassNotFoundException: org.apache.hadoop.hive.contrib.serde2.RegexSerDe

解决办法:

vi hive/conf/hive-site.xml 

<property>
  <name>hive.aux.jars.path</name>
  <value>file:////usr/lib/hive/lib/hive-contrib-0.7.1-cdh3u4.jar</value>
</property>
 

-heipark

猜你喜欢

转载自heipark.iteye.com/blog/1540054