hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject svn commit: r1576047 - in /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs: CHANGES.txt src/main/java/org/apache/hadoop/hdfs/DFSInputStream.java
Date Mon, 10 Mar 2014 19:04:05 GMT
Author: wang
Date: Mon Mar 10 19:04:05 2014
New Revision: 1576047

URL: http://svn.apache.org/r1576047
Log:
HDFS-6070. Cleanup use of ReadStatistics in DFSInputStream.

Modified:
    hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
    hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSInputStream.java

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt?rev=1576047&r1=1576046&r2=1576047&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt Mon Mar 10 19:04:05 2014
@@ -542,6 +542,8 @@ Release 2.4.0 - UNRELEASED
     HDFS-5986. Capture the number of blocks pending deletion on namenode webUI.
     (cnauroth)
 
+    HDFS-6070. Cleanup use of ReadStatistics in DFSInputStream. (wang)
+
   OPTIMIZATIONS
 
     HDFS-5790. LeaseManager.findPath is very slow when many leases need recovery

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSInputStream.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSInputStream.java?rev=1576047&r1=1576046&r2=1576047&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSInputStream.java
(original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSInputStream.java
Mon Mar 10 19:04:05 2014
@@ -659,14 +659,11 @@ implements ByteBufferReadable, CanSetDro
         int nRead, BlockReader blockReader) {
     if (nRead <= 0) return;
     if (blockReader.isShortCircuit()) {
-      readStatistics.totalBytesRead += nRead;
-      readStatistics.totalLocalBytesRead += nRead;
-      readStatistics.totalShortCircuitBytesRead += nRead;
+      readStatistics.addShortCircuitBytes(nRead);
     } else if (blockReader.isLocal()) {
-      readStatistics.totalBytesRead += nRead;
-      readStatistics.totalLocalBytesRead += nRead;
+      readStatistics.addLocalBytes(nRead);
     } else {
-      readStatistics.totalBytesRead += nRead;
+      readStatistics.addRemoteBytes(nRead);
     }
   }
   



Mime
View raw message