CDH6.2 平台 Hadoop 版本是 hadoop-3.0.0-cdh6.2.0,使用 Flink1.9 需要重新编译对应 Hadoop版本。
下载
Flink国内镜像站:flink-1.9.1-src.tgz 、 flink-shaded-7.0-src.tgz
或者git下载
git clone https://github.com/apache/flink.git
Maven 配置
<mirrors><!-- 阿里云仓库 --><mirror><id>alimaven</id><name>aliyun maven</name><url>http://maven.aliyun.com/nexus/content/repositories/central/</url><mirrorOf>central</mirrorOf></mirror><mirror><id>nexus-aliyun</id><name>aliyun maven</name><url>http://maven.aliyun.com/nexus/content/groups/public/</url><mirrorOf>central</mirrorOf></mirror><!-- Maven中央仓库中国镜像 --><mirror><id>maven cn repo</id><name>oneof the central mirrors in china</name><url>http://maven.net.cn/content/groups/public/</url><mirrorOf>central</mirrorOf></mirror><mirror><id>maven repo</id><name>Maven Repository Switchboard</name><url>http://repo1.maven.org/maven2/</url><mirrorOf>central</mirrorOf></mirror><mirror><id>maven repo2</id><mirrorOf>central</mirrorOf><name>Human Readable Name for this Mirror.</name><url>http://repo2.maven.org/maven2/</url></mirror></mirrors>
编译 flink-shade 源码
修改pom.xml,添加 cloudera repository
<repositories><repository><id>cloudera repo</id><url>https://repository.cloudera.com/artifactory/cloudera-repos/</url></repository><repository><id>mvn repo</id><url>https://mvnrepository.com</url></repository></repositories>
编译
mvn clean install -DskipTests -Dhadoop.version=3.0.0-cdh6.2.0