fix checkstyle
This commit is contained in:
parent
9a50dfedd9
commit
2039eb7e86
@ -337,9 +337,10 @@ public void testSequentialReadSkip() throws Exception {
|
|||||||
@Test(timeout = 60000)
|
@Test(timeout = 60000)
|
||||||
public void testSequentialTruncate() throws Exception {
|
public void testSequentialTruncate() throws Exception {
|
||||||
FileSystem fs = cluster.getFileSystem();
|
FileSystem fs = cluster.getFileSystem();
|
||||||
|
// given DEFAULT_NR_BYTES files to be truncated
|
||||||
bench.sequentialTest(fs, TestType.TEST_TYPE_WRITE,
|
bench.sequentialTest(fs, TestType.TEST_TYPE_WRITE,
|
||||||
DEFAULT_NR_BYTES,
|
DEFAULT_NR_BYTES, DEFAULT_NR_FILES);
|
||||||
DEFAULT_NR_FILES); // make sure the length of files to be truncated is DEFAULT_NR_BYTES
|
// test truncate
|
||||||
bench.sequentialTest(fs, TestType.TEST_TYPE_TRUNCATE,
|
bench.sequentialTest(fs, TestType.TEST_TYPE_TRUNCATE,
|
||||||
DEFAULT_NR_BYTES, DEFAULT_NR_FILES);
|
DEFAULT_NR_BYTES, DEFAULT_NR_FILES);
|
||||||
}
|
}
|
||||||
@ -774,14 +775,16 @@ private void sequentialTest(FileSystem fs,
|
|||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for(int i=0; i < nrFiles; i++) {
|
for (int i = 0; i < nrFiles; i++) {
|
||||||
ioer.configure(new JobConf(config, TestDFSIO.class));
|
ioer.configure(new JobConf(config, TestDFSIO.class));
|
||||||
String fileName = getFileName(i);
|
String fileName = getFileName(i);
|
||||||
ioer.stream = ioer.getIOStream(fileName);
|
ioer.stream = ioer.getIOStream(fileName);
|
||||||
try {
|
try {
|
||||||
ioer.doIO(Reporter.NULL, fileName, fileSize);
|
ioer.doIO(Reporter.NULL, fileName, fileSize);
|
||||||
} finally {
|
} finally {
|
||||||
if(ioer.stream != null) ioer.stream.close();
|
if (ioer.stream != null) {
|
||||||
|
ioer.stream.close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user