hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dran...@apache.org
Subject [10/50] [abbrv] hadoop git commit: HDFS-10795. Fix an error in ReaderStrategy#ByteBufferStrategy. Contributed by Sammi Chen
Date Tue, 06 Sep 2016 08:47:48 GMT
HDFS-10795. Fix an error in ReaderStrategy#ByteBufferStrategy. Contributed by Sammi Chen


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/f4a21d3a
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/f4a21d3a
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/f4a21d3a

Branch: refs/heads/HADOOP-12756
Commit: f4a21d3abaa7c5a9f0a0d8417e81f7eaf3d1b29a
Parents: 81485db
Author: Kai Zheng <kai.zheng@intel.com>
Authored: Sat Aug 27 10:54:25 2016 +0800
Committer: Kai Zheng <kai.zheng@intel.com>
Committed: Sat Aug 27 10:54:25 2016 +0800

----------------------------------------------------------------------
 .../src/main/java/org/apache/hadoop/hdfs/ReaderStrategy.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/f4a21d3a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/ReaderStrategy.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/ReaderStrategy.java
b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/ReaderStrategy.java
index d75a8ef..c984c3b 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/ReaderStrategy.java
+++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/ReaderStrategy.java
@@ -181,7 +181,7 @@ class ByteBufferStrategy implements ReaderStrategy {
                            int length) throws IOException {
     ByteBuffer tmpBuf = readBuf.duplicate();
     tmpBuf.limit(tmpBuf.position() + length);
-    int nRead = blockReader.read(readBuf.slice());
+    int nRead = blockReader.read(tmpBuf);
     // Only when data are read, update the position
     if (nRead > 0) {
       readBuf.position(readBuf.position() + nRead);


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message