Tejaskriya commented on code in PR #7805:
URL: https://github.com/apache/ozone/pull/7805#discussion_r1950436991
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/SCMDatanodeHeartbeatDispatcher.java:
##########
@@ -200,6 +203,34 @@ public List<SCMCommand> dispatch(SCMHeartbeatRequestProto
heartbeat) {
}
}
}
+ if (LOG.isDebugEnabled()) {
+ StringBuilder allCommands = new StringBuilder();
+ for (SCMCommand cmd : commands) {
+ allCommands.append("cmdID: ").append(cmd.getId());
+ allCommands.append(" encodedToken:
\"").append(cmd.getEncodedToken()).append("\"");
+ allCommands.append(" term: ").append(cmd.getTerm());
+ allCommands.append(" deadlineMsSinceEpoch:
").append(cmd.getDeadline());
+ if (cmd.getType().equals(deleteBlocksCommand)) {
+ DeleteBlocksCommand delCmd = (DeleteBlocksCommand) cmd;
+ allCommands.append(" deleteBlocksTransactions: {");
+ for (DeletedBlocksTransaction txn : delCmd.blocksTobeDeleted()) {
+ allCommands.append(" txnId:").append(txn.getTxID());
+ allCommands.append(" containerID:").append(txn.getContainerID());
+ allCommands.append("
deleteBlockCount:").append(txn.getLocalIDCount());
+ allCommands.append(" count:").append(txn.getCount());
+ allCommands.append(",");
+ }
+ allCommands.deleteCharAt(allCommands.length() - 1);
+ allCommands.append(" }");
+ } else {
+ allCommands.append(" ").append(cmd.getProto());
+ }
+ allCommands.append(", ");
+ }
+ int len = allCommands.length();
+ allCommands.delete(len - 2, len);
Review Comment:
I have changed the toString method for all commands to print the required
information along with the common details like cmdID, deadline, term and
encodedToken in the latest commit.
--
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]