sivakumar-mahalingam opened a new issue, #4439:
URL: https://github.com/apache/amoro/issues/4439
### What happened?
Several `Preconditions.checkArgument` calls use SLF4J-style `{}`
placeholders in their error messages. These classes use Guava's `Preconditions`
(shaded `guava32`), which only fills in `%s`. When one of these checks fails,
the `{}` is left in the message as literal text and the argument is appended in
square brackets at the end.
For example, releasing a Flink or Spark optimizer on YARN whose resource
properties lack the application ID throws:
```
java.lang.IllegalArgumentException: Cannot find {} from optimizer start up
stats [yarn-application-id]
```
**Expected:**
```
java.lang.IllegalArgumentException: Cannot find yarn-application-id from
optimizer start up stats
```
Affected call sites on master:
- `FlinkOptimizerContainer`: 4 calls (`session-cluster-job-id`,
`yarn-application-id`, `job-id`, `kubernetes-cluster-id`)
- `SparkOptimizerContainer`: 2 calls (`yarn-application-id`,
`kubernetes-submission-id`)
- `RuntimeHandlerChain`: `Cannot add the same runtime handler:{} twice`
- `HudiHadoopCatalog`: `Lack required property: {}`
The fix is to replace `{}` with `%s` in these messages. #2829 fixed the same
mistake in other places; these call sites were not covered.
### Affects Versions
master
### What table formats are you seeing the problem on?
Mixed-Iceberg, Paimon, Mixed-Hive, Iceberg
### What engines are you seeing the problem on?
Flink, Spark
### How to reproduce
start a Flink or Spark optimizer whose startup properties are missing the
YARN application ID, then cancel it. The error reads Cannot find {} from
optimizer start up stats [yarn-application-id] instead of Cannot find
yarn-application-id from optimizer start up stats.
### Relevant log output
```shell
```
### Anything else
_No response_
### Are you willing to submit a PR?
- [x] Yes I am willing to submit a PR!
### Code of Conduct
- [x] I agree to follow this project's Code of Conduct
--
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]