adoroszlai commented on code in PR #7805:
URL: https://github.com/apache/ozone/pull/7805#discussion_r1942900830
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/SCMDatanodeProtocolServer.java:
##########
@@ -280,6 +280,22 @@ public static SCMRegisteredResponseProto
getRegisteredResponse(
return cmd.getProtoBufMessage();
}
+ private String constructCommandAuditMap(List<SCMCommandProto> cmds) {
+ StringBuilder auditMap = new StringBuilder();
+ auditMap.append('[');
+ for (SCMCommandProto cmd : cmds) {
+ if (cmd.getCommandType().equals(deleteBlocksCommand)) {
+ auditMap.append("commandType:" + cmd.getCommandType());
+ auditMap.append(" No. of deleteTransactions:");
+
auditMap.append(cmd.getDeleteBlocksCommandProto().getDeletedBlocksTransactionsList().size());
+ } else {
Review Comment:
I guess some separator is also needed between commands, maybe between
command attributes, too. The goal is to most closely match previous output
while ommitting unwanted details.
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/SCMDatanodeProtocolServer.java:
##########
@@ -280,6 +280,22 @@ public static SCMRegisteredResponseProto
getRegisteredResponse(
return cmd.getProtoBufMessage();
}
+ private String constructCommandAuditMap(List<SCMCommandProto> cmds) {
+ StringBuilder auditMap = new StringBuilder();
+ auditMap.append('[');
+ for (SCMCommandProto cmd : cmds) {
+ if (cmd.getCommandType().equals(deleteBlocksCommand)) {
+ auditMap.append("commandType:" + cmd.getCommandType());
+ auditMap.append(" No. of deleteTransactions:");
Review Comment:
Avoid space in key:
```suggestion
auditMap.append(" deleteTransactionsCount:");
```
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/SCMDatanodeProtocolServer.java:
##########
@@ -280,6 +280,22 @@ public static SCMRegisteredResponseProto
getRegisteredResponse(
return cmd.getProtoBufMessage();
}
+ private String constructCommandAuditMap(List<SCMCommandProto> cmds) {
+ StringBuilder auditMap = new StringBuilder();
+ auditMap.append('[');
+ for (SCMCommandProto cmd : cmds) {
+ if (cmd.getCommandType().equals(deleteBlocksCommand)) {
+ auditMap.append("commandType:" + cmd.getCommandType());
Review Comment:
Append separately:
```suggestion
auditMap.append("commandType:").append(cmd.getCommandType());
```
--
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]