Forráskód Böngészése

HADOOP-3534. Log IOExceptions that happen in closing the name
system when the NameNode shuts down. Contributed by Tsz Wo (Nicholas) Sze.


git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/trunk@669529 13f79535-47bb-0310-9956-ffa450edef68

Owen O'Malley 17 éve
szülő
commit
fa30b784b1
2 módosított fájl, 6 hozzáadás és 1 törlés
  1. 3 0
      CHANGES.txt
  2. 3 1
      src/hdfs/org/apache/hadoop/dfs/FSNamesystem.java

+ 3 - 0
CHANGES.txt

@@ -625,6 +625,9 @@ Release 0.18.0 - Unreleased
     the tasktracker would reinitialize and bind to a different port). 
     the tasktracker would reinitialize and bind to a different port). 
     (Jothi Padmanabhan and Arun Murthy via ddas)
     (Jothi Padmanabhan and Arun Murthy via ddas)
 
 
+    HADOOP-3534. Log IOExceptions that happen in closing the name
+    system when the NameNode shuts down. (Tsz Wo (Nicholas) Sze via omalley)
+
 Release 0.17.1 - Unreleased
 Release 0.17.1 - Unreleased
 
 
   INCOMPATIBLE CHANGES
   INCOMPATIBLE CHANGES

+ 3 - 1
src/hdfs/org/apache/hadoop/dfs/FSNamesystem.java

@@ -461,8 +461,10 @@ class FSNamesystem implements FSConstants, FSNamesystemMBean {
           lmthread.interrupt();
           lmthread.interrupt();
           lmthread.join(3000);
           lmthread.join(3000);
         }
         }
+        dir.close();
       } catch (InterruptedException ie) {
       } catch (InterruptedException ie) {
-      } finally {
+      } catch (IOException ie) {
+        LOG.error("Error closing FSDirectory", ie);
         IOUtils.cleanup(LOG, dir);
         IOUtils.cleanup(LOG, dir);
       }
       }
     }
     }