-
Notifications
You must be signed in to change notification settings - Fork 3k
CORE: REST Catalog - Response class for server provided configuration #4184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CORE: REST Catalog - Response class for server provided configuration #4184
Conversation
| public Map<String, String> merge(Map<String, String> clientProperties) { | ||
| Preconditions.checkNotNull(clientProperties, | ||
| "Cannot merge client properties with server-provided properties. Invalid client configuration: null"); | ||
| Map<String, String> merged = Maps.newHashMap(defaults); | ||
| merged.putAll(clientProperties); | ||
| merged.putAll(overrides); | ||
| return merged; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function might be better placed outside of the response object. I haven't included tests for it yet, in case we want to move it to some other utility class or elsewhere (as the request / response object should arguably be more like data classes).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with it here for now. We can move it later if we think it doesn't fit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. That makes sense for me. This will at least unblock others from working in parallel on this.
ad185b1 to
2f38ccc
Compare
core/src/main/java/org/apache/iceberg/rest/responses/RESTCatalogConfigResponse.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/apache/iceberg/rest/responses/RESTCatalogConfigResponse.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/apache/iceberg/rest/responses/RESTCatalogConfigResponse.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/apache/iceberg/rest/responses/RESTCatalogConfigResponse.java
Show resolved
Hide resolved
core/src/test/java/org/apache/iceberg/rest/responses/TESTRESTCatalogConfigResponse.java
Outdated
Show resolved
Hide resolved
8c56b5f to
27e688b
Compare
core/src/main/java/org/apache/iceberg/rest/responses/RESTCatalogConfigResponse.java
Outdated
Show resolved
Hide resolved
60ee8ec to
4df1d8e
Compare
Defines the response class used to populate the server-provided configuration.
Per the spec, the catalog client will call the
/v1/configendpoint to retrieve a set ofoverridesanddefaults. Thedefaultconfigurations are there to allow clients to not have to provide all details so that end user's don't have to specify values that are commonly used, and theoverridesare there so that the server can require a certain value be used.I've also started updating the REST catalog spec to be more detailed for this part (though I'll probably move that to another PR).