Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 07-15-2018 05:54 AM
"describe database" and "describe extended database" --> displaying same information
hive > create database if not exists practice comment "This database was created for practice purpose" location '/home/abc/Sample' with dbproperties('Date'='2018-07-15','createdby'='Developer','Email'='[email protected]');
OK
Time taken: 0.018 seconds
hive> describe database practice;
OK
practice hdfs://abcdhdfs/apps/hive/warehouse/practice.db abc USER
Time taken: 0.122 seconds, Fetched: 1 row(s)
hive> describe database extended practice;
OK
practice hdfs://abcdhdfs/apps/hive/warehouse/practice.db abc USER Time taken: 0.123 seconds, Fetched: 1 row(s)
Created 07-15-2018 07:21 AM
Hello @Bal P!
Hm, that's kinda strange.
One thing made me curious, you have tried to create the database pointing to /home/abc/Sample and the DB got another path..
hdfs://abcdhdfs/apps/hive/warehouse/practice.db. Did you try to drop the database and recreate it again?
Hope this helps!
Created 07-15-2018 07:21 AM
Hello @Bal P!
Hm, that's kinda strange.
One thing made me curious, you have tried to create the database pointing to /home/abc/Sample and the DB got another path..
hdfs://abcdhdfs/apps/hive/warehouse/practice.db. Did you try to drop the database and recreate it again?
Hope this helps!
Created 07-15-2018 09:05 AM
I tried replicating your error on my kerberized cluster, the only difference I used a HDFS path for user hive /user/hive other than a local FS in your case '/home/abc/Sample' and the database was created
hive> create database if not exists practice comment "This database was created for practice purpose" location '/home/hive/test' with dbproperties('Date'='2018-07-15','created by'='Developer','Email'='[email protected]');Output of created database
$ hdfs dfs -ls /user/hive Found 3 items drwx------ - hive hdfs 0 2018-07-14 20:00 /user/hive/.Trash drwxr-xr-x - hive hdfs 0 2018-07-12 16:37 /user/hive/.hiveJars drwxr-xr-x - hive hdfs 0 2018-07-15 10:25 /user/hive/test
And when I run the describe all looked perfect !!!!
Hive works on top of the hadoop meaning it uses the hdfs for storage,by default it stores all databases in /apps/hive/warehouse/* unless in the table creation one uses the clause external keyword to point to an alternative path.
Can you confirm that you have this path in hdfs ?
/abcdhdfs/apps/hive/warehouse
HTH