hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hair...@apache.org
Subject svn commit: r703927 - in /hadoop/core/branches/branch-0.19: ./ src/hdfs/org/apache/hadoop/hdfs/server/datanode/metrics/ src/test/org/apache/hadoop/hdfs/server/datanode/
Date Mon, 13 Oct 2008 07:07:47 GMT
Author: hairong
Date: Mon Oct 13 00:07:47 2008
New Revision: 703927

URL: http://svn.apache.org/viewvc?rev=703927&view=rev
Log:
Merge -r 703922:703923 from trunk to main to move the change log of HADOOP-4228 into release
0.18.2 section

Added:
    hadoop/core/branches/branch-0.19/src/test/org/apache/hadoop/hdfs/server/datanode/TestDataNodeMetrics.java
      - copied unchanged from r703923, hadoop/core/trunk/src/test/org/apache/hadoop/hdfs/server/datanode/TestDataNodeMetrics.java
Modified:
    hadoop/core/branches/branch-0.19/   (props changed)
    hadoop/core/branches/branch-0.19/CHANGES.txt
    hadoop/core/branches/branch-0.19/src/hdfs/org/apache/hadoop/hdfs/server/datanode/metrics/DataNodeMetrics.java
    hadoop/core/branches/branch-0.19/src/hdfs/org/apache/hadoop/hdfs/server/datanode/metrics/DataNodeStatistics.java
    hadoop/core/branches/branch-0.19/src/hdfs/org/apache/hadoop/hdfs/server/datanode/metrics/DataNodeStatisticsMBean.java

Propchange: hadoop/core/branches/branch-0.19/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Oct 13 00:07:47 2008
@@ -1 +1 @@
-/hadoop/core/trunk:697306,698176,699056,699098,699415,699424,699444,699490,699517,700163,700628,700923,701273,701398
+/hadoop/core/trunk:697306,698176,699056,699098,699415,699424,699444,699490,699517,700163,700628,700923,701273,701398,703923

Modified: hadoop/core/branches/branch-0.19/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.19/CHANGES.txt?rev=703927&r1=703926&r2=703927&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.19/CHANGES.txt (original)
+++ hadoop/core/branches/branch-0.19/CHANGES.txt Mon Oct 13 00:07:47 2008
@@ -845,6 +845,9 @@
     HADOOP-4314. Simulated datanodes should not include blocks that are still
     being written in their block report. (Raghu Angadi)
 
+    HADOOP-4228. dfs datanoe metrics, bytes_read and bytes_written, overflow
+    due to incorrect type used. (hairong)
+
 Release 0.18.1 - 2008-09-17
 
   IMPROVEMENTS

Modified: hadoop/core/branches/branch-0.19/src/hdfs/org/apache/hadoop/hdfs/server/datanode/metrics/DataNodeMetrics.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.19/src/hdfs/org/apache/hadoop/hdfs/server/datanode/metrics/DataNodeMetrics.java?rev=703927&r1=703926&r2=703927&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.19/src/hdfs/org/apache/hadoop/hdfs/server/datanode/metrics/DataNodeMetrics.java
(original)
+++ hadoop/core/branches/branch-0.19/src/hdfs/org/apache/hadoop/hdfs/server/datanode/metrics/DataNodeMetrics.java
Mon Oct 13 00:07:47 2008
@@ -24,6 +24,7 @@
 import org.apache.hadoop.metrics.Updater;
 import org.apache.hadoop.metrics.jvm.JvmMetrics;
 import org.apache.hadoop.metrics.util.MetricsTimeVaryingInt;
+import org.apache.hadoop.metrics.util.MetricsLongValue;
 import org.apache.hadoop.metrics.util.MetricsTimeVaryingRate;
 
 
@@ -44,10 +45,10 @@
   private DataNodeStatistics datanodeStats;
   
   
-  public MetricsTimeVaryingInt bytesWritten = 
-                      new MetricsTimeVaryingInt("bytes_written");
-  public MetricsTimeVaryingInt bytesRead = 
-                      new MetricsTimeVaryingInt("bytes_read");
+  public MetricsLongValue bytesWritten = 
+                      new MetricsLongValue("bytes_written");
+  public MetricsLongValue bytesRead = 
+                      new MetricsLongValue("bytes_read");
   public MetricsTimeVaryingInt blocksWritten = 
                       new MetricsTimeVaryingInt("blocks_written");
   public MetricsTimeVaryingInt blocksRead = 

Modified: hadoop/core/branches/branch-0.19/src/hdfs/org/apache/hadoop/hdfs/server/datanode/metrics/DataNodeStatistics.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.19/src/hdfs/org/apache/hadoop/hdfs/server/datanode/metrics/DataNodeStatistics.java?rev=703927&r1=703926&r2=703927&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.19/src/hdfs/org/apache/hadoop/hdfs/server/datanode/metrics/DataNodeStatistics.java
(original)
+++ hadoop/core/branches/branch-0.19/src/hdfs/org/apache/hadoop/hdfs/server/datanode/metrics/DataNodeStatistics.java
Mon Oct 13 00:07:47 2008
@@ -34,7 +34,7 @@
    * This constructs and registers the DataNodeStatisticsMBean
    * @param dataNodeMetrics - the metrics from which the mbean gets its info
    */
-  DataNodeStatistics(DataNodeMetrics dataNodeMetrics, String storageId) {
+  public DataNodeStatistics(DataNodeMetrics dataNodeMetrics, String storageId) {
     myMetrics = dataNodeMetrics;
     String serverName;
     if (storageId.equals("")) {// Temp fix for the uninitialized storage
@@ -92,11 +92,18 @@
   /**
    * @inheritDoc
    */
-  public int getBytesRead() {
-    return myMetrics.bytesRead.getPreviousIntervalValue();
+  public long getBytesRead() {
+    return myMetrics.bytesRead.get();
   }
 
   /**
+   *   {@inheritDoc}
+   */
+  public long getBytesWritten() {
+    return myMetrics.bytesWritten.get();
+  }
+  
+  /**
    * @inheritDoc
    */
   public int getBlockVerificationFailures() {

Modified: hadoop/core/branches/branch-0.19/src/hdfs/org/apache/hadoop/hdfs/server/datanode/metrics/DataNodeStatisticsMBean.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.19/src/hdfs/org/apache/hadoop/hdfs/server/datanode/metrics/DataNodeStatisticsMBean.java?rev=703927&r1=703926&r2=703927&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.19/src/hdfs/org/apache/hadoop/hdfs/server/datanode/metrics/DataNodeStatisticsMBean.java
(original)
+++ hadoop/core/branches/branch-0.19/src/hdfs/org/apache/hadoop/hdfs/server/datanode/metrics/DataNodeStatisticsMBean.java
Mon Oct 13 00:07:47 2008
@@ -45,10 +45,16 @@
 public interface DataNodeStatisticsMBean {
   
   /**
+   *   Number of bytes written in the last interval
+   * @return number of bytes written
+   */
+  long getBytesWritten();
+  
+  /**
    *   Number of bytes read in the last interval
    * @return number of bytes read
    */
-  int getBytesRead();
+  long getBytesRead();
   
   /**
    *   Number of blocks written in the last interval



Mime
View raw message