gravitino icon indicating copy to clipboard operation
gravitino copied to clipboard

[Improvement] Validate the Hudi catalog backend configuration in CatalogUtils.java

Open justinmclean opened this issue 1 month ago • 2 comments

What would you like to be improved?

Validate the Hudi catalog backend configuration and throw an IllegalArgumentException when the backend property is missing instead of triggering a NullPointerException.

Here's a unit test to help:

  @Test
  public void testLoadHudiCatalogBackendMissingProperty() {
    IllegalArgumentException exception =
        Assertions.assertThrows(
            IllegalArgumentException.class, () -> CatalogUtils.loadHudiCatalogBackend(ImmutableMap.of()));
    Assertions.assertTrue(
        exception.getMessage().contains("Property " + CATALOG_BACKEND + " must not be null or empty"));
  }

How should we improve?

see above

justinmclean avatar Nov 12 '25 03:11 justinmclean

Hello @justinmclean I am interested to work in this issue. Can I be assigned?

HaJunYoo avatar Nov 12 '25 06:11 HaJunYoo

It's all yours. If you have any questions just ask.

justinmclean avatar Nov 12 '25 22:11 justinmclean