sodonnel commented on code in PR #3329:
URL: https://github.com/apache/ozone/pull/3329#discussion_r861626615
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/SCMNodeManager.java:
##########
@@ -621,6 +623,48 @@ public void processLayoutVersionReport(DatanodeDetails
datanodeDetails,
}
}
+ /**
+ * Process Command Queue Reports from the Datanode Heartbeat.
+ *
+ * @param datanodeDetails
+ * @param commandQueueReportProto
+ */
+ @Override
+ public void processNodeCommandQueueReport(DatanodeDetails datanodeDetails,
+ CommandQueueReportProto commandQueueReportProto) {
+ LOG.debug("Processing Command Queue Report from [datanode={}]",
+ datanodeDetails.getHostName());
+ if (LOG.isTraceEnabled()) {
+ LOG.trace("Command Queue Report is received from [datanode={}]: " +
+ "<json>{}</json>", datanodeDetails.getHostName(),
+ commandQueueReportProto.toString().replaceAll("\n", "\\\\n"));
+ }
+ try {
+ DatanodeInfo datanodeInfo = nodeStateManager.getNode(datanodeDetails);
+ if (commandQueueReportProto != null) {
+ datanodeInfo.setCommandCounts(commandQueueReportProto);
+ metrics.incNumNodeCommandQueueReportProcessed();
+ }
+ } catch (NodeNotFoundException e) {
Review Comment:
These metrics are copying what is already there for other commands, eg see
`processNodeReport()` and `processHeartbeat()` - I basically copied this
methods structure from there to keep it consistent. In both those cases, the
metric is "failedProcessing" but the only failure handled is nodeNotFound, so
the name is a bit misleading.
--
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]