2015-02-17 65 views
0

我知道這種類型的問題已在幾篇帖子中解決,但我找不到答案,提供了具體的「如何」或「在哪裏」如何設置限制以避免容器運行超出物理內存限制

我使用CDH5.2,運行執行shell命令的oozie工作流。每次我運行它,節點管理器殺死出錯的工作:

Container [pid=6757,containerID=container_1424206993158_0001_01_000002] is running beyond physical memory limits. Current usage: 1.0 GB of 1 GB physical memory used; 2.3 GB of 2.1 GB virtual memory used. Killing container

下面是相關屬性我有我的配置文件。儘管我明顯錯過了一些東西,所以我正在尋找具體的設置必須在哪裏的方向。

紗-site.xml中:

<property> 
    <name>yarn.scheduler.minimum-allocation-mb</name> 
    <value>2048</value> 
    </property> 

    <property> 
    <name>yarn.scheduler.maximum-allocation-mb</name> 
    <value>8196</value> 
    </property> 

    <property> 
    <name>yarn.nodemanager.resource.memory-mb</name> 
    <value>8196</value> 
    </property> 

mapred-site.xml中:

YARN > Configuration > Gateway > Resource Management 
YARN > Configuration > ResourceManager > Resource Management 
YARN > Configuration > NodeManager > Resource Management 

<property> 
    <name>mapreduce.map.memory.mb</name> 
    <value>4096</value> 
    </property> 
    <property> 
    <name>mapreduce.reduce.memory.mb</name> 
    <value>8196</value> 
    </property> 
<property> 
    <name>mapreduce.map.java.opts</name> 
    <value>-Xmx3072m</value> 
    </property> 
    <property> 
    <name>mapreduce.reduce.java.opts</name> 
    <value>-Xmx6144m</value> 
    </property> 
+0

你在使用Cloudera Manager嗎? – 2015-02-17 21:58:49

+0

沒有cloudera管理器,只需手動編輯/ etc下的配置。雖然如果你知道它將在CM中的位置,我會檢查虛擬機並在那裏嘗試。 – Promethean 2015-02-17 22:22:54

+1

在CM中,這些設置位於YARN> Configuration> [Gateway |]下ResourceManager | NodeManager]>資源管理。請記住在保存更改後重新啓動服務並部署客戶端配置(使用「配置」屏幕上的「操作」按鈕)。 – 2015-02-17 22:31:04

回答

1

在Cloudera的經理5您可以修改這些YARN資源設置請記住在保存後重新啓動服務並部署客戶端配置(使用「配置」屏幕上的「操作」按鈕)變化。

+0

Cloudera Manager造成了一些問題(服務無法啓動,暫停等等,因此在之前回滾,有人指向我的ozzie工作屬性,所以我將它們添加到它的xml中,這也起作用: oozie .launcher.mapreduce.map.memory.mb oozie.launcher.mapreduce.map.java.opts -Xmx3072m Promethean 2015-02-19 14:19:03

0

我有同樣的問題,並解決它增加兩個內存分配的:

YARN/Configuration/CATEGORY/Resource Management: 

地圖任務內存:

mapreduce.map.memory.mb 

Reduce任務內存:

mapreduce.reduce.memory.mb