hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rang...@apache.org
Subject svn commit: r656467 - in /hadoop/core/branches/branch-0.17: CHANGES.txt src/java/org/apache/hadoop/dfs/FSNamesystem.java
Date Wed, 14 May 2008 23:44:34 GMT
Author: rangadi
Date: Wed May 14 16:44:34 2008
New Revision: 656467

URL: http://svn.apache.org/viewvc?rev=656467&view=rev
Log:
HADOOP-3382. Fix memory leak when files are not cleanly closed (rangadi)

Modified:
    hadoop/core/branches/branch-0.17/CHANGES.txt
    hadoop/core/branches/branch-0.17/src/java/org/apache/hadoop/dfs/FSNamesystem.java

Modified: hadoop/core/branches/branch-0.17/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.17/CHANGES.txt?rev=656467&r1=656466&r2=656467&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.17/CHANGES.txt (original)
+++ hadoop/core/branches/branch-0.17/CHANGES.txt Wed May 14 16:44:34 2008
@@ -584,6 +584,8 @@
 
     HADOOP-3031. Fix javac warnings in test classes. (cdouglas)
 
+    HADOOP-3382. Fix memory leak when files are not cleanly closed (rangadi)
+
 Release 0.16.4 - 2008-05-05
 
   BUG FIXES

Modified: hadoop/core/branches/branch-0.17/src/java/org/apache/hadoop/dfs/FSNamesystem.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.17/src/java/org/apache/hadoop/dfs/FSNamesystem.java?rev=656467&r1=656466&r2=656467&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.17/src/java/org/apache/hadoop/dfs/FSNamesystem.java (original)
+++ hadoop/core/branches/branch-0.17/src/java/org/apache/hadoop/dfs/FSNamesystem.java Wed
May 14 16:44:34 2008
@@ -1845,6 +1845,17 @@
       Block last = blocks[blocks.length - 1];
       if (last.getNumBytes() == 0) {
           pendingFile.removeBlock(last);
+          blocksMap.removeINode(last);
+          for (Iterator<DatanodeDescriptor> it = 
+               blocksMap.nodeIterator(last); it.hasNext();) {
+            DatanodeDescriptor node = it.next();
+            addToInvalidates(last, node);
+          }
+          /* What else do we need to do?
+           * removeStoredBlock()? we do different things when a block is 
+           * removed in different contexts. Mostly these should be
+           * same and/or should be in one place.
+           */
       }
     }
 
@@ -1859,9 +1870,9 @@
     // replicate blocks of this file.
     checkReplicationFactor(newFile);
   
-    NameNode.stateChangeLog.debug("DIR* NameSystem.internalReleaseCreate: " + 
-                                  src + " is no longer written to by " + 
-                                  holder);
+    NameNode.stateChangeLog.info("DIR* NameSystem.internalReleaseCreate: " + 
+                                 src + " is no longer written to by " + 
+                                 holder);
   }
 
   /**



Mime
View raw message