Article Directory
standalone mode
1. Download the flink compressed package
Click to download: flink1.7.2
2. Upload to the machine
upload yourself
3. Unzip
tar -zxvf flink-1.7.2-bin-hadoop27-scala_2.11.tgz -C /opt/
4. Configure environment variables
vim /etc/profile
# 写入自己flink解压路径等
export FLINK_HOME=/opt/flink-1.7.2/
export PATH=${
FLINK_HOME}/bin:$PATH
Save and exit, refresh environment variables
source /etc/profile
5. Modify the ./conf/flink-conf.yaml file
cd /opt/flink-1.7.2/conf
vim flink-conf.yaml
Configure the savepoint path, which can be a local path or hdfs path
6. Modify the /conf/slave file
vim slave
For multiple nodes, specify multiple
7. Start the test view
start-cluster.sh
Two services will be started:
go to the flink page to have a look:
http://192.168.8.120 own ip:8081/
Yarn mode
When deploying Flink tasks in Yarn mode, it is required that Flink is a version supported by Hadoop. The Hadoop environment needs to ensure that the version is above 2.2, and the HDFS service is installed in the cluster.
1) Start hadoop cluster (omitted)
2) Start yarn-session
yarn-session.sh -n 2 -s 2 -jm 1024 -tm 1024 -nm test -d
Parameter explanation:
-n(–container): The number of TaskManagers.
-s(–slots): The number of slots for each TaskManager. By default, one slot is one core. The default number of slots for each taskmanager is 1. Sometimes there can be more taskmanagers for redundancy.
-jm: The memory of the JobManager (in MB).
-tm: The memory of each taskmanager (in MB).
-nm: appName of yarn (the name on the ui of yarn now).
-d: Execute in the background.