hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maha...@apache.org
Subject svn commit: r666401 - in /hadoop/core/trunk: CHANGES.txt src/hdfs/org/apache/hadoop/dfs/FSDirectory.java
Date Wed, 11 Jun 2008 00:40:13 GMT
Author: mahadev
Date: Tue Jun 10 17:40:13 2008
New Revision: 666401

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

Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/hdfs/org/apache/hadoop/dfs/FSDirectory.java

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=666401&r1=666400&r2=666401&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Tue Jun 10 17:40:13 2008
@@ -14,6 +14,9 @@
 
   BUG FIXES
 
+   HADOOP-3528. Metrics FilesCreated and files_deleted metrics 
+   do not match.
+
 Release 0.18.0 - Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/core/trunk/src/hdfs/org/apache/hadoop/dfs/FSDirectory.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/hdfs/org/apache/hadoop/dfs/FSDirectory.java?rev=666401&r1=666400&r2=666401&view=diff
==============================================================================
--- hadoop/core/trunk/src/hdfs/org/apache/hadoop/dfs/FSDirectory.java (original)
+++ hadoop/core/trunk/src/hdfs/org/apache/hadoop/dfs/FSDirectory.java Tue Jun 10 17:40:13
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