MAPREDUCE-7311. Clear filesystem statistics after tests in TestTaskProgressReporter (#2500)

Co-authored-by: Zhengxi Li <zli89@illinois.edu>
This commit is contained in:
lzx404243 2021-09-01 00:47:09 -04:00 committed by GitHub
parent 4ea60b5733
commit 6187f76f11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -34,6 +34,7 @@ import org.apache.hadoop.mapreduce.MRConfig;
import org.apache.hadoop.mapreduce.MRJobConfig; import org.apache.hadoop.mapreduce.MRJobConfig;
import org.apache.hadoop.mapreduce.checkpoint.TaskCheckpointID; import org.apache.hadoop.mapreduce.checkpoint.TaskCheckpointID;
import org.apache.hadoop.util.ExitUtil; import org.apache.hadoop.util.ExitUtil;
import org.junit.After;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
@ -179,6 +180,11 @@ public class TestTaskProgressReporter {
} }
} }
@After
public void cleanup() {
FileSystem.clearStatistics();
}
@Test(timeout=60000) @Test(timeout=60000)
public void testScratchDirSize() throws Exception { public void testScratchDirSize() throws Exception {
String tmpPath = TEST_DIR + "/testBytesWrittenLimit-tmpFile-" String tmpPath = TEST_DIR + "/testBytesWrittenLimit-tmpFile-"