You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by jokkycaz <jo...@gmail.com> on 2012/06/18 03:27:07 UTC

Hadoop java.io.IOexception: Cannot open filename

I am encountering this error

Exception in thread "main" java.io.IOException: Cannot open filename
/data/input.txt

When trying to run this command on a single hadoop cluster running hadoop
.20.2

bin/hadoop jar sample.jar ReadHadoop /data/input.txt

I am trying to run a .jar java program called ReadHadoop. It basically just
reads a file and outputs its contents into the cygwin command window. I have
hadoop set up correctly. When I execute the command bin/start-all.sh and
check localhost/50070 and 50030 everything is working correctly. What causes
this error. Any help would be GREAT!!!!!!!
-- 
View this message in context: http://old.nabble.com/Hadoop-java.io.IOexception%3A-Cannot-open-filename-tp34027586p34027586.html
Sent from the Hadoop core-user mailing list archive at Nabble.com.


Re: Hadoop java.io.IOexception: Cannot open filename

Posted by minumichael <mi...@tcs.com>.
Hi,
check if you have given the correct input filepath. Or check out by giving
other file types or removing the .txt extension.


-- 
View this message in context: http://old.nabble.com/Hadoop-java.io.IOexception%3A-Cannot-open-filename-tp34027586p34208589.html
Sent from the Hadoop core-user mailing list archive at Nabble.com.


Re: Hadoop java.io.IOexception: Cannot open filename

Posted by xiaodong feng <cr...@gmail.com>.
try bin/hadoop fs -ls /           if it not get error ,you could   bin/hadoop
fs -mkdir data .good luck

2012/6/18 Zach <jo...@gmail.com>

>
>
> When I try bin/hadoop fs -ls /data i get ls: Cannot access /data: No such
> file
> or directory. For some reason I am not in my /usr/local/hadoop/ file
> directory.
> How can I change this... Thank you
>
>
>

Re: Hadoop java.io.IOexception: Cannot open filename

Posted by Zach <jo...@gmail.com>.

When I try bin/hadoop fs -ls /data i get ls: Cannot access /data: No such file
or directory. For some reason I am not in my /usr/local/hadoop/ file directory.
How can I change this... Thank you



Re: Hadoop java.io.IOexception: Cannot open filename

Posted by Preethi Vinayak Ponangi <vi...@gmail.com>.
Hi,

Could you please check if your file /data/input.txt is present on HDFS?
The above error only means that the file is not present on the Hadoop file
system.

try a command: hadoop fs -ls /data

See if input.txt is present.

Regards,
Vinayak.

On Sun, Jun 17, 2012 at 8:27 PM, jokkycaz <jo...@gmail.com> wrote:

>
> I am encountering this error
>
> Exception in thread "main" java.io.IOException: Cannot open filename
> /data/input.txt
>
> When trying to run this command on a single hadoop cluster running hadoop
> .20.2
>
> bin/hadoop jar sample.jar ReadHadoop /data/input.txt
>
> I am trying to run a .jar java program called ReadHadoop. It basically just
> reads a file and outputs its contents into the cygwin command window. I
> have
> hadoop set up correctly. When I execute the command bin/start-all.sh and
> check localhost/50070 and 50030 everything is working correctly. What
> causes
> this error. Any help would be GREAT!!!!!!!
> --
> View this message in context:
> http://old.nabble.com/Hadoop-java.io.IOexception%3A-Cannot-open-filename-tp34027586p34027586.html
> Sent from the Hadoop core-user mailing list archive at Nabble.com.
>
>