Skip to content

Commit 278f969

Browse files
committed
-
1 parent 11066d6 commit 278f969

File tree

2 files changed

+4
-60
lines changed

2 files changed

+4
-60
lines changed

databricks-sdk-java/src/main/java/com/databricks/sdk/AccountClient.java

Lines changed: 0 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

databricks-sdk-java/src/main/java/com/databricks/sdk/core/DatabricksConfig.java

Lines changed: 4 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,6 @@
1818
import java.util.*;
1919
import org.apache.http.HttpMessage;
2020

21-
/**
22-
* Configuration for Databricks SDK clients.
23-
*
24-
* <p>This class holds all configuration needed to authenticate and connect to Databricks services,
25-
* including support for:
26-
*
27-
* <ul>
28-
* <li>Traditional workspace and account hosts
29-
* <li>Unified hosts (SPOG) that support both workspace and account operations
30-
* <li>Multiple authentication methods (PAT, OAuth, Azure, etc.)
31-
* </ul>
32-
*
33-
* <p><b>Unified Host Support:</b> When using a unified host, set {@code experimentalIsUnifiedHost}
34-
* to {@code true} and optionally provide a {@code workspaceId} for workspace-scoped operations. Use
35-
* {@link #getHostType()} and {@link #getClientType()} instead of the deprecated {@link
36-
* #isAccountClient()} method.
37-
*/
3821
public class DatabricksConfig {
3922
private CredentialsProvider credentialsProvider = new DefaultCredentialsProvider();
4023

@@ -45,9 +28,7 @@ public class DatabricksConfig {
4528
private String accountId;
4629

4730
/**
48-
* Workspace ID for unified host operations. When using a unified host that supports both
49-
* workspace and account-level operations, this field specifies which workspace context to operate
50-
* under for workspace-level API calls.
31+
* Workspace ID for unified host operations.
5132
*
5233
* <p><b>Note:</b> This API is experimental and may change or be removed in future releases
5334
* without notice.
@@ -56,8 +37,7 @@ public class DatabricksConfig {
5637
private String workspaceId;
5738

5839
/**
59-
* Flag to explicitly mark a host as a unified host. When true, the host is treated as supporting
60-
* both workspace and account-level operations through a single endpoint.
40+
* Flag to explicitly mark a host as a unified host.
6141
*
6242
* <p><b>Note:</b> This API is experimental and may change or be removed in future releases
6343
* without notice.
@@ -755,14 +735,7 @@ public boolean isAccountClient() {
755735
return host.startsWith("https://accounts.") || host.startsWith("https://accounts-dod.");
756736
}
757737

758-
/**
759-
* Determines the type of host based on configuration settings and host URL.
760-
*
761-
* <p>Returns UNIFIED if experimentalIsUnifiedHost is true, ACCOUNTS if the host starts with
762-
* "accounts." or "accounts-dod.", and WORKSPACE otherwise.
763-
*
764-
* @return The detected host type
765-
*/
738+
/** Returns the host type based on configuration settings and host URL. */
766739
public HostType getHostType() {
767740
if (experimentalIsUnifiedHost != null && experimentalIsUnifiedHost) {
768741
return HostType.UNIFIED;
@@ -776,15 +749,7 @@ public HostType getHostType() {
776749
return HostType.WORKSPACE;
777750
}
778751

779-
/**
780-
* Determines the client type based on host type and workspace ID configuration.
781-
*
782-
* <p>For unified hosts, returns WORKSPACE_ON_UNIFIED if a workspace ID is set, or
783-
* ACCOUNT_ON_UNIFIED otherwise. For traditional hosts, returns ACCOUNT or WORKSPACE based on the
784-
* host type.
785-
*
786-
* @return The determined client type
787-
*/
752+
/** Returns the client type based on host type and workspace ID configuration. */
788753
public ClientType getClientType() {
789754
HostType hostType = getHostType();
790755
switch (hostType) {
@@ -820,17 +785,6 @@ private OpenIDConnectEndpoints fetchOidcEndpointsFromDiscovery() {
820785
return null;
821786
}
822787

823-
/**
824-
* Fetches OIDC endpoints for unified hosts using the account ID.
825-
*
826-
* <p>For unified hosts, the OIDC endpoints follow the pattern:
827-
* {host}/oidc/accounts/{accountId}/v1/{token|authorize}
828-
*
829-
* @param accountId The account ID to use for endpoint construction
830-
* @return OpenIDConnectEndpoints configured for the unified host
831-
* @throws DatabricksException if accountId is null or empty
832-
* @throws IOException if endpoint construction fails
833-
*/
834788
private OpenIDConnectEndpoints getUnifiedOidcEndpoints(String accountId) throws IOException {
835789
if (accountId == null || accountId.isEmpty()) {
836790
throw new DatabricksException(

0 commit comments

Comments
 (0)