aboutsummaryrefslogtreecommitdiffstats
path: root/clustercontroller-core/src/main
diff options
context:
space:
mode:
authorGeir Storli <geirst@oath.com>2018-02-27 16:01:23 +0100
committerGeir Storli <geirst@oath.com>2018-02-27 16:01:23 +0100
commit7c5545b7d0f3b650249b07c424e7b46b2a32d58e (patch)
tree93472bc2758f528670c4662bc0a805595aea7870 /clustercontroller-core/src/main
parent6027334e88bfa4397bd1cf056db4f1bb6fb70f9d (diff)
Rename ClusterStateChangeTracker -> ClusterStatsChangeTracker.
Diffstat (limited to 'clustercontroller-core/src/main')
-rw-r--r--clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/ClusterStatsChangeTracker.java (renamed from clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/ClusterStateChangeTracker.java)8
-rw-r--r--clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/StateVersionTracker.java10
2 files changed, 9 insertions, 9 deletions
diff --git a/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/ClusterStateChangeTracker.java b/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/ClusterStatsChangeTracker.java
index 839d9c7357f..3ed6fc332ed 100644
--- a/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/ClusterStateChangeTracker.java
+++ b/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/ClusterStatsChangeTracker.java
@@ -4,15 +4,15 @@ package com.yahoo.vespa.clustercontroller.core;
/**
* Class tracking whether we have changes in current and previous cluster stats.
*
- * The state is considered changed if the current and previous cluster stats differs in whether
+ * The cluster stats are considered changed if the current and previous stats differs in whether
* they may have buckets pending in the 'global' bucket space. This signals that the ClusterStateBundle should be recomputed.
*/
-public class ClusterStateChangeTracker {
+public class ClusterStatsChangeTracker {
private ClusterStatsAggregator aggregator;
private boolean prevMayHaveBucketsPending;
- public ClusterStateChangeTracker(ClusterStatsAggregator aggregator) {
+ public ClusterStatsChangeTracker(ClusterStatsAggregator aggregator) {
this.aggregator = aggregator;
this.prevMayHaveBucketsPending = false;
}
@@ -26,7 +26,7 @@ public class ClusterStateChangeTracker {
aggregator = newAggregator;
}
- public boolean stateHasChanged() {
+ public boolean statsHaveChanged() {
if (!aggregator.hasUpdatesFromAllDistributors()) {
return false;
}
diff --git a/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/StateVersionTracker.java b/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/StateVersionTracker.java
index 511f1707389..7232b2f9346 100644
--- a/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/StateVersionTracker.java
+++ b/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/StateVersionTracker.java
@@ -32,14 +32,14 @@ public class StateVersionTracker {
private ClusterStateBundle currentClusterState = latestCandidateState;
private ClusterStateView clusterStateView;
- private ClusterStateChangeTracker clusterStateChangeTracker;
+ private ClusterStatsChangeTracker clusterStatsChangeTracker;
private final LinkedList<ClusterStateHistoryEntry> clusterStateHistory = new LinkedList<>();
private int maxHistoryEntryCount = 50;
StateVersionTracker() {
clusterStateView = ClusterStateView.create(currentUnversionedState.getBaselineClusterState());
- clusterStateChangeTracker = new ClusterStateChangeTracker(clusterStateView.getStatsAggregator());
+ clusterStatsChangeTracker = new ClusterStatsChangeTracker(clusterStateView.getStatsAggregator());
}
void setVersionRetrievedFromZooKeeper(final int version) {
@@ -85,7 +85,7 @@ public class StateVersionTracker {
public void updateLatestCandidateStateBundle(final ClusterStateBundle candidateBundle) {
assert(latestCandidateState.getBaselineClusterState().getVersion() == 0);
latestCandidateState = candidateBundle;
- clusterStateChangeTracker.syncBucketsPendingFlag();
+ clusterStatsChangeTracker.syncBucketsPendingFlag();
}
/**
@@ -124,7 +124,7 @@ public class StateVersionTracker {
newStateBundle.getBaselineClusterState().getDistributionBitCount());
// TODO should this take place in updateLatestCandidateStateBundle instead? I.e. does it require a consolidated state?
clusterStateView = ClusterStateView.create(currentClusterState.getBaselineClusterState());
- clusterStateChangeTracker.updateAggregator(clusterStateView.getStatsAggregator());
+ clusterStatsChangeTracker.updateAggregator(clusterStateView.getStatsAggregator());
}
private void recordCurrentStateInHistoryAtTime(final long currentTimeMs) {
@@ -141,7 +141,7 @@ public class StateVersionTracker {
}
boolean bucketSpaceMergeCompletionStateHasChanged() {
- return clusterStateChangeTracker.stateHasChanged();
+ return clusterStatsChangeTracker.statsHaveChanged();
}
/*