HDFS-16177. Bug fix for Util#receiveFile (#3310)

Reviewed-by: Hui Fei <ferhui@apache.org>
(cherry picked from commit 07627ef19e)
(cherry picked from commit 0067c06606e8e3176148fa1856aeb3ae0930951c)
This commit is contained in:
litao 2021-08-19 12:30:38 +08:00 committed by Wei-Chiu Chuang
parent 6a02596f42
commit ce100b5807
No known key found for this signature in database
GPG Key ID: B362E1C021854B9D
1 changed files with 1 additions and 1 deletions

View File

@ -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 " +