1、当--executor-cores设置超过cpu的个数,比如你一共有4个,而你设置了5个,则会出现如下问题,意思是没有可用的资源,由于一共有4个cpu而你设置5个,导致一直请求第5个资源而得不到,因此就会提示如下信息:
19/12/31 18:58:40 INFO scheduler.TaskSchedulerImpl: Adding task set 0.0 with 2 tasks
19/12/31 18:58:55 WARN scheduler.TaskSchedulerImpl: Initial job has not accepted any resources; check your cluster UI to ensure that workers are registered and have sufficient resources
19/12/31 18:59:10 WARN scheduler.TaskSchedulerImpl: Initial job has not accepted any resources; check your cluster UI to ensure that workers are registered and have sufficient resources
19/12/31 18:59:25 WARN scheduler.TaskSchedulerImpl: Initial job has not accepted any resources; check your cluster UI to ensure that workers are registered and have sufficient resources
19/12/31 18:59:40 WARN scheduler.TaskSchedulerImpl: Initial job has not accepted any resources; check your cluster UI to ensure that workers are registered and have sufficient resources
19/12/31 18:59:55 WARN scheduler.TaskSchedulerImpl: Initial job has not accepted any resources; check your cluster UI to ensure that workers are registered and have sufficient resources
如下图所示: