Details
Description
If the map output is compressed (mapreduce.map.output.compress set to true) then the reduce task progress may be highly underestimated.
In the reduce phase (but also in the merge phase), the progress of a reduce task is computed as the ratio between the number of processed bytes and the number of total bytes. But:
- the number of total bytes is computed by summing up the uncompressed segment sizes (Merger.Segment.getRawDataLength())
- the number of processed bytes is computed by exploiting the position of the current IFile.Reader (using IFile.Reader.getPosition()) but this may refer to the position in the underlying on disk file (which may be compressed)
Thus, if the map outputs are compressed then the progress may be underestimated (e.g., only 1 map output ondisk file, the compressed file is 25% of its original size, then the reduce task progress during the reduce phase will range between 0 and 0.25 and then artificially jump to 1.0).
Attached there is a patch: the number of processed bytes is now computed by exploiting IFile.Reader.bytesRead (if the the reader is in memory, then getPosition() already returns exactly this field).
Attachments
Attachments
Issue Links
- relates to
-
MAPREDUCE-5760 Reduce task percentage is going beyond 100% for a job
- Open