|
|
@@ -74,10 +74,6 @@ public class RoutingNodes extends AbstractCollection<RoutingNode> {
|
|
|
|
|
|
private int relocatingShards = 0;
|
|
|
|
|
|
- private int activeShardCount = 0;
|
|
|
-
|
|
|
- private int totalShardCount = 0;
|
|
|
-
|
|
|
private final Map<String, Set<String>> attributeValuesByAttribute;
|
|
|
private final Map<String, Recoveries> recoveriesPerNode;
|
|
|
|
|
|
@@ -116,7 +112,6 @@ public class RoutingNodes extends AbstractCollection<RoutingNode> {
|
|
|
assert indexShard.primary != null;
|
|
|
for (int copy = 0; copy < indexShard.size(); copy++) {
|
|
|
final ShardRouting shard = indexShard.shard(copy);
|
|
|
- totalShardCount++;
|
|
|
// to get all the shards belonging to an index, including the replicas,
|
|
|
// we define a replica set and keep track of it. A replica set is identified
|
|
|
// by the ShardId, as this is common for primary and replicas.
|
|
|
@@ -125,9 +120,6 @@ public class RoutingNodes extends AbstractCollection<RoutingNode> {
|
|
|
// LinkedHashMap to preserve order
|
|
|
nodesToShards.computeIfAbsent(shard.currentNodeId(), createRoutingNode).add(shard);
|
|
|
assignedShardsAdd(shard);
|
|
|
- if (shard.active()) {
|
|
|
- activeShardCount++;
|
|
|
- }
|
|
|
if (shard.relocating()) {
|
|
|
relocatingShards++;
|
|
|
ShardRouting targetShardRouting = shard.getTargetRelocatingShard();
|
|
|
@@ -169,8 +161,6 @@ public class RoutingNodes extends AbstractCollection<RoutingNode> {
|
|
|
this.inactivePrimaryCount = routingNodes.inactivePrimaryCount;
|
|
|
this.inactiveShardCount = routingNodes.inactiveShardCount;
|
|
|
this.relocatingShards = routingNodes.relocatingShards;
|
|
|
- this.activeShardCount = routingNodes.activeShardCount;
|
|
|
- this.totalShardCount = routingNodes.totalShardCount;
|
|
|
this.attributeValuesByAttribute = Maps.newMapWithExpectedSize(routingNodes.attributeValuesByAttribute.size());
|
|
|
for (Map.Entry<String, Set<String>> entry : routingNodes.attributeValuesByAttribute.entrySet()) {
|
|
|
this.attributeValuesByAttribute.put(entry.getKey(), new HashSet<>(entry.getValue()));
|
|
|
@@ -323,14 +313,6 @@ public class RoutingNodes extends AbstractCollection<RoutingNode> {
|
|
|
return relocatingShards;
|
|
|
}
|
|
|
|
|
|
- public int getActiveShardCount() {
|
|
|
- return activeShardCount;
|
|
|
- }
|
|
|
-
|
|
|
- public int getTotalShardCount() {
|
|
|
- return totalShardCount;
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* Returns all shards that are not in the state UNASSIGNED with the same shard
|
|
|
* ID as the given shard.
|
|
|
@@ -870,8 +852,6 @@ public class RoutingNodes extends AbstractCollection<RoutingNode> {
|
|
|
&& inactivePrimaryCount == that.inactivePrimaryCount
|
|
|
&& inactiveShardCount == that.inactiveShardCount
|
|
|
&& relocatingShards == that.relocatingShards
|
|
|
- && activeShardCount == that.activeShardCount
|
|
|
- && totalShardCount == that.totalShardCount
|
|
|
&& nodesToShards.equals(that.nodesToShards)
|
|
|
&& unassignedShards.equals(that.unassignedShards)
|
|
|
&& assignedShards.equals(that.assignedShards)
|
|
|
@@ -889,8 +869,6 @@ public class RoutingNodes extends AbstractCollection<RoutingNode> {
|
|
|
inactivePrimaryCount,
|
|
|
inactiveShardCount,
|
|
|
relocatingShards,
|
|
|
- activeShardCount,
|
|
|
- totalShardCount,
|
|
|
attributeValuesByAttribute,
|
|
|
recoveriesPerNode
|
|
|
);
|