hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cdoug...@apache.org
Subject svn commit: r662541 - in /hadoop/core/trunk: CHANGES.txt src/java/org/apache/hadoop/dfs/DataNode.java src/java/org/apache/hadoop/dfs/datanode/metrics/DataNodeMetrics.java
Date Mon, 02 Jun 2008 19:58:06 GMT
Author: cdouglas
Date: Mon Jun  2 12:58:05 2008
New Revision: 662541

URL: http://svn.apache.org/viewvc?rev=662541&view=rev
Log:
HADOOP-3340. Fix DFS metrics for BlocksReplicated, HeartbeatsNum, and
BlockReportsAverageTime. Contributed by lohit vijayarenu.


Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/java/org/apache/hadoop/dfs/DataNode.java
    hadoop/core/trunk/src/java/org/apache/hadoop/dfs/datanode/metrics/DataNodeMetrics.java

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=662541&r1=662540&r2=662541&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Mon Jun  2 12:58:05 2008
@@ -378,6 +378,8 @@
     HADOOP-3410. Fix KFS implemenation to return correct file
     modification time.  (Sriram Rao via cutting)
 
+    HADOOP-3340. Fix DFS metrics for BlocksReplicated, HeartbeatsNum, and
+    BlockReportsAverageTime. (lohit vijayarenu via cdouglas)
 
 Release 0.17.0 - 2008-05-18
 

Modified: hadoop/core/trunk/src/java/org/apache/hadoop/dfs/DataNode.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/java/org/apache/hadoop/dfs/DataNode.java?rev=662541&r1=662540&r2=662541&view=diff
==============================================================================
--- hadoop/core/trunk/src/java/org/apache/hadoop/dfs/DataNode.java (original)
+++ hadoop/core/trunk/src/java/org/apache/hadoop/dfs/DataNode.java Mon Jun  2 12:58:05 2008
@@ -778,6 +778,7 @@
     case DatanodeProtocol.DNA_TRANSFER:
       // Send a copy of a block to another datanode
       transferBlocks(bcmd.getBlocks(), bcmd.getTargets());
+      myMetrics.blocksReplicated.inc(bcmd.getBlocks().length);
       break;
     case DatanodeProtocol.DNA_INVALIDATE:
       //

Modified: hadoop/core/trunk/src/java/org/apache/hadoop/dfs/datanode/metrics/DataNodeMetrics.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/java/org/apache/hadoop/dfs/datanode/metrics/DataNodeMetrics.java?rev=662541&r1=662540&r2=662541&view=diff
==============================================================================
--- hadoop/core/trunk/src/java/org/apache/hadoop/dfs/datanode/metrics/DataNodeMetrics.java
(original)
+++ hadoop/core/trunk/src/java/org/apache/hadoop/dfs/datanode/metrics/DataNodeMetrics.java
Mon Jun  2 12:58:05 2008
@@ -132,6 +132,8 @@
       readMetadataOp.pushMetric(metricsRecord);
       copyBlockOp.pushMetric(metricsRecord);
       replaceBlockOp.pushMetric(metricsRecord);
+      heartbeats.pushMetric(metricsRecord);
+      blockReports.pushMetric(metricsRecord);
     }
     metricsRecord.update();
   }
@@ -141,5 +143,7 @@
     readMetadataOp.resetMinMax();
     copyBlockOp.resetMinMax();
     replaceBlockOp.resetMinMax();
+    heartbeats.resetMinMax();
+    blockReports.resetMinMax();
   }
 }



Mime
View raw message