Class ConfigValueChangeValidator
java.lang.Object
com.yahoo.vespa.model.application.validation.change.ConfigValueChangeValidator
- All Implemented Interfaces:
ChangeValidator
Compares the config instances in the current and next Vespa model to determine if some services will require restart.
The configs used by a given service is deduced from the
RestartConfigs
annotation.- Author:
- bjorncs
-
Constructor Summary
ConstructorDescriptionConfigValueChangeValidator
(com.yahoo.config.application.api.DeployLogger logger) -
Method Summary
Modifier and TypeMethodDescriptionStream<com.yahoo.config.model.api.ConfigChangeAction>
findConfigChangesFromModels
(AbstractConfigProducerRoot currentModel, AbstractConfigProducerRoot nextModel) List<com.yahoo.config.model.api.ConfigChangeAction>
validate
(VespaModel currentModel, VespaModel nextModel, com.yahoo.config.application.api.ValidationOverrides overrides, Instant now) Inspects the configuration in the new and old Vespa model to determine which services that require restart
-
Constructor Details
-
ConfigValueChangeValidator
public ConfigValueChangeValidator(com.yahoo.config.application.api.DeployLogger logger)
-
-
Method Details
-
validate
public List<com.yahoo.config.model.api.ConfigChangeAction> validate(VespaModel currentModel, VespaModel nextModel, com.yahoo.config.application.api.ValidationOverrides overrides, Instant now) Inspects the configuration in the new and old Vespa model to determine which services that require restart- Specified by:
validate
in interfaceChangeValidator
- Parameters:
currentModel
- the current active modelnextModel
- the next model we would like to activateoverrides
- validation overridesnow
- the instant to use as now- Returns:
- a list of actions specifying what needs to be done in order to activate the new model. Return an empty list if nothing needs to be done
-
findConfigChangesFromModels
public Stream<com.yahoo.config.model.api.ConfigChangeAction> findConfigChangesFromModels(AbstractConfigProducerRoot currentModel, AbstractConfigProducerRoot nextModel)
-