kylas
kylas

Reputation: 1455

copyFromLocal: `/user/hduser/input': No such file or directory

I was trying to do WordCount tutorial from this website but was having some problems and I followed the solutions from this thread. It was all fine until I tried to execute hadoop fs -copyFromLocal /user/hduser/input which produced this error

copyFromLocal: `/user/hduser/input': No such file or directory

And I tried to double confirm if there is such file by executing hadoop fs -mkdir /user/hduser/input and it says mkdir:/user/hduser/input': File exists`

So I am a little bit confused on where went wrong. I just wanna able to execute the copyFromLocal function.

When I run the command jps it shows - 
16023 SecondaryNameNode
16200 ResourceManager
16432 NodeManager
18971 Jps
15503 NameNode

Upvotes: 0

Views: 1806

Answers (2)

pkgajulapalli
pkgajulapalli

Reputation: 1126

You have to create directory before copying.

hadoop fs -mkdir /user/hduser/directory_in_hadoop_fs

Upvotes: 0

Ramin Darvishov
Ramin Darvishov

Reputation: 1039

hadoop fs -copyFromLocal /user/hduser/directory_in_local_fs /user/hduser/directory_in_hadoop_fs

copied directory_in_local_fs (local file or dicectory) into directory_in_hadoop_fs (path hadoop file system)

Upvotes: 1

Related Questions