Hadoop - wordcount program is not writing on output file in localhost:9870

35 Views Asked by At

I'm using hadoop-3.3.0 and jdk1.8 on Windows10 machine. I have a program to practice programming WordCount

  1. Step 1: Create a file named "data.txt". The content of the file is: data.txt

  2. Step2:

  • create input directory in hdfs with command:
hdfs dfs -mkdir /input

  • push the data.txt file into the newly created input folder:
hdfs dfs -put "D:\PhanTichDuLieu\data.txt" /input

  1. Step3: But wordcount program is not writing on output file in localhost:9870 I used comand:
hadoop jar "C:\hadoop-3.3.0\share\hadoop\mapreduce\hadoop-mapreduce-examples-3.3.0.jar" wordcount /input/data.txt /output

HELP ME WHY NOT SHOW OUTPUT FOLDER?

I tried many solutions but none worked. Please help me

1

There are 1 best solutions below

0
OneCricketeer On

You're trying to run Hadoop on Windows, but have not overridden the hadoop.tmp.dir config to be a non Unix path, therefore you see you have an error that paths under /tmp directory cannot be accessed since that's not valid.

You also cannot have spaces in your username for hadoop to work properly

You'll need to edit your xml files and restart the namenode/datanode and Nodemanager/resourcemanager to use any new property