ss77892 commented on code in PR #9753:
URL: https://github.com/apache/ozone/pull/9753#discussion_r2799810764
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueHandler.java:
##########
@@ -2091,8 +2091,18 @@ public ContainerCommandResponseProto readBlock(
return malformedRequest(request);
}
try {
- readBlockImpl(request, blockFile, kvContainer, streamObserver, false);
- // TODO metrics.incContainerBytesStats(Type.ReadBlock,
readBlock.getLen());
+ final long startTime = Time.monotonicNow();
+ final long bytesRead = readBlockImpl(request, blockFile, kvContainer,
streamObserver, false);
+ long endTime = Time.monotonicNow();
+ KeyValueContainerData containerData = (KeyValueContainerData) kvContainer
+ .getContainerData();
+ HddsVolume volume = containerData.getVolume();
+ if (volume != null) {
+ volume.getVolumeIOStats().incReadTime(endTime - startTime);
Review Comment:
Yep, added the helper.
--
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]