Debug
为方便用户查看任务执行期间申请的Executor数量,Spark UI增加了Debug页面。
Debug页面目前包括错误诊断信息以及不同类型Executor的时间线图。
其中对应的Executor个数含义:
- requestedTotalExecutors: 当前时间点已经提交申请的executor个数,包括已申请到的numExistingExecutors 和 未申请到的numPendingExecutors;
- numExistingExecutors:当前时间点已经申请到的executor个数,包括 空闲待回收的 executorsPendingToRemove 和 正在执行任务的 executorsActive
- numPendingExecutors:当前时间点已经提交申请,未申请到等待资源的executor个数
- executorsPendingToRemove:当前时间点等待回收的executor个数
- executorsPendingLossReason:丢失的executors个数,常见原因如资源抢占强制kill掉
- executorsActive:当前时间点有任务在执行的executor个数
如果想看一个任务在不同时间点占用的executor数量,应该看numExistingExecutors数量,需要注意的是executor数量并不能等同于CU的用量,一方面是一个executor可能占用更多内存换算成CU会占用更多的CU,还可能是一个executor会占用多个core(通过设置spark.executor.cores)也会占用更多的CU。