我試圖在EMR上運行(py)Spark作業來處理大量數據。目前,我的工作與以下錯誤消息失敗:Boosting spark.yarn.executor.memoryOverhead
Reason: Container killed by YARN for exceeding memory limits.
5.5 GB of 5.5 GB physical memory used.
Consider boosting spark.yarn.executor.memoryOverhead.
所以我google'd如何做到這一點,並發現我應該沿着spark.yarn.executor.memoryOverhead
參數與--conf標誌傳遞。我做這樣說:
aws emr add-steps\
--cluster-id %s\
--profile EMR\
--region us-west-2\
--steps Name=Spark,Jar=command-runner.jar,\
Args=[\
/usr/lib/spark/bin/spark-submit,\
--deploy-mode,client,\
/home/hadoop/%s,\
--executor-memory,100g,\
--num-executors,3,\
--total-executor-cores,1,\
--conf,'spark.python.worker.memory=1200m',\
--conf,'spark.yarn.executor.memoryOverhead=15300',\
],ActionOnFailure=CONTINUE" % (cluster_id,script_name)\
但是,當我重新運行該作業它不斷給我同樣的錯誤消息,與5.5 GB of 5.5 GB physical memory used
,這意味着我的記憶沒有增加..對我是什麼任何提示做錯了?
編輯
這裏是我最初如何創建羣集的詳細信息:
aws emr create-cluster\
--name "Spark"\
--release-label emr-4.7.0\
--applications Name=Spark\
--bootstrap-action Path=s3://emr-code-matgreen/bootstraps/install_python_modules.sh\
--ec2-attributes KeyName=EMR2,InstanceProfile=EMR_EC2_DefaultRole\
--log-uri s3://emr-logs-zerex\
--instance-type r3.xlarge\
--instance-count 4\
--profile EMR\
--service-role EMR_DefaultRole\
--region us-west-2'
感謝。
你檢查了工作的日誌? –
是@Koffee,那是我從中得到錯誤信息的地方。當它試圖執行一個SparkSQL語句,它將數據按大量變量進行分組然後進行聚合(即「按名稱從表組中選擇名稱,最小(數字)」)時,它會失敗。我在這裏複製了更詳細的日誌部分:http://pastebin.com/KVrbDkHu –
您使用哪個實例? m3.xlarge?我認爲'--total-executor-cores'參數只能在獨立模式下由Spark使用,而不能在Yarn中使用。 –