K-Means icon indicating copy to clipboard operation
K-Means copied to clipboard

Input File not found Exception

Open nkhan076 opened this issue 8 years ago • 2 comments

Hi, I was trying to run your code. But I am deliberately getting this error: Exception reading DistribtuedCache: java.io.FileNotFoundException: file:/tmp/hadoop-nkhan/mapred/local/1492189058953/centroid.txt (No such file or directory) Exception in thread "main" java.io.IOException: Job failed!

I already gave the input files (centroid.txt and data.txt) inside the input folder in hdfs. Can you please tell what should be the input file locations?

nkhan076 avatar Apr 14 '17 17:04 nkhan076

I have this problem too

my hadoop version is 2.7.3

tabatabaei avatar May 12 '17 07:05 tabatabaei

I know this is old but for anyone wondering, remember to upload the data.txt and centroid.txt files to hadoop's dfs as shown below (ss attached)

To upload: hdfs dfs -put data.txt wordcount/input (Assuming you have already created wordcount/input and wordcount/output directories)

To run the application:

<hadoop_path>/bin/hadoop jar <your_jar_file> <main_class> /user/<user_name>/wordcount/input /user/<user_name>/wordcount/output

WhatsApp Image 2023-02-25 at 18 07 47

dhevsabharish avatar Feb 26 '23 02:02 dhevsabharish