Failed with exception org.apache.hadoop.security.AccessControlException: User null does not belong to hdfs

sqoop

#1

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://nn01.itversity.com:3306/retail_db” --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!


#2

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


#3

@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?