Phoenix Build失败了。找不到标志。 Phoenix 4.8.2 Hbase-1.2 cdh 5.9.1

时间:2017-01-20 07:47:58

标签: maven hadoop hbase cloudera-cdh phoenix

我在Cloudera的Hadoop和Hbase安装上安装Apache Phoenix 4.8.2-Hbase-1.2(即通过cdh 5.9.1安装)

按照这些说明在其上构建Phoenix: Running java agents in lotus notes

现在我运行sudo mvn install -DskipTests

我在phoenix-core编译中遇到这个错误:

[INFO] Reactor Summary:
[INFO] 
[INFO] Apache Phoenix .................................... SUCCESS [5.569s]
[INFO] Phoenix Core ...................................... FAILURE [2:30.148s]
[INFO] Phoenix - Flume ................................... SKIPPED
[INFO] Phoenix - Pig ..................................... SKIPPED
[INFO] Phoenix Query Server Client ....................... SKIPPED
[INFO] Phoenix Query Server .............................. SKIPPED
[INFO] Phoenix - Pherf ................................... SKIPPED
[INFO] Phoenix - Spark ................................... SKIPPED
[INFO] Phoenix - Hive .................................... SKIPPED
[INFO] Phoenix Client .................................... SKIPPED
[INFO] Phoenix Server .................................... SKIPPED
[INFO] Phoenix Assembly .................................. SKIPPED
[INFO] Phoenix - Tracing Web Application ................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2:37.862s
[INFO] Finished at: Fri Jan 20 13:02:44 IST 2017
[INFO] Final Memory: 68M/714M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on project phoenix-core: Compilation failure: Compilation failure:
[ERROR] /opt/apache-phoenix-4.8.2-HBase-1.2-src-copy/phoenix-core/src/main/java/org/apache/phoenix/util/PhoenixMRJobUtil.java:[222,29] cannot find symbol
[ERROR] symbol:   variable QUEUE_NAME
[ERROR] location: interface org.apache.hadoop.mapreduce.MRJobConfig
[ERROR] /opt/apache-phoenix-4.8.2-HBase-1.2-src-copy/phoenix-core/src/main/java/org/apache/phoenix/util/PhoenixMRJobUtil.java:[226,32] cannot find symbol
[ERROR] symbol:   variable MAP_MEMORY_MB
[ERROR] location: interface org.apache.hadoop.mapreduce.MRJobConfig
[ERROR] /opt/apache-phoenix-4.8.2-HBase-1.2-src-copy/phoenix-core/src/main/java/org/apache/phoenix/util/PhoenixMRJobUtil.java:[227,29] cannot find symbol
[ERROR] symbol:   variable MAP_JAVA_OPTS
[ERROR] location: interface org.apache.hadoop.mapreduce.MRJobConfig
[ERROR] /opt/apache-phoenix-4.8.2-HBase-1.2-src-copy/phoenix-core/src/main/java/org/apache/phoenix/util/PhoenixMRJobUtil.java:[229,54] cannot find symbol
[ERROR] symbol:   variable QUEUE_NAME
[ERROR] location: interface org.apache.hadoop.mapreduce.MRJobConfig
[ERROR] /opt/apache-phoenix-4.8.2-HBase-1.2-src-copy/phoenix-core/src/main/java/org/apache/phoenix/util/PhoenixMRJobUtil.java:[230,39] cannot find symbol
[ERROR] symbol:   variable MAP_MEMORY_MB
[ERROR] location: interface org.apache.hadoop.mapreduce.MRJobConfig
[ERROR] /opt/apache-phoenix-4.8.2-HBase-1.2-src-copy/phoenix-core/src/main/java/org/apache/phoenix/util/PhoenixMRJobUtil.java:[231,39] cannot find symbol
[ERROR] symbol:   variable MAP_JAVA_OPTS
[ERROR] location: interface org.apache.hadoop.mapreduce.MRJobConfig
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :phoenix-core

无法在org.apache.hadoop.mapreduce.MRJobConfig类中找到QUEUE_NAME MAP_MEMORY_MBMAP_JAVA_OPTS。不是cloudera hadoop 2.6包含这些变量吗?

public static void updateCapacityQueueInfo(Configuration conf)中只有PhoenixMRJobUtil.java函数使用这些变量并导致编译失败。这是为Capacity scheduler提供信息的功能。从phoenix代码中评论此函数及其调用是否安全,因为我只安装这些函数用于本地测试,而不是用于生产环境。

否则还有什么可能是解决方案? Aren的hadoop 2.6和phoenix 4.8.2兼容吗?

1 个答案:

答案 0 :(得分:1)

最后为cdh5.9.1(Hbase 1.2.0和Hadoop 2.6.0)成功构建了Phoenix 4.8.2。这些问题是由于Phoenix 4.8.2与cdh5.9.1不兼容造成的。

在尝试更改phoenix代码以成功编译之后,我从这个repo中检出了phoenix 4.8Hbase-1.2-cdh5.8分支,其中大部分代码已经完成,以使其兼容:< / p>

https://github.com/chiastic-security/phoenix-for-cloudera/branches

原来这个分支虽然对于cdh5.8,也适用于我的cdh5.9.1。刚刚更改了pom.xml文件中的hbase和hadoop.two(包括mr)版本,并添加了:

</repository>
    <repository>
  <id>conjars.org</id>
  <url>http://conjars.org/repo</url>
</repository>
<repository>
  <id>apache snapshot</id>
  <url>https://repository.apache.org/content/repositories/snapshots/</url>
  <snapshots>
    <enabled>true</enabled>
  </snapshots>
</repository>
<repository>
  <id>sonatype-nexus-snapshots</id>
  <name>Sonatype Nexus Snapshots</name>
  <url>https://oss.sonatype.org/content/repositories/snapshots</url>
  <snapshots>
    <enabled>true</enabled>
  </snapshots>
</repository>

还将pigjacksonslf4jflumespark的版本信息替换为原始来源{{1}中提到的版本信息这里:

http://www-us.apache.org/dist/phoenix/apache-phoenix-4.8.2-HBase-1.2/src/