当前位置:网站首页>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 :
边栏推荐
猜你喜欢
随机推荐
Flink集群搭建以及企业级yarn集群搭建
p5.js千纸鹤动画背景js特效
SQL Sever中的窗口函数row_number()rank()dense_rank()
[IEEE publication] 2022 International Conference on intelligent transportation and future travel (cstfm 2022)
记录一下MySql update会锁定哪些范围的数据
H5网页如何在微信中自定义分享链接
如何在一个页面上使用多个KindEditor编辑器并将值传递到服务器端
JMeter接口测试工具基础— 取样器sampler(二)
leetCode-面试题 01.05: 一次编辑
牛客-TOP101-BM29
Uniapp implementation forbids video drag fast forward
[IEEE publication] 2022 International Conference on service robots (iwosr 2022)
Leetcode-498: diagonal traversal
被困英西中学的师生安全和食物有保障
Younger sister Juan takes you to learn JDBC --- 2-day sprint Day1
线程池的执行流程
JMeter接口测试工具基础 — Badboy工具
charles抓包工具使用教程
6.套餐管理业务开发
2022年能源与环境工程国际研讨会(CoEEE 2022)









