You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@uniffle.apache.org by GitBox <gi...@apache.org> on 2022/12/09 11:56:54 UTC

[GitHub] [incubator-uniffle] jerqi commented on a diff in pull request #395: [ISSUE-390] Print more infos after read finished

jerqi commented on code in PR #395:
URL: https://github.com/apache/incubator-uniffle/pull/395#discussion_r1044384038


##########
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:
    Could we give `skipped` a better name?



-- 
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org