1-844-696-6465 (US)        +91 77600 44484        help@dezyre.com

Problem creating a database in hive



0
I followed the answer you posted for Ishtiaq Rizvi's question. After giving rwx permission to all user using a sudo command and removing .lck files I tried to create a database by running the following commands:
hive> CREATE DATABASE hivedemo
> LOCATION '/user/hive/warehouse/hivedemo/';
The error now is:
FAILED: Error in metadata: javax.jdo.JDOFatalDataStoreException: Failed to create database '/var/lib/hive/metastore/metastore_db'
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask

It also shows Parse error: mismatched input 'LOCATION' expecting EOF
Please let me know how to resolve this.


2 Answer(s)


0

Hi Cheryl,

Appreciate the efforts you made to resolve the issue but this time it looks like issue is coming due to insufficient permissions to current user for creating metastore directory.
Please try running following command:
sudo chmod -R 777 /var/lib/hive/metastore/metastore_db
and then re-try running hive queries.
This should work now.

Please post, if further help is required.

0

Hi Cheryl,

Appreciate the efforts you made to resolve the issue but this time it looks like issue is coming due to insufficient permissions to current user for creating metastore directory.
Please try running following command:
sudo chmod -R 777 /var/lib/hive/metastore/metastore_db
and then re-try running hive queries.
This should work now.

Please post, if further help is required.

Your Answer

Click on this code-snippet-icon icon to add code snippet.

Upload Files (Maximum image file size - 1.5 MB, other file size - 10 MB, total size - not more than 50 MB)

Email
Password