0

when type "load data inpath '/group/public/aa.txt' into table managed_table;"

i got the following exception,why and how to resolve it?

FAILED: Hive Internal Error: java.lang.RuntimeException(java.io.FileNotFoundException: File 
does not exist: /tmp) java.lang.RuntimeException: java.io.FileNotFoundException: File does 
not exist: /tmp at org.apache.hadoop.hive.ql.Context.getScratchDir(Context.java:148)
Chris W
  • 1,792
  • 15
  • 32

1 Answers1

0

hive uses a temporary directory defined in hive.exec.scratchdir in hive-site.xml by default its /tmp/hive-${user.name }. I guess for some reason you don't have /tmp or don't have permissions to it.
Change the scratch dir or make it available to hive.

dimamah
  • 2,883
  • 18
  • 31
  • thanks dimamah~ when i set hive.exec.scratchdir to a hdfs dir, the load data words runs Correctly. but why a local dir cannnot work? i got the /tmp in my system,and i can write files in it. – user3127122 Dec 23 '13 at 08:35
  • do you see `hive-${user.name }` directory inside /tmp? if you do, what user owns it? same user running Hive? if you don't see it, try creating it manually with the user running hive – dimamah Dec 24 '13 at 09:32