This commit is contained in:
schalyanagaraju 2018-12-28 10:47:51 -08:00
parent 128f340f4f
commit dec6a28462
1 changed files with 3 additions and 0 deletions

View File

@ -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) {