From 2c04b9a3fc4d948f4cb5fd909de1d062ad7edfdd Mon Sep 17 00:00:00 2001 From: Harald Musum Date: Mon, 22 Oct 2018 12:26:09 +0200 Subject: Revert "Balder/avoid caching stuff you already have access t" --- .../vespa/model/container/ContainerCluster.java | 19 +++++----- .../model/container/search/ContainerSearch.java | 43 +++++++++++++++------- .../container/search/searchchain/SearchChains.java | 23 ++++++++++-- .../model/container/xml/ContainerModelBuilder.java | 24 ++++++------ .../model/provision/ModelProvisioningTest.java | 4 +- .../model/container/ContainerClusterTest.java | 23 ++++++------ .../search/searchchain/SearchChainsTestBase.java | 4 +- 7 files changed, 87 insertions(+), 53 deletions(-) diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/ContainerCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/container/ContainerCluster.java index 502df074ec4..ec8db5faa05 100755 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/ContainerCluster.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/container/ContainerCluster.java @@ -33,6 +33,7 @@ import com.yahoo.container.logging.AccessLog; import com.yahoo.container.usability.BindingsOverviewHandler; import com.yahoo.document.config.DocumentmanagerConfig; import com.yahoo.jdisc.http.ServletPathsConfig; +import com.yahoo.lang.SettableOptional; import com.yahoo.metrics.simple.runtime.MetricProperties; import com.yahoo.osgi.provider.model.ComponentModel; import com.yahoo.prelude.semantics.SemanticRulesConfig; @@ -166,7 +167,7 @@ public final class ContainerCluster private final List serviceAliases = new ArrayList<>(); private final List endpointAliases = new ArrayList<>(); - private final ComponentGroup> componentGroup; + protected final ComponentGroup> componentGroup; private final ConfigProducerGroup restApiGroup; private final ConfigProducerGroup servletGroup; private final ContainerClusterVerifier clusterVerifier; @@ -180,8 +181,8 @@ public final class ContainerCluster /** The zone this is deployed in, or the default zone if not on hosted Vespa */ private Zone zone; - private String hostClusterId = null; - private Integer memoryPercentage = null; + private Optional hostClusterId = Optional.empty(); + private final SettableOptional memoryPercentage = new SettableOptional<>(); private static class AcceptAllVerifier implements ContainerClusterVerifier { @Override @@ -325,7 +326,7 @@ public final class ContainerCluster return componentGroup.removeComponent(componentId); } - private void addSimpleComponent(Class clazz) { + public void addSimpleComponent(Class clazz) { addSimpleComponent(clazz.getName()); } @@ -412,7 +413,7 @@ public final class ContainerCluster addComponent(processingHandler); } - ProcessingChains getProcessingChains() { + public ProcessingChains getProcessingChains() { return processingChains; } @@ -774,22 +775,22 @@ public final class ContainerCluster /** The configured endpoint aliases (fqdn) for the service in this cluster */ public List endpointAliases() { return endpointAliases; } - public void setHostClusterId(String clusterId) { hostClusterId = clusterId; } + public void setHostClusterId(String clusterId) { hostClusterId = Optional.ofNullable(clusterId); } /** * Returns the id of the content cluster which hosts this container cluster, if any. * This is only set with hosted clusters where this container cluster is set up to run on the nodes * of a content cluster. */ - public Optional getHostClusterId() { return Optional.ofNullable(hostClusterId); } + public Optional getHostClusterId() { return hostClusterId; } - public void setMemoryPercentage(Integer memoryPercentage) { this.memoryPercentage = memoryPercentage; } + public void setMemoryPercentage(Optional memoryPercentage) { this.memoryPercentage.set(memoryPercentage); } /** * Returns the percentage of host physical memory this application has specified for nodes in this cluster, * or empty if this is not specified by the application. */ - public Optional getMemoryPercentage() { return Optional.ofNullable(memoryPercentage); } + public SettableOptional getMemoryPercentage() { return memoryPercentage; } boolean messageBusEnabled() { return messageBusEnabled; } diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/search/ContainerSearch.java b/config-model/src/main/java/com/yahoo/vespa/model/container/search/ContainerSearch.java index 2cfd4b067cd..227deca959f 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/search/ContainerSearch.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/container/search/ContainerSearch.java @@ -1,7 +1,10 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.model.container.search; +import com.yahoo.binaryprefix.BinaryPrefix; +import com.yahoo.binaryprefix.BinaryScaledAmount; import com.yahoo.container.bundle.BundleInstantiationSpecification; +import com.yahoo.lang.SettableOptional; import com.yahoo.osgi.provider.model.ComponentModel; import com.yahoo.prelude.fastsearch.FS4ResourcePool; import com.yahoo.prelude.semantics.SemanticRulesConfig; @@ -11,21 +14,15 @@ import com.yahoo.vespa.model.container.component.ContainerSubsystem; import com.yahoo.vespa.model.container.search.searchchain.HttpProvider; import com.yahoo.vespa.model.container.search.searchchain.LocalProvider; import com.yahoo.vespa.model.container.search.searchchain.SearchChains; +import com.yahoo.vespa.model.search.*; import com.yahoo.search.config.IndexInfoConfig; import com.yahoo.search.config.QrStartConfig; import com.yahoo.vespa.configdefinition.IlscriptsConfig; import com.yahoo.container.QrSearchersConfig; import com.yahoo.search.query.profile.config.QueryProfilesConfig; import com.yahoo.search.pagetemplates.PageTemplatesConfig; -import com.yahoo.vespa.model.search.AbstractSearchCluster; -import com.yahoo.vespa.model.search.Dispatch; -import com.yahoo.vespa.model.search.IndexedSearchCluster; -import com.yahoo.vespa.model.search.StreamingSearchCluster; -import java.util.LinkedHashMap; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; +import java.util.*; /** * @author gjoranv @@ -44,15 +41,20 @@ public class ContainerSearch extends ContainerSubsystem private final List systems = new LinkedList<>(); private final Options options; + // For legacy qrs clusters only. + private BinaryScaledAmount totalCacheSize = new BinaryScaledAmount(); + private QueryProfiles queryProfiles; private SemanticRules semanticRules; private PageTemplates pageTemplates; private final ContainerCluster owningCluster; + private final SettableOptional memoryPercentage; public ContainerSearch(ContainerCluster cluster, SearchChains chains, Options options) { super(chains); this.options = options; this.owningCluster = cluster; + this.memoryPercentage = cluster.getMemoryPercentage(); cluster.addComponent(getFS4ResourcePool()); } @@ -69,7 +71,7 @@ public class ContainerSearch extends ContainerSubsystem // public for testing public void initializeSearchChains(Map searchClusters) { - getChains().initialize(searchClusters); + getChains().initialize(searchClusters, totalCacheSize); QrsCache defaultCacheOptions = getOptions().cacheSettings.get(""); if (defaultCacheOptions != null) { @@ -86,6 +88,10 @@ public class ContainerSearch extends ContainerSubsystem } } + public void setTotalCacheSize(BinaryScaledAmount totalCacheSize) { + this.totalCacheSize = totalCacheSize; + } + public void setQueryProfiles(QueryProfiles queryProfiles) { this.queryProfiles = queryProfiles; } @@ -116,16 +122,24 @@ public class ContainerSearch extends ContainerSubsystem @Override public void getConfig(QrStartConfig.Builder qsB) { QrStartConfig.Jvm.Builder internalBuilder = new QrStartConfig.Jvm.Builder(); - if (owningCluster.getMemoryPercentage().isPresent()) { - internalBuilder.heapSizeAsPercentageOfPhysicalMemory(owningCluster.getMemoryPercentage().get()); - } else if (owningCluster.isHostedVespa()) { - internalBuilder.heapSizeAsPercentageOfPhysicalMemory(owningCluster.getHostClusterId().isPresent() ? 17 : 60); + if (memoryPercentage.isPresent()) { + internalBuilder.heapSizeAsPercentageOfPhysicalMemory(memoryPercentage.get()); + } + else if (owningCluster.isHostedVespa()) { + if (owningCluster.getHostClusterId().isPresent()) + internalBuilder.heapSizeAsPercentageOfPhysicalMemory(17); + else + internalBuilder.heapSizeAsPercentageOfPhysicalMemory(60); } qsB.jvm(internalBuilder.directMemorySizeCache(totalCacheSizeMb())); } private int totalCacheSizeMb() { - return totalHttpProviderCacheSize(); + if (!totalCacheSize.equals(new BinaryScaledAmount())) { + return (int) totalCacheSize.as(BinaryPrefix.mega); + } else { + return totalHttpProviderCacheSize(); + } } private int totalHttpProviderCacheSize() { @@ -187,6 +201,7 @@ public class ContainerSearch extends ContainerSubsystem public Options getOptions() { return options; } + public Optional getMemoryPercentage() { return memoryPercentage.asOptional(); } /** * Struct that encapsulates qrserver options. diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/search/searchchain/SearchChains.java b/config-model/src/main/java/com/yahoo/vespa/model/container/search/searchchain/SearchChains.java index 42d81e19496..c5913528435 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/search/searchchain/SearchChains.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/container/search/searchchain/SearchChains.java @@ -1,6 +1,7 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.model.container.search.searchchain; +import com.yahoo.binaryprefix.BinaryScaledAmount; import com.yahoo.collections.CollectionUtil; import com.yahoo.component.provider.ComponentRegistry; import com.yahoo.config.model.producer.AbstractConfigProducer; @@ -25,19 +26,33 @@ public class SearchChains extends Chains { super(parent, subId); } - public void initialize(Map searchClustersByName) { + public void initialize(Map searchClustersByName, BinaryScaledAmount totalProviderCacheSize) { LocalClustersCreator.addDefaultLocalProviders(this, searchClustersByName.keySet()); VespaSearchChainsCreator.addVespaSearchChains(this); validateSourceGroups(); //must be done before initializing searchers since they are used by FederationSearchers. - initializeComponents(searchClustersByName); + initializeComponents(searchClustersByName, totalProviderCacheSize); } - private void initializeComponents(Map searchClustersByName) { + private void initializeComponents(Map searchClustersByName, + BinaryScaledAmount totalProviderCacheSize) { setSearchClusterForLocalProvider(searchClustersByName); + setCacheSizeForHttpProviders(totalProviderCacheSize); initializeComponents(); } + private void setCacheSizeForHttpProviders(BinaryScaledAmount totalProviderCacheSize) { + double totalCacheWeight = 0; + for (HttpProvider provider : httpProviders()) { + totalCacheWeight += provider.getCacheWeight(); + } + + final BinaryScaledAmount cacheUnit = totalProviderCacheSize.divide(totalCacheWeight); + for (HttpProvider provider : httpProviders()) { + provider.setCacheSize(cacheUnit.multiply(provider.getCacheWeight())); + } + } + private void setSearchClusterForLocalProvider(Map clusterIndexByName) { for (LocalProvider provider : localProviders()) { AbstractSearchCluster cluster = clusterIndexByName.get(provider.getClusterName()); @@ -66,7 +81,7 @@ public class SearchChains extends Chains { super.validate(); } - SourceGroupRegistry allSourceGroups() { + public SourceGroupRegistry allSourceGroups() { return sourceGroups; } diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java b/config-model/src/main/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java index 89f2995d179..80026d0182e 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java @@ -136,7 +136,7 @@ public class ContainerModelBuilder extends ConfigModelBuilder { model.setCluster(cluster); } - private void addBundlesForPlatformComponents(ContainerCluster cluster) { + protected void addBundlesForPlatformComponents(ContainerCluster cluster) { for (Component component : cluster.getAllComponents()) { String componentClass = component.model.bundleInstantiationSpec.getClassName(); BundleMapper.getBundlePath(componentClass). @@ -252,15 +252,15 @@ public class ContainerModelBuilder extends ConfigModelBuilder { addConfiguredComponents(deployState, cluster, spec, "component"); } - private void setDefaultMetricConsumerFactory(ContainerCluster cluster) { + protected void setDefaultMetricConsumerFactory(ContainerCluster cluster) { cluster.setDefaultMetricConsumerFactory(MetricDefaultsConfig.Factory.Enum.STATE_MONITOR); } - private void addDefaultHandlers(ContainerCluster cluster) { + protected void addDefaultHandlers(ContainerCluster cluster) { addDefaultHandlersExceptStatus(cluster); } - private void addStatusHandlers(ContainerCluster cluster, ConfigModelContext configModelContext) { + protected void addStatusHandlers(ContainerCluster cluster, ConfigModelContext configModelContext) { if (configModelContext.getDeployState().isHosted()) { String name = "status.html"; Optional statusFile = Optional.ofNullable(System.getenv(HOSTED_VESPA_STATUS_FILE_INSTALL_SETTING)); @@ -281,7 +281,7 @@ public class ContainerModelBuilder extends ConfigModelBuilder { cluster.addVipHandler(); } - private static void addDefaultHandlersExceptStatus(ContainerCluster cluster) { + protected static void addDefaultHandlersExceptStatus(ContainerCluster cluster) { cluster.addDefaultRootHandler(); cluster.addMetricStateHandler(); cluster.addApplicationStatusHandler(); @@ -313,7 +313,7 @@ public class ContainerModelBuilder extends ConfigModelBuilder { return components; } - private void addAccessLogs(DeployState deployState, ContainerCluster cluster, Element spec) { + protected void addAccessLogs(DeployState deployState, ContainerCluster cluster, Element spec) { List accessLogElements = getAccessLogElements(spec); for (Element accessLog : accessLogElements) { @@ -324,12 +324,12 @@ public class ContainerModelBuilder extends ConfigModelBuilder { cluster.addDefaultSearchAccessLog(); } - private List getAccessLogElements(Element spec) { + protected final List getAccessLogElements(Element spec) { return XML.getChildren(spec, "accesslog"); } - private void addHttp(DeployState deployState, Element spec, ContainerCluster cluster) { + protected final void addHttp(DeployState deployState, Element spec, ContainerCluster cluster) { Element httpElement = XML.getChild(spec, "http"); if (httpElement != null) { cluster.setHttp(buildHttp(deployState, cluster, httpElement)); @@ -345,7 +345,7 @@ public class ContainerModelBuilder extends ConfigModelBuilder { return http; } - private void addRestApis(DeployState deployState, Element spec, ContainerCluster cluster) { + protected void addRestApis(DeployState deployState, Element spec, ContainerCluster cluster) { for (Element restApiElem : XML.getChildren(spec, "rest-api")) { cluster.addRestApi( new RestApiBuilder().build(deployState, cluster, restApiElem)); @@ -505,7 +505,7 @@ public class ContainerModelBuilder extends ConfigModelBuilder { memoryPercentage = memoryPercentage.substring(0, memoryPercentage.length()-1).trim(); try { - cluster.setMemoryPercentage(Integer.parseInt(memoryPercentage)); + cluster.setMemoryPercentage(Optional.of(Integer.parseInt(memoryPercentage))); } catch (NumberFormatException e) { throw new IllegalArgumentException("The memory percentage given for nodes in " + cluster + @@ -758,13 +758,13 @@ public class ContainerModelBuilder extends ConfigModelBuilder { } } - private static void addConfiguredComponents(DeployState deployState, ContainerCluster cluster, Element spec, String componentName) { + public static void addConfiguredComponents(DeployState deployState, ContainerCluster cluster, Element spec, String componentName) { for (Element node : XML.getChildren(spec, componentName)) { cluster.addComponent(new DomComponentBuilder().build(deployState, cluster, node)); } } - private static void validateAndAddConfiguredComponents(DeployState deployState, ContainerCluster cluster, Element spec, String componentName, Consumer elementValidator) { + public static void validateAndAddConfiguredComponents(DeployState deployState, ContainerCluster cluster, Element spec, String componentName, Consumer elementValidator) { for (Element node : XML.getChildren(spec, componentName)) { elementValidator.accept(node); // throws exception here if something is wrong cluster.addComponent(new DomComponentBuilder().build(deployState, cluster, node)); diff --git a/config-model/src/test/java/com/yahoo/config/model/provision/ModelProvisioningTest.java b/config-model/src/test/java/com/yahoo/config/model/provision/ModelProvisioningTest.java index 4a9a6d3dff3..d4a11052a71 100644 --- a/config-model/src/test/java/com/yahoo/config/model/provision/ModelProvisioningTest.java +++ b/config-model/src/test/java/com/yahoo/config/model/provision/ModelProvisioningTest.java @@ -132,13 +132,13 @@ public class ModelProvisioningTest { assertThat(model.getContainerClusters().get("mydisc").getContainers().get(0).getPreLoad(), is(getDefaults().underVespaHome("lib64/vespa/malloc/libvespamalloc.so"))); assertThat(model.getContainerClusters().get("mydisc").getContainers().get(1).getPreLoad(), is(getDefaults().underVespaHome("lib64/vespa/malloc/libvespamalloc.so"))); assertThat(model.getContainerClusters().get("mydisc").getContainers().get(2).getPreLoad(), is(getDefaults().underVespaHome("lib64/vespa/malloc/libvespamalloc.so"))); - assertThat(model.getContainerClusters().get("mydisc").getMemoryPercentage(), is(Optional.empty())); + assertThat(model.getContainerClusters().get("mydisc").getMemoryPercentage().asOptional(), is(Optional.empty())); assertThat(model.getContainerClusters().get("mydisc2").getContainers().get(0).getJvmArgs(), is("-verbosegc")); assertThat(model.getContainerClusters().get("mydisc2").getContainers().get(1).getJvmArgs(), is("-verbosegc")); assertThat(model.getContainerClusters().get("mydisc2").getContainers().get(0).getPreLoad(), is("lib/blablamalloc.so")); assertThat(model.getContainerClusters().get("mydisc2").getContainers().get(1).getPreLoad(), is("lib/blablamalloc.so")); - assertThat(model.getContainerClusters().get("mydisc2").getMemoryPercentage(), is(Optional.of(45))); + assertThat(model.getContainerClusters().get("mydisc2").getMemoryPercentage().asOptional(), is(Optional.of(45))); QrStartConfig.Builder qrStartBuilder = new QrStartConfig.Builder(); model.getContainerClusters().get("mydisc2").getConfig(qrStartBuilder); QrStartConfig qrsStartConfig = new QrStartConfig(qrStartBuilder); diff --git a/config-model/src/test/java/com/yahoo/vespa/model/container/ContainerClusterTest.java b/config-model/src/test/java/com/yahoo/vespa/model/container/ContainerClusterTest.java index 8e096b14d85..6067494dec9 100755 --- a/config-model/src/test/java/com/yahoo/vespa/model/container/ContainerClusterTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/container/ContainerClusterTest.java @@ -89,7 +89,7 @@ public class ContainerClusterTest { } private ContainerCluster createContainerCluster(MockRoot root, boolean isCombinedCluster) { - return createContainerCluster(root, isCombinedCluster, null, Optional.empty()); + return createContainerCluster(root, isCombinedCluster, Optional.empty(), Optional.empty()); } private ContainerCluster createClusterControllerCluster(MockRoot root) { @@ -97,10 +97,11 @@ public class ContainerClusterTest { } private ContainerCluster createContainerCluster(MockRoot root, boolean isCombinedCluster, ContainerClusterVerifier extraComponents) { - return createContainerCluster(root, isCombinedCluster, null, Optional.of(extraComponents)); + return createContainerCluster(root, isCombinedCluster, Optional.empty(), Optional.of(extraComponents)); } - private ContainerCluster createContainerCluster(MockRoot root, boolean isCombinedCluster, Integer memoryPercentage) { + private ContainerCluster createContainerCluster(MockRoot root, boolean isCombinedCluster, + Optional memoryPercentage) { return createContainerCluster(root, isCombinedCluster, memoryPercentage, Optional.empty()); } private MockRoot createRoot(boolean isHosted) { @@ -108,7 +109,7 @@ public class ContainerClusterTest { return new MockRoot("foo", state); } private ContainerCluster createContainerCluster(MockRoot root, boolean isCombinedCluster, - Integer memoryPercentage, Optional extraComponents) { + Optional memoryPercentage, Optional extraComponents) { ContainerCluster cluster = extraComponents.isPresent() ? new ContainerCluster(root, "container0", "container1", extraComponents.get(), root.getDeployState()) @@ -120,7 +121,7 @@ public class ContainerClusterTest { return cluster; } private void verifyHeapSizeAsPercentageOfPhysicalMemory(boolean isHosted, boolean isCombinedCluster, - Integer explicitMemoryPercentage, + Optional explicitMemoryPercentage, int expectedMemoryPercentage) { ContainerCluster cluster = createContainerCluster(createRoot(isHosted), isCombinedCluster, explicitMemoryPercentage); QrStartConfig.Builder qsB = new QrStartConfig.Builder(); @@ -133,14 +134,14 @@ public class ContainerClusterTest { public void requireThatHeapSizeAsPercentageOfPhysicalMemoryForHostedAndNot() { boolean hosted = true; boolean combined = true; // a cluster running on content nodes (only relevant with hosted) - verifyHeapSizeAsPercentageOfPhysicalMemory( hosted, ! combined, null, 60); - verifyHeapSizeAsPercentageOfPhysicalMemory( hosted, combined, null, 17); - verifyHeapSizeAsPercentageOfPhysicalMemory(! hosted, ! combined, null, 0); + verifyHeapSizeAsPercentageOfPhysicalMemory( hosted, ! combined, Optional.empty(), 60); + verifyHeapSizeAsPercentageOfPhysicalMemory( hosted, combined, Optional.empty(), 17); + verifyHeapSizeAsPercentageOfPhysicalMemory(! hosted, ! combined, Optional.empty(), 0); // Explicit value overrides all defaults - verifyHeapSizeAsPercentageOfPhysicalMemory( hosted, ! combined, 67, 67); - verifyHeapSizeAsPercentageOfPhysicalMemory( hosted, combined, 68, 68); - verifyHeapSizeAsPercentageOfPhysicalMemory(! hosted, ! combined, 69, 69); + verifyHeapSizeAsPercentageOfPhysicalMemory( hosted, ! combined, Optional.of(67), 67); + verifyHeapSizeAsPercentageOfPhysicalMemory( hosted, combined, Optional.of(68), 68); + verifyHeapSizeAsPercentageOfPhysicalMemory(! hosted, ! combined, Optional.of(69), 69); } private void verifyJvmArgs(boolean isHosted, boolean hasDocproc, String expectedArgs, String jvmArgs) { diff --git a/config-model/src/test/java/com/yahoo/vespa/model/container/search/searchchain/SearchChainsTestBase.java b/config-model/src/test/java/com/yahoo/vespa/model/container/search/searchchain/SearchChainsTestBase.java index 51a8333ef6e..9f7cbfd9a5b 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/container/search/searchchain/SearchChainsTestBase.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/container/search/searchchain/SearchChainsTestBase.java @@ -1,6 +1,7 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.model.container.search.searchchain; +import com.yahoo.binaryprefix.BinaryPrefix; import com.yahoo.binaryprefix.BinaryScaledAmount; import com.yahoo.config.model.builder.xml.test.DomBuilderTest; import com.yahoo.vespa.model.builder.xml.dom.chains.search.DomSearchChainsBuilder; @@ -15,7 +16,8 @@ public abstract class SearchChainsTestBase extends DomBuilderTest { @Before public void setupSearchChains() { SearchChains searchChains = new DomSearchChainsBuilder().build(root.getDeployState(), root, servicesXml()); - searchChains.initialize(MockSearchClusters.twoMockClusterSpecsByName(root)); + searchChains.initialize(MockSearchClusters.twoMockClusterSpecsByName(root), + new BinaryScaledAmount(100, BinaryPrefix.mega)); root.freezeModelTopology(); } -- cgit v1.2.3