今日闲来无事,整理一下Flink WebUI简介吧,对于初学者来说可能也许会有用吧,毕竟闲着太无聊了,后面再整理关于Metric指标,TaskManager内存模型吧,截图太费劲了。
1.提交flink 任务
flink cli 提交flink job任务shell如下:
简易提交脚本如下,其中jm内存设定为1024M,tm内存设定为4096M,slot插槽为2。
#!/usr/bin/env bash
proj_home=$(cd `dirname $0`/.. ; pwd)
env=$1
savepoint_path=$2
yarn_name=WordCount
class_name=com.bigdata.rt.etl.WordCount
jm_mem=1024
tm_mem=4096
slot_num=2
par_num=5
if [ ! -n "${savepoint_path}" ] ; then
echo "Starting Flink job without savepoint"
flink run \
--detached \
--jobmanager yarn-cluster \
--yarnname "${yarn_name}-${env}" \
--yarnjobManagerMemory ${jm_mem} \
--yarntaskManagerMemory ${tm_mem} \
--yarnslots ${slot_num} \
--parallelism ${par_num} \
--class ${class_name} \
-yD env.java.opts.jobmanager="-Djob.name=${yarn_name}-JM" \
-yD env.java.opts.taskmanager="-Djob.name=${yarn_name}-TM" \
/flink/job/etl/test.jar
else
echo "Starting Flink job with savepoint ${savepoint_path}"
flink run \
--detached \
--jobmanager yarn-cluster \
--yarnname "${yarn_name}-${env}" \
--yarnjobManagerMemory ${jm_mem} \
--yarntaskManagerMemory ${tm_mem} \
--yarnslots ${slot_num} \
--parallelism ${par_num} \
--class ${class_name} \
-s ${savepoint_path} \
-yD env.java.opts.jobmanager="-Djob.name=${yarn_name}-JM" \
-yD env.java.opts.taskmanager="-Djob.name=${yarn_name}-TM" \
/flink/job/etl/test.jar
fi
sleep 10s
web_frontend=`yarn application -appStates RUNNING -list | grep ${yarn_name} | awk -F ' ' '{print $NF}'`
echo "Web frontend listening at ${web_frontend}"
2.Flink Dashboard简介
3.Flink Running Jobs简介
Overview ui
Exception ui
TimeLine ui
Checkpoints ui
简介如下:
Checkpoint Counts Triggered: 256 In Progress: 0 Completed: 256 Failed: 0 Restored: 0
Checkpoint统计信息
Triggered: 256:已触发的检查点数量。
In Progress: 0:当前进行中的检查点数量。
Completed: 256:成功完成的检查点总数。
Failed: 0:失败的检查点总数
Restored: 0:重启的检查点总数
Latest Completed Checkpoint ID: 256 Completion Time: 2022-01-12 15:28:31 End to End Duration: 41ms Checkpointed Data Size: 11.9 KB
Latest Completed Checkpoint:最后完成的Checkpoint的信息
Completion Time: 最后完成检查点的时间
End to End Duration: 端到端的运行时间
Checkpointed Data Size: checkpoint数据量
Checkpoint Detail:Path: hdfs:/flink/flink-checkpoints/d4e087316e4354dc3f983864ab66c993/chk-260 Discarded: - Checkpoint Type: aligned checkpoint
Checkpoint Detail:checkpoint详细信息
Path: checkpoint 持久化路径
Discarded: 丢弃
Checkpoint Type: aligned checkpoint checkpoint类型(对齐)
Operators Checkpoint ui 简介如下:
Checkpoint History ui 简介如下:
Checkpoint Summary ui 简介如下: