Package com.databricks.jdbc.driver
Class DatabricksConnectionContext
- java.lang.Object
-
- com.databricks.jdbc.driver.DatabricksConnectionContext
-
- All Implemented Interfaces:
IDatabricksConnectionContext
public class DatabricksConnectionContext extends Object implements IDatabricksConnectionContext
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.databricks.jdbc.driver.IDatabricksConnectionContext
IDatabricksConnectionContext.AuthFlow, IDatabricksConnectionContext.AuthMech
-
-
Method Summary
-
-
-
Method Detail
-
parse
public static IDatabricksConnectionContext parse(String url, Properties properties) throws DatabricksSQLException
Parses connection Url and properties into a Databricks specific connection context- Parameters:
url- Databricks server connection Urlproperties- connection properties- Returns:
- a connection context
- Throws:
DatabricksSQLException
-
isValid
public static boolean isValid(String url)
-
getMetricsExporter
public DatabricksMetrics getMetricsExporter()
- Specified by:
getMetricsExporterin interfaceIDatabricksConnectionContext
-
getHostUrl
public String getHostUrl() throws DatabricksParsingException
Description copied from interface:IDatabricksConnectionContextReturns host-Url for Databricks server as parsed from JDBC connection in format https://server:port- Specified by:
getHostUrlin interfaceIDatabricksConnectionContext- Returns:
- Databricks host-Url
- Throws:
DatabricksParsingException
-
getComputeResource
public ComputeResource getComputeResource()
Description copied from interface:IDatabricksConnectionContextReturns warehouse-Id as parsed from JDBC connection Url- Specified by:
getComputeResourcein interfaceIDatabricksConnectionContext- Returns:
- warehouse-Id
-
getHttpPath
public String getHttpPath()
- Specified by:
getHttpPathin interfaceIDatabricksConnectionContext
-
getHostForOAuth
public String getHostForOAuth()
- Specified by:
getHostForOAuthin interfaceIDatabricksConnectionContext
-
getToken
public String getToken()
Description copied from interface:IDatabricksConnectionContextReturns the auth token (personal access token/OAuth token etc)- Specified by:
getTokenin interfaceIDatabricksConnectionContext- Returns:
- auth token
-
getAsyncExecPollInterval
public int getAsyncExecPollInterval()
- Specified by:
getAsyncExecPollIntervalin interfaceIDatabricksConnectionContext
-
getDirectResultMode
public Boolean getDirectResultMode()
- Specified by:
getDirectResultModein interfaceIDatabricksConnectionContext
-
getCloud
public String getCloud() throws DatabricksParsingException
- Throws:
DatabricksParsingException
-
getClientId
public String getClientId() throws DatabricksParsingException
- Specified by:
getClientIdin interfaceIDatabricksConnectionContext- Throws:
DatabricksParsingException
-
getOAuthScopesForU2M
public List<String> getOAuthScopesForU2M() throws DatabricksParsingException
- Specified by:
getOAuthScopesForU2Min interfaceIDatabricksConnectionContext- Throws:
DatabricksParsingException
-
getClientSecret
public String getClientSecret()
- Specified by:
getClientSecretin interfaceIDatabricksConnectionContext
-
getAuthFlow
public IDatabricksConnectionContext.AuthFlow getAuthFlow()
- Specified by:
getAuthFlowin interfaceIDatabricksConnectionContext
-
getAuthMech
public IDatabricksConnectionContext.AuthMech getAuthMech()
- Specified by:
getAuthMechin interfaceIDatabricksConnectionContext
-
getLogLevel
public LogLevel getLogLevel()
- Specified by:
getLogLevelin interfaceIDatabricksConnectionContext
-
getLogPathString
public String getLogPathString()
- Specified by:
getLogPathStringin interfaceIDatabricksConnectionContext
-
getLogFileSize
public int getLogFileSize()
- Specified by:
getLogFileSizein interfaceIDatabricksConnectionContext
-
getLogFileCount
public int getLogFileCount()
- Specified by:
getLogFileCountin interfaceIDatabricksConnectionContext
-
getClientUserAgent
public String getClientUserAgent()
- Specified by:
getClientUserAgentin interfaceIDatabricksConnectionContext
-
getCompressionType
public CompressionType getCompressionType()
- Specified by:
getCompressionTypein interfaceIDatabricksConnectionContext
-
getClientType
public DatabricksClientType getClientType()
- Specified by:
getClientTypein interfaceIDatabricksConnectionContext
-
getUseLegacyMetadata
public Boolean getUseLegacyMetadata()
- Specified by:
getUseLegacyMetadatain interfaceIDatabricksConnectionContext
-
getCloudFetchThreadPoolSize
public int getCloudFetchThreadPoolSize()
Description copied from interface:IDatabricksConnectionContextReturns the number of threads to be used for fetching data from cloud storage- Specified by:
getCloudFetchThreadPoolSizein interfaceIDatabricksConnectionContext
-
getCatalog
public String getCatalog()
- Specified by:
getCatalogin interfaceIDatabricksConnectionContext
-
getSchema
public String getSchema()
- Specified by:
getSchemain interfaceIDatabricksConnectionContext
-
getSessionConfigs
public Map<String,String> getSessionConfigs()
- Specified by:
getSessionConfigsin interfaceIDatabricksConnectionContext
-
isAllPurposeCluster
public boolean isAllPurposeCluster()
- Specified by:
isAllPurposeClusterin interfaceIDatabricksConnectionContext
-
getProxyHost
public String getProxyHost()
- Specified by:
getProxyHostin interfaceIDatabricksConnectionContext
-
getProxyPort
public int getProxyPort()
- Specified by:
getProxyPortin interfaceIDatabricksConnectionContext
-
getProxyUser
public String getProxyUser()
- Specified by:
getProxyUserin interfaceIDatabricksConnectionContext
-
getProxyPassword
public String getProxyPassword()
- Specified by:
getProxyPasswordin interfaceIDatabricksConnectionContext
-
getUseProxy
public Boolean getUseProxy()
- Specified by:
getUseProxyin interfaceIDatabricksConnectionContext
-
getProxyAuthType
public com.databricks.sdk.core.ProxyConfig.ProxyAuthType getProxyAuthType()
- Specified by:
getProxyAuthTypein interfaceIDatabricksConnectionContext
-
getUseSystemProxy
public Boolean getUseSystemProxy()
- Specified by:
getUseSystemProxyin interfaceIDatabricksConnectionContext
-
getUseCloudFetchProxy
public Boolean getUseCloudFetchProxy()
- Specified by:
getUseCloudFetchProxyin interfaceIDatabricksConnectionContext
-
getCloudFetchProxyHost
public String getCloudFetchProxyHost()
- Specified by:
getCloudFetchProxyHostin interfaceIDatabricksConnectionContext
-
getCloudFetchProxyPort
public int getCloudFetchProxyPort()
- Specified by:
getCloudFetchProxyPortin interfaceIDatabricksConnectionContext
-
getCloudFetchProxyUser
public String getCloudFetchProxyUser()
- Specified by:
getCloudFetchProxyUserin interfaceIDatabricksConnectionContext
-
getCloudFetchProxyPassword
public String getCloudFetchProxyPassword()
- Specified by:
getCloudFetchProxyPasswordin interfaceIDatabricksConnectionContext
-
getCloudFetchProxyAuthType
public com.databricks.sdk.core.ProxyConfig.ProxyAuthType getCloudFetchProxyAuthType()
- Specified by:
getCloudFetchProxyAuthTypein interfaceIDatabricksConnectionContext
-
shouldEnableArrow
public Boolean shouldEnableArrow()
- Specified by:
shouldEnableArrowin interfaceIDatabricksConnectionContext
-
getEndpointURL
public String getEndpointURL() throws DatabricksParsingException
- Specified by:
getEndpointURLin interfaceIDatabricksConnectionContext- Throws:
DatabricksParsingException
-
shouldRetryTemporarilyUnavailableError
public Boolean shouldRetryTemporarilyUnavailableError()
- Specified by:
shouldRetryTemporarilyUnavailableErrorin interfaceIDatabricksConnectionContext
-
shouldRetryRateLimitError
public Boolean shouldRetryRateLimitError()
- Specified by:
shouldRetryRateLimitErrorin interfaceIDatabricksConnectionContext
-
getTemporarilyUnavailableRetryTimeout
public int getTemporarilyUnavailableRetryTimeout()
- Specified by:
getTemporarilyUnavailableRetryTimeoutin interfaceIDatabricksConnectionContext
-
getRateLimitRetryTimeout
public int getRateLimitRetryTimeout()
- Specified by:
getRateLimitRetryTimeoutin interfaceIDatabricksConnectionContext
-
getIdleHttpConnectionExpiry
public int getIdleHttpConnectionExpiry()
- Specified by:
getIdleHttpConnectionExpiryin interfaceIDatabricksConnectionContext
-
supportManyParameters
public boolean supportManyParameters()
- Specified by:
supportManyParametersin interfaceIDatabricksConnectionContext
-
isFakeServiceTest
public boolean isFakeServiceTest()
Returns whether the current test is a fake service test.- Specified by:
isFakeServiceTestin interfaceIDatabricksConnectionContext
-
enableTelemetry
public boolean enableTelemetry()
- Specified by:
enableTelemetryin interfaceIDatabricksConnectionContext
-
getConnectionURL
public String getConnectionURL()
- Specified by:
getConnectionURLin interfaceIDatabricksConnectionContext
-
-