Skip to content

Commit

Permalink
[flink] fix
Browse files Browse the repository at this point in the history
  • Loading branch information
LinMingQiang committed Nov 26, 2024
1 parent d7e2290 commit 9c959d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,13 @@ public void processElement(StreamRecord<RowData> element) throws Exception {

if (write.streamingMode()) {
write.notifyNewFiles(snapshotId, partition, bucket, files);
// The full compact is not supported in streaming mode.
write.compact(partition, bucket, false);
} else {
Preconditions.checkArgument(
files.isEmpty(),
"Batch compact job does not concern what files are compacted. "
+ "They only need to know what buckets are compacted.");
// `minor` compact strategy is supported in batch mode.
write.compact(partition, bucket, fullCompaction);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,6 @@ public void testStreamingFullCompactStrategy() throws Exception {
streamExecutionEnvironmentBuilder().streamingMode().build();
Assertions.assertThatThrownBy(() -> action.withStreamExecutionEnvironment(env).build())
.hasMessage(
"full compact strategy is only supported in batch mode. Please add -Dexecution.runtime-mode=BATCH.");
"The full compact strategy is only supported in batch mode. Please add -Dexecution.runtime-mode=BATCH.");
}
}

0 comments on commit 9c959d0

Please sign in to comment.