Running and Verifying Flink
- Start ZooKeeper and Hadoop in sequence.
- Start the Flink cluster on server1:
1/usr/local/flink/bin/yarn-session.sh -nm flinkapp
- You can run the following command to view the parameters in the yarn-session.sh file:
1/usr/local/flink/bin/yarn-session.sh -h - You can run the following command to stop the Flink cluster on server1:
1yarn app -kill $(yarn app -list | grep flinkapp | awk '{print $1}')
- You can run the following command to view the parameters in the yarn-session.sh file:
- After the YARN session is started, a YARN application ID is generated. You can access the Flink WebUI through the YARN WebUI. Replace the following example address with the actual one.For example, if the Application ID generated after the YARN session is started is application_XX_XX, the YARN WebUI port is 8088, and the IP address of the primary node in the cluster is server1, access the following address:
http://server1:8088/proxy/Application ID/
- Run the following command to query the YARN WebUI port. If no port is displayed, the default port number 8088 is used.
1cat /usr/local/hadoop/etc/hadoop/yarn-site.xml | grep "yarn.resourcemanager.webapp.address" -A 1
- To query the application ID, log in to the YARN WebUI and search for the keyword flinkapp in the Search search box.
- Run the following command to query the YARN WebUI port. If no port is displayed, the default port number 8088 is used.
Parent topic: Deployment Guide (CentOS & openEuler)