hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From szets...@apache.org
Subject svn commit: r774138 - in /hadoop/core/trunk: ./ src/core/org/apache/hadoop/metrics/util/ src/hdfs/org/apache/hadoop/hdfs/server/namenode/ src/hdfs/org/apache/hadoop/hdfs/server/namenode/metrics/
Date Tue, 12 May 2009 23:53:29 GMT
Author: szetszwo
Date: Tue May 12 23:53:28 2009
New Revision: 774138

URL: http://svn.apache.org/viewvc?rev=774138&view=rev
Log:
HADOOP-5714. Add a metric for NameNode getFileInfo operation.  Contributed by Jakob Homan

Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/core/org/apache/hadoop/metrics/util/MetricsRegistry.java
    hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/server/namenode/NameNode.java
    hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/server/namenode/metrics/NameNodeMetrics.java

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=774138&r1=774137&r2=774138&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Tue May 12 23:53:28 2009
@@ -582,6 +582,9 @@
     like memory based scheduling, job initialization and removal of pre-emption.
     (Sreekanth Ramakrishnan via yhemanth)
 
+    HADOOP-5714. Add a metric for NameNode getFileInfo operation. (Jakob Homan
+    via szetszwo)
+
   OPTIMIZATIONS
 
   BUG FIXES

Modified: hadoop/core/trunk/src/core/org/apache/hadoop/metrics/util/MetricsRegistry.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/core/org/apache/hadoop/metrics/util/MetricsRegistry.java?rev=774138&r1=774137&r2=774138&view=diff
==============================================================================
--- hadoop/core/trunk/src/core/org/apache/hadoop/metrics/util/MetricsRegistry.java (original)
+++ hadoop/core/trunk/src/core/org/apache/hadoop/metrics/util/MetricsRegistry.java Tue May
12 23:53:28 2009
@@ -20,9 +20,6 @@
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.Map;
-import java.util.Set;
-import java.util.Map.Entry;
-
 
 /**
  * 

Modified: hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/server/namenode/NameNode.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/server/namenode/NameNode.java?rev=774138&r1=774137&r2=774138&view=diff
==============================================================================
--- hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/server/namenode/NameNode.java (original)
+++ hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/server/namenode/NameNode.java Tue May
12 23:53:28 2009
@@ -719,6 +719,7 @@
    *         or null if file not found
    */
   public FileStatus getFileInfo(String src)  throws IOException {
+    myMetrics.numFileInfoOps.inc();
     return namesystem.getFileInfo(src);
   }
 

Modified: hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/server/namenode/metrics/NameNodeMetrics.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/server/namenode/metrics/NameNodeMetrics.java?rev=774138&r1=774137&r2=774138&view=diff
==============================================================================
--- hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/server/namenode/metrics/NameNodeMetrics.java
(original)
+++ hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/server/namenode/metrics/NameNodeMetrics.java
Tue May 12 23:53:28 2009
@@ -62,6 +62,8 @@
                     new MetricsTimeVaryingInt("CreateFileOps", registry);
     public MetricsTimeVaryingInt numDeleteFileOps = 
                           new MetricsTimeVaryingInt("DeleteFileOps", registry);
+    public MetricsTimeVaryingInt numFileInfoOps =
+                          new MetricsTimeVaryingInt("FileInfoOps", registry);
     public MetricsTimeVaryingInt numAddBlockOps = 
                           new MetricsTimeVaryingInt("AddBlockOps", registry);
 



Mime
View raw message