Spark WARN cluster.ClusterScheduler: Initial job has not accepted any resources;check your cluster

来源:互联网 发布:炒股软件免费下载 编辑:程序博客网 时间:2024/05/16 16:07

在Spark集群模式执行以下命令时:
root@master:/home/hadoop/spark/bin# ./spark-shell –master spark://master:7077 –jars xxxxx –class xxx.xxxxx –driver-memory 3g –execute-memory 3g …

出现了这个错误: WARN cluster.ClusterScheduler: Initial job has not accepted any resources; check your cluster UI to ensure that workers are registered and have sufficient memory

可能是你在运行的时候hosts写错了. ”root@master :“说明主机的hostname是master,所以解决方法是用正确的host名(实在不行用ip)执行程序:
root@debian-master:/home/hadoop/spark/bin# ./run-example org.apache.spark.examples.SparkPi spark://debian-master:7077

其他解决方法:
检查你的drive-memory 和 executor-memory 是否超过了最大值,在spark_master_webui中可以看到节点的memory,如图:
这里写图片描述

0 0
原创粉丝点击