Browse Source

HDFS-6369. Document that BlockReader#available() can return more bytes than are remaining in the block (Ted Yu via Colin Patrick McCabe)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1600801 13f79535-47bb-0310-9956-ffa450edef68
Colin McCabe 11 years ago
parent
commit
e40524d759

+ 3 - 0
hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt

@@ -470,6 +470,9 @@ Release 2.5.0 - UNRELEASED
     HDFS-6268. Better sorting in NetworkTopology#pseudoSortByDistance when
     no local node is found. (wang)
 
+    HDFS-6369. Document that BlockReader#available() can return more bytes than
+    are remaining in the block (Ted Yu via Colin Patrick McCabe)
+
   OPTIMIZATIONS
 
     HDFS-6214. Webhdfs has poor throughput for files >2GB (daryn)

+ 1 - 0
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/BlockReader.java

@@ -51,6 +51,7 @@ public interface BlockReader extends ByteBufferReadable {
    * Returns an estimate of the number of bytes that can be read
    * (or skipped over) from this input stream without performing
    * network I/O.
+   * This may return more than what is actually present in the block.
    */
   int available() throws IOException;