System environment: CentOS7.6
Closed: selinux, firewalld
Prerequisites:
Install JDK\HADOOP environment
Implementation steps:
1. Go to the hadoop installation directory and create a wcinput directory
# mkdir wcinput
2. Enter the wcinput directory and create a file
# cd wcinput/
After entering the wcinput directory, create a file and write something into it at will
# vim word.txt
3. Run a jar package, specify the input path-call the mappreduce-examples calculation module, and send the processing result to a specified destination directory (the destination directory does not exist in advance)
# bin/hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-3.2.2.jar wordcount wcinput/ ./wcoutput
4. Then go to the destination directory and have a look
5. View the running results