himank / K-Means

K-Means Clustering using MapReduce
75 stars 62 forks source link

Input File not found Exception #3

Open nkhan076 opened 7 years ago

nkhan076 commented 7 years ago

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?

tabatabaei commented 7 years ago

I have this problem too

my hadoop version is 2.7.3

dhevsabharish commented 1 year ago

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