use of org.apache.flink.kubernetes.operator.validation.DefaultValidator in project flink-kubernetes-operator by apache.
the class ValidatorUtils method discoverValidators.
public static Set<FlinkResourceValidator> discoverValidators(FlinkConfigManager configManager) {
Set<FlinkResourceValidator> resourceValidators = new HashSet<>();
DefaultValidator defaultValidator = new DefaultValidator(configManager);
defaultValidator.configure(configManager.getDefaultConfig());
resourceValidators.add(defaultValidator);
PluginUtils.createPluginManagerFromRootFolder(configManager.getDefaultConfig()).load(FlinkResourceValidator.class).forEachRemaining(validator -> {
LOG.info("Discovered resource validator from plugin directory[{}]: {}.", System.getenv().getOrDefault(ConfigConstants.ENV_FLINK_PLUGINS_DIR, ConfigConstants.DEFAULT_FLINK_PLUGINS_DIRS), validator.getClass().getName());
validator.configure(configManager.getDefaultConfig());
resourceValidators.add(validator);
});
return resourceValidators;
}
Aggregations