Eclipse Run WordCount Steps

Source: Internet
Author: User
Tags hadoop fs

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.