ashishkumar50 commented on code in PR #8516:
URL: https://github.com/apache/ozone/pull/8516#discussion_r2135214838
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/block/SCMBlockDeletingService.java:
##########
@@ -186,20 +186,26 @@ public EmptyTaskResult call() throws Exception {
for (Map.Entry<DatanodeID, List<DeletedBlocksTransaction>> entry :
transactions.getDatanodeTransactionMap().entrySet()) {
DatanodeID dnId = entry.getKey();
+ long blocksToDn = 0;
List<DeletedBlocksTransaction> dnTXs = entry.getValue();
if (!dnTXs.isEmpty()) {
Set<Long> dnTxSet = dnTXs.stream()
.map(DeletedBlocksTransaction::getTxID)
.collect(Collectors.toSet());
+ for (DeletedBlocksTransaction deletedBlocksTransaction : dnTXs) {
+ blocksToDn +=
+ deletedBlocksTransaction.getLocalIDList().size();
+ }
processedTxIDs.addAll(dnTxSet);
DeleteBlocksCommand command = new DeleteBlocksCommand(dnTXs);
command.setTerm(scmContext.getTermOfLeader());
deletedBlockLog.recordTransactionCreated(dnId, command.getId(),
dnTxSet);
eventPublisher.fireEvent(SCMEvents.DATANODE_COMMAND,
new CommandForDatanode<>(dnId, command));
+ metrics.incrNumBlockDeletionSentDN(dnId, blocksToDn);
Review Comment:
Add metric for overall blocks count sent to DN as well
`transactions.getBlocksDeleted()`
--
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]