EricGao888 commented on code in PR #10749:
URL: https://github.com/apache/dolphinscheduler/pull/10749#discussion_r917563437


##########
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/FileUtils.java:
##########
@@ -244,4 +244,15 @@ public static boolean directoryTraversal(String filename){
         }
     }
 
+    /**
+     * Get file size in KB
+     *
+     * @param filename String type of filename
+     * @return file size in KB
+     */
+    public static double getFileSizeInKB(String filename){
+        File file = new File(filename);
+        return ((double) file.length()) / 1024;

Review Comment:
   Fixed in by the latest commit.



##########
dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/metrics/WorkerServerMetrics.java:
##########
@@ -17,11 +17,10 @@
 
 package org.apache.dolphinscheduler.server.worker.metrics;
 
+import java.util.concurrent.TimeUnit;
 import java.util.function.Supplier;
 
-import io.micrometer.core.instrument.Counter;
-import io.micrometer.core.instrument.Gauge;
-import io.micrometer.core.instrument.Metrics;
+import io.micrometer.core.instrument.*;

Review Comment:
   Fixed in by the latest commit.



-- 
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]

Reply via email to