Eclipse Import into Hadoop 2.4

Source: Internet
Author: User

Install the Elicpse plug-in hadoop-maven-plugins using the following command:
$ CD ${hadoop_home}/hadoop-maven-plugins
$ mvn Install
Then generate the Eclipse project file:
$ cd ${hadoop_home}
$ MVN eclipse:eclipse-dskiptests
Finally, in Eclipse, follow the following process to import the source code: "File" → "Import" → "Existing Projects into Workspace".

Here you can refer to: http://www.aboutyun.com/thread-8211-1-1.html


Here is a blog written by the error, where I only met a few, I finally posted the error I encountered

Error#1. Hadoop-streaming inside the build path has a problem, showing/root/workspace/hadoop-2.2.0-src/hadoop-yarn-project/hadoop-yarn/ hadoop-yarn-server/hadoop-yarn-server-resourcemanager/conf (missing)

Solution, remove the reference just fine.

Error#2. hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/ Testdfsclientfailover.java Sun.net.spi.nameservice.NameService Error, this is a package that needs import, exists in OpenJDK, not found in Oracle JDK, Need to download one. Nameservice is an interface, it is good to find a nameservice on the internet to put in the package. http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/7u40-b43/sun/net/spi/nameservice/ Nameservice.java#nameservice

Error#3. /hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineeditsviewer/xmleditsvisitor.java inside Display
Import Com.sun.org.apache.xml.internal.serialize.OutputFormat;
Import Com.sun.org.apache.xml.internal.serialize.XMLSerializer;
Failure, this is due to eclipse's strong check principle, open Java-Compiler-errors/warnings and under "Deprecated and restricted API" change the Sett ing of "Forbidden reference (Access rules)" Adjusts the error level to the warning level.

Error#4. /hadoop-common/src/test/java/org/apache/hadoop/io/serializer/avro/  Testavroserialization.java shows that there is no Avrorecord class, and the online search for Avrorecord class is put into a sibling package. http://grepcode.com/file/repo1.maven.org/maven2/org.apache.hadoop/hadoop-common/2.2.0/org/apache/hadoop/io/ Serializer/avro/avrorecord.java#avrorecord

Error#5. The ORG.APACHE.HADOOP.IPC.PROTOBUF package is empty and needs to be found in the/hadoop-common/target/generated-sources/java profobuf copy to/hadoop-common It's good to be in the/src/test/java. At the same time the package is also missing the following three references, find on the Grepcode, the corresponding files hadoop-common2.2.0 down to import.

Org.apache.hadoop.ipc.protobuf.TestProtos.EchoRequestProto;
Org.apache.hadoop.ipc.protobuf.TestProtos.EchoResponseProto;
Org.apache.hadoop.ipc.protobuf.TestRpcServiceProtos.TestProtobufRpcProto;

Error#6. /hadoop-auth/org/apache/hadoop/security/authentication/client/authenricatortestcase.java Display Server.start () and Server.stop () error, have not found the reason, waiting to be checked ~ ~ ~

-----------------------------------------Dividing line-------------------------------------------------

I encountered the error 56, in fact, the main 3 questions

    1. Ibid. error#1. Hadoop-streaming inside the build path has a problem, showing/root/workspace/hadoop-2.2.0-src/hadoop-yarn-project/hadoop-yarn/ hadoop-yarn-server/hadoop-yarn-server-resourcemanager/conf (missing)

      Solution, remove the reference is good, the right right-click Error item->properties-> left Java Build path->source-> selected error item, remove

    2. Ibid. error#4, the solution is ibid.

    3. Ibid. error#5, the solution is ibid.

Then you should be right.

Reference:

Http://zhidao.baidu.com/link?url=HC-qIB_ Xxz4zdjtd-gpgi0mmwge7fgpjc222ri9ha-ju3iflcer4ivt7zogvou7jyr4fwew8yup0opwo_9tdlz4u-vd5derkqn8oihzzqfw

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.