Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

impala-shell -f No such file or directory

avatar
Champion Alumni

Hello,

 

I'm having a script file that I want to run with impala-shell. 

When I do :

 

hadoop dfs -ls  /user/developer/scripts/Impala/ 

 

I can see my file

 

However, when I try to do it in impala I get no such file or directory. 

 

impala-shell -f /user/developer/scripts/Impala/myFile

 

What should I check? Why is impala not finding my file?

 

Thank you!

GHERMAN Alina
1 ACCEPTED SOLUTION

avatar
Expert Contributor

Hi - 

 

The Impala shell is looking for the file in your *local* filesystem, not on HDFS. It does not currently support reading input scripts from HDFS. So to make this work, copy the file locally with hdfs -fs get <path to your file> <local path>, and then run impala-shell -f <local path>.

 

Best,

Henry

View solution in original post

3 REPLIES 3

avatar
Expert Contributor

Hi - 

 

The Impala shell is looking for the file in your *local* filesystem, not on HDFS. It does not currently support reading input scripts from HDFS. So to make this work, copy the file locally with hdfs -fs get <path to your file> <local path>, and then run impala-shell -f <local path>.

 

Best,

Henry

avatar
Champion Alumni

However, with this solution I have a problem… I do not know on which instance from my cluster is the file downloaded (I want shedule my task with oozie)

GHERMAN Alina

avatar
Explorer

Hi

I had the same issue , I have to make each statement in SQL file to be impala-shell -q *.

Even it can work but I think it is so ugly and will be disaster when you have lots of statements !

 

I had raised the issue at this post before :

 

http://community.cloudera.com/t5/Interactive-Short-cycle-SQL/Impala-schedule-with-oozie-tutorial/m-p...