flink編譯hadoop3.1.2(失败,这个问题没有意义,关闭)
環境:
| 組件 | 版本 |
| zookeeper | 3.6.0 |
| hadoop | 3.1.2 |
| spark | 3.0.0-preview2-bin-hadoop3.2 |
| hbase | 2.2.4 |
| hive | 3.0.0 |
| flink | 1.10.1 |
https://mirrors.tuna.tsinghua.edu.cn/apache/flink/flink-1.10.1/flink-1.10.1-src.tgz
pom.xml中93-159行是需要關注的版本,目前的修改辦法是如果pom.xml中的版本比其他大數據組件中的jar更新,那么就不修改版本了,如果比其他大數據組件中的版本舊,那么就進行修改和更新。
| pom.xml中的變量 | pom.xml中的默認版本 | 預期修改成 | 修改理由-hadoop中對應的jar包/文件夾 |
| hadoop.version | 2.4.1 | 3.1.2 | hadoop-3.1.2 |
| guava.version | 18.0 | ? | ? |
| akka.version | 2.5.21 | ? | ? |
| slf4j.version | 1.7.15 | 1.7.25 | $TEZ_HOME/lib/slf4j-api-1.7.25.jar |
| scala.version | 2.11.12 | 感覺應該不會有太大影響,所以沒改 | ? |
| scala.binary.version | 2.11 | 感覺應該不會有太大影響,所以沒改 | ? |
| zookeeper.version | 3.4.10 | 3.6.0 | apache-zookeeper-3.6.0-bin |
| curator.version | 2.12.0 | 2.13.0 | apache-tez-0.9.2-src/tez-dist/target/tez-0.9.2/lib/curator-client-2.13.0.jar |
| jackson.version | 2.10.1 | 2.7.8(實際沒修改) | $HADOOP/share/hadoop/yarn/lib/jackson-jaxrs-json-provider-2.7.8.jar |
| hive.version | 2.3.4 | 3.0.0 | apache-hive-3.0.0-bin |
| hivemetastore.hadoop.version | 2.7.5 | 3.0.0 | 在mysql中查看 |
| hadoop.version | 2.7.0-mapr-1607 | 不用修改 | MapR是一家大數據公司,不使用他們的平臺就不用對此處進行修改[1] |
| zookeeper.version | 3.4.5-mapr-1604 | 不用修改 | MapR是一家大數據公司,不使用他們的平臺就不用對此處進行修改[1] |
同時flink-connectors/flink-hbase/pom.xml中的hbase修改為2.2.4
?
mysql> use hive;
mysql> select * from VERSION;
+--------+----------------+----------------------------+
| VER_ID | SCHEMA_VERSION | VERSION_COMMENT ? ? ? ? ? ?|
+--------+----------------+----------------------------+
| ? ? ?1 | 3.0.0 ? ? ? ? ?| Hive release version 3.0.0 |
+--------+----------------+----------------------------+
1 row in set (0.00 sec)
?
?
mvn clean package -DskipTests -Dhadoop.version=3.1.2編譯失敗
[ERROR] Failed to execute goal on project flink-hadoop-fs: Could not resolve dependencies for project org.apache.flink:flink-hadoop-fs:jar:1.10.1: Could not find artifact org.apache.flink:flink-shaded-hadoop-2:jar:3.1.2-9.0 in alimaven (http://maven.aliyun.com/nexus/content/groups/public/) -> [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/DependencyResolutionException
[ERROR]?
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] ? mvn <goals> -rf :flink-hadoop-fs
?
因為前些時候已經編譯成功flink1.12了,和hadoop3.x兼容的很好,所以這里在編譯的時候特地采用hadoop3.x其實意義不大。
?
Reference:
[1]大數據發行版本+組件中的競品/等同地位關系(持續更新中)
?
總結
以上是生活随笔為你收集整理的flink編譯hadoop3.1.2(失败,这个问题没有意义,关闭)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 关于网络IP地址的分类
- 下一篇: flink配置+停止flink中的job