Failed with exception User null does not belong to hdfs



I was trying to import all tables from retail_db. Created the db problem6_rak. It dumps the records for categories table and fails with an error. There is no problem with the directory on hdfs.
The sqoop command used is as below:

sqoop import-all-tables --connect “jdbc:mysql://” --username retail_dba --password itversity --warehouse-dir /user/hive/warehouse/problem6_rak --hive-import --hive-database problem6_rak --create-hive-table --as-textfile;

Here is the error:

It would be great if somebody could help!


The hive warehouse directory which you have given is incorrect. Try /apps/hive/warehouse/problem6_rak.db/


@annapurna got it. One last question, when we try to import data and mention warehouse directory, should we strictly specify actual hive warehouse directory?

Will it not create a dir at whatever location we give?