1996fanrui opened a new pull request, #23873:
URL: https://github.com/apache/flink/pull/23873

   ## What is the purpose of the change
   
   When the default value of Duration is 24 hours or 1 day, the display unit is 
ms. (86400000 ms). For example, the [kubernetes operator 
doc](https://nightlies.apache.org/flink/flink-kubernetes-operator-docs-main/docs/operations/configuration/)
 has 3 options, their default value are 86400000 ms.
   
   This bug from `org.apache.flink.util.TimeUtils#formatWithHighestUnit`, and 
it can be reproduced by `TimeUtilsPrettyPrintingTest`. 
   
   Bug reason: When the duration is `1 day`, it filters all TimeUnits, so it 
uses the default `TimeUnit.MILLISECONDS`.
   
   <img width="1065" alt="image" 
src="https://github.com/apache/flink/assets/38427477/42696e58-e147-45d3-b93f-cafa9ae6ec8e";>
   
   
   
   ## Brief change log
   
   - [FLINK-33752][Configuration] Change the displayed timeunit to day when the 
duration is an integral multiple of 1 day
     - Find the correct `HighestIntegerUnit` for 1day.
   
   ## Verifying this change
   
   - Added some arguments for `TimeUtilsPrettyPrintingTest#testFormatting`
    
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): no
     - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: no
     - The serializers: no
     - The runtime per-record code paths (performance sensitive): no
     - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
     - The S3 file system connector: no
   
   ## Documentation
   
     - Does this pull request introduce a new feature? no
     - If yes, how is the feature documented? (not applicable / docs / JavaDocs 
/ not documented)
   


-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to