我有一个运行配置单元的 3 节点集群。 当我尝试从集群外部运行一些测试时,出现以下错误
FAILED: Error in metadata: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask Logging initialized using configuration in file:/net/slc01nwj/scratch/ashsshar/view_storage/ashsshar_bda_latest_2/work/hive_scratch/conf/hive-log4j.properties
当我登录到集群节点并执行 hive 时,它工作正常。
hive> 显示数据库; 好的 默认
在测试日志文件中生成以下错误
13/04/04 03:10:49 ERROR security.UserGroupInformation: PriviledgedActionException as:ashsshar {my username }(auth:SIMPLE) cause:java.io.IOException: javax.jdo.JDOFatalDataStoreException: Failed to create database '/var/lib/hive/metastore/metastore_db', see the next exception for details. NestedThrowables: java.sql.SQLException: Failed to create database '/var/lib/hive/metastore/metastore_db', see the next exception for details.
我的 hive-site.xml
文件包含此连接属性::
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:derby:;databaseName=/var/lib/hive/metastore/metastore_db;create=true</value>
<description>JDBC connect string for a JDBC metastore</description>
我已经在我的集群节点上更改了 /var/lib/hive/metastore/metastore_db
,但仍然出现相同的错误
我还尝试从上面的目录中删除所有 *lck 文件
最佳答案
{username}是否有权限创建
/var/lib/hive/metastore/metastore_db
?
如果它是一个测试集群你可以做
sudo chmod -R 777/var/lib/hive/metastore/metastore_db
或 chown
给运行它的用户。
关于hadoop - 无法实例化 HiveMetaStoreClient,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15810210/