Where is /user/hive/warehouse

Hi Sir, I am going through your videos in ITVERSITY and trying my hands on in BIGDATA-LABS, there it is mentioned that what ever data bases we create using hive will be stored in warehouse, but when I try to create the sqoop_import it says it already exits. So, can you please explain how to create our databases and where to save, and how is the warehouse path created in this kind of shared environment where we need to access using our id like /user/soori2980 etc. ?

I hope this will help you …

  1. Go to the hive command prompt.
  2. Fire create database xyz; (where xyz is the name of the database)
  3. Kindly check the directory available in hdfs or not by firing this command
    hdfs dfs -ls /user/hive/warehouse/xyz.db
  4. while importing with sqoop, mentioned warehouse-dir

Let me know in case of any difficulty …

Hi Mohit, thanks a ton for your prompt reply, your solution works when I work on my virtual machine, but in LAB, no. Below is the screen shot.
hive> create database xyz;
Time taken: 0.245 seconds
hive> dfs -ls /user/hive/warehouse;
ls: /user/hive/warehouse': No such file or directory Command failed with exit code = 1 Query returned non-zero code: 1, cause: null hive> dfs -ls /user/soori2980/hive/warehouse; ls:/user/soori2980/hive/warehouse’: No such file or directory
Tried using hadoop too:
[soori2980@gw01 ~]$ hadoop fs -ls /user/hive/warehouse
ls: /user/hive/warehouse': No such file or directory [soori2980@gw01 ~]$ hadoop fs -ls /user/soori2980/hive/warehouse ls:/user/soori2980/hive/warehouse’: No such file or directory

But I can see my database when I run the command in hive
hive> show databases;

Please explain me the concept how it works in our BIGDATA-LABS and how to move my database to HDFS.

@mohitkumar, we should not change hive directory like that as part of sqoop command.

@sureshj, default hive location is /user/hive/warehouse. But for hortonworks it is /apps/hive/warehouse.
You can launch hive and run set hive.metastore.warehouse.dir; command to get the value of hive warehouse directory.

If it work, please mark this as solution.