Skip to content

Commit

Permalink
fixed checkstyle issues
Browse files Browse the repository at this point in the history
  • Loading branch information
kaiyaok2 committed May 14, 2024
1 parent 4e98ad7 commit 710e1ce
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,21 @@
import static org.mockito.Mockito.mock;

public class TestMapTask {
private static File TEST_ROOT_DIR = new File(
private static File testRootDir = new File(
System.getProperty("test.build.data",
System.getProperty("java.io.tmpdir", "/tmp")),
TestMapTask.class.getName());

@Before
public void setup() throws Exception {
if(!TEST_ROOT_DIR.exists()) {
TEST_ROOT_DIR.mkdirs();
if(!testRootDir.exists()) {
testRootDir.mkdirs();
}
}

@After
public void cleanup() throws Exception {
FileUtil.fullyDelete(TEST_ROOT_DIR);
FileUtil.fullyDelete(testRootDir);
}

@Rule
Expand All @@ -74,7 +74,7 @@ public void cleanup() throws Exception {
public void testShufflePermissions() throws Exception {
JobConf conf = new JobConf();
conf.set(CommonConfigurationKeys.FS_PERMISSIONS_UMASK_KEY, "077");
conf.set(MRConfig.LOCAL_DIR, TEST_ROOT_DIR.getAbsolutePath());
conf.set(MRConfig.LOCAL_DIR, testRootDir.getAbsolutePath());
MapOutputFile mof = new MROutputFiles();
mof.setConf(conf);
TaskAttemptID attemptId = new TaskAttemptID("12345", 1, TaskType.MAP, 1, 1);
Expand Down Expand Up @@ -106,7 +106,7 @@ public void testShufflePermissions() throws Exception {
public void testSpillFilesCountLimitInvalidValue() throws Exception {
JobConf conf = new JobConf();
conf.set(CommonConfigurationKeys.FS_PERMISSIONS_UMASK_KEY, "077");
conf.set(MRConfig.LOCAL_DIR, TEST_ROOT_DIR.getAbsolutePath());
conf.set(MRConfig.LOCAL_DIR, testRootDir.getAbsolutePath());
conf.setInt(MRJobConfig.SPILL_FILES_COUNT_LIMIT, -2);
MapOutputFile mof = new MROutputFiles();
mof.setConf(conf);
Expand All @@ -132,7 +132,7 @@ public void testSpillFilesCountLimitInvalidValue() throws Exception {
public void testSpillFilesCountBreach() throws Exception {
JobConf conf = new JobConf();
conf.set(CommonConfigurationKeys.FS_PERMISSIONS_UMASK_KEY, "077");
conf.set(MRConfig.LOCAL_DIR, TEST_ROOT_DIR.getAbsolutePath());
conf.set(MRConfig.LOCAL_DIR, testRootDir.getAbsolutePath());
conf.setInt(MRJobConfig.SPILL_FILES_COUNT_LIMIT, 2);
MapOutputFile mof = new MROutputFiles();
mof.setConf(conf);
Expand Down

0 comments on commit 710e1ce

Please sign in to comment.