Commit 59e5b8a
[apache#7190] fix(catalogs): Validate and filter empty storageLocations in HadoopCatalogOperations (apache#7238)
### What changes were proposed in this pull request?
Add validation: throw error if StorageLocation is null or blank `Storage
location for name '" + e.getKey() + "' must not be null or blank`
### Why are the changes needed?
Fixes apache#7190
### Does this PR introduce any user-facing change?
No. APIs and behavior are unchanged, only error messages for invalid
input are clearer.
### How was this patch tested?
- Added new unit tests.
- Verified with `./gradlew clean build`.1 parent 72081ea commit 59e5b8a
File tree
2 files changed
+83
-7
lines changed- catalogs/catalog-hadoop/src
- main/java/org/apache/gravitino/catalog/hadoop
- test/java/org/apache/gravitino/catalog/hadoop
2 files changed
+83
-7
lines changedLines changed: 31 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
297 | 301 | | |
298 | 302 | | |
299 | 303 | | |
| |||
1018 | 1022 | | |
1019 | 1023 | | |
1020 | 1024 | | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
1021 | 1029 | | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
1022 | 1038 | | |
1023 | 1039 | | |
1024 | 1040 | | |
| |||
1033 | 1049 | | |
1034 | 1050 | | |
1035 | 1051 | | |
1036 | | - | |
| 1052 | + | |
1037 | 1053 | | |
1038 | 1054 | | |
1039 | 1055 | | |
1040 | 1056 | | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
1041 | 1063 | | |
1042 | 1064 | | |
1043 | 1065 | | |
| |||
1047 | 1069 | | |
1048 | 1070 | | |
1049 | 1071 | | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
1050 | 1080 | | |
1051 | 1081 | | |
1052 | 1082 | | |
| |||
Lines changed: 52 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| |||
383 | 384 | | |
384 | 385 | | |
385 | 386 | | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | 387 | | |
390 | 388 | | |
391 | 389 | | |
392 | | - | |
393 | | - | |
394 | | - | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
395 | 396 | | |
396 | 397 | | |
397 | 398 | | |
| |||
1598 | 1599 | | |
1599 | 1600 | | |
1600 | 1601 | | |
| 1602 | + | |
| 1603 | + | |
| 1604 | + | |
| 1605 | + | |
| 1606 | + | |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
| 1614 | + | |
| 1615 | + | |
| 1616 | + | |
| 1617 | + | |
| 1618 | + | |
| 1619 | + | |
| 1620 | + | |
| 1621 | + | |
| 1622 | + | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
| 1634 | + | |
| 1635 | + | |
| 1636 | + | |
| 1637 | + | |
| 1638 | + | |
| 1639 | + | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
| 1643 | + | |
| 1644 | + | |
| 1645 | + | |
| 1646 | + | |
1601 | 1647 | | |
1602 | 1648 | | |
1603 | 1649 | | |
| |||
0 commit comments