diff options
| author | gujinkai <[email protected]> | 2023-10-19 16:35:19 +0800 |
|---|---|---|
| committer | gujinkai <[email protected]> | 2023-10-19 17:41:26 +0800 |
| commit | 1433281a3e1cac711d86398bc197fa6a63b6e00a (patch) | |
| tree | fa07bbbf02fa97a82f6c313c2fa34ddf7d0cc9f7 | |
| parent | b92c08372ba66ad8dc67cb857d9da80d79aa4571 (diff) | |
chore: modify some configurations
5 files changed, 14 insertions, 18 deletions
diff --git a/platform-base/src/main/java/com/zdjizhi/base/utils/FlinkEnvironmentUtils.java b/platform-base/src/main/java/com/zdjizhi/base/utils/FlinkEnvironmentUtils.java index 78a5bcc..9b524aa 100644 --- a/platform-base/src/main/java/com/zdjizhi/base/utils/FlinkEnvironmentUtils.java +++ b/platform-base/src/main/java/com/zdjizhi/base/utils/FlinkEnvironmentUtils.java @@ -22,22 +22,23 @@ public class FlinkEnvironmentUtils { static { streamExeEnv.setParallelism(CommonConfig.STREAM_EXECUTION_ENVIRONMENT_PARALLELISM); - //checkpoint配置 streamExeEnv.getConfig().enableObjectReuse(); + //checkpoint配置 switch (CommonConfig.FLINK_ENABLE_CHECKPOINT_FLAG) { case "0": break; case "1": - streamExeEnv.enableCheckpointing(CommonConfig.FLINK_ENABLE_CHECKPOINT_TIME * 1000); + streamExeEnv.enableCheckpointing(CommonConfig.FLINK_ENABLE_CHECKPOINT_TIME * 1000L); CheckpointConfig checkpointConfig = streamExeEnv.getCheckpointConfig(); checkpointConfig.setCheckpointingMode(CheckpointingMode.AT_LEAST_ONCE); - checkpointConfig.setMinPauseBetweenCheckpoints(CommonConfig.FLINK_MIN_PAUSE_BETWEEN_CHECKPOINTS * 1000); - checkpointConfig.setCheckpointTimeout(CommonConfig.FLINK_CHECKPOINT_TIMEOUT * 1000); + checkpointConfig.setMinPauseBetweenCheckpoints(CommonConfig.FLINK_MIN_PAUSE_BETWEEN_CHECKPOINTS * 1000L); + checkpointConfig.setCheckpointTimeout(CommonConfig.FLINK_CHECKPOINT_TIMEOUT * 1000L); checkpointConfig.setTolerableCheckpointFailureNumber(CommonConfig.FLINK_TOLERABLE_CHECKPOINT_FAILURE_NUMBER); checkpointConfig.setMaxConcurrentCheckpoints(CommonConfig.FLINK_MAX_CONCURRENT_CHECKPOINT); checkpointConfig.enableUnalignedCheckpoints(); + checkpointConfig.enableExternalizedCheckpoints(CheckpointConfig.ExternalizedCheckpointCleanup.RETAIN_ON_CANCELLATION); break; default: throw new IllegalArgumentException(); diff --git a/platform-schedule/src/main/resources/business.properties b/platform-schedule/src/main/resources/business.properties index 53dc405..0a3012a 100644 --- a/platform-schedule/src/main/resources/business.properties +++ b/platform-schedule/src/main/resources/business.properties @@ -2,4 +2,4 @@ cn.record.etl.class=com.zdjizhi.etl.CnRecordEtl cn.pre.metric.class=com.zdjizhi.pre.CnPreMetric cn.pre.relation.metric.class=com.zdjizhi.pre.relation.CnRelationMetric cn.dns.pre.metric.class=com.zdjizhi.pre.dns.DnsPreMetric -#cn.detection.indicator.class=com.zdjizhi.schedule.indicator.IndicatorSchedule
\ No newline at end of file +cn.detection.indicator.class=com.zdjizhi.schedule.indicator.IndicatorSchedule
\ No newline at end of file diff --git a/platform-schedule/src/main/resources/common.properties b/platform-schedule/src/main/resources/common.properties index d5edd4f..0c6cda6 100644 --- a/platform-schedule/src/main/resources/common.properties +++ b/platform-schedule/src/main/resources/common.properties @@ -41,20 +41,15 @@ output.sasl.jaas.config.flag=0 ############################## Flink checkpoint ?? ###################################### #????checkpoint,0:???;1:?? -flink.enable.checkpoint.flag=0 - +flink.enable.checkpoint.flag=1 #???? checkpoint ??,??:ms -flink.enable.checkpoint.time=300 - +flink.enable.checkpoint.time=60 #?? checkpoint ???????,??:ms -flink.min.pause.between.checkpoints=60 - +flink.min.pause.between.checkpoints=30 #?? checkpoint ????,??:ms -flink.checkpoint.timeout=120 - +flink.checkpoint.timeout=30 #??????? checkpoint ?? flink.tolerable.checkpoint.failure.number=2 - #????????? checkpoint ?? flink.max.concurrent.checkpoint=1 diff --git a/platform-schedule/src/main/resources/indicator-match.properties b/platform-schedule/src/main/resources/indicator-match.properties index e57461f..24d904e 100644 --- a/platform-schedule/src/main/resources/indicator-match.properties +++ b/platform-schedule/src/main/resources/indicator-match.properties @@ -1,5 +1,5 @@ -sink.kafka.topic=test +sink.kafka.topic=SECURITY-EVENT-CN sink.kafka.props.bootstrap.servers=192.168.44.55:9092 -rule.full.url=https://localhost/ -rule.inc.url=https://localhost/inc
\ No newline at end of file +rule.full.url=http://192.168.44.54:8090/v1/rule/detection +rule.inc.url=http://192.168.44.54:8090/v1/rule/detection/increase
\ No newline at end of file @@ -20,7 +20,7 @@ <properties> <flink.version>1.13.1</flink.version> - <zdjizhi.version>1.2</zdjizhi.version> + <zdjizhi.version>1.2.1</zdjizhi.version> <opencsv.version>3.3</opencsv.version> <scala.version>2.12</scala.version> <hadoop.version>2.7.1</hadoop.version> |
