public class SessionManager extends CompositeService
CompositeService.CompositeServiceShutdownHookService.STATE| Modifier and Type | Field and Description |
|---|---|
static String |
HIVERCFILE |
| Constructor and Description |
|---|
SessionManager(HiveServer2 hiveServer2) |
| Modifier and Type | Method and Description |
|---|---|
static void |
clearForwardedAddresses() |
static void |
clearIpAddress() |
static void |
clearProxyUserName() |
static void |
clearUserName() |
void |
closeSession(SessionHandle sessionHandle) |
HiveSession |
createSession(SessionHandle sessionHandle,
org.apache.hive.service.rpc.thrift.TProtocolVersion protocol,
String username,
String password,
String ipAddress,
Map<String,String> sessionConf,
boolean withImpersonation,
String delegationToken) |
static List<String> |
getForwardedAddresses() |
String |
getHiveServer2HostName() |
static String |
getIpAddress() |
int |
getOpenSessionCount() |
OperationManager |
getOperationManager() |
Collection<Operation> |
getOperations() |
static String |
getProxyUserName() |
HiveSession |
getSession(SessionHandle sessionHandle) |
Collection<HiveSession> |
getSessions() |
static String |
getUserName() |
void |
init(HiveConf hiveConf)
Initialize the service.
|
SessionHandle |
openSession(org.apache.hive.service.rpc.thrift.TProtocolVersion protocol,
String username,
String password,
String ipAddress,
Map<String,String> sessionConf) |
SessionHandle |
openSession(org.apache.hive.service.rpc.thrift.TProtocolVersion protocol,
String username,
String password,
String ipAddress,
Map<String,String> sessionConf,
boolean withImpersonation,
String delegationToken)
Opens a new session and creates a session handle.
|
static void |
setForwardedAddresses(List<String> ipAddress) |
static void |
setIpAddress(String ipAddress) |
static void |
setProxyUserName(String userName) |
static void |
setUserName(String userName) |
void |
start()
Start the service.
|
void |
stop()
Stop the service.
|
Future<?> |
submitBackgroundOperation(Runnable r) |
addService, getServices, removeServicegetHiveConf, getName, getServiceState, getStartTime, register, setHiveConf, unregisterpublic static final String HIVERCFILE
public SessionManager(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 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 CompositeServicepublic SessionHandle openSession(org.apache.hive.service.rpc.thrift.TProtocolVersion protocol, String username, String password, String ipAddress, Map<String,String> sessionConf) throws HiveSQLException
HiveSQLExceptionpublic SessionHandle openSession(org.apache.hive.service.rpc.thrift.TProtocolVersion protocol, String username, String password, String ipAddress, Map<String,String> sessionConf, boolean withImpersonation, String delegationToken) throws HiveSQLException
protocol - username - password - ipAddress - sessionConf - withImpersonation - delegationToken - HiveSQLExceptionThriftCLIService.getUserName(TOpenSessionReq)public HiveSession createSession(SessionHandle sessionHandle, org.apache.hive.service.rpc.thrift.TProtocolVersion protocol, String username, String password, String ipAddress, Map<String,String> sessionConf, boolean withImpersonation, String delegationToken) throws HiveSQLException
HiveSQLExceptionpublic void closeSession(SessionHandle sessionHandle) throws HiveSQLException
HiveSQLExceptionpublic HiveSession getSession(SessionHandle sessionHandle) throws HiveSQLException
HiveSQLExceptionpublic OperationManager getOperationManager()
public static void setIpAddress(String ipAddress)
public static void clearIpAddress()
public static String getIpAddress()
public static void clearForwardedAddresses()
public static void setUserName(String userName)
public static void clearUserName()
public static String getUserName()
public static void setProxyUserName(String userName)
public static String getProxyUserName()
public static void clearProxyUserName()
public Collection<Operation> getOperations()
public Collection<HiveSession> getSessions()
public int getOpenSessionCount()
Copyright © 2019 The Apache Software Foundation. All Rights Reserved.