From a52a1aef2b44e5032ee9296ce1ada8ade2708fe2 Mon Sep 17 00:00:00 2001
From: Junfan Zhang <junfan.zhang@outlook.com>
Date: Mon, 26 Aug 2024 16:43:28 +0800
Subject: [PATCH] [VL][uniffle] Correct the write wait duration log (#6994)

---
 .../shuffle/writer/VeloxUniffleColumnarShuffleWriter.java   | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gluten-uniffle/velox/src/main/java/org/apache/spark/shuffle/writer/VeloxUniffleColumnarShuffleWriter.java b/gluten-uniffle/velox/src/main/java/org/apache/spark/shuffle/writer/VeloxUniffleColumnarShuffleWriter.java
index 2219fc674431..5a5bf5caa30c 100644
--- a/gluten-uniffle/velox/src/main/java/org/apache/spark/shuffle/writer/VeloxUniffleColumnarShuffleWriter.java
+++ b/gluten-uniffle/velox/src/main/java/org/apache/spark/shuffle/writer/VeloxUniffleColumnarShuffleWriter.java
@@ -226,11 +226,11 @@ public long spill(MemoryTarget self, Spiller.Phase phase, long size) {
     // clear all
     sendRestBlockAndWait();
     sendCommit();
-    long writeDurationMs = System.nanoTime() - pushMergedDataTime;
-    shuffleWriteMetrics.incWriteTime(writeDurationMs);
+    long writeDurationNanos = System.nanoTime() - pushMergedDataTime;
+    shuffleWriteMetrics.incWriteTime(writeDurationNanos);
     LOG.info(
         "Finish write shuffle with rest write {} ms",
-        TimeUnit.MILLISECONDS.toNanos(writeDurationMs));
+        TimeUnit.NANOSECONDS.toMillis(writeDurationNanos));
   }
 
   @Override