Eclipse Integration runs the WordCount program using the Hadoop plugin

Source: Internet
Author: User
Tags file permissions hadoop fs

Cloud Address: https://pan.baidu.com/s/1CmBAJMdcwCxLGuCwSTcJNw Password: QOCW

Prerequisites: Starting the cluster, configuring the JDK and Hadoop environment variables is necessary to delete the output files in the virtual machine using

[[email protected] sbin]# Hadoop fs-rm-r/outputdeleted/output[[email protected] sbin]# ll

Give Hadoop file permissions

[[email protected] sbin]# Hadoop fs-chmod 777/

1. Open the Eclopse installation package

Put the downloaded Hadoop plugin Hadoop-eclipse-plugin-2.6.0.jar in the directory above and restart Ecliplse

Configure the Hadoop installation path

Select the window-preferences-hadoop map/reduce-hadoop installation directory command to select the installation directory for Hadoop

Note that the installation directory is the Hadoop that you configure environment variables, or you will not be able to run when you create a wordcount project that lacks a jar package

Configure Map/reduce

Click the Window-show perspective--other-map/reduce-ok button to configure the Map/reduce view

Stand-alone Window-show View-other-map/reduce-ok button display map/reduce Locations tab

Configure host-corresponding

If your cluster is configured successfully

[Email protected] sbin]# jps14036 NameNode19319 Jps14570 ResourceManager14302 Secondarynamenode

These four configuration files all have a

The following interface appears to indicate whether the connection is successful or not.

Refresh Project

If we get here, congratulations are half done.

Next you need to change the file under the bin of Hadoop

Open Directory

Copy my Baidu cloud inside the jar package hadoop-common-2.2.0-bin-master different versions of Eclipse may be different

Copy all of the files in this directory to the bin directory of Hadoop to replace and add

Back to the development environment

New Woredcount Project

As described in Hadoop, if the configuration succeeds, these jar packages will not be small, especially the Hadoop jar.

Next we need to download the Org package inside the class copied to the SRC directory in order to prevent error

Direct copy org entire directory to the SRC directory of the Hello Project

Then find the supplied WordCount example Wordcount.java class that comes with Hadoop

Change the Baoming, please.

It's all right.

Copy a log file to the Hadoop directory because the file is not output

One final step

Hdfs://192.168.10.11:9000/input3hdfs://192.168.10.11:9000/output/wordcount

Until the console prints out

Success

Eclipse Integration runs the WordCount program using the Hadoop plugin

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.