use of com.yahoo.vespa.model.application.validation.ConstantTensorJsonValidator.InvalidConstantTensor in project vespa by vespa-engine.
the class RankingConstantsValidator method validate.
@Override
public void validate(VespaModel model, DeployState deployState) {
ApplicationPackage applicationPackage = deployState.getApplicationPackage();
ExceptionMessageCollector exceptionMessageCollector = new ExceptionMessageCollector("Invalid constant tensor file(s):");
for (SearchDefinition sd : deployState.getSearchDefinitions()) {
for (RankingConstant rc : sd.getSearch().getRankingConstants().values()) {
try {
validateRankingConstant(rc, applicationPackage);
} catch (InvalidConstantTensor | FileNotFoundException ex) {
exceptionMessageCollector.add(ex, rc.getName(), rc.getFileName());
}
}
}
if (exceptionMessageCollector.exceptionsOccurred) {
throw new TensorValidationFailed(exceptionMessageCollector.combinedMessage);
}
}
Aggregations