KevinWikant commented on code in PR #7179:
URL: https://github.com/apache/hadoop/pull/7179#discussion_r1892962603


##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java:
##########
@@ -190,6 +190,7 @@ public class BlockManager implements BlockStatsMXBean {
 
   private final PendingDataNodeMessages pendingDNMessages =
     new PendingDataNodeMessages();
+  private final UnderConstructionBlocks ucBlocks;

Review Comment:
   Good question. I am definitely open to changing the terminology here.
   
   I don't know if `UnderReplication` is the correct term though, I think this 
may be more applicable to a block which needs to be replicated asynchronously 
by the Namenode to meet replication factor (i.e. due to datanode 
decommissioning or datanode failures). 
   
   From the Namenode logs we can see the block replica state is reported as 
`RBW` (replica being written) \ `RECEIVING_BLOCK`:
   
   ```
   2024-12-05 15:51:09,399 DEBUG blockmanagement.BlockManager: Reported block 
blk_1073741825_1001 on 172.31.93.89:9866 size 268435456 replicaState = RBW
   2024-12-05 15:51:09,399 DEBUG BlockStateChange: BLOCK* block 
RECEIVING_BLOCK: blk_1073741825_1001 is received from 172.31.93.89:9866
   ```
   
   I took the term `UnderConstruction` from here in the code:
   - 
https://github.com/apache/hadoop/blob/cd2cffe73f909a106ba47653acf525220f2665cf/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/DatanodeAdminManager.java#L305
   
   However, upon further inspection it seems this term is related to a 
BlockCollection (as opposed to a block replica):
   - 
https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodeFile.java#L318
   
   Let me know your thoughts. I can refactor `UnderConstructionBlocks` to 
something like `RbwBlocks` or `ReplicaBeingWrittenBlocks` if this is a more 
accurate term



-- 
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