public class HiveSessionService extends BaseLensService implements SessionService
| Modifier and Type | Class and Description |
|---|---|
class |
HiveSessionService.SessionExpiryRunnable
The Class SessionExpiryRunnable.
|
NAME| Constructor and Description |
|---|
HiveSessionService(org.apache.hive.service.cli.CLIService cliService)
Instantiates a new hive session service.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addResource(LensSessionHandle sessionid,
String type,
String path)
Adds the resource.
|
int |
addResourceToAllServices(LensSessionHandle sessionid,
String type,
String path)
Adds the resource to all services.
|
void |
closeSession(LensSessionHandle sessionHandle)
Close session.
|
void |
deleteResource(LensSessionHandle sessionid,
String type,
String path)
Delete resource.
|
List<String> |
getAllSessionParameters(LensSessionHandle sessionid,
boolean verbose,
String key)
Gets the all session parameters.
|
HealthStatus |
getHealthStatus()
Returns the health status of the service.
|
void |
init(org.apache.hadoop.hive.conf.HiveConf hiveConf) |
boolean |
isOpen(LensSessionHandle sessionHandle)
Returns true if the session is open
|
List<String> |
listAllResources(LensSessionHandle sessionHandle,
String type)
Lists resources from the session service
|
LensSessionHandle |
openSession(String username,
String password,
String database,
Map<String,String> configuration)
Open session.
|
void |
readExternal(ObjectInput in) |
void |
setSessionParameter(LensSessionHandle sessionid,
String key,
String value)
Sets the session parameter.
|
void |
start() |
void |
stop() |
void |
writeExternal(ObjectOutput out) |
acquire, acquire, getCliService, getHiveSessionHandle, getLensConf, getLensConf, getNumberOfSessions, getServerDomain, getSession, getSessionManager, getValidPath, openSession, prepareStopping, release, release, removePrefixBeforeURI, restoreSessiongetHiveConf, getName, getServiceState, getStartTime, register, unregisterequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitrestoreSessionpublic HiveSessionService(org.apache.hive.service.cli.CLIService cliService)
cliService - the cli servicepublic int addResourceToAllServices(LensSessionHandle sessionid, String type, String path)
addResourceToAllServices in interface SessionServicesessionid - the sessionidtype - the typepath - the pathpublic List<String> listAllResources(LensSessionHandle sessionHandle, String type)
SessionServicelistAllResources in interface SessionServicesessionHandle - the sessionidtype - the resource type, can be null, file or jarpublic void addResource(LensSessionHandle sessionid, String type, String path)
addResource in interface SessionServiceaddResource in class BaseLensServicesessionid - the session handletype - the typepath - the pathpublic void deleteResource(LensSessionHandle sessionid, String type, String path)
deleteResource in interface SessionServicedeleteResource in class BaseLensServicesessionid - the session handletype - the typepath - the pathpublic LensSessionHandle openSession(String username, String password, String database, Map<String,String> configuration) throws LensException
openSession in interface SessionServiceusername - the usernamepassword - the passworddatabase - Set current database to the supplied valueconfiguration - the configurationLensException - the lens exceptionpublic boolean isOpen(LensSessionHandle sessionHandle)
SessionServiceisOpen in interface SessionServicepublic List<String> getAllSessionParameters(LensSessionHandle sessionid, boolean verbose, String key) throws LensException
getAllSessionParameters in interface SessionServicesessionid - the sessionidverbose - the verbosekey - the keyLensException - the lens exceptionpublic void setSessionParameter(LensSessionHandle sessionid, String key, String value)
setSessionParameter in interface SessionServicesessionid - the sessionidkey - the keyvalue - the valuepublic void init(org.apache.hadoop.hive.conf.HiveConf hiveConf)
init in interface org.apache.hive.service.Serviceinit in class org.apache.hive.service.CompositeServicepublic void start()
start in interface org.apache.hive.service.Servicestart in class org.apache.hive.service.CompositeServicepublic void stop()
stop in interface org.apache.hive.service.Servicestop in class org.apache.hive.service.CompositeServicepublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizablewriteExternal in class BaseLensServiceIOExceptionpublic HealthStatus getHealthStatus()
BaseLensServicegetHealthStatus in interface HealthCheckablegetHealthStatus in class BaseLensServicepublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizablereadExternal in class BaseLensServiceIOExceptionClassNotFoundExceptionpublic void closeSession(LensSessionHandle sessionHandle) throws LensException
closeSession in interface SessionServicecloseSession in class BaseLensServicesessionHandle - the session handleLensException - the lens exceptionCopyright © 2014–2015 Apache Software Foundation. All rights reserved.