public class SessionManager extends CompositeService
CompositeService.CompositeServiceShutdownHook
Service.STATE
Modifier and Type | Field and Description |
---|---|
static String |
HIVERCFILE |
Constructor and Description |
---|
SessionManager(HiveServer2 hiveServer2) |
Modifier and Type | Method and Description |
---|---|
static void |
clearIpAddress() |
static void |
clearProxyUserName() |
static void |
clearUserName() |
void |
closeSession(SessionHandle sessionHandle) |
static String |
getIpAddress() |
int |
getOpenSessionCount() |
OperationManager |
getOperationManager() |
static String |
getProxyUserName() |
HiveSession |
getSession(SessionHandle sessionHandle) |
static String |
getUserName() |
void |
init(HiveConf hiveConf)
Initialize the service.
|
SessionHandle |
openSession(TProtocolVersion protocol,
String username,
String password,
String ipAddress,
Map<String,String> sessionConf) |
SessionHandle |
openSession(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 |
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, removeService
getHiveConf, getName, getServiceState, getStartTime, register, unregister
public static final String HIVERCFILE
public SessionManager(HiveServer2 hiveServer2)
public void init(HiveConf hiveConf)
AbstractService
Service.STATE.NOTINITED
to Service.STATE.INITED
unless the
operation failed and an exception was raised.init
in interface Service
init
in class CompositeService
public void start()
AbstractService
Service.STATE.INITED
to Service.STATE.STARTED
unless the
operation failed and an exception was raised.start
in interface Service
start
in class CompositeService
public void stop()
AbstractService
stop
in interface Service
stop
in class CompositeService
public SessionHandle openSession(TProtocolVersion protocol, String username, String password, String ipAddress, Map<String,String> sessionConf) throws HiveSQLException
HiveSQLException
public SessionHandle openSession(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
- HiveSQLException
org.apache.hive.service.cli.thrift.ThriftCLIService#getUserName()
public void closeSession(SessionHandle sessionHandle) throws HiveSQLException
HiveSQLException
public HiveSession getSession(SessionHandle sessionHandle) throws HiveSQLException
HiveSQLException
public OperationManager getOperationManager()
public static void setIpAddress(String ipAddress)
public static void clearIpAddress()
public static String getIpAddress()
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 int getOpenSessionCount()
Copyright © 2017 The Apache Software Foundation. All rights reserved.