如何在群集模式下以交互方式运行spark

时间:2015-04-22 06:26:22

标签: scala apache-spark

我在

上运行了一个火花丛
spark://host1:7077
spark://host2:7077
spark://host3:7077

并通过/bin/spark-shell --master spark://host1:7077连接 尝试使用以下内容读取文件时

val textFile = sc.textFile("README.md")
textFile.count()

提示说

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

host1:8080上通过Web ui检查时显示:

Workers: 0
Cores: 0 Total, 0 Used
Memory: 0.0 B Total, 0.0 B Used
Applications: 0 Running, 2 Completed
Drivers: 0 Running, 0 Completed
Status: ALIVE

我的问题是如何在spark-shell集群模式下运行时指定内核和内存?或者我必须将我的scala代码打包到.jar文件中,然后将作业提交给spark?

由于

0 个答案:

没有答案