gpt4 book ai didi

java - 象鸟mvn包报错

转载 作者:可可西里 更新时间:2023-11-01 14:19:11 26 4
gpt4 key购买 nike

我已经在我的系统中安装了 hadoop 2.2。我想使用 Elephant-Bird jar 。运行“mvn package”时出现以下错误。

错误:


[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

最佳答案

通过从 http://archive.apache.org/dist/thrift/0.7.0/thrift-0.7.0.tar.gz 下载将 Thrift 从 0.9.1 更改为 0.7.0 .提取并进入提取的文件夹。然后输入以下命令:

  • chmod +x ./configure
  • ./配置
  • 制作
  • sudo 进行安装

通过键入 thrift -version 检查 thrift 版本。这应该返回 "Thrift version 0.7.0"

然后转到 elephant-bird 文件夹并输入“mvn -Dmaven.test.skip=true package”

注意:跳过测试用于某些测试失败。跳过测试选项解决了这个问题。

控制台输出:

[INFO] Building jar: /usr/lib/hadoop/elephant_bird/examples/target/elephant-bird-examples-4.4-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Elephant Bird ..................................... SUCCESS [2.043s]
[INFO] Elephant Bird Cascading2 .......................... SUCCESS [4.277s]
[INFO] Elephant Bird Core ................................ SUCCESS [16.622s]
[INFO] Elephant Bird Hadoop Compatibility ................ SUCCESS [0.106s]
[INFO] Elephant Bird Hive ................................ SUCCESS [0.462s]
[INFO] Elephant Bird Mahout .............................. SUCCESS [5.026s]
[INFO] Elephant Bird Pig ................................. SUCCESS [9.756s]
[INFO] Elephant Bird RCFile .............................. SUCCESS [3.745s]
[INFO] Elephant Bird Lucene .............................. SUCCESS [3.320s]
[INFO] Elephant Bird Pig Lucene .......................... SUCCESS [1.736s]
[INFO] Elephant Bird Examples ............................ SUCCESS [6.653s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 55.204s
[INFO] Finished at: Wed Jan 15 01:28:31 IST 2014
[INFO] Final Memory: 64M/386M
[INFO] ------------------------------------------------------------------------

编辑:Pig 在为 JsonLoader 编译加载语句时抛出错误,因为未找到 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 个 Jars 以在 Pig 中使用 Elephant-Bird 插件。

关于java - 象鸟mvn包报错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20181345/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com