You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2021/10/19 09:21:55 UTC

[GitHub] [flink] JingsongLi commented on a change in pull request #17517: [FLINK-24585][filesystem] Print the change in the size of the compacted files

JingsongLi commented on a change in pull request #17517:
URL: https://github.com/apache/flink/pull/17517#discussion_r731663969



##########
File path: flink-table/flink-table-runtime/src/main/java/org/apache/flink/table/filesystem/stream/compact/CompactOperator.java
##########
@@ -198,6 +198,11 @@ private void doCompact(String partition, List<Path> paths) throws IOException {
             return;
         }
 
+        List<Long> pathsSize = new ArrayList<>();
+        for (Path path : paths) {
+            pathsSize.add(fileSystem.getFileStatus(path).getBlockSize());

Review comment:
       use getLen?

##########
File path: flink-table/flink-table-runtime/src/main/java/org/apache/flink/table/filesystem/stream/compact/CompactOperator.java
##########
@@ -217,12 +222,17 @@ private void doCompact(String partition, List<Path> paths) throws IOException {
             doMultiFilesCompact(partition, paths, target);
         }
 
+        long targetSize = fileSystem.getFileStatus(target).getBlockSize();
+
         double costSeconds = ((double) (System.currentTimeMillis() - startMillis)) / 1000;
         LOG.info(
-                "Compaction time cost is '{}S', target file is '{}', input files are '{}'",
+                "Compaction time cost is '{}S', target file={name: '{}', size(byte): {}}, "
+                        + "input files={name: '{}', size(byte): {}}",

Review comment:
       Can we collect name and size to a HashMap, and just print it? WDYT?




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

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