WARN TaskSchedulerImpl: Initial job has not accepted any resources; check your cluster uito ensure

来源:互联网 发布:ecshop3源码下载 编辑:程序博客网 时间:2024/06/05 08:43

当运行Spark程序,出现这样的问题

WARN TaskSchedulerImpl: Initial job has not accepted any resources; check your cluster uito ensure that workers are registered and have sufficient memory

然后停下来,登录webUI看到的Status是Wait,分配的核是0,内存是参数 –executor-memory(或-Dspark.executor.memory)
这是因为当前的集群的可用资源不能满足应用程序所请求的资源。
这个首先检查一下spark-env.sh文件里面分给每个worker的executor的memory是多少。当app中上述的参数超过这个数值,那么app就不会找这个worker进行工作,而是去找满足数值的worker。
当然,一般来说每个节点的分配的都是一样,所以遇到这种情况基本是因为参数超过了分配给worker的executor的memory的数值。
到spark-env.sh文件修改executor(worker)的数值(当然前提是你有这么多内存)
问题就会得到解决。

0 0