From ce100b58076af95f50c98ccf4a803abc9adffba8 Mon Sep 17 00:00:00 2001 From: litao Date: Thu, 19 Aug 2021 12:30:38 +0800 Subject: [PATCH] HDFS-16177. Bug fix for Util#receiveFile (#3310) Reviewed-by: Hui Fei (cherry picked from commit 07627ef19e2bf4c87f12b53e508edf8fee05856a) (cherry picked from commit 0067c06606e8e3176148fa1856aeb3ae0930951c) --- .../main/java/org/apache/hadoop/hdfs/server/common/Util.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/Util.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/Util.java index e9f9bfb830c..85bd490efe6 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/Util.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/Util.java @@ -285,7 +285,7 @@ public final class Util { fos.getChannel().force(true); fos.close(); double writeSec = Math.max(((float) - (flushStartTime - Time.monotonicNow())) / 1000.0, 0.001); + (Time.monotonicNow() - flushStartTime)) / 1000.0, 0.001); xferCombined += writeSec; xferStats.append(String .format(" Synchronous (fsync) write to disk of " +