hadoop local mode

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

     image.png2. 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

image.png

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

image.png

4. Then go to the destination directory and have a look

image.png

5. View the running results

image.png


Guess you like

Origin blog.51cto.com/kangxi/2676764