hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maha...@apache.org
Subject svn commit: r666400 - in /hadoop/core/branches/branch-0.18: CHANGES.txt src/hdfs/org/apache/hadoop/dfs/FSDirectory.java
Date Wed, 11 Jun 2008 00:36:26 GMT
Author: mahadev
Date: Tue Jun 10 17:36:26 2008
New Revision: 666400

URL: http://svn.apache.org/viewvc?rev=666400&view=rev
Log:
HADOOP-3528. Metrics FilesCreated and files_deleted metrics do not match. (Lohit via Mahadev)

Modified:
    hadoop/core/branches/branch-0.18/CHANGES.txt
    hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/FSDirectory.java

Modified: hadoop/core/branches/branch-0.18/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.18/CHANGES.txt?rev=666400&r1=666399&r2=666400&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.18/CHANGES.txt (original)
+++ hadoop/core/branches/branch-0.18/CHANGES.txt Tue Jun 10 17:36:26 2008
@@ -552,6 +552,9 @@
 
     HADOOP-3519.  Fix NPE in DFS FileSystem rename.  (hairong via tomwhite)
 
+    HADOOP-3528. Metrics FilesCreated and files_deleted metrics 
+    do not match. (Lohit via Mahadev)
+
 Release 0.17.0 - 2008-05-18
 
   INCOMPATIBLE CHANGES

Modified: hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/FSDirectory.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/FSDirectory.java?rev=666400&r1=666399&r2=666400&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/FSDirectory.java (original)
+++ hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/FSDirectory.java Tue Jun
10 17:36:26 2008
@@ -835,6 +835,10 @@
         if (inodes[i] == null) {
           return false;
         }
+        // Directory creation also count towards FilesCreated
+        // to match count of files_deleted metric. 
+        if (namesystem != null)
+          NameNode.getNameNodeMetrics().numFilesCreated.inc();
         fsImage.getEditLog().logMkDir(cur, inodes[i]);
         NameNode.stateChangeLog.debug(
             "DIR* FSDirectory.mkdirs: created directory " + cur);



Mime
View raw message