jojochuang commented on code in PR #10122:
URL: https://github.com/apache/ozone/pull/10122#discussion_r3807968408


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/replication/ReplicationManager.java:
##########
@@ -421,6 +434,59 @@ public long getInflightReplicationCount() {
         .getPendingOpCount(ContainerReplicaOp.PendingOpType.ADD);
   }
 
+  /**
+   * Returns the number of active EC reconstruction commands currently in
+   * progress across the cluster.
+   */
+  public int getInflightReconstructionCount() {
+    return inflightReconstructionCount.get();
+  }
+
+  @VisibleForTesting

Review Comment:
   Removed `@VisibleForTesting`; the accessor is package-private for 
same-package unit tests.



##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/replication/ReplicationManager.java:
##########
@@ -421,6 +434,59 @@ public long getInflightReplicationCount() {
         .getPendingOpCount(ContainerReplicaOp.PendingOpType.ADD);
   }
 
+  /**
+   * Returns the number of active EC reconstruction commands currently in
+   * progress across the cluster.
+   */
+  public int getInflightReconstructionCount() {
+    return inflightReconstructionCount.get();
+  }
+
+  @VisibleForTesting
+  Integer getReconstructionPendingFragmentCount(long cmdId) {
+    return reconstructionCommandIdToPendingFragmentCount.get(cmdId);

Review Comment:
   Done in 6aa56401202. Returns `int` via `getOrDefault(cmdId, 0)`. A missing 
entry and zero pending fragments both read as 0, which matches how tests assert 
cleared/unregistered commands.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to