我一直在8節點集羣上部署SparkPi示例。即使羣集利用率低(沒有其他作業正在運行),與該示例相關的任務似乎也沒有部署到羣集中的所有節點。強制YARN在所有從屬設備上部署Spark任務
這裏是如何,我開始SparkPi例如:
spark-submit --class org.apache.spark.examples.SparkPi --master yarn --deploy-mode cluster --driver-memory 1g --executor-memory 1g --executor-cores 1 --num-executors 7 $SPARK_HOME/lib/spark-examples-1.6.1-hadoop2.6.0.jar 100000
我有一種感覺,這是因爲我在資源管理器中使用了CapacityScheduler
。這裏是我的yarn-site.xml
文件:
<configuration>
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
<property>
<name>yarn.resourcemanager.hostname</name>
<value>master.cluster</value>
</property>
<property>
<name>yarn.resourcemanager.address</name>
<value>master.cluster:8032</value>
</property>
<property>
<name>yarn.resourcemanager.scheduler.address</name>
<value>master.cluster:8030</value>
</property>
<property>
<name>yarn.resourcemanager.webapp.address</name>
<value>0.0.0.0:8088</value>
</property>
<property>
<name>yarn.resourcemanager.resource-tracker.address</name>
<value>master.cluster:8031</value>
</property>
<property>
<name>yarn.resourcemanager.admin.address</name>
<value>master.cluster:8033</value>
</property>
<property>
<name>yarn.resourcemanager.admin.address</name>
<value>master.cluster:8033</value>
</property>
<property>
<name>yarn.application.classpath</name>
<value>/usr/local/hadoop/etc/hadoop, /usr/local/hadoop/share/hadoop/common/*, /usr/local/hadoop/share/hadoop/common/lib/*, /usr/local/hadoop/share/hadoop/hdfs/*, /usr/local/hadoop/share/hadoop/hdfs/lib/*, /usr/local/hadoop/share/hadoop/mapreduce/*, /usr/local/hadoop/share/hadoop/mapreduce/lib/*, /usr/local/hadoop/share/hadoop/yarn/*, /usr/local/hadoop/share/hadoop/yarn/lib/*</value>
</property>
<property>
<description>
Number of seconds after an application finishes before the nodemanager's
DeletionService will delete the application's localized file directory
and log directory.
To diagnose Yarn application problems, set this property's value large
enough (for example, to 600 = 10 minutes) to permit examination of these
directories. After changing the property's value, you must restart the
nodemanager in order for it to have an effect.
The roots of Yarn applications' work directories is configurable with
the yarn.nodemanager.local-dirs property (see below), and the roots
of the Yarn applications' log directories is configurable with the
yarn.nodemanager.log-dirs property (see also below).
</description>
<name>yarn.nodemanager.delete.debug-delay-sec</name>
<value>600</value>
</property>
</configuration>
我如何可以調整YARN,使其部署跨所有節點的任務?
我實際上使用神經網絡訓練集羣,它不是一個面向生產的系統。在這種情況下,我推動羣集越多越好。這是否有助於上下文?否則,完全同意。 – crockpotveggies
在一個執行者下儘可能多地完成任務。不知道神經網絡的底層軟件架構,但我相信它會幫助你提高性能。如果這是一項傳統的火花招聘工作,我會告訴你,你的排序和洗牌會變得非常快。 – YoYo