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 st...@apache.org on 2016/04/18 11:27:23 UTC
[1/2] hadoop git commit: HDFS-10291 TestShortCircuitLocalRead failing
(stevel)
Repository: hadoop
Updated Branches:
refs/heads/branch-2 a6d0e9e56 -> dd6476969
refs/heads/branch-2.8 7f47d984f -> e9699aa44
HDFS-10291 TestShortCircuitLocalRead failing (stevel)
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/e9699aa4
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/e9699aa4
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/e9699aa4
Branch: refs/heads/branch-2.8
Commit: e9699aa443f20309b5575bd7dfe1f8b7b7639ed6
Parents: 7f47d98
Author: Steve Loughran <st...@apache.org>
Authored: Mon Apr 18 10:26:35 2016 +0100
Committer: Steve Loughran <st...@apache.org>
Committed: Mon Apr 18 10:26:35 2016 +0100
----------------------------------------------------------------------
.../hadoop/hdfs/shortcircuit/TestShortCircuitLocalRead.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/e9699aa4/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/shortcircuit/TestShortCircuitLocalRead.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/shortcircuit/TestShortCircuitLocalRead.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/shortcircuit/TestShortCircuitLocalRead.java
index f4fbebc..116dc88 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/shortcircuit/TestShortCircuitLocalRead.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/shortcircuit/TestShortCircuitLocalRead.java
@@ -153,8 +153,11 @@ public class TestShortCircuitLocalRead {
//Read a small number of bytes first.
int nread = stm.read(actual, 0, 3);
nread += stm.read(actual, nread, 2);
- //Read across chunk boundary
- nread += stm.read(actual, nread, 517);
+ int len = 517;
+ if (actual.length - nread >= len) {
+ //Read across chunk boundary
+ nread += stm.read(actual, nread, len);
+ }
checkData(actual, readOffset, expected, nread, "A few bytes");
//Now read rest of it
while (nread < actual.length) {
[2/2] hadoop git commit: HDFS-10291 TestShortCircuitLocalRead failing
(stevel)
Posted by st...@apache.org.
HDFS-10291 TestShortCircuitLocalRead failing (stevel)
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/dd647696
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/dd647696
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/dd647696
Branch: refs/heads/branch-2
Commit: dd64769699ea4c85abdf9c590b9db680837e8b27
Parents: a6d0e9e
Author: Steve Loughran <st...@apache.org>
Authored: Mon Apr 18 10:26:35 2016 +0100
Committer: Steve Loughran <st...@apache.org>
Committed: Mon Apr 18 10:26:58 2016 +0100
----------------------------------------------------------------------
.../hadoop/hdfs/shortcircuit/TestShortCircuitLocalRead.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/dd647696/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/shortcircuit/TestShortCircuitLocalRead.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/shortcircuit/TestShortCircuitLocalRead.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/shortcircuit/TestShortCircuitLocalRead.java
index f4fbebc..116dc88 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/shortcircuit/TestShortCircuitLocalRead.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/shortcircuit/TestShortCircuitLocalRead.java
@@ -153,8 +153,11 @@ public class TestShortCircuitLocalRead {
//Read a small number of bytes first.
int nread = stm.read(actual, 0, 3);
nread += stm.read(actual, nread, 2);
- //Read across chunk boundary
- nread += stm.read(actual, nread, 517);
+ int len = 517;
+ if (actual.length - nread >= len) {
+ //Read across chunk boundary
+ nread += stm.read(actual, nread, len);
+ }
checkData(actual, readOffset, expected, nread, "A few bytes");
//Now read rest of it
while (nread < actual.length) {