fix checkstyle

This commit is contained in:
Zhuobin Zheng 2021-12-22 17:41:24 +08:00
parent 10732107c8
commit bd4ac99108
1 changed files with 4 additions and 2 deletions

View File

@ -382,7 +382,7 @@ public class ErasureCodeBenchmarkThroughput
throws IOException { throws IOException {
long count = 0; long count = 0;
long bytesRead; long bytesRead;
byte buf[] = new byte[BUFFER_SIZE_MB * 1024 * 1024]; byte[] buf = new byte[BUFFER_SIZE_MB * 1024 * 1024];
while (true) { while (true) {
bytesRead = inputStream.read(count, buf, 0, buf.length); bytesRead = inputStream.read(count, buf, 0, buf.length);
if (bytesRead < 0) { if (bytesRead < 0) {
@ -407,7 +407,6 @@ public class ErasureCodeBenchmarkThroughput
} }
} }
return count; return count;
} }
private long readFile(Path path) throws IOException { private long readFile(Path path) throws IOException {
@ -420,6 +419,9 @@ public class ErasureCodeBenchmarkThroughput
case STATEFUL: totalRead = doStateful(inputStream); break; case STATEFUL: totalRead = doStateful(inputStream); break;
case POSITIONAL: totalRead = doPositional(inputStream); break; case POSITIONAL: totalRead = doPositional(inputStream); break;
case RANDOM: totalRead = doRandom(inputStream); break; case RANDOM: totalRead = doRandom(inputStream); break;
default:
throw new RuntimeException(String.format("Illegal readType: %s",
readType));
} }
System.out.println("Finished " + readType + " read " + path System.out.println("Finished " + readType + " read " + path
+ ". Time taken: " + sw.now(TimeUnit.SECONDS) + " s."); + ". Time taken: " + sw.now(TimeUnit.SECONDS) + " s.");