aboutsummaryrefslogtreecommitdiffstats
path: root/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/applications
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@gmail.com>2021-03-18 10:51:04 +0100
committerJon Bratseth <bratseth@gmail.com>2021-03-18 10:51:04 +0100
commit0987fc62387a441099461f8e49af76f78d2ef065 (patch)
treee73e46132bcb4b2404c6f41024cf222e16661f1c /node-repository/src/main/java/com/yahoo/vespa/hosted/provision/applications
parentdbf0540edf8bdb98f6646a697959287c598b9908 (diff)
Move to ClusterModel
Diffstat (limited to 'node-repository/src/main/java/com/yahoo/vespa/hosted/provision/applications')
-rw-r--r--node-repository/src/main/java/com/yahoo/vespa/hosted/provision/applications/Cluster.java26
1 files changed, 0 insertions, 26 deletions
diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/applications/Cluster.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/applications/Cluster.java
index 69d7cec4007..59b70ff1ef0 100644
--- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/applications/Cluster.java
+++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/applications/Cluster.java
@@ -129,32 +129,6 @@ public class Cluster {
return new Cluster(id, exclusive, min, max, suggested, target, scalingEvents, autoscalingStatus);
}
- /** The predicted duration of a rescaling of this cluster */
- public Duration scalingDuration(ClusterSpec clusterSpec) {
- int completedEventCount = 0;
- Duration totalDuration = Duration.ZERO;
- for (ScalingEvent event : scalingEvents()) {
- if (event.duration().isEmpty()) continue;
- completedEventCount++;
- totalDuration = totalDuration.plus(event.duration().get());
- }
-
- if (completedEventCount == 0) { // Use defaults
- if (clusterSpec.isStateful()) return Duration.ofHours(12);
- return Duration.ofMinutes(10);
- }
- else {
- Duration predictedDuration = totalDuration.dividedBy(completedEventCount);
-
- // TODO: Remove when we have reliable completion for content clusters
- if (clusterSpec.isStateful() && predictedDuration.minus(Duration.ofHours(12)).isNegative())
- return Duration.ofHours(12);
-
- if (predictedDuration.minus(Duration.ofMinutes(5)).isNegative()) return Duration.ofMinutes(5); // minimum
- return predictedDuration;
- }
- }
-
@Override
public int hashCode() { return id.hashCode(); }