1996fanrui opened a new pull request, #769:
URL: https://github.com/apache/flink-kubernetes-operator/pull/769

   ## What is the purpose of the change
   
   `AutoscalerEventUtils#parseVertexScalingReports` uses the 
`Double.parseDouble` to parse the `CurrentProcessCapacity`, 
`expectedProcessCapacity` and `targetDataRate`.
   
   But they are formatted by `String.format("%.2f")`, it will use the local 
format by default. And the decimal point format in EU is `,` instead of `.`.  
For example: `String.format(Locale.GERMAN, "%.2f", 812.58)` will return 
`812,58`.
   
   
   ## Brief change log
   
   [FLINK-34329][autoscaler] Fix the bug that scaling report parser doesn't 
support Locale
   
   - Step1: Using the NumberFormat to support Locale format because the event 
is formatted in String.format, it uses the Locale by default.
   - Step2: Using the Double.parseDouble 
     - NumberFormat doesn't support Infinity and NaN
     - So we use the `Double.parseDouble` when the step1 doesn't work.
   
   ## Verifying this change
   
   Locale as the parameters, and we tested some common Locales by default.
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to