|
@@ -586,13 +586,11 @@ public class TestCopyCommitter {
|
|
|
|
|
|
@Test
|
|
|
public void testCommitWithCleanupTempFiles() throws IOException {
|
|
|
- testCommitWithCleanup(true, false);
|
|
|
- testCommitWithCleanup(false, true);
|
|
|
- testCommitWithCleanup(true, true);
|
|
|
- testCommitWithCleanup(false, false);
|
|
|
+ testCommitWithCleanup(true);
|
|
|
+ testCommitWithCleanup(false);
|
|
|
}
|
|
|
|
|
|
- private void testCommitWithCleanup(boolean append, boolean directWrite)throws IOException {
|
|
|
+ private void testCommitWithCleanup(boolean directWrite) throws IOException {
|
|
|
TaskAttemptContext taskAttemptContext = getTaskAttemptContext(config);
|
|
|
JobID jobID = taskAttemptContext.getTaskAttemptID().getJobID();
|
|
|
JobContext jobContext = new JobContextImpl(
|
|
@@ -611,7 +609,7 @@ public class TestCopyCommitter {
|
|
|
DistCpOptions options = new DistCpOptions.Builder(
|
|
|
Collections.singletonList(new Path(sourceBase)),
|
|
|
new Path("/out"))
|
|
|
- .withAppend(append)
|
|
|
+ .withAppend(true)
|
|
|
.withSyncFolder(true)
|
|
|
.withDirectWrite(directWrite)
|
|
|
.build();
|
|
@@ -631,7 +629,7 @@ public class TestCopyCommitter {
|
|
|
null, taskAttemptContext);
|
|
|
committer.commitJob(jobContext);
|
|
|
|
|
|
- if (append || directWrite) {
|
|
|
+ if (directWrite) {
|
|
|
ContractTestUtils.assertPathExists(fs, "Temp files should not be cleanup with append or direct option",
|
|
|
tempFilePath);
|
|
|
} else {
|