hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From szets...@apache.org
Subject svn commit: r719754 - in /hadoop/core/trunk: CHANGES.txt src/hdfs/org/apache/hadoop/hdfs/server/namenode/NamenodeFsck.java src/test/org/apache/hadoop/hdfs/server/namenode/TestFsck.java
Date Sat, 22 Nov 2008 00:04:32 GMT
Author: szetszwo
Date: Fri Nov 21 16:04:32 2008
New Revision: 719754

URL: http://svn.apache.org/viewvc?rev=719754&view=rev
Log:
HADOOP-4647. NamenodeFsck should close the DFSClient it has created. (szetszwo)

Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/server/namenode/NamenodeFsck.java
    hadoop/core/trunk/src/test/org/apache/hadoop/hdfs/server/namenode/TestFsck.java

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=719754&r1=719753&r2=719754&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Fri Nov 21 16:04:32 2008
@@ -1197,6 +1197,9 @@
     HADOOP-4703. Should not wait for proxy forever in lease recovering.
     (szetszwo)
 
+    HADOOP-4647. NamenodeFsck should close the DFSClient it has created.
+    (szetszwo)
+
 Release 0.18.2 - 2008-11-03
 
   BUG FIXES

Modified: hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/server/namenode/NamenodeFsck.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/server/namenode/NamenodeFsck.java?rev=719754&r1=719753&r2=719754&view=diff
==============================================================================
--- hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/server/namenode/NamenodeFsck.java (original)
+++ hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/server/namenode/NamenodeFsck.java Fri
Nov 21 16:04:32 2008
@@ -318,6 +318,7 @@
   private void lostFoundMove(FileStatus file, LocatedBlocks blocks)
     throws IOException {
     DFSClient dfs = new DFSClient(conf);
+    try {
     if (!lfInited) {
       lostFoundInit(dfs);
     }
@@ -377,6 +378,9 @@
       e.printStackTrace();
       LOG.warn(errmsg + ": " + e.getMessage());
     }
+    } finally {
+      dfs.close();
+    }
   }
       
   /*

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/hdfs/server/namenode/TestFsck.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/hdfs/server/namenode/TestFsck.java?rev=719754&r1=719753&r2=719754&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/hdfs/server/namenode/TestFsck.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/hdfs/server/namenode/TestFsck.java Fri Nov
21 16:04:32 2008
@@ -71,6 +71,7 @@
     FileSystem fs = null;
     try {
       Configuration conf = new Configuration();
+      conf.setLong("dfs.blockreport.intervalMsec", 10000L);
       cluster = new MiniDFSCluster(conf, 4, true, null);
       fs = cluster.getFileSystem();
       util.createFiles(fs, "/srcdat");
@@ -106,6 +107,7 @@
     FileSystem fs = null;
     try {
       Configuration conf = new Configuration();
+      conf.setLong("dfs.blockreport.intervalMsec", 10000L);
       cluster = new MiniDFSCluster(conf, 4, true, null);
       fs = cluster.getFileSystem();
       util.createFiles(fs, "/srcdat");
@@ -126,7 +128,7 @@
     FileSystem fs = null;
     try {
       Configuration conf = new Configuration();
-      conf.set("dfs.blockreport.intervalMsec", Integer.toString(30));
+      conf.setLong("dfs.blockreport.intervalMsec", 10000L);
       cluster = new MiniDFSCluster(conf, 4, true, null);
       String topDir = "/srcdat";
       fs = cluster.getFileSystem();
@@ -183,6 +185,7 @@
     FileSystem fs = null;
     try {
       Configuration conf = new Configuration();
+      conf.setLong("dfs.blockreport.intervalMsec", 10000L);
       cluster = new MiniDFSCluster(conf, 4, true, null);
       String topDir = "/srcdat";
       String randomString = "HADOOP  ";



Mime
View raw message