HaJunYoo opened a new pull request, #9304:
URL: https://github.com/apache/gravitino/pull/9304
<!--
1. Title: [#<issue>] <type>(<scope>): <subject>
Examples:
- "[#123] feat(operator): support xxx"
- "[#233] fix: check null before access result in xxx"
- "[MINOR] refactor: fix typo in variable name"
- "[MINOR] docs: fix typo in README"
- "[#255] test: fix flaky test NameOfTheTest"
Reference: https://www.conventionalcommits.org/en/v1.0.0/
2. If the PR is unfinished, please mark this PR as draft.
-->
### What changes were proposed in this pull request?
- Validate catalog-backend before loading the Hudi catalog backend and throw
a clear IllegalArgumentException when it is missing or blank.
- Add a unit test covering the missing-property case to ensure the error is
raised with the expected message.
### Why are the changes needed?
The previous code attempted to valueOf a null backend string, causing a
NullPointerException.
This change surfaces a clear, actionable error when the required property is
absent.
Fix: #9079
### Does this PR introduce _any_ user-facing change?
Error handling now reports a clear IllegalArgumentException if
catalog-backend is not provided. No API changes
### How was this patch tested?
-
catalogs/catalog-lakehouse-hudi/src/test/java/org/apache/gravitino/catalog/lakehouse/hudi/utils/TestCatalogUtils.java:
testLoadHudiCatalogBackendMissingProperty
- ./gradlew --no-daemon :catalogs:catalog-lakehouse-hudi:test --tests
org.apache.gravitino.catalog.lakehouse.hudi.utils.TestCatalogUtils
--
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]