public class KyuubiConnection extends Object implements SQLConnection, KyuubiLoggable
| Modifier and Type | Field and Description |
|---|---|
static String |
BEELINE_MODE_PROPERTY |
static int |
DEFAULT_ENGINE_LOG_THREAD_TIMEOUT |
static String |
HS2_PROXY_USER |
static org.slf4j.Logger |
LOG |
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE| Constructor and Description |
|---|
KyuubiConnection(String uri,
Properties info) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancelDelegationToken(String tokenStr) |
void |
clearWarnings() |
void |
close() |
Statement |
createStatement()
Creates a Statement object for sending SQL statements to the database.
|
Statement |
createStatement(int resultSetType,
int resultSetConcurrency) |
void |
executeInitSql() |
static List<JdbcConnectionParams> |
getAllUrls(String zookeeperBasedHS2Url)
Get all direct HiveServer2 URLs from a ZooKeeper based HiveServer2 URL
|
boolean |
getAutoCommit() |
String |
getCatalog() |
Properties |
getClientInfo() |
String |
getClientInfo(String name) |
String |
getConnectedUrl() |
String |
getDelegationToken(String owner,
String renewer) |
String |
getEngineId() |
String |
getEngineName() |
String |
getEngineRefId() |
String |
getEngineUrl() |
List<String> |
getExecLog()
Get the launch engine operation logs of current connection.
|
DatabaseMetaData |
getMetaData() |
org.apache.kyuubi.shaded.hive.service.rpc.thrift.TProtocolVersion |
getProtocol() |
String |
getSchema() |
int |
getTransactionIsolation() |
SQLWarning |
getWarnings() |
boolean |
hasMoreLogs()
Check whether launch engine operation might be producing more logs to be fetched.
|
boolean |
isClosed() |
boolean |
isReadOnly() |
boolean |
isValid(int timeout) |
boolean |
isWrapperFor(Class<?> iface) |
static org.apache.kyuubi.shaded.hive.service.rpc.thrift.TCLIService.Iface |
newSynchronizedClient(org.apache.kyuubi.shaded.hive.service.rpc.thrift.TCLIService.Iface client) |
static List<String> |
parseInitFile(String initFile) |
PreparedStatement |
prepareStatement(String sql) |
PreparedStatement |
prepareStatement(String sql,
int autoGeneratedKeys) |
PreparedStatement |
prepareStatement(String sql,
int resultSetType,
int resultSetConcurrency) |
void |
renewDelegationToken(String tokenStr) |
void |
setAutoCommit(boolean autoCommit) |
void |
setCatalog(String catalog) |
void |
setClientInfo(Properties properties) |
void |
setClientInfo(String name,
String value) |
void |
setEngineLogThread(Thread logThread) |
void |
setReadOnly(boolean readOnly) |
void |
setSchema(String schema) |
void |
setTransactionIsolation(int level) |
<T> T |
unwrap(Class<T> iface) |
void |
waitLaunchEngineToComplete() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitabort, commit, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStatement, createStruct, getHoldability, getNetworkTimeout, getTypeMap, nativeSQL, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, rollback, setHoldability, setNetworkTimeout, setSavepoint, setSavepoint, setTypeMappublic static final org.slf4j.Logger LOG
public static final String BEELINE_MODE_PROPERTY
public static final String HS2_PROXY_USER
public static int DEFAULT_ENGINE_LOG_THREAD_TIMEOUT
public KyuubiConnection(String uri, Properties info) throws SQLException
SQLExceptionpublic static List<JdbcConnectionParams> getAllUrls(String zookeeperBasedHS2Url) throws Exception
Exceptionpublic boolean hasMoreLogs()
hasMoreLogs in interface KyuubiLoggablepublic List<String> getExecLog() throws SQLException, ClosedOrCancelledException
getExecLog in interface KyuubiLoggableSQLExceptionClosedOrCancelledException - if connection has been closedpublic void setEngineLogThread(Thread logThread)
public void executeInitSql()
throws SQLException
SQLExceptionpublic static List<String> parseInitFile(String initFile) throws IOException
IOExceptionpublic String getConnectedUrl()
public String getDelegationToken(String owner, String renewer) throws SQLException
SQLExceptionpublic void cancelDelegationToken(String tokenStr) throws SQLException
SQLExceptionpublic void renewDelegationToken(String tokenStr) throws SQLException
SQLExceptionpublic void clearWarnings()
throws SQLException
clearWarnings in interface ConnectionSQLExceptionpublic void close()
throws SQLException
close in interface AutoCloseableclose in interface ConnectionSQLExceptionpublic Statement createStatement() throws SQLException
createStatement in interface ConnectionSQLException - if a database access error occurs.Connection.createStatement()public Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException
createStatement in interface ConnectionSQLExceptionpublic boolean getAutoCommit()
throws SQLException
getAutoCommit in interface ConnectionSQLExceptionpublic String getCatalog() throws SQLException
getCatalog in interface ConnectionSQLExceptionpublic Properties getClientInfo() throws SQLException
getClientInfo in interface ConnectionSQLExceptionpublic String getClientInfo(String name) throws SQLException
getClientInfo in interface ConnectionSQLExceptionpublic DatabaseMetaData getMetaData() throws SQLException
getMetaData in interface ConnectionSQLExceptionpublic String getSchema() throws SQLException
getSchema in interface ConnectionSQLExceptionpublic int getTransactionIsolation()
throws SQLException
getTransactionIsolation in interface ConnectionSQLExceptionpublic SQLWarning getWarnings() throws SQLException
getWarnings in interface ConnectionSQLExceptionpublic boolean isClosed()
throws SQLException
isClosed in interface ConnectionSQLExceptionpublic boolean isReadOnly()
throws SQLException
isReadOnly in interface ConnectionSQLExceptionpublic boolean isValid(int timeout)
throws SQLException
isValid in interface ConnectionSQLExceptionpublic PreparedStatement prepareStatement(String sql) throws SQLException
prepareStatement in interface ConnectionSQLExceptionpublic PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException
prepareStatement in interface ConnectionSQLExceptionpublic PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException
prepareStatement in interface ConnectionSQLExceptionpublic void setAutoCommit(boolean autoCommit)
throws SQLException
setAutoCommit in interface ConnectionSQLExceptionpublic void setCatalog(String catalog) throws SQLException
setCatalog in interface ConnectionSQLExceptionpublic void setClientInfo(Properties properties) throws SQLClientInfoException
setClientInfo in interface ConnectionSQLClientInfoExceptionpublic void setClientInfo(String name, String value) throws SQLClientInfoException
setClientInfo in interface ConnectionSQLClientInfoExceptionpublic void setReadOnly(boolean readOnly)
throws SQLException
setReadOnly in interface ConnectionSQLExceptionpublic void setSchema(String schema) throws SQLException
setSchema in interface ConnectionSQLExceptionpublic void setTransactionIsolation(int level)
throws SQLException
setTransactionIsolation in interface ConnectionSQLExceptionpublic boolean isWrapperFor(Class<?> iface) throws SQLException
isWrapperFor in interface WrapperSQLExceptionpublic <T> T unwrap(Class<T> iface) throws SQLException
unwrap in interface WrapperSQLExceptionpublic org.apache.kyuubi.shaded.hive.service.rpc.thrift.TProtocolVersion getProtocol()
public static org.apache.kyuubi.shaded.hive.service.rpc.thrift.TCLIService.Iface newSynchronizedClient(org.apache.kyuubi.shaded.hive.service.rpc.thrift.TCLIService.Iface client)
public void waitLaunchEngineToComplete()
throws SQLException
SQLExceptionpublic String getEngineId()
public String getEngineName()
public String getEngineUrl()
public String getEngineRefId()
Copyright © 2023 The Apache Software Foundation. All rights reserved.