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?
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With