目录
1.创建flink源
wget https://downloads.apache.org/flink/flink-1.13.2/flink-1.13.2-bin-scala_2.11.tgz
wget https://repo.maven.apache.org/maven2/org/apache/flink/flink-shaded-hadoop-2-uber/2.8.3-10.0/flink-shaded-hadoop-2-uber-2.8.3-10.0.jar
mv flink-1.13.2-bin-scala_2.11 /var/www/html/flink/
mv flink-shaded-hadoop-2-uber-2.8.3-10.0.jar /var/www/html/flink/
2.下载ambari-flink-service服务
查看hdp版本
[root@node001 ~]# VERSION=`hdp-select status hadoop-client | sed 's/hadoop-client - \([0-9]\.[0-9]\).*/\1/'`
[root@node001 ~]# echo $VERSION
3.1
载ambari-flink-service服务
下载ambari-flink-service服务到 ambari-server 资源目录下
[root@node001 ~]# git clone https://github.com/abajwa-hw/ambari-flink-service.git /var/lib/ambari-server/resources/stacks/HDP/$VERSION/services/FLINK
正克隆到 '/var/lib/ambari-server/resources/stacks/HDP/3.1/services/FLINK'...
remote: Enumerating objects: 198, done.
remote: Counting objects: 100% (6/6), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 198 (delta 0), reused 3 (delta 0), pack-reused 192
接收对象中: 100% (198/198), 2.09 MiB | 575.00 KiB/s, done.
处理 delta 中: 100% (89/89), done.
查看文件
[root@node001 ~]# cd /var/lib/ambari-server/resources/stacks/HDP/3.1/services/FLINK/
[root@node001 FLINK]# ll
总用量 20
drwxr-xr-x 2 root root 58 8月 30 20:48 configuration
-rw-r--r-- 1 root root 223 8月 30 20:48 kerberos.json
-rw-r--r-- 1 root root 1777 8月 30 20:48 metainfo.xml
drwxr-xr-x 3 root root 21 8月 30 20:48 package
-rwxr-xr-x 1 root root 8114 8月 30 20:48 README.md
-rw-r--r-- 1 root root 125 8月 30 20:48 role_command_order.json
drwxr-xr-x 2 root root 236 8月 30 20:48 screenshots
3. 修改配置文件
1.编辑 metainfo.xml 将安装的版本修改为 1.13.2
cd /var/lib/ambari-server/resources/stacks/HDP/3.1/services/FLINK/
vim metainfo.xml
<displayName>Flink</displayName>
<comment>Apache Flink is a streaming dataflow.。。。。.</comment>
<version>1.13.2</version>
2.配置JAVA_HOME
cd /var/lib/ambari-server/resources/stacks/HDP/3.1/services/FLINK/configuration
vim flink-env.xml
env.java.home: /usr/local/java/ #改为自己的java路径
3.编辑flink-ambari-config.xml修改下载地址为第一步创建的网络路径
cd /var/lib/ambari-server/resources/stacks/HDP/3.1/services/FLINK/configuration
vim flink-ambari-config.xml
<property>
<name>flink_download_url</name>
<!--<value>http://www.us.apache.org/dist/flink/flink-1.9.1/flink-1.9.1-bin-scala_2.11.tgz</value>-->
<value<