Primary error message :error:org.apache.hadoop.mapreduce.task.reduce.shuffle$shuffleerror: Error in Shuffle in Fetcher#43
workaround : Limit the shuffle memory usage of reduce
hive:set mapreduce.reduce.shuffle.memory.limit.percent=0.1;
MR:job.getConfiguration (). Setstrings ("Mapreduce.reduce.shuffle.memory.limit.percent", "0.1");
principle Analysis : Reduce will initiate multiple fetch threads at map execution to a certain percentage to pull the output of map, put it into reduce's memory, disk, and merge. When the amount of data is large, the data pulled into the memory will cause oom, so this time to reduce the percentage of fetch in memory, the fetch data is placed directly on the disk.
Mapreduce.reduce.shuffle.memory.limit.percent: The size of the map output that each fetch takes to account for the size of the memory. The default is 0.25. So the actual output of each fetcher can be placed in the size of the memory is reducer Java heap size*0.9*0.25.
Complete error log :
INFO MapReduce. Job:task id:attempt_xxxxxx, status:failed
Error:org.apache.hadoop.mapreduce.task.reduce.shuffle$shuffleerror:error in Shuffle in fetcher#43
At Org.apache.hadoop.mapreduce.task.reduce.Shuffle.run (shuffle.java:134)
At Org.apache.hadoop.mapred.ReduceTask.run (reducetask.java:376)
At Org.apache.hadoop.mapred.yarnchild$2.run (yarnchild.java:167)
At java.security.AccessController.doPrivileged (Native Method)
At javax.security.auth.Subject.doAs (subject.java:396)
At org.apache.hadoop.security.UserGroupInformation.doAs (usergroupinformation.java:1550)
At Org.apache.hadoop.mapred.YarnChild.main (yarnchild.java:162)
caused By:java.lang.OutOfMemoryError:Java heap space
At Org.apache.hadoop.io.compress.BlockDecompressorStream.getCompressedData (blockdecompressorstream.java:123 )
At org.apache.hadoop.io.compress.BlockDecompressorStream.decompress (blockdecompressorstream.java:98)
At Org.apache.hadoop.io.compress.DecompressorStream.read (decompressorstream.java:85)
At org.apache.hadoop.io.IOUtils.readFully (ioutils.java:192)
At org.apache.hadoop.mapreduce.task.reduce.InMemoryMapOutput.shuffle (inmemorymapoutput.java:97)
At org.apache.hadoop.mapreduce.task.reduce.Fetcher.copyMapOutput (fetcher.java:434)
At org.apache.hadoop.mapreduce.task.reduce.Fetcher.copyFromHost (fetcher.java:341)
At Org.apache.hadoop.mapreduce.task.reduce.Fetcher.run (fetcher.java:165)
Reduce the Hadoop exception pull data failed (Error in shuffle in Fetcher)