Skip to content

Commit

Permalink
add support for 01
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-maynard committed Mar 3, 2025
1 parent f18df3b commit 412180c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,9 @@ public static <T> Builder<T> builder() {
public static final PolarisConfiguration<Integer> STORAGE_CONFIGURATION_MAX_LOCATIONS =
PolarisConfiguration.<Integer>builder()
.key("STORAGE_CONFIGURATION_MAX_LOCATIONS")
.description("How many locations can be associated with a storage configuration")
.catalogConfig("max.locations")
.description("How many locations can be associated with a storage configuration, or -1 for" +
" unlimited locations")
.defaultValue(20)
.build();
}
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ protected void validatePrefixForStorageType(String loc) {

/** Validate the number of allowed locations not exceeding the max value. */
public void validateMaxAllowedLocations(int maxAllowedLocations) {
if (allowedLocations.size() > maxAllowedLocations) {
if (maxAllowedLocations != -1 && allowedLocations.size() > maxAllowedLocations) {
throw new IllegalArgumentException(
"Number of allowed locations exceeds " + maxAllowedLocations);
}
Expand Down

0 comments on commit 412180c

Please sign in to comment.