aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/admin/clustercontroller/ClusterControllerClusterVerifier.java35
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/admin/clustercontroller/ClusterControllerContainerCluster.java7
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomAdminV2Builder.java6
-rwxr-xr-xconfig-model/src/main/java/com/yahoo/vespa/model/container/ContainerCluster.java50
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/container/ContainerClusterImpl.java13
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/container/ContainerClusterVerifier.java34
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/container/ContainerImpl.java7
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java9
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/content/cluster/ContentCluster.java8
-rwxr-xr-xconfig-model/src/test/java/com/yahoo/vespa/model/container/ContainerClusterTest.java32
10 files changed, 17 insertions, 184 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/admin/clustercontroller/ClusterControllerClusterVerifier.java b/config-model/src/main/java/com/yahoo/vespa/model/admin/clustercontroller/ClusterControllerClusterVerifier.java
deleted file mode 100644
index 4edfab6d738..00000000000
--- a/config-model/src/main/java/com/yahoo/vespa/model/admin/clustercontroller/ClusterControllerClusterVerifier.java
+++ /dev/null
@@ -1,35 +0,0 @@
-// 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.admin.clustercontroller;
-
-import com.yahoo.component.ComponentSpecification;
-import com.yahoo.container.handler.ThreadpoolConfig;
-import com.yahoo.vespa.model.container.Container;
-import com.yahoo.vespa.model.container.ContainerCluster;
-import com.yahoo.vespa.model.container.ContainerClusterVerifier;
-import com.yahoo.vespa.model.container.component.Component;
-import com.yahoo.vespa.model.container.component.SimpleComponent;
-
-import java.util.Collections;
-import java.util.Set;
-
-/**
- * @author baldersheim
- * Verifies that all containers added are ClusterControllerContainers and that filters away Linguistics components.
- */
-public class ClusterControllerClusterVerifier implements ContainerClusterVerifier {
- static final Set<ComponentSpecification> unwantedComponents = Collections.singleton(new SimpleComponent(ContainerCluster.DEFAULT_LINGUISTICS_PROVIDER).getClassId());
- @Override
- public boolean acceptComponent(Component component) {
- return ! unwantedComponents.contains(component.getClassId());
- }
-
- @Override
- public boolean acceptContainer(Container container) {
- return container instanceof ClusterControllerContainer;
- }
-
- @Override
- public void getConfig(ThreadpoolConfig.Builder builder) {
- builder.maxthreads(10);
- }
-}
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/admin/clustercontroller/ClusterControllerContainerCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/admin/clustercontroller/ClusterControllerContainerCluster.java
index 0917941bfc3..096189cabfe 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/admin/clustercontroller/ClusterControllerContainerCluster.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/admin/clustercontroller/ClusterControllerContainerCluster.java
@@ -1,10 +1,10 @@
+// Copyright 2019 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.model.admin.clustercontroller;
import com.yahoo.config.model.deploy.DeployState;
import com.yahoo.config.model.producer.AbstractConfigProducer;
import com.yahoo.container.handler.ThreadpoolConfig;
import com.yahoo.vespa.model.container.ContainerCluster;
-import com.yahoo.vespa.model.container.ContainerClusterVerifier;
/**
* Container cluster for cluster-controller containers.
@@ -14,15 +14,10 @@ import com.yahoo.vespa.model.container.ContainerClusterVerifier;
public class ClusterControllerContainerCluster extends ContainerCluster<ClusterControllerContainer> implements
ThreadpoolConfig.Producer
{
-
public ClusterControllerContainerCluster(AbstractConfigProducer<?> parent, String subId, String name, DeployState deployState) {
super(parent, subId, name, deployState);
}
- public ClusterControllerContainerCluster(AbstractConfigProducer<?> parent, String subId, String name, ContainerClusterVerifier verifier, DeployState deployState) {
- super(parent, subId, name, verifier, deployState);
- }
-
@Override
public void getConfig(ThreadpoolConfig.Builder builder) {
builder.maxthreads(10);
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomAdminV2Builder.java b/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomAdminV2Builder.java
index 85917197aca..85111b9bae3 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomAdminV2Builder.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomAdminV2Builder.java
@@ -15,12 +15,8 @@ import com.yahoo.vespa.model.admin.Logserver;
import com.yahoo.vespa.model.admin.Slobrok;
import com.yahoo.vespa.model.admin.clustercontroller.ClusterControllerCluster;
import com.yahoo.vespa.model.admin.clustercontroller.ClusterControllerContainer;
-import com.yahoo.vespa.model.admin.clustercontroller.ClusterControllerClusterVerifier;
import com.yahoo.vespa.model.admin.clustercontroller.ClusterControllerContainerCluster;
import com.yahoo.vespa.model.builder.xml.dom.VespaDomBuilder.DomConfigProducerBuilder;
-import com.yahoo.vespa.model.container.Container;
-import com.yahoo.vespa.model.container.ContainerCluster;
-import com.yahoo.vespa.model.container.ContainerClusterImpl;
import com.yahoo.vespa.model.container.xml.ContainerModelBuilder;
import org.w3c.dom.Element;
@@ -99,7 +95,7 @@ public class DomAdminV2Builder extends DomAdminBuilderBase {
var cluster = new ClusterControllerContainerCluster(parent,
"cluster-controllers",
"cluster-controllers",
- new ClusterControllerClusterVerifier(), deployState);
+ deployState);
ContainerModelBuilder.addDefaultHandler_legacyBuilder(cluster);
List<ClusterControllerContainer> containers = new ArrayList<>();
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 2f109d287cd..b09080600a4 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
@@ -6,9 +6,7 @@ import com.yahoo.cloud.config.ConfigserverConfig;
import com.yahoo.cloud.config.RoutingProviderConfig;
import com.yahoo.component.ComponentId;
import com.yahoo.component.ComponentSpecification;
-import com.yahoo.config.FileReference;
import com.yahoo.config.application.api.ApplicationMetaData;
-import com.yahoo.config.application.api.ComponentInfo;
import com.yahoo.config.docproc.DocprocConfig;
import com.yahoo.config.docproc.SchemamappingConfig;
import com.yahoo.config.model.ApplicationConfigProducerRoot;
@@ -22,7 +20,6 @@ import com.yahoo.container.bundle.BundleInstantiationSpecification;
import com.yahoo.container.core.ApplicationMetadataConfig;
import com.yahoo.container.core.document.ContainerDocumentConfig;
import com.yahoo.container.handler.ThreadPoolProvider;
-import com.yahoo.container.handler.ThreadpoolConfig;
import com.yahoo.container.jdisc.ContainerMbusConfig;
import com.yahoo.container.jdisc.JdiscBindingsConfig;
import com.yahoo.container.jdisc.config.HealthMonitorConfig;
@@ -38,8 +35,6 @@ import com.yahoo.search.config.IndexInfoConfig;
import com.yahoo.search.config.QrStartConfig;
import com.yahoo.search.pagetemplates.PageTemplatesConfig;
import com.yahoo.search.query.profile.config.QueryProfilesConfig;
-import com.yahoo.vespa.config.search.RankProfilesConfig;
-import com.yahoo.vespa.config.search.core.RankingConstantsConfig;
import com.yahoo.vespa.configdefinition.IlscriptsConfig;
import com.yahoo.vespa.model.PortsMeta;
import com.yahoo.vespa.model.Service;
@@ -49,25 +44,20 @@ import com.yahoo.vespa.model.container.component.AccessLogComponent;
import com.yahoo.vespa.model.container.component.Component;
import com.yahoo.vespa.model.container.component.ComponentGroup;
import com.yahoo.vespa.model.container.component.ComponentsConfigGenerator;
-import com.yahoo.vespa.model.container.component.ConfigProducerGroup;
import com.yahoo.vespa.model.container.component.DiscBindingsConfigGenerator;
import com.yahoo.vespa.model.container.component.FileStatusHandlerComponent;
import com.yahoo.vespa.model.container.component.Handler;
-import com.yahoo.vespa.model.container.component.Servlet;
import com.yahoo.vespa.model.container.component.SimpleComponent;
import com.yahoo.vespa.model.container.component.StatisticsComponent;
import com.yahoo.vespa.model.container.component.chain.ProcessingHandler;
import com.yahoo.vespa.model.container.docproc.ContainerDocproc;
import com.yahoo.vespa.model.container.docproc.DocprocChains;
import com.yahoo.vespa.model.container.http.Http;
-import com.yahoo.vespa.model.container.jersey.Jersey2Servlet;
-import com.yahoo.vespa.model.container.jersey.RestApi;
import com.yahoo.vespa.model.container.processing.ProcessingChains;
import com.yahoo.vespa.model.container.search.ContainerSearch;
import com.yahoo.vespa.model.container.search.searchchain.SearchChains;
import com.yahoo.vespa.model.content.Content;
import com.yahoo.vespa.model.search.AbstractSearchCluster;
-import com.yahoo.vespa.model.utils.FileSender;
import com.yahoo.vespaclient.config.FeederConfig;
import edu.umd.cs.findbugs.annotations.NonNull;
import edu.umd.cs.findbugs.annotations.Nullable;
@@ -82,8 +72,6 @@ import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
-import java.util.stream.Collectors;
-import java.util.stream.Stream;
import static com.yahoo.container.core.BundleLoaderProperties.DISK_BUNDLE_PREFIX;
@@ -117,8 +105,7 @@ public abstract class ContainerCluster<CONTAINER extends Container>
DocprocConfig.Producer,
ClusterInfoConfig.Producer,
RoutingProviderConfig.Producer,
- ConfigserverConfig.Producer,
- ThreadpoolConfig.Producer
+ ConfigserverConfig.Producer
{
@@ -163,7 +150,6 @@ public abstract class ContainerCluster<CONTAINER extends Container>
private final List<String> serviceAliases = new ArrayList<>();
private final List<String> endpointAliases = new ArrayList<>();
private final ComponentGroup<Component<?, ?>> componentGroup;
- private final ContainerClusterVerifier clusterVerifier;
private final boolean isHostedVespa;
private Map<String, String> concreteDocumentTypes = new LinkedHashMap<>();
@@ -178,28 +164,9 @@ public abstract class ContainerCluster<CONTAINER extends Container>
private String environmentVars = null;
private Integer memoryPercentage = null;
- // TODO: REMOVE
- private static class AcceptAllVerifier implements ContainerClusterVerifier {
- @Override
- public boolean acceptComponent(Component component) { return true; }
-
- @Override
- public boolean acceptContainer(Container container) { return true; }
-
- @Override
- public void getConfig(ThreadpoolConfig.Builder builder) {
-
- }
- }
public ContainerCluster(AbstractConfigProducer<?> parent, String subId, String name, DeployState deployState) {
- this(parent, subId, name, new AcceptAllVerifier(), deployState);
- }
-
- public ContainerCluster(AbstractConfigProducer<?> parent, String subId, String name,
- ContainerClusterVerifier verifier, DeployState deployState) {
super(parent, subId);
- this.clusterVerifier = verifier;
this.name = name;
this.isHostedVespa = stateIsHosted(deployState);
this.zone = (deployState != null) ? deployState.zone() : Zone.defaultZone();
@@ -210,10 +177,6 @@ public abstract class ContainerCluster<CONTAINER extends Container>
// TODO: Better modelling
addSimpleComponent(ThreadPoolProvider.class);
addSimpleComponent(com.yahoo.concurrent.classlock.ClassLocking.class);
- addSimpleComponent("com.yahoo.jdisc.http.filter.SecurityFilterInvoker");
- addSimpleComponent(DEFAULT_LINGUISTICS_PROVIDER);
- addSimpleComponent("com.yahoo.container.jdisc.SecretStoreProvider");
- addSimpleComponent("com.yahoo.container.jdisc.CertificateStoreProvider");
addSimpleComponent("com.yahoo.container.jdisc.metric.MetricConsumerProviderProvider");
addSimpleComponent("com.yahoo.container.jdisc.metric.MetricProvider");
addSimpleComponent("com.yahoo.container.jdisc.metric.MetricUpdater");
@@ -292,9 +255,7 @@ public abstract class ContainerCluster<CONTAINER extends Container>
}
public final void addComponent(Component<?, ?> component) {
- if (clusterVerifier.acceptComponent(component)) {
- componentGroup.addComponent(component);
- }
+ componentGroup.addComponent(component);
}
public final void addSimpleComponent(String idSpec, String classSpec, String bundleSpec) {
@@ -314,7 +275,7 @@ public abstract class ContainerCluster<CONTAINER extends Container>
addSimpleComponent(clazz.getName());
}
- private void addSimpleComponent(String className) {
+ protected void addSimpleComponent(String className) {
addComponent(new SimpleComponent(className));
}
@@ -478,11 +439,6 @@ public abstract class ContainerCluster<CONTAINER extends Container>
}
@Override
- public void getConfig(ThreadpoolConfig.Builder builder) {
- clusterVerifier.getConfig(builder);
- }
-
- @Override
public void getConfig(DocumentmanagerConfig.Builder builder) {
if (containerDocproc != null && containerDocproc.isCompressDocuments())
builder.enablecompression(true);
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/ContainerClusterImpl.java b/config-model/src/main/java/com/yahoo/vespa/model/container/ContainerClusterImpl.java
index 8caa4f1dfd4..50f7029657d 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/container/ContainerClusterImpl.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/container/ContainerClusterImpl.java
@@ -1,9 +1,8 @@
-// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright 2019 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.model.container;
import com.yahoo.component.ComponentId;
import com.yahoo.config.FileReference;
-import com.yahoo.config.application.api.ApplicationMetaData;
import com.yahoo.config.application.api.ComponentInfo;
import com.yahoo.config.model.deploy.DeployState;
import com.yahoo.config.model.producer.AbstractConfigProducer;
@@ -50,15 +49,13 @@ public final class ContainerClusterImpl extends ContainerCluster<ContainerImpl>
super(parent, subId, name, deployState);
restApiGroup = new ConfigProducerGroup<>(this, "rest-api");
servletGroup = new ConfigProducerGroup<>(this, "servlet");
- }
- public ContainerClusterImpl(AbstractConfigProducer<?> parent, String subId, String name, ContainerClusterVerifier verifier, DeployState deployState) {
- super(parent, subId, name, verifier, deployState);
- restApiGroup = new ConfigProducerGroup<>(this, "rest-api");
- servletGroup = new ConfigProducerGroup<>(this, "servlet");
+ addSimpleComponent(DEFAULT_LINGUISTICS_PROVIDER);
+ addSimpleComponent("com.yahoo.container.jdisc.SecretStoreProvider");
+ addSimpleComponent("com.yahoo.container.jdisc.CertificateStoreProvider");
+ addSimpleComponent("com.yahoo.jdisc.http.filter.SecurityFilterInvoker");
}
-
protected void myPrepare(DeployState deployState) {
addAndSendApplicationBundles(deployState);
if (modelEvaluation != null)
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/ContainerClusterVerifier.java b/config-model/src/main/java/com/yahoo/vespa/model/container/ContainerClusterVerifier.java
deleted file mode 100644
index a6b7b2dbbcb..00000000000
--- a/config-model/src/main/java/com/yahoo/vespa/model/container/ContainerClusterVerifier.java
+++ /dev/null
@@ -1,34 +0,0 @@
-// 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;
-
-import com.yahoo.container.handler.ThreadpoolConfig;
-import com.yahoo.vespa.model.container.component.Component;
-
-/**
- *
- * Operations on a container cluster are verified against this verifier
- * This can be used for ignoring, consitency checking.
- *
- * * @author baldersheim
- *
- */
-public interface ContainerClusterVerifier {
- /**
- * Return true if you accept the component.
- * @param component name of component that wants to be added
- * @return true if you accept it
- */
- boolean acceptComponent(Component component);
-
- /**
- * Return true if you accept the container.
- * @param container container to add
- * @return true if you accept it
- */
- boolean acceptContainer(Container container);
-
- /**
- * Produce threadpool config
- */
- void getConfig(ThreadpoolConfig.Builder builder);
-}
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/ContainerImpl.java b/config-model/src/main/java/com/yahoo/vespa/model/container/ContainerImpl.java
index a51557ff98a..57be3a86870 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/container/ContainerImpl.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/container/ContainerImpl.java
@@ -1,13 +1,8 @@
+// Copyright 2019 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.model.container;
-import com.yahoo.config.FileReference;
-import com.yahoo.config.application.api.ComponentInfo;
import com.yahoo.config.model.api.container.ContainerServiceType;
-import com.yahoo.config.model.deploy.DeployState;
import com.yahoo.config.model.producer.AbstractConfigProducer;
-import com.yahoo.vespa.model.container.component.Component;
-import com.yahoo.vespa.model.container.jersey.RestApi;
-import com.yahoo.vespa.model.utils.FileSender;
/**
* @author gjoranv
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 ffe3e2b81d7..707bb8c88b7 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
@@ -167,12 +167,9 @@ public class ContainerModelBuilder extends ConfigModelBuilder<ContainerModel> {
addSecretStore(cluster, spec);
addHandlers(deployState, cluster, spec);
- if (cluster instanceof ContainerClusterImpl) {
- var cluterImpl = (ContainerClusterImpl) cluster;
- addRestApis(deployState, spec, cluterImpl);
- addServlets(deployState, spec, cluterImpl);
- addModelEvaluation(spec, cluterImpl, context);
- }
+ addRestApis(deployState, spec, cluster);
+ addServlets(deployState, spec, cluster);
+ addModelEvaluation(spec, cluster, context);
addProcessing(deployState, spec, cluster);
addSearch(deployState, spec, cluster);
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/content/cluster/ContentCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/content/cluster/ContentCluster.java
index 9415efbfc67..35edab8d841 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/content/cluster/ContentCluster.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/content/cluster/ContentCluster.java
@@ -23,20 +23,16 @@ import com.yahoo.vespa.model.HostResource;
import com.yahoo.vespa.model.Service;
import com.yahoo.vespa.model.admin.Admin;
import com.yahoo.vespa.model.admin.clustercontroller.ClusterControllerContainerCluster;
-import com.yahoo.vespa.model.admin.monitoring.Metric;
-import com.yahoo.vespa.model.admin.monitoring.MetricsConsumer;
import com.yahoo.vespa.model.admin.monitoring.Monitoring;
import com.yahoo.vespa.model.admin.clustercontroller.ClusterControllerCluster;
import com.yahoo.vespa.model.admin.clustercontroller.ClusterControllerComponent;
import com.yahoo.vespa.model.admin.clustercontroller.ClusterControllerConfigurer;
import com.yahoo.vespa.model.admin.clustercontroller.ClusterControllerContainer;
-import com.yahoo.vespa.model.admin.clustercontroller.ClusterControllerClusterVerifier;
import com.yahoo.vespa.model.builder.xml.dom.ModelElement;
import com.yahoo.vespa.model.builder.xml.dom.NodesSpecification;
import com.yahoo.vespa.model.container.Container;
import com.yahoo.vespa.model.container.ContainerCluster;
import com.yahoo.vespa.model.container.ContainerClusterImpl;
-import com.yahoo.vespa.model.container.ContainerImpl;
import com.yahoo.vespa.model.container.ContainerModel;
import com.yahoo.vespa.model.container.xml.ContainerModelBuilder;
import com.yahoo.vespa.model.content.ClusterControllerConfig;
@@ -455,9 +451,7 @@ public class ContentCluster extends AbstractConfigProducer implements
Collection<HostResource> hosts,
String name, boolean multitenant,
DeployState deployState) {
- var clusterControllers = new ClusterControllerContainerCluster(parent, name, name,
- new ClusterControllerClusterVerifier(),
- deployState);
+ var clusterControllers = new ClusterControllerContainerCluster(parent, name, name, deployState);
List<ClusterControllerContainer> containers = new ArrayList<>();
// Add a cluster controller on each config server (there is always at least one).
if (clusterControllers.getContainers().isEmpty()) {
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 21c4edb782f..eae7e099c35 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
@@ -16,7 +16,6 @@ import com.yahoo.container.handler.ThreadpoolConfig;
import com.yahoo.search.config.QrStartConfig;
import com.yahoo.vespa.model.Host;
import com.yahoo.vespa.model.HostResource;
-import com.yahoo.vespa.model.admin.clustercontroller.ClusterControllerClusterVerifier;
import com.yahoo.vespa.model.admin.clustercontroller.ClusterControllerContainer;
import com.yahoo.vespa.model.admin.clustercontroller.ClusterControllerContainerCluster;
import com.yahoo.vespa.model.container.component.Component;
@@ -27,11 +26,9 @@ import org.junit.Test;
import java.util.Collection;
import java.util.Iterator;
-import java.util.Optional;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
/**
* @author Simon Thoresen Hult
@@ -85,27 +82,14 @@ public class ContainerClusterTest {
return cluster;
}
private ClusterControllerContainerCluster createClusterControllerCluster(MockRoot root) {
- return new ClusterControllerContainerCluster(root, "container0", "container1",
- new ClusterControllerClusterVerifier(), root.getDeployState());
+ return new ClusterControllerContainerCluster(root, "container0", "container1", root.getDeployState());
}
private MockRoot createRoot(boolean isHosted) {
DeployState state = new DeployState.Builder().properties(new TestProperties().setHostedVespa(isHosted)).build();
return new MockRoot("foo", state);
}
- private ContainerClusterImpl createContainerCluster(MockRoot root, boolean isCombinedCluster,
- Integer memoryPercentage, Optional<ContainerClusterVerifier> extraComponents) {
-
- ContainerClusterImpl cluster = extraComponents.isPresent()
- ? new ContainerClusterImpl(root, "container0", "container1", extraComponents.get(), root.getDeployState())
- : new ContainerClusterImpl(root, "container0", "container1", root.getDeployState());
- if (isCombinedCluster)
- cluster.setHostClusterId("test-content-cluster");
- cluster.setMemoryPercentage(memoryPercentage);
- cluster.setSearch(new ContainerSearch(cluster, new SearchChains(cluster, "search-chain"), new ContainerSearch.Options()));
- return cluster;
- }
- private void verifyHeapSizeAsPercentageOfPhysicalMemory(boolean isHosted, boolean isCombinedCluster,
+ private void verifyHeapSizeAsPercentageOfPhysicalMemory(boolean isHosted, boolean isCombinedCluster,
Integer explicitMemoryPercentage,
int expectedMemoryPercentage) {
ContainerCluster cluster = createContainerCluster(createRoot(isHosted), isCombinedCluster, explicitMemoryPercentage);
@@ -162,18 +146,6 @@ public class ContainerClusterTest {
}
@Test
- public void testContainerClusterMaxThreads() {
- MockRoot root = createRoot(false);
- ContainerClusterImpl cluster = createContainerCluster(root, false);
- addContainer(root.deployLogger(), cluster, "c1","host-c1");
-
- ThreadpoolConfig.Builder tpBuilder = new ThreadpoolConfig.Builder();
- cluster.getConfig(tpBuilder);
- ThreadpoolConfig threadpoolConfig = new ThreadpoolConfig(tpBuilder);
- assertEquals(500, threadpoolConfig.maxthreads());
- }
-
- @Test
public void testClusterControllerResourceUsage() {
MockRoot root = createRoot(false);
ClusterControllerContainerCluster cluster = createClusterControllerCluster(root);