栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 大数据 > 大数据系统

flink在centos7单机安装测试

flink在centos7单机安装测试

系统环境:CentOS7.8

flink版本:下载和Scala版本对应的

flink官方下载地址:https://flink.apache.org/downloads.html

查看jdk

[root@localhost bin]# java -version
java version "1.8.0_162"
Java(TM) SE Runtime Environment (build 1.8.0_162-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.162-b12, mixed mode)

安装:

解压到指定文件夹

[root@localhost tools]# tar zxvf flink-1.11.6-bin-scala_2.12.tgz -C /root/training/

到安装目录的文件夹下:

[root@localhost ]# cd /root/training/flink-1.11.6/

启动flink服务:

[root@localhost flink-1.11.6]# bin/start-cluster.sh
Starting cluster.
Starting standalonesession daemon on host localhost.
Starting taskexecutor daemon on host localhost.

jps查看进程:

[root@localhost flink-1.11.6]# jps
7926 TaskManagerRunner
8023 Jps
7614 StandaloneSessionClusterEntrypoint

TaskManagerRunnerStandaloneSessionClusterEntrypoint启动才算安装成功;

开始我的TaskManagerRunner没启动,网上找了好多方法都没解决,最后解决办法:

    停止flink:
[root@localhost flink-1.11.6]# bin/stop-cluster.sh
No taskexecutor daemon (pid: 6460) is running anymore on localhost.
No standalonesession daemon (pid: 6150) is running anymore on localhost.

最后发现进程还在:

[root@localhost flink-1.11.6]# jps
7202 Jps
2394 StandaloneSessionClusterEntrypoint
    直接有kill杀死:
[root@localhost flink-1.11.6]# kill -9 2394
[root@localhost flink-1.11.6]# jps
7217 Jps
    再次启动flink:
[root@localhost flink-1.11.6]# bin/start-cluster.sh
Starting cluster.
Starting standalonesession daemon on host localhost.
Starting taskexecutor daemon on host localhost.
[root@localhost flink-1.11.6]# jps
7926 TaskManagerRunner
8023 Jps
7614 StandaloneSessionClusterEntrypoint

5、浏览器访问flink服务,直接访问:http://自己ip:8081/#/overview,可以看到flink已经正常启动。

运行flink自带样例词频统计:

[root@localhost bin]# ./flink run ../examples/batch/WordCount.jar
Executing WordCount example with default input data set.
Use --input to specify file input.
Printing result to stdout. Use --output to specify output path.
Job has been submitted with JobID 6959c79777833ad39b8847cb3d3f736d
Program execution finished
Job with JobID 6959c79777833ad39b8847cb3d3f736d has finished.
Job Runtime: 3239 ms
Accumulator Results: 
- fe3b95521fed6b0e1774cd035c55fe5b (java.util.ArrayList) [170 elements]

.......
(respect,1)
(returns,1)
(rub,1)
(s,5)
(say,1)
(scorns,1)
(sea,1)

安装测试完成。
希望对你有帮助!!!!!!!!

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/761349.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号