Class ConfigResponse
java.lang.Object
org.apache.iceberg.rest.responses.ConfigResponse
- All Implemented Interfaces:
RESTMessage
,RESTResponse
Represents a response to requesting server-side provided configuration for the REST catalog. This
allows client provided values to be overridden by the server or defaulted if not provided by the
client.
The catalog properties, with overrides and defaults applied, should be used to configure the catalog and for all subsequent requests after this initial config request.
Configuration from the server consists of two sets of key/value pairs.
- defaults - properties that should be used as default configuration
- overrides - properties that should be used to override client configuration
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ConfigResponse.Builder
builder()
defaults()
Properties that should be used as default configuration.Merge client-provided config with server side provided configuration to return a single properties map which will be used for instantiating and configuring the REST catalog.Properties that should be used to override client configuration.toString()
void
validate()
Ensures that a constructed instance of a REST message is valid according to the REST spec.
-
Constructor Details
-
ConfigResponse
public ConfigResponse()
-
-
Method Details
-
validate
public void validate()Description copied from interface:RESTMessage
Ensures that a constructed instance of a REST message is valid according to the REST spec.This is needed when parsing data that comes from external sources and the object might have been constructed without all the required fields present.
- Specified by:
validate
in interfaceRESTMessage
-
defaults
Properties that should be used as default configuration.defaults
have the lowest priority and should be applied before the client provided configuration.- Returns:
- properties that should be used as default configuration
-
overrides
Properties that should be used to override client configuration.overrides
have the highest priority and should be applied after defaults and any client-provided configuration properties.- Returns:
- properties that should be given higher precedence than any client provided input
-
merge
Merge client-provided config with server side provided configuration to return a single properties map which will be used for instantiating and configuring the REST catalog.- Parameters:
clientProperties
- - Client provided configuration- Returns:
- Merged configuration, with precedence in the order overrides, then client properties, and then defaults.
-
toString
-
builder
-