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/12/29 22:38:26 UTC
hadoop git commit: HADOOP-11039. ByteBufferReadable API doc is
inconsistent with the implementations. (Yi Liu via Colin P. McCabe) (cherry
picked from commit 249cc905017948d64aab3d14d7a64df3b7b35a13)
Repository: hadoop
Updated Branches:
refs/heads/branch-2 e5cb52ec1 -> e25b789b1
HADOOP-11039. ByteBufferReadable API doc is inconsistent with the implementations. (Yi Liu via Colin P. McCabe)
(cherry picked from commit 249cc905017948d64aab3d14d7a64df3b7b35a13)
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/e25b789b
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/e25b789b
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/e25b789b
Branch: refs/heads/branch-2
Commit: e25b789b19d072fa167be589fe44c5d4fb3ed876
Parents: e5cb52e
Author: Colin Patrick Mccabe <cm...@cloudera.com>
Authored: Mon Dec 29 13:37:45 2014 -0800
Committer: Colin Patrick Mccabe <cm...@cloudera.com>
Committed: Mon Dec 29 13:38:20 2014 -0800
----------------------------------------------------------------------
hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++
.../java/org/apache/hadoop/fs/ByteBufferReadable.java | 11 +++++------
2 files changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/e25b789b/hadoop-common-project/hadoop-common/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt
index 418c650..0f01a91 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -307,6 +307,9 @@ Release 2.7.0 - UNRELEASED
HADOOP-11448. Fix findbugs warnings in FileBasedIPList. (ozawa)
+ HADOOP-11039. ByteBufferReadable API doc is inconsistent with the
+ implementations. (Yi Liu via Colin P. McCabe)
+
Release 2.6.0 - 2014-11-18
INCOMPATIBLE CHANGES
http://git-wip-us.apache.org/repos/asf/hadoop/blob/e25b789b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/ByteBufferReadable.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/ByteBufferReadable.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/ByteBufferReadable.java
index e18a115..aa6e85e 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/ByteBufferReadable.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/ByteBufferReadable.java
@@ -29,9 +29,8 @@ public interface ByteBufferReadable {
* Reads up to buf.remaining() bytes into buf. Callers should use
* buf.limit(..) to control the size of the desired read.
* <p/>
- * After a successful call, buf.position() and buf.limit() should be
- * unchanged, and therefore any data can be immediately read from buf.
- * buf.mark() may be cleared or updated.
+ * After a successful call, buf.position() will be advanced by the number
+ * of bytes read and buf.limit() should be unchanged.
* <p/>
* In the case of an exception, the values of buf.position() and buf.limit()
* are undefined, and callers should be prepared to recover from this
@@ -45,9 +44,9 @@ public interface ByteBufferReadable {
* signal an error upon their receipt.
*
* @param buf
- * the ByteBuffer to receive the results of the read operation. Up to
- * buf.limit() - buf.position() bytes may be read.
- * @return the number of bytes available to read from buf
+ * the ByteBuffer to receive the results of the read operation.
+ * @return the number of bytes read, possibly zero, or -1 if
+ * reach end-of-stream
* @throws IOException
* if there is some error performing the read
*/