sivakumar-mahalingam opened a new pull request, #4440:
URL: https://github.com/apache/amoro/pull/4440

   ## Why are the changes needed?
   
   Guava's `Preconditions.checkArgument` only fills in `%s` placeholders. 
Several call sites used SLF4J-style `{}`, so a failed check produced an 
unformatted message with the argument appended in brackets:
   
   ```
   Cannot find {} from optimizer start up stats [yarn-application-id]
   ```
   
   instead of:
   
   ```
   Cannot find yarn-application-id from optimizer start up stats
   ```
   
   This follows #2829, which fixed the same mistake in other places.
   
   Close #4439.
   
   ## Brief change log
   
   Replace `{}` with `%s` in the `Preconditions` error messages in:
   
   - `FlinkOptimizerContainer`: 4 messages (`session-cluster-job-id`, 
`yarn-application-id`, `job-id`, `kubernetes-cluster-id`)
   - `SparkOptimizerContainer`: 2 messages (`yarn-application-id`, 
`kubernetes-submission-id`)
   - `RuntimeHandlerChain`: duplicate runtime handler message
   - `HudiHadoopCatalog`: missing warehouse property message
   
   Only exception messages change; there is no behavior change. The `LOG` calls 
in these files correctly use `{}` and are untouched.
   
   ## How was this patch tested?
   
   - [ ] Add some test cases that check the changes thoroughly including 
negative and positive cases if possible
   
   - [ ] Add screenshots for manual tests if appropriate
   
   - [X] Run test locally before making a pull request
   
   The changes are limited to string literals in exception messages. A scan of 
the repository finds no other `Preconditions` messages using `{}`.
   
   ## Documentation
   
   - Does this pull request introduce a new feature? no
   - If yes, how is the feature documented? not applicable
   


-- 
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