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

后端 未结 3 620
野趣味
野趣味 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: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:

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

    to

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

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

提交回复
热议问题