diff options
author | Jon Bratseth <bratseth@gmail.com> | 2021-03-18 10:51:04 +0100 |
---|---|---|
committer | Jon Bratseth <bratseth@gmail.com> | 2021-03-18 10:51:04 +0100 |
commit | 0987fc62387a441099461f8e49af76f78d2ef065 (patch) | |
tree | e73e46132bcb4b2404c6f41024cf222e16661f1c /node-repository/src/main/java/com/yahoo/vespa/hosted/provision/applications | |
parent | dbf0540edf8bdb98f6646a697959287c598b9908 (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.java | 26 |
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(); } |