org.apache.hadoop.mapred.YarnChild: GC overhead limit

記錄一次錯誤:

環境:CDH5.10 jdk8

hive query 時,報錯org.apache.hadoop.mapred.YarnChild: Error running child : java.lang.OutOfMemoryError: GC overhead limit exceeded at org.apache.hadoop.io.Text.setCapacity(Text.java:268) at org.apache.hadoop.io.Text.set(Text.java:224) at org.apache.hadoop.io.Text.set(Text.java:214)

一般會有下面幾種情況: 1.map/reduce的內存不足 2.client 的heap不足 client hive heap(一般是發生mapjoin時導致的) 3.opts(mapreduce.map/reduce.java.opts不足,但是堆內存必須小於memory的大小)

調大相應的參數即可解決。 如:

<property>
    <name>mapreduce.map.java.opts.max.heap</name>
    <value>983</value>
</property>
<property>
    <name>mapreduce.reduce.java.opts.max.heap</name>
    <value>983</value>
</property>

或者

set mapreduce.map.java.opts=-Xmx2g

備註: 1. mapreduce.map/reduce.memory.mb 默認是0,不是不限制memory的大小,而是 The amount of memory to request from the scheduler for each map task. If this is not specified or is non-positive, it is inferred from mapreduce.map.java.opts and mapreduce.job.heap.memory-mb.ratio. If java-opts are also not specified, we set it to 1024. 2. CDH mapreduce.map/reduce.java.opts.max.heap 默認是0,不是不限制,而是默認狀態下的大小是依據mapreduce.map/reduce.memory.mb 大小 3. CDH有mapreduce.map.java.opts.max.heap而apache hadoop並沒有這個參數,卻有mapreduce.map.java.opts, mapreduce.map.java.opts會覆蓋掉 mapreduce.map.java.opts.max.heap

4.還會看到mapred.map/reduce.child.java.opts

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章