Author: mattf
Date: Tue Jun 14 23:55:08 2011
New Revision: 1135859
URL: http://svn.apache.org/viewvc?rev=1135859&view=rev
Log:
HDFS-1836. Thousand of CLOSE_WAIT socket. Contributed by Todd Lipcon, ported to
security branch by Bharath Mundlapudi.
Modified:
hadoop/common/branches/branch-0.20-security/CHANGES.txt
hadoop/common/branches/branch-0.20-security/src/hdfs/org/apache/hadoop/hdfs/DFSClient.java
Modified: hadoop/common/branches/branch-0.20-security/CHANGES.txt
URL:
http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security/CHANGES.txt?rev=1135859&r1=1135858&r2=1135859&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security/CHANGES.txt (original)
+++ hadoop/common/branches/branch-0.20-security/CHANGES.txt Tue Jun 14 23:55:08
2011
@@ -2,8 +2,17 @@ Hadoop Change Log
Release 0.20.206.0 - unreleased
- MAPREDUCE-7343. Make the number of warnings accepted by test-patch
- configurable to limit false positives. (Thomas Graves via cdouglas)
+ NEW FEATURES
+
+ BUG FIXES
+
+ IMPROVEMENTS
+
+ MAPREDUCE-7343. Make the number of warnings accepted by test-patch
+ configurable to limit false positives. (Thomas Graves via cdouglas)
+
+ HDFS-1836. Thousand of CLOSE_WAIT socket. Contributed by Todd Lipcon,
+ ported to security branch by Bharath Mundlapudi. (via mattf)
Release 0.20.205.0 - unreleased
Modified:
hadoop/common/branches/branch-0.20-security/src/hdfs/org/apache/hadoop/hdfs/DFSClient.java
URL:
http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security/src/hdfs/org/apache/hadoop/hdfs/DFSClient.java?rev=1135859&r1=1135858&r2=1135859&view=diff
==============================================================================
---
hadoop/common/branches/branch-0.20-security/src/hdfs/org/apache/hadoop/hdfs/DFSClient.java
(original)
+++
hadoop/common/branches/branch-0.20-security/src/hdfs/org/apache/hadoop/hdfs/DFSClient.java
Tue Jun 14 23:55:08 2011
@@ -2526,11 +2526,7 @@ public class DFSClient implements FSCons
}
synchronized (dataQueue) {
- try {
- blockStream.close();
- blockReplyStream.close();
- } catch (IOException e) {
- }
+ IOUtils.cleanup(LOG, blockStream, blockReplyStream);
nodes = null;
response = null;
blockStream = null;
@@ -2670,11 +2666,7 @@ public class DFSClient implements FSCons
}
if (blockStream != null) {
- try {
- blockStream.close();
- blockReplyStream.close();
- } catch (IOException e) {
- }
+ IOUtils.cleanup(LOG, blockStream, blockReplyStream);
}
blockStream = null;
blockReplyStream = null;
@@ -3417,8 +3409,7 @@ public class DFSClient implements FSCons
synchronized (dataQueue) {
if (blockStream != null) {
blockStream.writeInt(0); // indicate end-of-block to datanode
- blockStream.close();
- blockReplyStream.close();
+ IOUtils.cleanup(LOG, blockStream, blockReplyStream);
}
if (s != null) {
s.close();