class AlarmTaskExecutor extends FunctionTaskExecutor {

        private final AlarmRuleHandler handler;

        private Function<RuleData, Flux<AlarmRuleHandler.Result>> executor;

        private Config config;

        public AlarmTaskExecutor(ExecutionContext context, AlarmRuleHandler handler) {
            super("告警", context);
            this.handler = handler;
            reload();
        }

        @Override
        public String getName() {
            return config.getMode() == AlarmMode.relieve
                ? "解除告警" : "触发告警";
        }

        @Override
        protected Publisher<RuleData> apply(RuleData input) {
            return executor
                .apply(input)
                .doOnError(err -> log.warn("{} alarm error,rule:{}", config.mode, context.getInstanceId(), err))
                .map(result -> context.newRuleData(input.newData(result.toMap())));
        }

        @Override
        public void reload() {<FILL_FUNCTION_BODY>}
    }

            config = FastBeanCopier.copy(context.getJob().getConfiguration(), new Config());
            ValidatorUtils.tryValidate(config);
            if (config.mode == AlarmMode.relieve) {
                executor = input -> handler.relieved(context, input);
            } else {
                executor = input -> handler.triggered(context, input);
            }
        
<no_super_class>