You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by sz...@apache.org on 2008/11/22 01:07:01 UTC
svn commit: r719756 - in /hadoop/core/branches/branch-0.19: CHANGES.txt
src/hdfs/org/apache/hadoop/hdfs/server/namenode/NamenodeFsck.java
src/test/org/apache/hadoop/hdfs/server/namenode/TestFsck.java
Author: szetszwo
Date: Fri Nov 21 16:07:01 2008
New Revision: 719756
URL: http://svn.apache.org/viewvc?rev=719756&view=rev
Log:
HADOOP-4647. NamenodeFsck should close the DFSClient it has created. (szetszwo)
Modified:
hadoop/core/branches/branch-0.19/CHANGES.txt
hadoop/core/branches/branch-0.19/src/hdfs/org/apache/hadoop/hdfs/server/namenode/NamenodeFsck.java
hadoop/core/branches/branch-0.19/src/test/org/apache/hadoop/hdfs/server/namenode/TestFsck.java
Modified: hadoop/core/branches/branch-0.19/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.19/CHANGES.txt?rev=719756&r1=719755&r2=719756&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.19/CHANGES.txt (original)
+++ hadoop/core/branches/branch-0.19/CHANGES.txt Fri Nov 21 16:07:01 2008
@@ -1007,6 +1007,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/branches/branch-0.19/src/hdfs/org/apache/hadoop/hdfs/server/namenode/NamenodeFsck.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.19/src/hdfs/org/apache/hadoop/hdfs/server/namenode/NamenodeFsck.java?rev=719756&r1=719755&r2=719756&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.19/src/hdfs/org/apache/hadoop/hdfs/server/namenode/NamenodeFsck.java (original)
+++ hadoop/core/branches/branch-0.19/src/hdfs/org/apache/hadoop/hdfs/server/namenode/NamenodeFsck.java Fri Nov 21 16:07:01 2008
@@ -307,6 +307,7 @@
private void lostFoundMove(FileStatus file, LocatedBlocks blocks)
throws IOException {
DFSClient dfs = new DFSClient(conf);
+ try {
if (!lfInited) {
lostFoundInit(dfs);
}
@@ -366,6 +367,9 @@
e.printStackTrace();
LOG.warn(errmsg + ": " + e.getMessage());
}
+ } finally {
+ dfs.close();
+ }
}
/*
Modified: hadoop/core/branches/branch-0.19/src/test/org/apache/hadoop/hdfs/server/namenode/TestFsck.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.19/src/test/org/apache/hadoop/hdfs/server/namenode/TestFsck.java?rev=719756&r1=719755&r2=719756&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.19/src/test/org/apache/hadoop/hdfs/server/namenode/TestFsck.java (original)
+++ hadoop/core/branches/branch-0.19/src/test/org/apache/hadoop/hdfs/server/namenode/TestFsck.java Fri Nov 21 16:07:01 2008
@@ -72,6 +72,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");
@@ -107,6 +108,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");
@@ -127,7 +129,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();
@@ -184,6 +186,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 ";