fix:fixed the problem of reporting NoClass in session mode

This commit is contained in:
wangchengcheng
2024-01-23 18:12:25 +08:00
parent 62bffa9731
commit 046b7fea80
4 changed files with 42 additions and 14 deletions

View File

@@ -255,5 +255,10 @@ public class DosConfigs {
.longType()
.defaultValue(60L);
public static final ConfigOption<String> JOB_NAME =
ConfigOptions.key("job.name")
.stringType()
.defaultValue("detection_dos_attack")
.withDescription("The flink job name.");
}

View File

@@ -79,6 +79,6 @@ public class DosDetectionApplication {
.addSink(KafkaProducer.getKafkaProducer(config.get(KAFKA_SINK_METRIC_TOPIC), DosConfiguration.getProperties(SINK_KAFKA_PROPERTIES_PREFIX)))
.setParallelism(config.get(KAFKA_SINK_METRIC_PARALLELISM));
env.execute(args[0]);
env.execute(config.get(JOB_NAME));
}
}