Eclipse Run WordCount Steps
The first step: Build the project and import the code.
Step Two: Create a file to write the data (separated by a space) and upload it to HDFs.
1. Create the file and write the data:
2. Uploading HDFs
On the line under Hadoop permissions:
Command: Hadoop fs-put new file path input directory
such as: Hadoop fs-put/home/hadoop/input/text03 input
View all HDFs files
Command:hadoop fs-ls input
After the upload is successful, you can see it in Eclipse Engineering space:
In the Hadoop folder, the operation under the Hadoop permissions is usually in the root folder.
3. Set the eclipse input/output path,
The input path is the path that was just uploaded to HDFs, and the output path is set directly.
3.1, right-click Project:
3.2 Input Path: The input path is separated from the output path by a space.
Note: If this is not found, the input path is prepended with hdfs://localhost:9000
hdfs://localhost:9000/user/hadoop/input/text03 hdfs://localhost:9000/user/hadoop/output/text03b
3.3 Running the Code
Click Run and the following appears in the console:
Nth Run
Run for the first time:
3.4 Statistical results
This is the end of the run.
Eclipse Run WordCount Steps