The package org.apache.hadoop.ipc.protobuf is empty

I just got the latest stable version of Hadoop (2.4) and followed this instruction to import it into Eclipse.

However, I have some build errors cannot be resolved to a typein 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 the package org.apache.hadoop.ipc.protobuf is empty. Am I doing something wrong? Missing any configuration step?

+4
source share
2 answers

Java hadoop. Java protoc

maven install mvn install -DskipTests protoc- .java

hasoop

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

protobuf .. . .

mvn install -DskipTests java protobuf

+3

cd to path "/hadoop-common-project/hadoop-common/src/test/proto" : protoc --java_out=../java *.proto. , ( Google), github.

+1

Source: https://habr.com/ru/post/1536988/


All Articles