Class ConfigResponse

java.lang.Object
org.apache.iceberg.rest.responses.ConfigResponse
All Implemented Interfaces:
RESTMessage, RESTResponse

public class ConfigResponse extends Object implements 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
  • endpoints - a list of endpoints that the server supports
  • 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 interface RESTMessage
    • defaults

      public Map<String,String> 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

      public Map<String,String> 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
    • endpoints

      public List<Endpoint> endpoints()
      The list of available endpoints that the server supports
      Returns:
      A list of available endpoints that the server supports
    • merge

      public Map<String,String> merge(Map<String,String> clientProperties)
      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

      public String toString()
      Overrides:
      toString in class Object
    • builder

      public static ConfigResponse.Builder builder()