在 Spark 0.9.0 上运行作业会引发错误
2022-09-04 21:57:39
我安装了一个Apache Spark 0.9.0集群,我正在尝试部署一个从HDFS读取文件的代码。这段代码会引发警告,最终作业会失败。这是代码
/**
* running the code would fail
* with a warning
* Initial job has not accepted any resources; check your cluster UI to ensure that
* workers are registered and have sufficient memory
*/
object Main extends App {
val sconf = new SparkConf()
.setMaster("spark://labscs1:7077")
.setAppName("spark scala")
val sctx = new SparkContext(sconf)
sctx.parallelize(1 to 100).count
}
以下是警告消息
初始工作尚未接受任何资源;检查群集 UI 以确保辅助角色已注册并具有足够的内存
如何摆脱这一点,或者我错过了一些配置。