Description
In function SequenceFile.Writer.close() (line 946): The first marked line returns the compressor while the second marked line will use the compressor again. This will lead to a race condition if another thread checks out the compressor between these two marked statements.
SequenceFile.java
public synchronized void close() throws IOException { CodecPool.returnCompressor(compressor); // <==== compressor returned keySerializer.close(); uncompressedValSerializer.close(); if (compressedValSerializer != null) { compressedValSerializer.close(); // <===== compressor used } if (out != null) { // Close the underlying stream iff we own it... if (ownOutputStream) { out.close(); } else { out.flush(); } out = null; } }
Attachments
Attachments
Issue Links
- relates to
-
MAPREDUCE-2258 IFile reader closes stream and compressor in wrong order
- Closed