当前位置:网站首页>Flink1.7 from installation to experience
Flink1.7 from installation to experience
2022-07-18 18:52:00 【Hua Weiyun】
Welcome to visit mine GitHub
Here we classify and summarize all the original works of Xinchen ( Including supporting source code ):https://github.com/zq2599/blog_demos
- Actual combat of this article Flink1.7 The installation and Demo Operation process ;
Introduction to the steps
- preparation ;
- download Flink1.7;
- install Flink1.7;
- start-up Flink1.7;
- Experience Flink1.7;
preparation
- The following is the environmental information of this actual battle :
- operating system :CentOS Linux release 7.5.1804
- JDK:1.8.0_191
- nc Tools :7.50( The installation command is yum install nmap-ncat.x86_64)
- Be careful :
- I am here vmware Of ubuntu16 I tried , After starting Managers、Slots、Available Task Slots The number of is zero , But there is no problem on the physical machine ;
- CentOS Please pay attention to turn off the firewall ;
download Flink1.7
- stay Flink Download from the official website , The address is :https://flink.apache.org/downloads.html
- Here's the picture , Select the version in the red box :

install Flink1.7
- Flink1.7 It's easy to install , Decompression can be , As shown below :
- Download the Flink The installation package file is flink-1.7.0-bin-hadoop28-scala_2.11.tgz, Put it in this position :/usr/local/work;
- stay /usr/local/work Execute command under directory tar -zxvf flink-1.7.0-bin-hadoop28-scala_2.11.tgz decompression , A folder will be generated :flink-1.7.0
start-up Flink1.7
- In the folder flink-1.7.0 Give orders ./bin/start-cluster.sh You can start Flink, The startup information is as follows :
[ro[email protected] flink-1.7.0]# ./bin/start-cluster.sh Starting cluster.Starting standalonesession daemon on host vostro.Starting taskexecutor daemon on host vostro.- stay flink-1.7.0/log You can see the directory named flink-root-standalonesession-0-vostro.log Log file ( Your file name is slightly different from mine ,vostro It's my hostname ,root Is the current account number ), The contents are as follows :
2018-12-16 16:51:00,658 INFO org.apache.flink.runtime.dispatcher.DispatcherRestEndpoint - Rest endpoint listening at localhost:80812018-12-16 16:51:00,658 INFO org.apache.flink.runtime.dispatcher.DispatcherRestEndpoint - http://localhost:8081 was granted leadership with leaderSessionID=00000000-0000-0000-0000-0000000000002018-12-16 16:51:00,658 INFO org.apache.flink.runtime.dispatcher.DispatcherRestEndpoint - Web frontend listening at http://localhost:8081.2018-12-16 16:51:00,760 INFO org.apache.flink.runtime.rpc.akka.AkkaRpcService - Starting RPC endpoint for org.apache.flink.runtime.resourcemanager.StandaloneResourceManager at akka://flink/user/resourcemanager .2018-12-16 16:51:00,777 INFO org.apache.flink.runtime.rpc.akka.AkkaRpcService - Starting RPC endpoint for org.apache.flink.runtime.dispatcher.StandaloneDispatcher at akka://flink/user/dispatcher .2018-12-16 16:51:00,803 INFO org.apache.flink.runtime.resourcemanager.StandaloneResourceManager - ResourceManager akka.tcp://[email protected]:6123/user/resourcemanager was granted leadership with fencing token 000000000000000000000000000000002018-12-16 16:51:00,804 INFO org.apache.flink.runtime.resourcemanager.slotmanager.SlotManager - Starting the SlotManager.2018-12-16 16:51:00,847 INFO org.apache.flink.runtime.dispatcher.StandaloneDispatcher - Dispatcher akka.tcp://[email protected]:6123/user/dispatcher was granted leadership with fencing token 00000000-0000-0000-0000-0000000000002018-12-16 16:51:00,849 INFO org.apache.flink.runtime.dispatcher.StandaloneDispatcher - Recovering all persisted jobs.2018-12-16 16:51:01,601 INFO org.apache.flink.runtime.resourcemanager.StandaloneResourceManager - Registering TaskManager with ResourceID a0692f62811e0452256484a5e46ec5ed (akka.tcp://[email protected]:40228/user/taskmanager_0) at ResourceManager2018-12-16 17:19:09,663 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - RECEIVED SIGNAL 15: SIGTERM. Shutting down as requested.2018-12-16 17:19:09,663 INFO org.apache.flink.runtime.blob.TransientBlobCache - Shutting down BLOB cache2018-12-16 17:19:09,668 INFO org.apache.flink.runtime.blob.BlobServer - Stopped BLOB server at 0.0.0.0:35234My machine IP The address is 192.168.1.103, So visit... In the browser http://192.168.1.103:8081, You can see the following information :

