hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hair...@apache.org
Subject svn commit: r1044148 - in /hadoop/common/trunk: CHANGES.txt src/java/org/apache/hadoop/fs/FSOutputSummer.java
Date Thu, 09 Dec 2010 22:22:58 GMT
Author: hairong
Date: Thu Dec  9 22:22:53 2010
New Revision: 1044148

URL: http://svn.apache.org/viewvc?rev=1044148&view=rev
Log:
HADOOP-7058. Expose number of bytes in FSOutputSummer buffer to implementatins. Contributed
by Todd Lipcon.

Modified:
    hadoop/common/trunk/CHANGES.txt
    hadoop/common/trunk/src/java/org/apache/hadoop/fs/FSOutputSummer.java

Modified: hadoop/common/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/CHANGES.txt?rev=1044148&r1=1044147&r2=1044148&view=diff
==============================================================================
--- hadoop/common/trunk/CHANGES.txt (original)
+++ hadoop/common/trunk/CHANGES.txt Thu Dec  9 22:22:53 2010
@@ -29,6 +29,9 @@ Trunk (unreleased changes)
     HADOOP-7060. A more elegant FileSystem#listCorruptFileBlocks API.
     (Patrick Kling via hairong)
 
+    HADOOP-7058. Expose number of bytes in FSOutputSummer buffer to
+    implementatins. (Todd Lipcon via hairong)
+
   OPTIMIZATIONS
 
   BUG FIXES

Modified: hadoop/common/trunk/src/java/org/apache/hadoop/fs/FSOutputSummer.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/src/java/org/apache/hadoop/fs/FSOutputSummer.java?rev=1044148&r1=1044147&r2=1044148&view=diff
==============================================================================
--- hadoop/common/trunk/src/java/org/apache/hadoop/fs/FSOutputSummer.java (original)
+++ hadoop/common/trunk/src/java/org/apache/hadoop/fs/FSOutputSummer.java Thu Dec  9 22:22:53
2010
@@ -139,6 +139,13 @@ abstract public class FSOutputSummer ext
       }
     }
   }
+
+  /**
+   * Return the number of valid bytes currently in the buffer.
+   */
+  protected synchronized int getBufferedDataSize() {
+    return count;
+  }
   
   /** Generate checksum for the data chunk and output data chunk & checksum
    * to the underlying output stream. If keep is true then keep the



Mime
View raw message