blob: 15e3c113d16363d6573810d1733a6334f87afb13 (
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
// Copyright Yahoo. 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.api.Reindexing;
import com.yahoo.config.model.deploy.DeployState;
import com.yahoo.config.model.producer.TreeConfigProducer;
import com.yahoo.config.provision.ClusterSpec;
import com.yahoo.jdisc.http.server.jetty.VoidRequestLog;
import com.yahoo.search.config.QrStartConfig;
import com.yahoo.vespa.model.container.ContainerCluster;
import com.yahoo.vespa.model.container.PlatformBundles;
import java.nio.file.Path;
import java.util.Collections;
import java.util.Optional;
import java.util.Set;
/**
* Container cluster for cluster-controller containers.
*
* @author gjoranv
* @author bjorncs
*/
public class ClusterControllerContainerCluster extends ContainerCluster<ClusterControllerContainer> {
private static final Set<Path> UNNECESSARY_BUNDLES = Collections.unmodifiableSet(PlatformBundles.VESPA_SECURITY_BUNDLES);
private final ReindexingContext reindexingContext;
public ClusterControllerContainerCluster(
TreeConfigProducer<?> parent, String subId, String name, DeployState deployState) {
super(parent, subId, name, deployState, false);
addDefaultHandlersWithVip();
addAccessLog();
this.reindexingContext = createReindexingContext(deployState);
setJvmGCOptions(deployState.getProperties().jvmGCOptions(Optional.of(ClusterSpec.Type.admin)));
}
@Override
protected Set<Path> unnecessaryPlatformBundles() { return UNNECESSARY_BUNDLES; }
@Override protected boolean messageBusEnabled() { return false; }
@Override
public void getConfig(QrStartConfig.Builder builder) {
super.getConfig(builder);
builder.jvm.heapsize(128);
}
public ReindexingContext reindexingContext() { return reindexingContext; }
private static ReindexingContext createReindexingContext(DeployState deployState) {
return new ReindexingContext(deployState.reindexing().orElse(Reindexing.DISABLED_INSTANCE));
}
}
|