public class CLIService extends CompositeService implements ICLIService
CompositeService.CompositeServiceShutdownHookService.STATE| Modifier and Type | Field and Description |
|---|---|
static org.apache.hive.service.rpc.thrift.TProtocolVersion |
SERVER_VERSION |
| Constructor and Description |
|---|
CLIService(HiveServer2 hiveServer2) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancelDelegationToken(SessionHandle sessionHandle,
HiveAuthFactory authFactory,
String tokenStr) |
void |
cancelOperation(OperationHandle opHandle) |
void |
closeOperation(OperationHandle opHandle) |
void |
closeSession(SessionHandle sessionHandle) |
void |
createSessionWithSessionHandle(SessionHandle sessionHandle,
String username,
String password,
Map<String,String> configuration)
Used to restore session
|
OperationHandle |
executeStatement(SessionHandle sessionHandle,
String statement,
Map<String,String> confOverlay)
Execute statement on the server.
|
OperationHandle |
executeStatement(SessionHandle sessionHandle,
String statement,
Map<String,String> confOverlay,
long queryTimeout)
Execute statement on the server with a timeout.
|
OperationHandle |
executeStatementAsync(SessionHandle sessionHandle,
String statement,
Map<String,String> confOverlay)
Execute statement asynchronously on the server.
|
OperationHandle |
executeStatementAsync(SessionHandle sessionHandle,
String statement,
Map<String,String> confOverlay,
long queryTimeout)
Execute statement asynchronously on the server with a timeout.
|
RowSet |
fetchResults(OperationHandle opHandle) |
RowSet |
fetchResults(OperationHandle opHandle,
FetchOrientation orientation,
long maxRows,
FetchType fetchType) |
OperationHandle |
getCatalogs(SessionHandle sessionHandle) |
OperationHandle |
getColumns(SessionHandle sessionHandle,
String catalogName,
String schemaName,
String tableName,
String columnName) |
OperationHandle |
getCrossReference(SessionHandle sessionHandle,
String primaryCatalog,
String primarySchema,
String primaryTable,
String foreignCatalog,
String foreignSchema,
String foreignTable) |
String |
getDelegationToken(SessionHandle sessionHandle,
HiveAuthFactory authFactory,
String owner,
String renewer) |
String |
getDelegationTokenFromMetaStore(String owner) |
OperationHandle |
getFunctions(SessionHandle sessionHandle,
String catalogName,
String schemaName,
String functionName) |
org.apache.hadoop.security.UserGroupInformation |
getHttpUGI() |
GetInfoValue |
getInfo(SessionHandle sessionHandle,
GetInfoType getInfoType) |
OperationStatus |
getOperationStatus(OperationHandle opHandle,
boolean getProgressUpdate) |
OperationHandle |
getPrimaryKeys(SessionHandle sessionHandle,
String catalog,
String schema,
String table) |
String |
getQueryId(org.apache.hive.service.rpc.thrift.TOperationHandle opHandle) |
TableSchema |
getResultSetMetadata(OperationHandle opHandle) |
OperationHandle |
getSchemas(SessionHandle sessionHandle,
String catalogName,
String schemaName) |
org.apache.hadoop.security.UserGroupInformation |
getServiceUGI() |
HiveConf |
getSessionConf(SessionHandle sessionHandle) |
SessionManager |
getSessionManager() |
OperationHandle |
getTables(SessionHandle sessionHandle,
String catalogName,
String schemaName,
String tableName,
List<String> tableTypes) |
OperationHandle |
getTableTypes(SessionHandle sessionHandle) |
OperationHandle |
getTypeInfo(SessionHandle sessionHandle) |
void |
init(HiveConf hiveConf)
Initialize the service.
|
SessionHandle |
openSession(String username,
String password,
Map<String,String> configuration) |
SessionHandle |
openSession(org.apache.hive.service.rpc.thrift.TProtocolVersion protocol,
String username,
String password,
Map<String,String> configuration)
Deprecated.
|
SessionHandle |
openSession(org.apache.hive.service.rpc.thrift.TProtocolVersion protocol,
String username,
String password,
String ipAddress,
Map<String,String> configuration) |
SessionHandle |
openSessionWithImpersonation(String username,
String password,
Map<String,String> configuration,
String delegationToken) |
SessionHandle |
openSessionWithImpersonation(org.apache.hive.service.rpc.thrift.TProtocolVersion protocol,
String username,
String password,
Map<String,String> configuration,
String delegationToken)
|
SessionHandle |
openSessionWithImpersonation(org.apache.hive.service.rpc.thrift.TProtocolVersion protocol,
String username,
String password,
String ipAddress,
Map<String,String> configuration,
String delegationToken) |
void |
renewDelegationToken(SessionHandle sessionHandle,
HiveAuthFactory authFactory,
String tokenStr) |
void |
setApplicationName(SessionHandle sh,
String value) |
void |
start()
Start the service.
|
void |
stop()
Stop the service.
|
addService, getServices, removeServicegetHiveConf, getName, getServiceState, getStartTime, register, setHiveConf, unregisterpublic static final org.apache.hive.service.rpc.thrift.TProtocolVersion SERVER_VERSION
public CLIService(HiveServer2 hiveServer2)
public void init(HiveConf hiveConf)
AbstractServiceService.STATE.NOTINITED to Service.STATE.INITED unless the
operation failed and an exception was raised.init in interface Serviceinit in class CompositeServicepublic org.apache.hadoop.security.UserGroupInformation getServiceUGI()
public org.apache.hadoop.security.UserGroupInformation getHttpUGI()
public void start()
AbstractServiceService.STATE.INITED to Service.STATE.STARTED unless the
operation failed and an exception was raised.start in interface Servicestart in class CompositeServicepublic void stop()
AbstractServicestop in interface Servicestop in class CompositeService@Deprecated public SessionHandle openSession(org.apache.hive.service.rpc.thrift.TProtocolVersion protocol, String username, String password, Map<String,String> configuration) throws HiveSQLException
openSession(TProtocolVersion, String, String, String, Map)HiveSQLException@Deprecated public SessionHandle openSessionWithImpersonation(org.apache.hive.service.rpc.thrift.TProtocolVersion protocol, String username, String password, Map<String,String> configuration, String delegationToken) throws HiveSQLException
HiveSQLExceptionpublic SessionHandle openSession(org.apache.hive.service.rpc.thrift.TProtocolVersion protocol, String username, String password, String ipAddress, Map<String,String> configuration) throws HiveSQLException
HiveSQLExceptionpublic SessionHandle openSessionWithImpersonation(org.apache.hive.service.rpc.thrift.TProtocolVersion protocol, String username, String password, String ipAddress, Map<String,String> configuration, String delegationToken) throws HiveSQLException
HiveSQLExceptionpublic SessionHandle openSession(String username, String password, Map<String,String> configuration) throws HiveSQLException
openSession in interface ICLIServiceHiveSQLExceptionpublic void createSessionWithSessionHandle(SessionHandle sessionHandle, String username, String password, Map<String,String> configuration) throws HiveSQLException
HiveSQLExceptionpublic SessionHandle openSessionWithImpersonation(String username, String password, Map<String,String> configuration, String delegationToken) throws HiveSQLException
openSessionWithImpersonation in interface ICLIServiceHiveSQLExceptionpublic void closeSession(SessionHandle sessionHandle) throws HiveSQLException
closeSession in interface ICLIServiceHiveSQLExceptionpublic GetInfoValue getInfo(SessionHandle sessionHandle, GetInfoType getInfoType) throws HiveSQLException
getInfo in interface ICLIServiceHiveSQLExceptionpublic OperationHandle executeStatement(SessionHandle sessionHandle, String statement, Map<String,String> confOverlay) throws HiveSQLException
executeStatement in interface ICLIServiceHiveSQLExceptionpublic OperationHandle executeStatement(SessionHandle sessionHandle, String statement, Map<String,String> confOverlay, long queryTimeout) throws HiveSQLException
executeStatement in interface ICLIServiceHiveSQLExceptionpublic OperationHandle executeStatementAsync(SessionHandle sessionHandle, String statement, Map<String,String> confOverlay) throws HiveSQLException
executeStatementAsync in interface ICLIServiceHiveSQLExceptionpublic OperationHandle executeStatementAsync(SessionHandle sessionHandle, String statement, Map<String,String> confOverlay, long queryTimeout) throws HiveSQLException
executeStatementAsync in interface ICLIServiceHiveSQLExceptionpublic OperationHandle getTypeInfo(SessionHandle sessionHandle) throws HiveSQLException
getTypeInfo in interface ICLIServiceHiveSQLExceptionpublic OperationHandle getCatalogs(SessionHandle sessionHandle) throws HiveSQLException
getCatalogs in interface ICLIServiceHiveSQLExceptionpublic OperationHandle getSchemas(SessionHandle sessionHandle, String catalogName, String schemaName) throws HiveSQLException
getSchemas in interface ICLIServiceHiveSQLExceptionpublic OperationHandle getTables(SessionHandle sessionHandle, String catalogName, String schemaName, String tableName, List<String> tableTypes) throws HiveSQLException
getTables in interface ICLIServiceHiveSQLExceptionpublic OperationHandle getTableTypes(SessionHandle sessionHandle) throws HiveSQLException
getTableTypes in interface ICLIServiceHiveSQLExceptionpublic OperationHandle getColumns(SessionHandle sessionHandle, String catalogName, String schemaName, String tableName, String columnName) throws HiveSQLException
getColumns in interface ICLIServiceHiveSQLExceptionpublic OperationHandle getFunctions(SessionHandle sessionHandle, String catalogName, String schemaName, String functionName) throws HiveSQLException
getFunctions in interface ICLIServiceHiveSQLExceptionpublic OperationHandle getPrimaryKeys(SessionHandle sessionHandle, String catalog, String schema, String table) throws HiveSQLException
getPrimaryKeys in interface ICLIServiceHiveSQLExceptionpublic OperationHandle getCrossReference(SessionHandle sessionHandle, String primaryCatalog, String primarySchema, String primaryTable, String foreignCatalog, String foreignSchema, String foreignTable) throws HiveSQLException
getCrossReference in interface ICLIServiceHiveSQLExceptionpublic OperationStatus getOperationStatus(OperationHandle opHandle, boolean getProgressUpdate) throws HiveSQLException
getOperationStatus in interface ICLIServiceHiveSQLExceptionpublic HiveConf getSessionConf(SessionHandle sessionHandle) throws HiveSQLException
HiveSQLExceptionpublic void cancelOperation(OperationHandle opHandle) throws HiveSQLException
cancelOperation in interface ICLIServiceHiveSQLExceptionpublic void closeOperation(OperationHandle opHandle) throws HiveSQLException
closeOperation in interface ICLIServiceHiveSQLExceptionpublic TableSchema getResultSetMetadata(OperationHandle opHandle) throws HiveSQLException
getResultSetMetadata in interface ICLIServiceHiveSQLExceptionpublic RowSet fetchResults(OperationHandle opHandle) throws HiveSQLException
fetchResults in interface ICLIServiceHiveSQLExceptionpublic RowSet fetchResults(OperationHandle opHandle, FetchOrientation orientation, long maxRows, FetchType fetchType) throws HiveSQLException
fetchResults in interface ICLIServiceHiveSQLExceptionpublic String getDelegationTokenFromMetaStore(String owner) throws HiveSQLException, UnsupportedOperationException, LoginException, IOException
public String getDelegationToken(SessionHandle sessionHandle, HiveAuthFactory authFactory, String owner, String renewer) throws HiveSQLException
getDelegationToken in interface ICLIServiceHiveSQLExceptionpublic void setApplicationName(SessionHandle sh, String value) throws HiveSQLException
setApplicationName in interface ICLIServiceHiveSQLExceptionpublic void cancelDelegationToken(SessionHandle sessionHandle, HiveAuthFactory authFactory, String tokenStr) throws HiveSQLException
cancelDelegationToken in interface ICLIServiceHiveSQLExceptionpublic void renewDelegationToken(SessionHandle sessionHandle, HiveAuthFactory authFactory, String tokenStr) throws HiveSQLException
renewDelegationToken in interface ICLIServiceHiveSQLExceptionpublic String getQueryId(org.apache.hive.service.rpc.thrift.TOperationHandle opHandle) throws HiveSQLException
getQueryId in interface ICLIServiceHiveSQLExceptionpublic SessionManager getSessionManager()
Copyright © 2019 The Apache Software Foundation. All Rights Reserved.