hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmcc...@apache.org
Subject svn commit: r1575109 - /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/HasEnhancedByteBufferAccess.java
Date Fri, 07 Mar 2014 01:18:33 GMT
Author: cmccabe
Date: Fri Mar  7 01:18:32 2014
New Revision: 1575109

URL: http://svn.apache.org/r1575109
Log:
HDFS-6065. HDFS zero-copy reads should return null on EOF when doing ZCR (cmccabe)

Modified:
    hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/HasEnhancedByteBufferAccess.java

Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/HasEnhancedByteBufferAccess.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/HasEnhancedByteBufferAccess.java?rev=1575109&r1=1575108&r2=1575109&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/HasEnhancedByteBufferAccess.java
(original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/HasEnhancedByteBufferAccess.java
Fri Mar  7 01:18:32 2014
@@ -50,13 +50,15 @@ public interface HasEnhancedByteBufferAc
    *            Options to use when reading.
    *
    * @return
-   *            We will return null on EOF (and only on EOF).
-   *            Otherwise, we will return a direct ByteBuffer containing at
-   *            least one byte.  You must free this ByteBuffer when you are 
-   *            done with it by calling releaseBuffer on it.
-   *            The buffer will continue to be readable until it is released 
-   *            in this manner.  However, the input stream's close method may
-   *            warn about unclosed buffers.
+   *            We will always return an empty buffer if maxLength was 0,
+   *            whether or not we are at EOF.
+   *            If maxLength > 0, we will return null if the stream has
+   *            reached EOF.
+   *            Otherwise, we will return a ByteBuffer containing at least one 
+   *            byte.  You must free this ByteBuffer when you are done with it 
+   *            by calling releaseBuffer on it.  The buffer will continue to be
+   *            readable until it is released in this manner.  However, the
+   *            input stream's close method may warn about unclosed buffers.
    * @throws
    *            IOException: if there was an error reading.
    *            UnsupportedOperationException: if factory was null, and we
@@ -76,4 +78,4 @@ public interface HasEnhancedByteBufferAc
    *            The ByteBuffer to release.
    */
   public void releaseBuffer(ByteBuffer buffer);
-}
\ No newline at end of file
+}



Mime
View raw message