File tree Expand file tree Collapse file tree 1 file changed +4
-18
lines changed
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/replication Expand file tree Collapse file tree 1 file changed +4
-18
lines changed Original file line number Diff line number Diff line change @@ -191,17 +191,11 @@ private void countReplicas() {
191191 * Total healthy replicas = 3 = 1 matching + 2 mismatched replicas
192192 */
193193 public int getHealthyReplicaCount () {
194- return healthyReplicaCount + healthyReplicaCountAdapter ()
195- + decommissionCount + maintenanceCount ;
194+ return healthyReplicaCount + decommissionCount + maintenanceCount ;
196195 }
197196
198197 public int getUnhealthyReplicaCount () {
199- return unhealthyReplicaCount + getUnhealthyReplicaCountAdapter ()
200- + unhealthyDecommissionCount + unhealthyMaintenanceCount ;
201- }
202-
203- protected int getUnhealthyReplicaCountAdapter () {
204- return 0 ;
198+ return unhealthyReplicaCount + unhealthyDecommissionCount + unhealthyMaintenanceCount ;
205199 }
206200
207201 public int getMisMatchedReplicaCount () {
@@ -213,21 +207,13 @@ public int getMatchingReplicaCount() {
213207 }
214208
215209 private int getAvailableReplicas () {
216- int available = healthyReplicaCount + healthyReplicaCountAdapter () ;
210+ int available = healthyReplicaCount ;
217211 if (considerUnhealthy ) {
218- available += unhealthyReplicaCount + getUnhealthyReplicaCountAdapter () ;
212+ available += unhealthyReplicaCount ;
219213 }
220214 return available ;
221215 }
222216
223- /**
224- * The new replication manager now does not consider replicas with
225- * UNHEALTHY state when counting sufficient replication.
226- */
227- protected int healthyReplicaCountAdapter () {
228- return 0 ;
229- }
230-
231217 @ Override
232218 public int getDecommissionCount () {
233219 return considerUnhealthy
You can’t perform that action at this time.
0 commit comments