Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Package org.apache.hadoop.ipc.protobuf empty

I just get the last stable Hadoop version (2.4) and followed this instruction to import it into Eclipse.

However, I've having several build errors of cannot be resolved to a type in the test src folder. As an example:

import org.apache.hadoop.ipc.protobuf.TestProtos.EchoRequestProto;
import org.apache.hadoop.ipc.protobuf.TestProtos.EchoResponseProto;
import org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto;
import org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto;
import org.apache.hadoop.ipc.protobuf.TestRpcServiceProtos.TestProtobufRpcProto;
import org.apache.hadoop.ipc.protobuf.TestRpcServiceProtos.TestProtobufRpc2Proto;

Eclipse cannot find any of these classes, simply because org.apache.hadoop.ipc.protobuf package is empty. Am I doing something wrong? Missing some configuration step?

like image 233
Pedro Dusso Avatar asked Apr 17 '14 16:04

Pedro Dusso


1 Answers

You cannot find any Java files under these packages in the hadoop source code repository. Java files under this packages will be generated by protoc compiler

When you execute maven install mvn install -DskipTests protoc compiler will generate the corresponding .java files

For Setting up hadoop build environment, refer the following link

http://wiki.apache.org/hadoop/HowToContribute

Install native libraries Install protobuf etc. Refer above link for detailed information

Once you successfully execute the command mvn install -DskipTests you can see the java files under protobuf packages

like image 95
SachinJ Avatar answered Sep 28 '22 05:09

SachinJ