blob: af9740a3633b60a2f30731f3bd15aa5b081ae783 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
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.SIMPLE_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);
}
}
|