thus ,Flink1.7 install 、 Deploy 、 Start up ;
Experience Flink1.7
- Execute the following command on the machine to connect the machine 9000 port :
nc -l 9000- In the folder flink-1.7.0 Execute the following command , You can listen to this computer 9000 port , Wait for data on this port :
./bin/flink run examples/streaming/SocketWindowWordCount.jar --port 9000- Then refresh web page , See the following information , I added a new one Job:

- In execution nc -l 9000 Command window , Enter some sentences , Press enter after each input , as follows :
[[email protected] work]# nc -l 9000hello flink worldaaa bbb cccflink startstart flink study, flink go- This will send the above string to the local 9000 port ;
- stay flink-1.7.0/log Under the table of contents , There will be flink-root-taskexecutor-0-vostro.out The file appears , Your file name may be slightly different , among vostro It's my host name ,root Is the current account number , Open this file and have a look , The following appears :
[[email protected] work]# nc -l 9000hello flink worldaaa bbb cccflink startstart flink study, flink goIt can be seen that the task has been executed normally , The number of words in each sentence is counted ;
thus , We finished Flink The first experience of , In the follow-up actual combat, we will gradually deepen our experience together Flink This powerful framework ;
Welcome to Huawei cloud blog : Xinchen, programmer
On the way to study , You are not alone , Xinchen's original works are accompanied all the way …
边栏推荐
- 最新信息安全毕业设计题目选题推荐
- Sword finger offer 52 The first common node of two linked lists
- [Luogu p6891] ビルのりけ 4 (DP) (conclusion)
- Stream—优雅的处理集合元素
- Conversion of data types
- Flink1.7从安装到体验
- Impala advanced settings of broadcast_ BYTES_ LIMIT
- 2022/7/14 每日一题(简单路径与树结合--->深搜)
- Here comes the problem! Unplug the network cable for a few seconds and plug it back in. Does the original TCP connection still exist?
- 【Day4】optimization
猜你喜欢
随机推荐
CAN光端机解决泰和安TX3016C消防主机长距离联网问题
844. 比较含退格的字符串
【C语言刷LeetCode】134. 加油站(M)
thingJS的使用
Sword finger offer 52 The first common node of two linked lists
Solution of eigenvalue and eigenvector
Can optical fiber converter solves the long-distance networking problem of taihe'an tx3016a fire engine
Anaconda 的认识以及和它相关的一些编辑器的简单介绍
Series operations of function templates (detailed explanation)
Your first orthodontic condition (continuously updating)
02 review multithreading
【Ucos-III源码分析】——内存管理机制
Unity—常用API(续Time类)
函数模板的系列操作( 详解 )
软件测试面试题:软件产品质量特性是什么?
每日一题·剑指Offer || 041.滑动窗口的平均值(346一样)·队列
指针的理解与操作
Conversion of data types
【黄啊码】MySQL入门—1、SQL 的执行流程
10 suggestions for graduating and going to the programmer's Road (wonderful pictures)

![[英雄星球七月集训LeetCode解题日报] 第16日 队列](/img/0d/157ede29995f32163f8db01398de9a.png)







