hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cdoug...@apache.org
Subject svn commit: r644985 - in /hadoop/core/trunk: ./ src/java/org/apache/hadoop/dfs/ src/java/org/apache/hadoop/fs/ src/test/org/apache/hadoop/fs/
Date Fri, 04 Apr 2008 23:02:28 GMT
Author: cdouglas
Date: Fri Apr  4 16:02:20 2008
New Revision: 644985

URL: http://svn.apache.org/viewvc?rev=644985&view=rev
Log:
HADOOP-3139. Remove the consistency check for the FileSystem cache in
closeAll() that causes spurious warnings and a deadlock.
(Tsz Wo (Nicholas), SZE via cdouglas)


Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/java/org/apache/hadoop/dfs/DistributedFileSystem.java
    hadoop/core/trunk/src/java/org/apache/hadoop/dfs/HftpFileSystem.java
    hadoop/core/trunk/src/java/org/apache/hadoop/fs/FileSystem.java
    hadoop/core/trunk/src/test/org/apache/hadoop/fs/TestFileSystem.java

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=644985&r1=644984&r2=644985&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Fri Apr  4 16:02:20 2008
@@ -518,6 +518,10 @@
     HADOOP-3159. Avoid file system cache being overwritten whenever
     configuration is modified. (Tsz Wo (Nicholas), SZE via hairong)
 
+    HADOOP-3139. Remove the consistency check for the FileSystem cache in
+    closeAll() that causes spurious warnings and a deadlock.
+    (Tsz Wo (Nicholas), SZE via cdouglas)
+
 Release 0.16.2 - 2008-04-02
 
   BUG FIXES

Modified: hadoop/core/trunk/src/java/org/apache/hadoop/dfs/DistributedFileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/java/org/apache/hadoop/dfs/DistributedFileSystem.java?rev=644985&r1=644984&r2=644985&view=diff
==============================================================================
--- hadoop/core/trunk/src/java/org/apache/hadoop/dfs/DistributedFileSystem.java (original)
+++ hadoop/core/trunk/src/java/org/apache/hadoop/dfs/DistributedFileSystem.java Fri Apr  4
16:02:20 2008
@@ -222,7 +222,7 @@
   }
 
   /** {@inheritDoc} */
-  public synchronized void close() throws IOException {
+  public void close() throws IOException {
     try {
       dfs.close();
     } finally {

Modified: hadoop/core/trunk/src/java/org/apache/hadoop/dfs/HftpFileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/java/org/apache/hadoop/dfs/HftpFileSystem.java?rev=644985&r1=644984&r2=644985&view=diff
==============================================================================
--- hadoop/core/trunk/src/java/org/apache/hadoop/dfs/HftpFileSystem.java (original)
+++ hadoop/core/trunk/src/java/org/apache/hadoop/dfs/HftpFileSystem.java Fri Apr  4 16:02:20
2008
@@ -74,7 +74,7 @@
   public void initialize(URI name, Configuration conf) throws IOException {
     setConf(conf);
     try {
-      this.ugi = UnixUserGroupInformation.login(conf);
+      this.ugi = UnixUserGroupInformation.login(conf, true);
     } catch (LoginException le) {
       throw new IOException(StringUtils.stringifyException(le));
     }

Modified: hadoop/core/trunk/src/java/org/apache/hadoop/fs/FileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/java/org/apache/hadoop/fs/FileSystem.java?rev=644985&r1=644984&r2=644985&view=diff
==============================================================================
--- hadoop/core/trunk/src/java/org/apache/hadoop/fs/FileSystem.java (original)
+++ hadoop/core/trunk/src/java/org/apache/hadoop/fs/FileSystem.java Fri Apr  4 16:02:20 2008
@@ -1318,13 +1318,6 @@
         remove(key, fs);
 
         if (fs != null) {
-          //check consistency
-          if (!new Key(fs).equals(key)) {
-            exceptions.add(new IOException(fs.getClass().getSimpleName()
-                + "(=" + fs + ") and " + key.getClass().getSimpleName()
-                + "(=" + key + ") do not match."));
-          }
-
           try {
             fs.close();
           }

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/fs/TestFileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/fs/TestFileSystem.java?rev=644985&r1=644984&r2=644985&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/fs/TestFileSystem.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/fs/TestFileSystem.java Fri Apr  4 16:02:20
2008
@@ -503,4 +503,27 @@
       }
     }
   }
+    
+  public void testFsClose() throws Exception {
+    {
+      Configuration conf = new Configuration();
+      new Path("file:///").getFileSystem(conf);
+      UnixUserGroupInformation.login(conf, true);
+      FileSystem.closeAll();
+    }
+
+    {
+      Configuration conf = new Configuration();
+      new Path("hftp://localhost:12345/").getFileSystem(conf);
+      UnixUserGroupInformation.login(conf, true);
+      FileSystem.closeAll();
+    }
+
+    {
+      Configuration conf = new Configuration();
+      FileSystem fs = new Path("hftp://localhost:12345/").getFileSystem(conf);
+      UnixUserGroupInformation.login(fs.getConf(), true);
+      FileSystem.closeAll();
+    }
+  }
 }



Mime
View raw message