HDFS-8253. DFSStripedOutputStream.closeThreads releases cellBuffers multiple times. Contributed by Kai Sasaki
This commit is contained in:
parent
d920cdab91
commit
093907d728
@ -320,3 +320,6 @@
|
||||
|
||||
HDFS-8567. Erasure Coding: SafeMode handles file smaller than a full stripe.
|
||||
(Walter Su via jing9)
|
||||
|
||||
HDFS-8253. DFSStripedOutputStream.closeThreads releases cellBuffers
|
||||
multiple times. (Kai Sasaki via szetszwo)
|
||||
|
@ -494,21 +494,24 @@ boolean isClosed() {
|
||||
@Override
|
||||
protected void closeThreads(boolean force) throws IOException {
|
||||
final MultipleIOException.Builder b = new MultipleIOException.Builder();
|
||||
for (StripedDataStreamer streamer : streamers) {
|
||||
try {
|
||||
streamer.close(force);
|
||||
streamer.join();
|
||||
streamer.closeSocket();
|
||||
} catch(Exception e) {
|
||||
try {
|
||||
for (StripedDataStreamer streamer : streamers) {
|
||||
try {
|
||||
handleStreamerFailure("force=" + force, e);
|
||||
} catch(IOException ioe) {
|
||||
b.add(ioe);
|
||||
streamer.close(force);
|
||||
streamer.join();
|
||||
streamer.closeSocket();
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
handleStreamerFailure("force=" + force, e);
|
||||
} catch (IOException ioe) {
|
||||
b.add(ioe);
|
||||
}
|
||||
} finally {
|
||||
streamer.setSocketToNull();
|
||||
}
|
||||
} finally {
|
||||
streamer.setSocketToNull();
|
||||
setClosed();
|
||||
}
|
||||
} finally {
|
||||
setClosed();
|
||||
}
|
||||
final IOException ioe = b.build();
|
||||
if (ioe != null) {
|
||||
|
Loading…
Reference in New Issue
Block a user