Class UCConfigUtils
Object
io.delta.storage.commit.uccommitcoordinator.UCConfigUtils
Shared utility methods for parsing flat UC configuration maps (e.g. auth, appVersions).
Used by both the Scala factory (
UCTokenBasedRestClientFactory) and the Java
client (UCDeltaTokenBasedRestClient).
Config key names are the single source of truth and must stay aligned with OSS Unity Catalog.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final StringAuth config key for the token provider type.static final Stringstatic final Stringstatic final Stringstatic final StringLegacy top-level token key (withoutauth.prefix).static final Stringstatic final StringStatic token provider type value for legacytokenconfigs.static final String -
Method Summary
Modifier and TypeMethodDescriptionextractAppVersions(Map<String, String> ucConfig) ExtractsappVersions.*entries from a flat ucConfig map, stripping the prefix.extractAuthConfig(Map<String, String> ucConfig) Extracts authentication configuration from a flat ucConfig map.static StringextractUri(Map<String, String> ucConfig) Extracts the requiredurivalue from a flat ucConfig map.static booleanhasAuthConfig(Map<String, String> ucConfig) Returnstrueif the ucConfig contains any authentication configuration (auth.*keys or legacytokenkey).static booleanisCredentialRenewalEnabled(Map<String, String> ucConfig) Returns whether credential renewal is enabled.static booleanisCredentialScopedFsEnabled(Map<String, String> ucConfig) Returns whether credential-scoped filesystem access is enabled.static booleanisCredentialVendingEnabled(Map<String, String> ucConfig) Returns whether table operations should vend temporary storage credentials.static booleanisDeltaRestApiEnabled(Map<String, String> ucConfig) Returns whether the Delta REST API client should be used.static booleanparseBoolean(Map<String, String> ucConfig, String key, boolean defaultValue) Parses a boolean config value with a default fallback.
-
Field Details
-
URI_KEY
- See Also:
-
AUTH_PREFIX
- See Also:
-
APP_VERSIONS_PREFIX
- See Also:
-
DELTA_REST_API_ENABLED_KEY
- See Also:
-
CREDENTIAL_VENDING_ENABLED_KEY
- See Also:
-
RENEW_CREDENTIAL_ENABLED_KEY
- See Also:
-
CRED_SCOPED_FS_ENABLED_KEY
- See Also:
-
LEGACY_TOKEN_KEY
Legacy top-level token key (withoutauth.prefix).- See Also:
-
AUTH_TYPE_KEY
Auth config key for the token provider type.- See Also:
-
STATIC_AUTH_TYPE
Static token provider type value for legacytokenconfigs.- See Also:
-
-
Method Details
-
extractUri
Extracts the requiredurivalue from a flat ucConfig map.- Throws:
IllegalArgumentException- ifuriis not present.
-
extractAuthConfig
Extracts authentication configuration from a flat ucConfig map. Theauth.prefix is stripped while the suffix (e.g.oauth.clientId) is preserved so downstream lookups match exactly. Prefersauth.*keys; falls back to the legacytokenkey.- Parameters:
ucConfig- the flat configuration map.- Returns:
- a map suitable for
TokenProvider.create, with theauth.prefix stripped.
-
hasAuthConfig
Returnstrueif the ucConfig contains any authentication configuration (auth.*keys or legacytokenkey). -
extractAppVersions
ExtractsappVersions.*entries from a flat ucConfig map, stripping the prefix.- Parameters:
ucConfig- the flat configuration map.- Returns:
- a map of application name to version string.
-
isDeltaRestApiEnabled
Returns whether the Delta REST API client should be used. Defaults totruewhen the key is absent. -
isCredentialVendingEnabled
Returns whether table operations should vend temporary storage credentials. Defaults totruewhen the key is absent. -
isCredentialRenewalEnabled
Returns whether credential renewal is enabled. Defaults totruewhen the key is absent. -
isCredentialScopedFsEnabled
Returns whether credential-scoped filesystem access is enabled. Defaults totruewhen the key is absent. -
parseBoolean
Parses a boolean config value with a default fallback. Only"true"/"false"(case-insensitive) are accepted; any other value throws so misconfigured keys surface loudly rather than silently falling back.- Throws:
IllegalArgumentException- if the value is present but not a valid boolean.
-