1
votes

I am new to hadoop and trying out the sample program of wordcount already distributed with hadoop installation. I have created input directory named as "input" in hdfs and it contains my pdf file (how-to-code-in-python.pdf). When trying to run hadoop command for wordcount it shows an error

java.lang.Exception: java.io.FileNotFoundException: Path is not a file: /input/input

Hadoop error image

What is the exact error and how do I solve it?

1

1 Answers

0
votes

You list the contents of the folder

hdfs dfs -ls /input 

Look at everything not a file

Then remove the folder(s) listed in the error as not files

hdfs dfs -rm -R /input/input

Then upload your data again

hdfs dfs -copyFromLocal file.txt /input/