限流时支持根据表达式忽略重要文件

This commit is contained in:
houjinchuan
2024-03-14 16:31:54 +08:00
parent 38e1049fa0
commit 0243e2b686
5 changed files with 44 additions and 18 deletions

View File

@@ -122,7 +122,7 @@ public class FileChunkCombinerTests {
@Test
public void testParseMessagePackMapFunction() throws Exception {
ParseMessagePackMapFunction mapFunction = new ParseMessagePackMapFunction(false, Long.MAX_VALUE);
ParseMessagePackMapFunction mapFunction = new ParseMessagePackMapFunction(false, Long.MAX_VALUE,"");
OneInputStreamOperatorTestHarness<byte[], FileChunk> testHarness = new OneInputStreamOperatorTestHarness<>(new StreamMap<>(mapFunction));
testHarness.setup();
testHarness.open();
@@ -617,7 +617,7 @@ public class FileChunkCombinerTests {
triggers.add(LastChunkOrNoDataInTimeTrigger.of(windowIdleTime * 1000));
Trigger<Object, TimeWindow> trigger = MultipleTrigger.of(triggers);
env.addSource(source)
.map(new ParseMessagePackMapFunction(false, Long.MAX_VALUE))
.map(new ParseMessagePackMapFunction(false, Long.MAX_VALUE,""))
.filter(new FileChunkFilterFunction(Long.MAX_VALUE, ""))
.assignTimestampsAndWatermarks(watermarkStrategy)
.keyBy(new FileChunkKeySelector(), BasicTypeInfo.STRING_TYPE_INFO)