我是蜂房的初学者。当我尝试执行任何hive命令时:
hive>SHOW TABLES;
它显示以下错误:
FAILED: Error in metadata: javax.jdo.JDOFatalDataStoreException: Failed to start database '/var/lib/hive/metastore/metastore_db', see the next exception for details.
NestedThrowables:
java.sql.SQLException: Failed to start database '/var/lib/hive/metastore/metastore_db', see the next exception for details.
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask发布于 2014-03-26 12:39:00
这看起来像是derby锁定问题。您可以通过删除/var/lib/hive/metastore/metastore_db目录中的锁定文件来临时修复此问题。但是这个问题在将来也会发生。
sudo rm -rf /var/lib/hive/metastore/metastore_db/*.lck
使用默认的hive metastore嵌入的derby,不可能同时启动多个hive实例。通过将配置单元元存储更改为mysql或postgres服务器,可以解决此问题。
有关更改配置单元元存储的信息,请参阅以下cloudera文档
http://www.cloudera.com/content/cloudera-content/cloudera-docs/CDH4/4.2.0/CDH4-Installation-Guide/cdh4ig_topic_18_4.html
发布于 2017-11-14 18:35:25
当我忘记在同一个节点上运行另一个spark-shell实例时,我也遇到过类似的错误。
发布于 2015-12-09 02:23:21
将~/hive/conf文件夹下的hive-site.xml更新为以下名称/值,并尝试执行以下操作:
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:derby:;databaseName=/var/lib/hive/metastore/metastore_db;create=true</value>https://stackoverflow.com/questions/22651105
复制相似问题