我已经在我的系统中安装了hadoop2.2。我想用象鸟罐。运行“mvn包”时出现以下错误。
错误:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project elephant-bird-core: Compilation failure: Compilation failure:
[ERROR] /usr/lib/hadoop/elephant_bird/core/target/generated-sources/thrift/com/twitter/elephantbird/thrift/test/TestListInList.java: [9,39] error: package org.apache.commons.lang3.builder does not exist
[ERROR] /usr/lib/hadoop/elephant_bird/core/target/generated-sources/thrift/com/twitter/elephantbird/thrift/test/TestListInList.java: [10,31] error: package org.apache.thrift.scheme does not exist
[ERROR] /usr/lib/hadoop/elephant_bird/core/target/generated-sources/thrift/com/twitter/elephantbird/thrift/test/TestListInList.java: [11,31] error: package org.apache.thrift.scheme does not exist
[ERROR] /usr/lib/hadoop/elephant_bird/core/target/generated-sources/thrift/com/twitter/elephantbird/thrift/test/TestListInList.java: [12,31] error: package org.apache.thrift.scheme does not exist
[ERROR] /usr/lib/hadoop/elephant_bird/core/target/generated-sources/thrift/com/twitter/elephantbird/thrift/test/TestListInList.java: [14,31] error: package org.apache.thrift.scheme does not exist
[ERROR] /usr/lib/hadoop/elephant_bird/core/target/generated-sources/thrift/com/twitter/elephantbird/thrift/test/TestListInList.java: [15,33] error: cannot find symbol
[ERROR] package org.apache.thrift.protocol
[ERROR] /usr/lib/hadoop/elephant_bird/core/target/generated-sources/thrift/com/twitter/elephantbird/thrift/test/TestListInList.java: [20,0] error: package org.apache.thrift.server.AbstractNonblockingServer does not exist
[ERROR] /usr/lib/hadoop/elephant_bird/core/target/generated-sources/thrift/com/twitter/elephantbird/thrift/test/TestListInList.java: [42,43] error: cannot find symbol
我在pom.xml中添加了以下代码,但仍然存在错误。
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.1</version>
</dependency>
如何解决此错误?
系统配置
Thrift version 0.9.1
Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 19:21:28+0530)
Maven home: /usr/lib/mvn/apache-maven-3.0.5
Java version: 1.7.0_25, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-openjdk-amd64/jre
Default locale: en_IN, platform encoding: UTF-8
OS name: "linux", version: "3.5.0-43-generic", arch: "amd64", family: "unix"
Hadoop 2.2.0.2.0.6.0-76
1条答案
按热度按时间4ioopgfo1#
通过从下载将thrift从0.9.1更改为0.7.0http://archive.apache.org/dist/thrift/0.7.0/thrift-0.7.0.tar.gz. 提取并进入提取文件夹。然后键入以下命令:
chmod+x./configure配置
/配置
制作
sudo make安装
通过键入thrift-version检查节俭版本。这应该返回“thrift版本0.7.0”
然后转到 elephant-bird 文件夹并键入“mvn-dmaven.test.skip=true包”
注意:跳过测试用于某些测试失败。跳过测试选项解决了这个问题。
控制台输出:
编辑:pig在编译jsonload的load语句时抛出错误,因为找不到json-simple-1.1.1.jar。用谷歌搜索这个jar,你很容易就能找到无法发布链接,因为声望少于10)
在启动关于hadoop compat的pig作业时抛出了一个错误。下载http://repo1.maven.org/maven2/com/twitter/elephantbird/elephant-bird-hadoop-compat/4.4/elephant-bird-hadoop-compat-4.4.jar (也可以在/hadoop compat/target/elephant-bird-hadoop-compat-4.4-snapshot.jar中找到)
)
注册4罐使用 elephant-bird 插件在Pig。