2013-11-24 30 views
5

我在我的系統中安裝了hadoop 2.2。我想用大象鳥罐。在運行「mvn package」時遇到以下錯誤。Elephant-bird 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 

我已經添加下面的代碼在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 

回答

5

更改從0.9.1儉到0.7.0由http://archive.apache.org/dist/thrift/0.7.0/thrift-0.7.0.tar.gz下載。提取並進入提取的文件夾。然後鍵入以下命令:

  • 使用chmod + X的./configure
  • 的./configure
  • 使
  • 須藤使鍵入節儉-version安裝

檢查節儉的版本。這應返回「節儉版本0.7.0」

然後去象鳥的文件夾,然後鍵入「MVN -Dmaven.test.skip =真包」

注:跳過測試被用作一些測試失敗了。跳過測試選項解決了這個問題。

控制檯輸出:

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

編輯: 豬被扔的錯誤在編譯時負載語句JsonLoader爲JSON-簡單1.1.1.jar沒有被發現。谷歌的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 (在<大象鳥的文件夾路徑還發現> /hadoop-compat/target/elephant-bird-hadoop-compat-4.4-SNAPSHOT.jar

寄存器4瓶使用豬的大象鳥插件。

+0

http://stackoverflow.com/questions/7645918/require-no-such-file-to-load-mkmf-loaderror可能會幫助,如果你在執行「make」時出現ruby錯誤。 –

+0

http://stackoverflow.com/questions/7962715/rvm-can-not-install-gem-thrift-on-ubuntu-11-10可能會幫助,如果你仍然堅持與紅寶石寶石錯誤。 THRIFT的0.8版本已修復此問題。從存檔站點下載0.8 thrift鏈接:http://archive.apache.org/dist/thrift/0.8.0/thrift-0.8.0.tar.gz –

相關問題