2016-11-20 61 views
0

開始火花EC2羣集後,我開始sparkR從/根與sparkR:驗證號碼起作用工作者節點

$ ./spark/bin/sparkR 

所得消息的幾行包括:

16/11/20 10:13:51 WARN SparkConf: 
SPARK_WORKER_INSTANCES was detected (set to '1'). 
This is deprecated in Spark 1.0+. 

Please instead use: 
- ./spark-submit with --num-executors to specify the number of executors 
- Or set SPARK_EXECUTOR_INSTANCES 
- spark.executor.instances to configure the number of instances in the spark config. 

所以,遵循該建議,我添加了最後一行spark-defaults.conf

$ pwd 
/root/spark/conf 
$ cat spark-defaults.conf 
spark.executor.memory 512m 
spark.executor.extraLibraryPath /root/ephemeral-hdfs/lib/native/ 
spark.executor.extraClassPath /root/ephemeral-hdfs/conf 
spark.executor.instances 2 

這導致消息不再是印刷。

在sparkR中,如何驗證將要訪問的工作節點的數量?

+0

您能分享您正在使用的Spark配置參數嗎? –

+0

好的,我按照建議將這行添加到spark-defaults.conf –

回答

0

當你啓動你的火花集羣后,你可以在Master_IP上檢查你當前的工作者和執行者,例如在本地localhost:8080 上的spark ui。你也可以檢查你的配置是否可以在localhost:4040下正確應用環境選項卡

+0

Gotcha。謝謝,我現在看到了。這個信息,也許核心數量,也可以從sparkR內訪問嗎? –

+0

你可以使用配置'spark.executor.cores'來分配核心的數量,默認情況下它會使用你的機器的所有核心 –