You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by cm...@apache.org on 2014/03/07 02:19:24 UTC
svn commit: r1575111 - in
/hadoop/common/branches/branch-2.4/hadoop-common-project: ./ hadoop-common/
hadoop-common/src/ hadoop-common/src/main/java/
hadoop-common/src/main/java/org/apache/hadoop/fs/HasEnhancedByteBufferAccess.java
Author: cmccabe
Date: Fri Mar 7 01:19:24 2014
New Revision: 1575111
URL: http://svn.apache.org/r1575111
Log:
HDFS-6065. HDFS zero-copy reads should return null on EOF when doing ZCR (cmccabe)
Modified:
hadoop/common/branches/branch-2.4/hadoop-common-project/ (props changed)
hadoop/common/branches/branch-2.4/hadoop-common-project/hadoop-common/ (props changed)
hadoop/common/branches/branch-2.4/hadoop-common-project/hadoop-common/src/ (props changed)
hadoop/common/branches/branch-2.4/hadoop-common-project/hadoop-common/src/main/java/ (props changed)
hadoop/common/branches/branch-2.4/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/HasEnhancedByteBufferAccess.java
Propchange: hadoop/common/branches/branch-2.4/hadoop-common-project/
------------------------------------------------------------------------------
Merged /hadoop/common/trunk/hadoop-common-project:r1575109
Propchange: hadoop/common/branches/branch-2.4/hadoop-common-project/hadoop-common/
------------------------------------------------------------------------------
Merged /hadoop/common/trunk/hadoop-common-project/hadoop-common:r1575109
Propchange: hadoop/common/branches/branch-2.4/hadoop-common-project/hadoop-common/src/
------------------------------------------------------------------------------
Merged /hadoop/common/trunk/hadoop-common-project/hadoop-common/src:r1575109
Propchange: hadoop/common/branches/branch-2.4/hadoop-common-project/hadoop-common/src/main/java/
------------------------------------------------------------------------------
Merged /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java:r1575109
Modified: hadoop/common/branches/branch-2.4/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/HasEnhancedByteBufferAccess.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2.4/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/HasEnhancedByteBufferAccess.java?rev=1575111&r1=1575110&r2=1575111&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.4/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/HasEnhancedByteBufferAccess.java (original)
+++ hadoop/common/branches/branch-2.4/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/HasEnhancedByteBufferAccess.java Fri Mar 7 01:19:24 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
+}