Jirawech Siwawut
04/29/2023, 3:16 AM// broadcast
harness0.processElement(new CompactionUnit(0, "p0", Arrays.asList(f0, f1, f4)), 0);
harness0.processElement(new CompactionUnit(1, "p0", Collections.singletonList(f3)), 0);
harness0.processElement(new CompactionUnit(2, "p0", Arrays.asList(f2, f5)), 0);
harness0.processElement(new CompactionUnit(3, "p0", Collections.singletonList(f6)), 0);
harness0.processElement(new EndCompaction(1), 0);
// check compacted file generated
assertThat(fs.exists(new Path(folder, "compacted-f0"))).isTrue();
assertThat(fs.exists(new Path(folder, "compacted-f2"))).isTrue();
// f3 and f6 are in the charge of another task
assertThat(fs.exists(new Path(folder, "compacted-f3"))).isFalse();
assertThat(fs.exists(new Path(folder, "compacted-f6"))).isFalse();