use of com.yahoo.vespa.config.server.monitoring.MetricUpdater in project vespa by vespa-engine.
the class ActivatedModelsBuilder method buildModelVersion.
@Override
protected Application buildModelVersion(ModelFactory modelFactory, ApplicationPackage applicationPackage, ApplicationId applicationId, com.yahoo.component.Version wantedNodeVespaVersion, // Ignored since we have this in the app package for activated models
Optional<AllocatedHosts> ignored, Instant now) {
log.log(LogLevel.DEBUG, String.format("Loading model version %s for session %s application %s", modelFactory.getVersion(), appGeneration, applicationId));
ServerCache cache = zkClient.loadServerCache();
ModelContext modelContext = new ModelContextImpl(applicationPackage, Optional.empty(), permanentApplicationPackage.get().applicationPackage(), logger, configDefinitionRepo, getForVersionOrLatest(applicationPackage.getFileRegistryMap(), modelFactory.getVersion()).orElse(new MockFileRegistry()), createStaticProvisioner(applicationPackage.getAllocatedHosts()), createModelContextProperties(applicationId), Optional.empty(), new com.yahoo.component.Version(modelFactory.getVersion().toString()), wantedNodeVespaVersion);
MetricUpdater applicationMetricUpdater = metrics.getOrCreateMetricUpdater(Metrics.createDimensions(applicationId));
return new Application(modelFactory.createModel(modelContext), cache, appGeneration, modelFactory.getVersion(), applicationMetricUpdater, applicationId);
}
use of com.yahoo.vespa.config.server.monitoring.MetricUpdater in project vespa by vespa-engine.
the class ApplicationTest method setupHandler.
@Before
public void setupHandler() throws IOException, SAXException {
File testApp = new File("src/test/apps/app");
ServerCache cache = createCacheAndAddContent();
VespaModel model = new VespaModel(FilesApplicationPackage.fromFile(testApp));
final ApplicationId applicationId = new ApplicationId.Builder().tenant("foo").applicationName("foo").build();
handler = new Application(model, cache, 1, Version.fromIntValues(1, 2, 3), new MetricUpdater(Metrics.createTestMetrics(), Metrics.createDimensions(applicationId)), applicationId);
}
Aggregations