Просмотр исходного кода

svn merge -r 640720:640721 from trunk to 0.16 branch. Fixes HADOOP-3027.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/branches/branch-0.16@640722 13f79535-47bb-0310-9956-ffa450edef68
Devaraj Das 17 лет назад
Родитель
Сommit
8e5cfa871b
2 измененных файлов с 4 добавлено и 2 удалено
  1. 3 0
      CHANGES.txt
  2. 1 2
      src/java/org/apache/hadoop/fs/FileSystem.java

+ 3 - 0
CHANGES.txt

@@ -40,6 +40,9 @@ Release 0.16.2 - Unreleased
     HADOOP-3039. Fixes a problem to do with exceptions in tasks not
     killing jobs. (Amareshwari Sriramadasu via ddas)
 
+    HADOOP-3027. Fixes a problem to do with adding a shutdown hook in
+    FileSystem.  (Amareshwari Sriramadasu via ddas)
+
 Release 0.16.1 - 2008-03-13
 
   INCOMPATIBLE CHANGES

+ 1 - 2
src/java/org/apache/hadoop/fs/FileSystem.java

@@ -1188,11 +1188,10 @@ public abstract class FileSystem extends Configured implements Closeable {
     synchronized FileSystem get(URI uri, Configuration conf) throws IOException{
       FileSystem fs = map.get(new Key(uri, conf));
       if (fs == null) {
+        fs = createFileSystem(uri, conf);
         if (map.isEmpty() && !clientFinalizer.isAlive()) {
           Runtime.getRuntime().addShutdownHook(clientFinalizer);
         }
-
-        fs = createFileSystem(uri, conf);
         map.put(new Key(fs), fs);
       }
       return fs;