1996fanrui commented on code in PR #26950:
URL: https://github.com/apache/flink/pull/26950#discussion_r2306825672


##########
flink-runtime/src/main/java/org/apache/flink/runtime/blob/BlobWriter.java:
##########
@@ -111,12 +112,29 @@ static <T> Either<SerializedValue<T>, PermanentBlobKey> 
offloadWithException(
         Preconditions.checkNotNull(serializedValue);
         Preconditions.checkNotNull(jobId);
         Preconditions.checkNotNull(blobWriter);
+        LOG.info(
+                "Offloading BLOB for job {}, size: {}",
+                jobId,
+                serializedValue.getByteArray().length);
+        final SystemClock systemClock = SystemClock.getInstance();
+        final long offloadStartTs = systemClock.relativeTimeMillis();
         try {
             final PermanentBlobKey permanentBlobKey =
                     blobWriter.putPermanent(jobId, 
serializedValue.getByteArray());
-            return Either.Right(permanentBlobKey);
+            final Either<SerializedValue<T>, PermanentBlobKey> right =
+                    Either.Right(permanentBlobKey);
+            LOG.info(
+                    "BLOB for job {} with size: {} has been offloaded in {} 
millis",
+                    jobId,
+                    serializedValue.getByteArray().length,
+                    systemClock.relativeTimeMillis() - offloadStartTs);

Review Comment:
   This PR introduced 3 logs. If we have the second log, whether the first one 
is not needed? 
   
   - The first log has been included by the second one, right?
   - Even if it throws some exceptions during offloading, the third log works. 
   
   If removing the first log makes sense, it would be better to log 
`serializedValue.getByteArray().length` in the third log.



-- 
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-unsubscr...@flink.apache.org

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

Reply via email to