hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hair...@apache.org
Subject svn commit: r733887 - in /hadoop/core/trunk: CHANGES.txt src/test/org/apache/hadoop/hdfs/TestReplication.java
Date Mon, 12 Jan 2009 20:14:53 GMT
Author: hairong
Date: Mon Jan 12 12:14:45 2009
New Revision: 733887

URL: http://svn.apache.org/viewvc?rev=733887&view=rev
Log:
HADOOP-5008. TestReplication#testPendingReplicationRetry leaves an opened fd unclosed. Contributed
by Hairong Kuang.

Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/test/org/apache/hadoop/hdfs/TestReplication.java

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=733887&r1=733886&r2=733887&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Mon Jan 12 12:14:45 2009
@@ -609,6 +609,9 @@
 
     HADOOP-4982. TestFsck should run in Eclipse. (shv)
 
+    HADOOP-5008. TestReplication#testPendingReplicationRetry leaves an opened
+    fd unclosed. (hairong)
+
 Release 0.19.0 - 2008-11-18
 
   INCOMPATIBLE CHANGES

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/hdfs/TestReplication.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/hdfs/TestReplication.java?rev=733887&r1=733886&r2=733887&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/hdfs/TestReplication.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/hdfs/TestReplication.java Mon Jan 12 12:14:45
2009
@@ -350,8 +350,12 @@
             long len = blockFile.length();
             assertTrue(len > 50);
             RandomAccessFile blockOut = new RandomAccessFile(blockFile, "rw");
-            blockOut.seek(len/3);
-            blockOut.write(buffer, 0, 25);
+            try {
+              blockOut.seek(len/3);
+              blockOut.write(buffer, 0, 25);
+            } finally {
+              blockOut.close();
+            }
           }
           fileCount++;
         }



Mime
View raw message