大象鸟mvn包错误 [英] Elephant-bird mvn package error

查看:140
本文介绍了大象鸟mvn包错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在系统中安装了hadoop 2.2。我想用大象鸟罐。在运行mvn package时出现以下错误。



错误:




  [错误]未能执行目标org.apache.maven.plugins:maven-compiler-plugin:2.3.2:编译(默认编译)项目elephant-bird- core:编译失败:编译失败:
[错误] /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
[错误] / 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
[错误] / 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
[错误] / usr / lib / hadoop / elephant_bird /芯/目标/生成来源/ thrift / com / twitter / elephantbird / thrift / test / TestListInList.java:[12,31] error:package org.apache.thrift.scheme does not exist
[错误] / 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
[错误] / usr / lib / hadoop / elephant_bird / core / target / generated-sources / thrift / com / twitter / elephantbird / thrift / test / TestListInList.java:[15,33] error:can not find symbol
[ERROR] package org.apache.thrift.protocol
[错误] /usr/lib/hadoop/elephant_bird/core/target/generated-sources/thrift/com/twitter/elephantbird/thrift/test/TestListInList.java:[20, 0]错误:package org.apache.thrift.server.AbstractNonblockingServer不存在
[错误] / usr / lib / hadoop / elephant_bird / core / target / generated-sources / thrift / com / twitter / elephantbird / thrift /test/TestListInList.java:[42,43] error:can not find symbol






我在pom.xml中添加了以下代码,但仍然存在错误。

 <依赖性> 
< groupId> org.apache.commons< / groupId>
< artifactId> commons-lang3< / artifactId>
< version> 3.1< / version>
< /依赖关系>

如何解决此错误?

系统配置

  Thrift 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版本:1.7.0_25,供应商:Oracle Corporation
Java主页:/ usr / lib / jvm / java-7-openjdk-amd64 / jre
默认语言环境:en_IN,平台编码:UTF-8
操作系统名称:linux,版本: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 。提取并进入提取的文件夹。然后输入以下命令:


  • chmod + x ./configure

  • ./ configure
  • >
  • make

  • sudo make install



键入thrift -version。这应该返回Thrift version 0.7.0

然后去elephant-bird文件夹并输入mvn -Dmaven.test.skip =真正的软件包



注意:由于一些测试失败,因此使用跳过测试。跳过测试选项解决了这个问题。



控制台输出:

  [ INFO]构建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兼容性................ 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] Elephan t鸟Lucene .............................. SUCCESS [3.320s]
[INFO] Elephant Bird Pig Lucene。 ......................... SUCCESS [1.736s]
[INFO] Elephant Bird Examples .......... .................. SUCCESS [6.653s]
[信息] -------------------- -------------------------------------------------- -
[信息]建立成功
[信息] -------------------------------- ----------------------------------------
[信息]总时间: 55.204s
[INFO]完成于:星期三1月15日01:28:31 IST 2014
[INFO]最终记忆:64M / 386M
[信息] -------- -------------------------------------------------- --------------

编辑:
Pig由于未找到json-simple-1.1.1.jar,因此在编译JsonLoader的加载语句时抛出错误。谷歌的jar,你可以很容易地找到它。 (由于信誉低于10,无法发布链接)



在启动有关hadoop-compat的猪作业时出现错误。下载 http://repo1.maven.org/maven2/com/twitter/elephantbird/elephant-bird-hadoop-compat/4.4/elephant-bird-hadoop-compat-4.4.jar
(还可以在< elephant-bird-folder-path> /hadoop-compat/target/elephant-bird-hadoop-compat-4.4-SNAPSHOT.jar中找到





注册4个Jars在Pig中使用Elephant-Bird插件。


I have installed hadoop 2.2 in my system. I want to use Elephant-Bird jar. Am getting following error while runnning "mvn package".

Error:


[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


I have added below code in pom.xml but still the error exist.

<dependency>
    <groupId>org.apache.commons</groupId>
    <artifactId>commons-lang3</artifactId>
    <version>3.1</version>
</dependency>

How can i resolve this error ?

System Configuration

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

解决方案

Changed Thrift from 0.9.1 to 0.7.0 by downloading from http://archive.apache.org/dist/thrift/0.7.0/thrift-0.7.0.tar.gz. Extract and go into the extracted folder. Then typed following commands :

  • chmod +x ./configure
  • ./configure
  • make
  • sudo make install

Check thrift version by typing thrift -version. This should return "Thrift version 0.7.0"

Then go to elephant-bird folder and type "mvn -Dmaven.test.skip=true package"

Note : skip test is used as some tests were failing. Skip test options solved the issue.

Console output :

[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] ------------------------------------------------------------------------

EDIT : Pig was throwing error while compiling load statement for JsonLoader as json-simple-1.1.1.jar was not found. Google for the jar, you can find it easily. ( Cannot post link due to less than 10 reputation)

and there was an error thrown while launching pig job regarding hadoop-compat. Download http://repo1.maven.org/maven2/com/twitter/elephantbird/elephant-bird-hadoop-compat/4.4/elephant-bird-hadoop-compat-4.4.jar (Also found in < elephant-bird-folder-path >/hadoop-compat/target/elephant-bird-hadoop-compat-4.4-SNAPSHOT.jar

)

register 4 Jars to use Elephant-Bird plugin in Pig.

这篇关于大象鸟mvn包错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