From dec6a2846241cfd054acbcb601deca997fd4d447 Mon Sep 17 00:00:00 2001 From: schalyanagaraju Date: Fri, 28 Dec 2018 10:47:51 -0800 Subject: [PATCH] Fixing bug : https://issues.apache.org/jira/browse/MAPREDUCE-7089 --- .../src/test/java/org/apache/hadoop/fs/TestDFSIO.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/fs/TestDFSIO.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/fs/TestDFSIO.java index 10709bec0fe..28ae2e4522e 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/fs/TestDFSIO.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/fs/TestDFSIO.java @@ -547,6 +547,9 @@ public class TestDFSIO implements Tool { String name, long totalSize // in bytes ) throws IOException { + if (bufferSize <= 0) { + throw new IllegalArgumentException("Buffer size must be greater than 0"); + } InputStream in = (InputStream)this.stream; long actualSize = 0; while (actualSize < totalSize) {