[ 
https://issues.apache.org/jira/browse/HIVE-29037?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17985119#comment-17985119
 ] 

Raghav Aggarwal commented on HIVE-29037:
----------------------------------------

+1

> Incorrect time calculation in HiveSplitGenerator causing negative elapsed 
> time in logs
> --------------------------------------------------------------------------------------
>
>                 Key: HIVE-29037
>                 URL: https://issues.apache.org/jira/browse/HIVE-29037
>             Project: Hive
>          Issue Type: Bug
>          Components: Hive
>            Reporter: chiranjeevi
>            Assignee: chiranjeevi
>            Priority: Minor
>
> The HiveSplitGenerator class incorrectly calculates elapsed time for split 
> serialization operations, resulting in negative time values in the logs. This 
> makes debugging and performance analysis difficult.
> The calculation fileWriteStarted - Time.monotonicNow() is reversed. Since 
> Time.monotonicNow() returns the current time, which is always greater than 
> fileWriteStarted (the time when the operation started), this calculation 
> always produces a negative number.
> Example log 
> 2025-06-21 16:43:28,637 [DEBUG] [HiveSplitGenerator.SplitSerializer Thread - 
> #2|#2] |tez.HiveSplitGenerator|: Split #41 event to output path: 
> hdfs://clustername/tmp/hive/staging/.tez/application_1749793988888_0095/events/hive_20250621164323_c39588f6-0ae9-48ad-8db5-5e43cf4a1b1d/0_catalog_sales_InputDataInformationEvent_41
>  written in *-320 ms*



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to