hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r496859 - in /lucene/hadoop/trunk: ./ src/java/org/apache/hadoop/dfs/ src/java/org/apache/hadoop/mapred/
Date Tue, 16 Jan 2007 20:52:29 GMT
Author: cutting
Date: Tue Jan 16 12:52:28 2007
New Revision: 496859

URL: http://svn.apache.org/viewvc?view=rev&rev=496859
Log:
HADOOP-890.  Replace dashes in metric names with underscores.  Contributed by Nigel.

Modified:
    lucene/hadoop/trunk/CHANGES.txt
    lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DataNode.java
    lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/FSDirectory.java
    lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/NameNode.java
    lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/JobTracker.java
    lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/MapTask.java
    lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/ReduceTask.java

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?view=diff&rev=496859&r1=496858&r2=496859
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Tue Jan 16 12:52:28 2007
@@ -21,6 +21,10 @@
     the TreeSet of block locations with an ArrayList.
     (Raghu Angadi via cutting)
 
+ 6. HADOOP-890.  Replace dashes in metric names with underscores,
+    for better compatibility with some monitoring systems.
+    (Nigel Daley via cutting)
+
 
 Release 0.10.1 - 2007-01-10
 

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DataNode.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DataNode.java?view=diff&rev=496859&r1=496858&r2=496859
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DataNode.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DataNode.java Tue Jan 16 12:52:28 2007
@@ -132,32 +132,32 @@
       
       synchronized void readBytes(int nbytes) {
         bytesRead += nbytes;
-        Metrics.report(metricsRecord, "bytes-read", bytesRead);
+        Metrics.report(metricsRecord, "bytes_read", bytesRead);
       }
       
       synchronized void wroteBytes(int nbytes) {
         bytesWritten += nbytes;
-        Metrics.report(metricsRecord, "bytes-written", bytesWritten);
+        Metrics.report(metricsRecord, "bytes_written", bytesWritten);
       }
       
       synchronized void readBlocks(int nblocks) {
         blocksRead += nblocks;
-        Metrics.report(metricsRecord, "blocks-read", blocksRead);
+        Metrics.report(metricsRecord, "blocks_read", blocksRead);
       }
       
       synchronized void wroteBlocks(int nblocks) {
         blocksWritten += nblocks;
-        Metrics.report(metricsRecord, "blocks-written", blocksWritten);
+        Metrics.report(metricsRecord, "blocks_written", blocksWritten);
       }
       
       synchronized void replicatedBlocks(int nblocks) {
         blocksReplicated += nblocks;
-        Metrics.report(metricsRecord, "blocks-replicated", blocksReplicated);
+        Metrics.report(metricsRecord, "blocks_replicated", blocksReplicated);
       }
       
       synchronized void removedBlocks(int nblocks) {
         blocksRemoved += nblocks;
-        Metrics.report(metricsRecord, "blocks-removed", blocksRemoved);
+        Metrics.report(metricsRecord, "blocks_removed", blocksRemoved);
       }
     }
     

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/FSDirectory.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/FSDirectory.java?view=diff&rev=496859&r1=496858&r2=496859
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/FSDirectory.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/FSDirectory.java Tue Jan 16 12:52:28
2007
@@ -223,7 +223,7 @@
                     v.add(blocks[i]);
                 }
             }
