HDFS-1990. Fix resource leaks in BlockReceiver.close(). Contributed by Uma Maheswara Rao G
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1143147 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1e5e03c73c
commit
5c778cdee3
@ -805,6 +805,9 @@ Trunk (unreleased changes)
|
||||
HDFS-2053. Bug in INodeDirectory#computeContentSummary warning.
|
||||
(Michael Noll via eli)
|
||||
|
||||
HDFS-1990. Fix resource leaks in BlockReceiver.close(). (Uma Maheswara
|
||||
Rao G via szetszwo)
|
||||
|
||||
Release 0.22.0 - Unreleased
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
@ -231,6 +231,9 @@ public void close() throws IOException {
|
||||
} catch(IOException e) {
|
||||
ioe = e;
|
||||
}
|
||||
finally {
|
||||
IOUtils.closeStream(checksumOut);
|
||||
}
|
||||
// close block file
|
||||
try {
|
||||
if (out != null) {
|
||||
@ -244,6 +247,9 @@ public void close() throws IOException {
|
||||
} catch (IOException e) {
|
||||
ioe = e;
|
||||
}
|
||||
finally{
|
||||
IOUtils.closeStream(out);
|
||||
}
|
||||
// disk check
|
||||
if(ioe != null) {
|
||||
datanode.checkDiskError(ioe);
|
||||
|
Loading…
Reference in New Issue
Block a user