summaryrefslogtreecommitdiffstats
path: root/config-model
diff options
context:
space:
mode:
authorgjoranv <gv@verizonmedia.com>2019-10-15 10:49:47 +0200
committergjoranv <gv@verizonmedia.com>2019-10-15 10:52:19 +0200
commitb20c7db4ff10deb8af417f576a16247abeb98453 (patch)
tree09cb7e18c77ed18f1ec9ec5fde6459701a63cfb2 /config-model
parenta6df361ed0de384d1892f1138e9ebc11d4eee0ac (diff)
Only application clusters need to worry about memory percentage.
Diffstat (limited to 'config-model')
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/container/ApplicationContainerCluster.java11
-rwxr-xr-xconfig-model/src/main/java/com/yahoo/vespa/model/container/ContainerCluster.java10
2 files changed, 13 insertions, 8 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/ApplicationContainerCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/container/ApplicationContainerCluster.java
index 55f6a0b3825..10536147419 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/container/ApplicationContainerCluster.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/container/ApplicationContainerCluster.java
@@ -62,6 +62,8 @@ public final class ApplicationContainerCluster extends ContainerCluster<Applicat
private MbusParams mbusParams;
private boolean messageBusEnabled = true;
+ private Integer memoryPercentage = null;
+
public ApplicationContainerCluster(AbstractConfigProducer<?> parent, String subId, String name, DeployState deployState) {
super(parent, subId, name, deployState);
@@ -141,6 +143,15 @@ public final class ApplicationContainerCluster extends ContainerCluster<Applicat
return restApiGroup.getComponents().stream().map(RestApi::getJersey2Servlet);
}
+ public void setMemoryPercentage(Integer memoryPercentage) { this.memoryPercentage = 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<Integer> getMemoryPercentage() { return Optional.ofNullable(memoryPercentage); }
+
@Override
public void getConfig(BundlesConfig.Builder builder) {
applicationBundles.stream().map(FileReference::value)
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 a1aef1c0c91..fd14625953c 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
@@ -154,7 +154,6 @@ public abstract class ContainerCluster<CONTAINER extends Container>
private String hostClusterId = null;
private String jvmGCOptions = null;
private String environmentVars = null;
- private Integer memoryPercentage = null;
public ContainerCluster(AbstractConfigProducer<?> parent, String subId, String name, DeployState deployState) {
@@ -605,16 +604,11 @@ public abstract class ContainerCluster<CONTAINER extends Container>
*/
public Optional<String> getHostClusterId() { return Optional.ofNullable(hostClusterId); }
- public void setMemoryPercentage(Integer memoryPercentage) { this.memoryPercentage = memoryPercentage; }
public void setJvmGCOptions(String opts) { this.jvmGCOptions = opts; }
+
public void setEnvironmentVars(String environmentVars) { this.environmentVars = environmentVars; }
- public Optional<String> getJvmGCOptions() { return Optional.ofNullable(jvmGCOptions); }
- /**
- * 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<Integer> getMemoryPercentage() { return Optional.ofNullable(memoryPercentage); }
+ public Optional<String> getJvmGCOptions() { return Optional.ofNullable(jvmGCOptions); }
public final void setRpcServerEnabled(boolean rpcServerEnabled) { this.rpcServerEnabled = rpcServerEnabled; }