hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cdoug...@apache.org
Subject svn commit: r644989 - in /hadoop/core/branches/branch-0.16: ./ src/java/org/apache/hadoop/dfs/ src/java/org/apache/hadoop/fs/ src/test/org/apache/hadoop/fs/
Date Fri, 04 Apr 2008 23:17:11 GMT
Author: cdouglas
Date: Fri Apr  4 16:17:07 2008
New Revision: 644989

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


Modified:
    hadoop/core/branches/branch-0.16/CHANGES.txt
    hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/dfs/DistributedFileSystem.java
    hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/dfs/HftpFileSystem.java
    hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/fs/FileSystem.java
    hadoop/core/branches/branch-0.16/src/test/org/apache/hadoop/fs/TestFileSystem.java

Modified: hadoop/core/branches/branch-0.16/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.16/CHANGES.txt?rev=644989&r1=644988&r2=644989&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.16/CHANGES.txt (original)
+++ hadoop/core/branches/branch-0.16/CHANGES.txt Fri Apr  4 16:17:07 2008
@@ -13,6 +13,11 @@
     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/branches/branch-0.16/src/java/org/apache/hadoop/dfs/DistributedFileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/dfs/DistributedFileSystem.java?rev=644989&r1=644988&r2=644989&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/dfs/DistributedFileSystem.java
(original)
+++ hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/dfs/DistributedFileSystem.java
Fri Apr  4 16:17:07 2008
@@ -185,7 +185,7 @@
   }
 
   /** {@inheritDoc} */
-  public synchronized void close() throws IOException {
+  public void close() throws IOException {
     try {
       dfs.close();
     } finally {

Modified: hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/dfs/HftpFileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/dfs/HftpFileSystem.java?rev=644989&r1=644988&r2=644989&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/dfs/HftpFileSystem.java (original)
+++ hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/dfs/HftpFileSystem.java Fri
Apr  4 16:17:07 2008
@@ -73,7 +73,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/branches/branch-0.16/src/java/org/apache/hadoop/fs/FileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/fs/FileSystem.java?rev=644989&r1=644988&r2=644989&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/fs/FileSystem.java (original)
+++ hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/fs/FileSystem.java Fri Apr
 4 16:17:07 2008
@@ -1222,13 +1222,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/branches/branch-0.16/src/test/org/apache/hadoop/fs/TestFileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.16/src/test/org/apache/hadoop/fs/TestFileSystem.java?rev=644989&r1=644988&r2=644989&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.16/src/test/org/apache/hadoop/fs/TestFileSystem.java (original)
+++ hadoop/core/branches/branch-0.16/src/test/org/apache/hadoop/fs/TestFileSystem.java Fri
Apr  4 16:17:07 2008
@@ -499,11 +499,35 @@
         int n = Thread.activeCount();
         for(int i = 0; i < 100; i++) {
           FileSystem.get(uri, new Configuration());
+          Thread.sleep(100);
           assertTrue(n >= Thread.activeCount());
         }
       } finally {
         cluster.shutdown(); 
       }
+    }
+  }
+    
+  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