-            Metrics.report(metricsRecord, "files-deleted", ++numFilesDeleted);
+            Metrics.report(metricsRecord, "files_deleted", ++numFilesDeleted);
             for (Iterator it = children.values().iterator(); it.hasNext(); ) {
                 INode child = (INode) it.next();
                 child.collectSubtreeBlocks(v);

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/NameNode.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/NameNode.java?view=diff&rev=496859&r1=496858&r2=496859
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/NameNode.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/NameNode.java Tue Jan 16 12:52:28 2007
@@ -113,20 +113,20 @@
       }
       
       synchronized void createFile() {
-        Metrics.report(metricsRecord, "files-created", ++numFilesCreated);
+        Metrics.report(metricsRecord, "files_created", ++numFilesCreated);
       }
       
       synchronized void openFile() {
-        Metrics.report(metricsRecord, "files-opened", ++numFilesOpened);
+        Metrics.report(metricsRecord, "files_opened", ++numFilesOpened);
       }
       
       synchronized void renameFile() {
-        Metrics.report(metricsRecord, "files-renamed", ++numFilesRenamed);
+        Metrics.report(metricsRecord, "files_renamed", ++numFilesRenamed);
       }
       
       synchronized void listFile(int nfiles) {
         numFilesListed += nfiles;
-        Metrics.report(metricsRecord, "files-listed", numFilesListed);
+        Metrics.report(metricsRecord, "files_listed", numFilesListed);
       }
     }
     

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/JobTracker.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/JobTracker.java?view=diff&rev=496859&r1=496858&r2=496859
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/JobTracker.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/JobTracker.java Tue Jan 16 12:52:28
2007
@@ -386,32 +386,32 @@
       }
       
       synchronized void launchMap() {
-        Metrics.report(metricsRecord, "maps-launched",
+        Metrics.report(metricsRecord, "maps_launched",
             ++numMapTasksLaunched);
       }
       
       synchronized void completeMap() {
-        Metrics.report(metricsRecord, "maps-completed",
+        Metrics.report(metricsRecord, "maps_completed",
             ++numMapTasksCompleted);
       }
       
       synchronized void launchReduce() {
-        Metrics.report(metricsRecord, "reduces-launched",
+        Metrics.report(metricsRecord, "reduces_launched",
             ++numReduceTasksLaunched);
       }
       
       synchronized void completeReduce() {
-        Metrics.report(metricsRecord, "reduces-completed",
+        Metrics.report(metricsRecord, "reduces_completed",
             ++numReduceTasksCompleted);
       }
       
       synchronized void submitJob() {
-        Metrics.report(metricsRecord, "jobs-submitted",
+        Metrics.report(metricsRecord, "jobs_submitted",
             ++numJobsSubmitted);
       }
       
       synchronized void completeJob() {
-        Metrics.report(metricsRecord, "jobs-completed",
+        Metrics.report(metricsRecord, "jobs_completed",
             ++numJobsCompleted);
       }
     }

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/MapTask.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/MapTask.java?view=diff&rev=496859&r1=496858&r2=496859
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/MapTask.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/MapTask.java Tue Jan 16 12:52:28
2007
@@ -71,15 +71,15 @@
     }
     
     synchronized void mapInput(long numBytes) {
-      Metrics.report(metricsRecord, "input-records", ++numInputRecords);
+      Metrics.report(metricsRecord, "input_records", ++numInputRecords);
       numInputBytes += numBytes;
-      Metrics.report(metricsRecord, "input-bytes", numInputBytes);
+      Metrics.report(metricsRecord, "input_bytes", numInputBytes);
     }
     
     synchronized void mapOutput(long numBytes) {
-      Metrics.report(metricsRecord, "output-records", ++numOutputRecords);
+      Metrics.report(metricsRecord, "output_records", ++numOutputRecords);
       numOutputBytes += numBytes;
-      Metrics.report(metricsRecord, "output-bytes", numOutputBytes);
+      Metrics.report(metricsRecord, "output_bytes", numOutputBytes);
     }
     
   }

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/ReduceTask.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/ReduceTask.java?view=diff&rev=496859&r1=496858&r2=496859
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/ReduceTask.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/ReduceTask.java Tue Jan 16 12:52:28
2007
@@ -54,11 +54,11 @@
     }
     
     synchronized void reduceInput() {
-      Metrics.report(metricsRecord, "input-records", ++numInputRecords);
+      Metrics.report(metricsRecord, "input_records", ++numInputRecords);
     }
     
     synchronized void reduceOutput() {
-      Metrics.report(metricsRecord, "output-records", ++numOutputRecords);
+      Metrics.report(metricsRecord, "output_records", ++numOutputRecords);
     }
   }
   



Mime
View raw message