Class PolarisClient
java.lang.Object
org.apache.polaris.service.it.env.PolarisClient
- All Implemented Interfaces:
AutoCloseable
This is a holder for the heavy-weight HTTP client for accessing Polaris APIs. This class provides
method for constructing light-weight API wrappers for Iceberg REST and Polaris Management API
that reuse the same shared HTTP client.
-
Method Summary
Modifier and TypeMethodDescriptionstatic com.fasterxml.jackson.databind.ObjectMapperUtility method that creates anObjectMappersufficient for (de-)serializing client-side payloads for Iceberg REST and Polaris Management APIs.catalogApi(String authToken) voidvoidclose()genericTableApi(String authToken) managementApi(String authToken) newEntityName(String hint) This method should be used by test code to make top-level entity names.Requests an access token from the authorization server denoted by the issuer URL and token endpoint path.obtainToken(org.apache.polaris.core.admin.model.PrincipalWithCredentials credentials) Requests an access token from the Polaris server for the given principal.obtainToken(ClientCredentials credentials) Requests an access token from the Polaris server for the given credentials.obtainToken(ClientPrincipal principal) Requests an access token from the Polaris server for the given principal.booleanstatic PolarisClientpolarisClient(PolarisApiEndpoints endpoints)
-
Method Details
-
polarisClient
-
buildObjectMapper
public static com.fasterxml.jackson.databind.ObjectMapper buildObjectMapper()Utility method that creates anObjectMappersufficient for (de-)serializing client-side payloads for Iceberg REST and Polaris Management APIs.It is recommended for
PolarisServerManagerimplementations to use thisObjectMapperif the make customclients. -
newEntityName
This method should be used by test code to make top-level entity names. The purpose of this method is two-fold:- Identify top-level entities for later clean-up by
cleanUp(String).- Allow
PolarisServerManagers to customize top-level entities per environment. - Identify top-level entities for later clean-up by
-
managementApi
-
catalogApi
-
catalogApiPlain
-
genericTableApi
-
policyApi
-
obtainToken
Requests an access token from the Polaris server for the given principal. -
obtainToken
Requests an access token from the Polaris server for the given principal. -
obtainToken
Requests an access token from the Polaris server for the given credentials. -
obtainToken
Requests an access token from the authorization server denoted by the issuer URL and token endpoint path. -
ownedName
-
cleanUp
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-