java.sql.SQLException: Failed to start database 'metastore_db' ERROR, while initializing database using hive

后端 未结 3 475
野趣味
野趣味 2021-01-22 13:48

I installed Hadoop and Hive on 3 cluster. I have able to login to hive from my cluster node where HIVE is running.

root@NODE_3 hive]# hive Logging initia

相关标签:
3条回答
  • 2021-01-22 13:55

    follow this steps if you are using CDH 1. copy /usr/lib/hive/conf/hive-site.xml and paste into /usr/lib/spark/conf/

    This will solve the problem of "metastore_db" error

    Thanks

    0 讨论(0)
  • 2021-01-22 13:58

    It seems to be an issue with creating the metastore. I solved this by creating a directory and setting the value to that directory as follows:

    step-1: create a directory on home say its: hive-metastore-dir

    step-2: being super user edit the hive-site.xml (its in: /usr/lib/hive/conf) as follows:

    <name>javax.jdo.option.ConnectionURL</name>
      <value>jdbc:derby:;databaseName=/var/lib/hive/metastore/metastore_db;create=true</value>
    

    to

    <name>javax.jdo.option.ConnectionURL</name> 
      <value>jdbc:derby:;databaseName=/home/hive-metastore-dir/metastore/metastore_db;create=true</value>
    

    step-3: start the CLI as sudo hive and perform your queries.

    0 讨论(0)
  • 2021-01-22 14:01

    You may login to hive client from a directory where the user has write access. By default, hive will try to create temporary directory in local and HDFS when a shell is opened up.

    0 讨论(0)
提交回复
热议问题