Hive Sqoop change scratchdir

In this post  Hive Job Submission failed with exception

I had mentioned about deleting .Trash folder.  For any reason if you are not able to delete the folder you can go with Option B.

Change the  scratchdir for Hive / Sqoop to use

Create a new folder under  hadoop file system.  Example   /db/tmphive

Grant read write access to other user  to  /db/tmphive folder and use this SET property in hive script.

Hive> set hive.exec.scratchdir=/db/tmphive/;

If same is used in Sqoop use  it with -D option

Sqoop import  -Dhive.exec.scratchdir=/db/tmphive/ …. 



Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: