跨張貼由:https://forums.aws.amazon.com/thread.jspa?messageID=766424自動縮放AWS EMR集羣節點0
嘿,
嘗試此策略應用到核心實例組:
{
"Constraints": {
"MinCapacity": 0,
"MaxCapacity": 2
},
"Rules": [
{
"Name": "ScaleUp",
"Action": {
"Market": "ON_DEMAND",
"SimpleScalingPolicyConfiguration": {
"AdjustmentType": "EXACT_CAPACITY",
"ScalingAdjustment": 5,
"CoolDown": 300
}
},
"Trigger": {
"CloudWatchAlarmDefinition": {
"ComparisonOperator": "GREATER_THAN",
"MetricName": "AppsPending",
"Threshold": 0,
"Period": 300
}
}
},
{
"Name": "ScaleDown",
"Action": {
"Market": "ON_DEMAND",
"SimpleScalingPolicyConfiguration": {
"AdjustmentType": "EXACT_CAPACITY",
"ScalingAdjustment": 0,
"CoolDown": 300
}
},
"Trigger": {
"CloudWatchAlarmDefinition": {
"ComparisonOperator": "LESS_THAN_OR_EQUAL",
"MetricName": "AppsRunning",
"Threshold": 0,
"Period": 300
}
}
}
]
}
但我發現了這個錯誤:
An error occurred (ValidationException) when calling the PutAutoScalingPolicy operation: Auto Scaling constraint parameter minCapacity should be at least 1 for Core Instance Group.
我不是EMR的專家,但從文檔我認爲這woul d是可能的(我可以在用戶界面中手動創建主集羣,爲什麼存在這種差異?)。主節點按cron時間表運行作業,當它啓動時會生成作業,然後AutoScaling啓動核心實例進行處理,並在作業完成時縮小尺寸。
有什麼建議嗎?
謝謝,亞歷克斯
PS。爲了闡明功能需求,我試圖在master上運行一個zeppelin儀表板服務,讓它每24小時啓動一個批處理作業,這將需要幾個節點,然後在其餘時間縮減回0個節點。如果我得到了錯誤的結局,我很樂意考慮其他的建議。
而不是這個,嘗試調度emr集羣每24小時運行一次並關機。並對您的齊柏林飛船作業進行模擬。 – halil