First step: Get Hadoop-eclipse-plugin-1.2.1.jar File
There are two ways of doing this:
1. Under the Src/contrib/eclipse-plugin directory of the Hadoop installation directory, run the following command to generate the Eclipse plugin:
ant-d/opt/eclipse-d1.2.1
(The first D of the command is followed by the Eclipse installation directory, followed by the Hadoop version number on the second d)
2. Directly download the corresponding version of the file, such as mine is directly downloaded Hadoop-eclipse-plugin-1.2.1.jar
Step two: Copy the generated or downloaded Hadoop-eclipse-plugin-1.2.1.jar files to the plugin file of the Eclipse installation directory, and then restart Eclipse
Third step: Open Eclipse, select the Hadoop root directory at window->preferences-> map/reduce, and click OK.
Add: If you do not create a MapReduce project directly in the third step, you will be prompted with the following error:
Invalid Hadoop Runtime specified; Please click the ' Configure Hadoop install directory ' or fill in the Library location input field
Add plug-ins in eclipse