Skip to content

Commit c4af3ed

Browse files
author
fanshilun
committed
HDDS-11843. Improve Some Code.
1 parent de78fc7 commit c4af3ed

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/replication/RatisContainerReplicaCount.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ public String toString() {
286286
*
287287
* When considering inflight operations, it is assumed any operation will
288288
* fail. However, to consider the worst case and avoid data loss, we always
289-
* assume a delete will succeed and and add will fail. In this way, we will
289+
* assume a delete will succeed and add will fail. In this way, we will
290290
* avoid scheduling too many deletes which could result in dataloss.
291291
*
292292
* Decisions around over-replication are made only on healthy replicas,
@@ -320,7 +320,7 @@ public String toString() {
320320
* For under replicated containers we do consider inflight add and delete to
321321
* avoid scheduling more adds than needed. There is additional logic around
322322
* containers with maintenance replica to ensure minHealthyForMaintenance
323-
* replia are maintained.
323+
* replica are maintained.
324324
*
325325
* @return Delta of replicas needed. Negative indicates over replication and
326326
* containers should be removed. Positive indicates over replication
@@ -621,7 +621,7 @@ public int getExcessRedundancy(boolean includePendingDelete) {
621621
* considering inflight add and deletes.
622622
* @return zero if perfectly replicated, a negative value for over replication
623623
* and a positive value for under replication. The magnitude of the
624-
* return value indicates how many replias the container is over or
624+
* return value indicates how many replies the container is over or
625625
* under replicated by.
626626
*/
627627
private int redundancyDelta(boolean includePendingDelete,
@@ -650,7 +650,7 @@ boolean insufficientDueToOutOfService() {
650650

651651
/**
652652
* How many more replicas can be lost before the container is
653-
* unreadable, assuming any infligh deletes will complete. For containers
653+
* unreadable, assuming any inflight deletes will complete. For containers
654654
* which are under-replicated due to decommission
655655
* or maintenance only, the remaining redundancy will include those
656656
* decommissioning or maintenance replicas, as they are technically still

hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/replication/RatisUnderReplicationHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public int processAndSendCommands(
145145

146146
if (targetDatanodes.size() < replicaCount.additionalReplicaNeeded()) {
147147
// The placement policy failed to find enough targets to satisfy fix
148-
// the under replication. There fore even though some commands were sent,
148+
// the under replication. Therefore even though some commands were sent,
149149
// we throw an exception to indicate that the container is still under
150150
// replicated and should be re-queued for another attempt later.
151151
LOG.debug("Placement policy failed to find enough targets to satisfy " +

hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/replication/UnhealthyReplicationProcessor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public void processAll(ReplicationQueue queue) {
9292
List<HealthResult> failedOnes = new LinkedList<>();
9393
// Getting the limit requires iterating over all nodes registered in
9494
// NodeManager and counting the healthy ones. This is somewhat expensive
95-
// so we get get the count once per iteration as it should not change too
95+
// so we get the count once per iteration as it should not change too
9696
// often.
9797
long inflightLimit = replicationManager.getReplicationInFlightLimit();
9898
while (true) {

0 commit comments

Comments
 (0)