当前位置:网站首页>Flink cluster construction and enterprise level yarn cluster construction
Flink cluster construction and enterprise level yarn cluster construction
2022-06-24 10:26:00 【Juvenile deer】
Flink download :
According to the version you want to download , Download the specified version I downloaded 7.2hadoop edition
Unzip and start :
Local boot
[[email protected] flinkhadoop1.7.2]# bin/start-scala-shell.sh local
Submit one locally job
scala> benv.readTextFile("/home/admin/word.txt").flatMap(_.split(" ")).map((_,1)).groupBy(0).sum(1).print()

Stand alone cluster startup :
[[email protected] flinkhadoop1.7.2]# bin/start-cluster.sh
Starting cluster.
Starting standalonesession daemon on host node01.
Starting taskexecutor daemon on host node01.
[[email protected] flinkhadoop1.7.2]# jps
28417 StandaloneSessionClusterEntrypoint
29013 Jps
28858 TaskManagerRunner
View the start cluster page

Submit task to flink Single node cluster
[[email protected] flinkhadoop1.7.2]# bin/flink run /home/admin/flinkhadoop1.7.2/examples/batch/WordCount.jar --input /home/admin/word.txt --output /home/admin/out

The front end views the uploaded tasks
Implementation plan :


Output file display
[[email protected] flinkhadoop1.7.2]# cat /home/admin/out flink 1 hello 6 java 1 storm 1 stream 2 world 1
Stop the cluster :
bin/stop-cluster.sh

jobmanager.rpc.address: node01
jobmanager.rpc.port: 6123
jobmanager.heap.size: 1024
taskmanager.heap.size: 1024
taskmanager.numberOfTaskSlots: 2
taskmanager.memory.preallocate: false
parallelism.default: 1
jobmanager.web.port: 8081
taskmanager.tmp.dirs: /home/user/apps/flink/tmp
# Page submission
web.submit.enable: true
[[email protected] flinkhadoop1.7.2]# vim conf/masters 192.168.36.138:8081
[[email protected] flinkhadoop1.7.2]# vim conf/slaves 192.168.36.138 192.168.36.139 192.168.36.140
hadoop download
https://archive.apache.org/dist/hadoop/core/hadoop-2.7.5/
hadoop Cluster deployment :
Nanny level Hadoop Cluster deployment _ Wang, programmer java The blog of -CSDN Blog
Single deployment hadoop:
Single deployment hadoop2.7.3_ Wang, programmer java The blog of -CSDN Blog _hadoop2.7.3
hadoop visit :
http://node01:50070/dfshealth.html#tab-overview
/usr/soft/hadoop-2.7.3/sbin/stop-dfs.sh /usr/soft/hadoop-2.7.3/sbin/start-dfs.sh
hadoop create a file : hdfs dfs -mkdir -p /word #1. see hdfs File system directory file hdfs dfs -ls /word #2. Upload : hdfs dfs -put Local file directory HDFS File directory hdfs dfs -put /usr/apps/word/words.txt /word #3. Delete file hdfs dfs -rm -r HDFS File path hdfs dfs -rm -r /word
flink Cluster deployment , The same routine ; Cluster deployment and enterprise level Hadoop colony yarn Refer to the following address for deployment https://blog.csdn.net/weixin_44385486/article/details/124197370?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522165552127416782388044840%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fblog.%2522%257D&request_id=165552127416782388044840&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~blog~first_rank_ecpm_v1~rank_v31_ecpm-3-124197370-null-null.nonecase&utm_term=flink&spm=1018.2226.3001.4450
https://blog.csdn.net/weixin_44385486/article/details/124197370?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522165552127416782388044840%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fblog.%2522%257D&request_id=165552127416782388044840&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~blog~first_rank_ecpm_v1~rank_v31_ecpm-3-124197370-null-null.nonecase&utm_term=flink&spm=1018.2226.3001.4450
In the process of cluster building , Possible problems :
- Port occupied , We need to manually kill the program that occupies the port ;
- Directory not found or file not found , We are flink-conf.yaml I've configured io.tmp.dirs , This directory needs to be created manually
flink -hadoop Highly available clusters and yarn need Corresponding flink-hadoop rely on , Download address
command :
./bin/flink run -m yarn-cluster -yid application_xxxx ./examples/batch/WordCount.jar
yarn Run task on./bin/flink run -yjm 1024m -ytm 4096m -ys 2 ./examples/batch/WordCount.jar
Start cluster
bin/start-cluster.sh
Stop the cluster
bin/stop-cluster.sh
The attachment FLink Technical data can be referred to :
边栏推荐
- 顺丰科技智慧物流校园技术挑战赛(2022/06/19)【AK】
- Customize the toolbars of the kindeditor editor. Items removes unnecessary toolbars or retains some toolbars
- leetCode-1823: 找出游戏的获胜者
- Six states of threads
- Error reading CSV (TSV) file
- How can I solve the problem that the swiper animation animation fails when switching between left and right rotations of the swiper?
- 牛客-TOP101-BM29
- Machine learning - principal component analysis (PCA)
- 记录一下MySql update会锁定哪些范围的数据
- Learn to use PHP to implement unlimited comments and unlimited to secondary comments solutions
猜你喜欢

Leetcode-498: diagonal traversal

Resolved: methods with the same name as their class will not be constructors in

3.员工的增删改查

Uniapp develops a wechat applet to display the map function, and click it to open Gaode or Tencent map.

leetCode-2221: 数组的三角和

Uniapp implements the function of clicking to make a call

百度网盘下载一直请求中问题解决

JMeter接口测试工具基础— 取样器sampler(二)

SQL Sever中的窗口函数row_number()rank()dense_rank()

4.分类管理业务开发
随机推荐
leetCode-1051: 高度检查器
Younger sister Juan takes you to learn JDBC --- 2-day sprint Day1
顺丰科技智慧物流校园技术挑战赛(2022/06/19)【AK】
23. Opencv——图像拼接项目
正规方程、、、
利用pandas读取SQL Sever数据表
The great charm of cookies
学习整理在php中使用KindEditor富文本编辑器
Error reading CSV (TSV) file
SSM integration
[resource sharing] the 5th International Conference on civil, architectural and environmental engineering in 2022 (iccaee 2022)
Practice sharing of packet capturing tool Charles
SF Technology Smart logistics Campus Technology Challenge (June 19, 2022) [AK]
静态链接库和动态链接库的区别
[EI分享] 2022年第六届船舶,海洋与海事工程国际会议(NAOME 2022)
A method to solve the self-adaptive width and height of the internal picture of rich text label in wechat applet
JMeter接口测试工具基础— 取样器sampler(二)
机器学习——主成分分析(PCA)
pycharm快捷键大全
线程池的执行流程