xianjingfeng commented on code in PR #395:
URL: https://github.com/apache/incubator-uniffle/pull/395#discussion_r1044946567
##########
storage/src/main/java/org/apache/uniffle/storage/handler/impl/AbstractClientReadHandler.java:
##########
@@ -38,10 +43,32 @@ public void close() {
}
@Override
- public void updateConsumedBlockInfo(BufferSegment bs) {
+ public void updateConsumedBlockInfo(BufferSegment bs, boolean skipped) {
+ if (bs == null) {
+ return;
+ }
+ updateBlockMetric(readHandlerMetric, bs, skipped);
}
@Override
public void logConsumedBlockInfo() {
+ LOG.info("Client read [" + readHandlerMetric.getReadBlockNum() + " blocks,"
+ + " bytes:" + readHandlerMetric.getReadLength() + " uncompressed
bytes:"
+ + readHandlerMetric.getReadUncompressLength()
+ + "], skipped[" + readHandlerMetric.getSkippedReadBlockNum() + "
blocks,"
+ + " bytes:" + readHandlerMetric.getSkippedReadLength() + "
uncompressed bytes:"
+ + readHandlerMetric.getSkippedReadUncompressLength() + "]");
+ }
+
+ protected void updateBlockMetric(ClientReadHandlerMetric metric,
BufferSegment bs, boolean skipped) {
Review Comment:
> I can't get the meaning of this parameter. Do it mean that this
BufferSegment will be skipped if this value is true?
There are two kinds of block meitrcs in this pr, `Consumed` and `Skipped`.
`Consumed` means the block has not been read before and `Skipped` means block
has been read before or the block is damaged.
--
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]