hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hank baker <>
Subject Java Heap Memory OOM when using ORCNewInputFormat in MR
Date Tue, 30 Aug 2016 22:04:21 GMT
Hi all,

I'm trying to run a map reduce job to convert csv data into orc using the
OrcNewOutputFormat (reduce is required to satisfy some partitioning logic)
but getting an OOM error at reduce phase (during merge to be exact) with
the below attached stacktrace for one particular table which has about 800
columns and this error seems common across all reducers(minimum reducer
input records is about 20, max. is about 100 mil). I am trying to figure
out the exact cause of the error since I have use the same job to convert
tables with 100-10000 columns without any memory or config changes.

What concerns me in the stack trace is this line:


Why is it going OOM while trying to write MetaData ?

I originally believed this was simply due to the number of open buffers (as
mentioned in
I wrote a bit of code to reproduce the error on my local setup by creating
an instance of OrcRecordWriter and writing large number of columns, I did
get a similar heap space error, however it was going OOM while trying to
flush the stripes, with this in the stacktrace:


This issue on the dev environment got resolved by setting


Will the same setting work for the original error?

For different reasons I cannot change the reducer memory or lower the
buffer size even at a job level. For now, I am just trying to understand
the source of this error. Can anyone please help?

Original OOM stacktrace:

FATAL [main] org.apache.hadoop.mapred.YarnChild: Error running child :
java.lang.OutOfMemoryError: Java heap space
	at java.nio.HeapByteBuffer.<init>(
	at java.nio.ByteBuffer.allocate(
	at org.apache.hadoop.mapred.ReduceTask$NewTrackingRecordWriter.close(
	at org.apache.hadoop.mapred.ReduceTask.runNewReducer(
	at org.apache.hadoop.mapred.YarnChild$
	at Method)
	at org.apache.hadoop.mapred.YarnChild.main(

View raw message