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, restoreSession
getHiveConf, getName, getServiceState, getStartTime, register, unregister
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
restoreSession
public HiveSessionService(org.apache.hive.service.cli.CLIService cliService)
cliService
- the cli servicepublic int addResourceToAllServices(LensSessionHandle sessionid, String type, String path)
addResourceToAllServices
in interface SessionService
sessionid
- the sessionidtype
- the typepath
- the pathpublic List<String> listAllResources(LensSessionHandle sessionHandle, String type)
SessionService
listAllResources
in interface SessionService
sessionHandle
- the sessionidtype
- the resource type, can be null, file or jarpublic void addResource(LensSessionHandle sessionid, String type, String path)
addResource
in interface SessionService
addResource
in class BaseLensService
sessionid
- the session handletype
- the typepath
- the pathpublic void deleteResource(LensSessionHandle sessionid, String type, String path)
deleteResource
in interface SessionService
deleteResource
in class BaseLensService
sessionid
- the session handletype
- the typepath
- the pathpublic LensSessionHandle openSession(String username, String password, String database, Map<String,String> configuration) throws LensException
openSession
in interface SessionService
username
- the usernamepassword
- the passworddatabase
- Set current database to the supplied valueconfiguration
- the configurationLensException
- the lens exceptionpublic boolean isOpen(LensSessionHandle sessionHandle)
SessionService
isOpen
in interface SessionService
public List<String> getAllSessionParameters(LensSessionHandle sessionid, boolean verbose, String key) throws LensException
getAllSessionParameters
in interface SessionService
sessionid
- the sessionidverbose
- the verbosekey
- the keyLensException
- the lens exceptionpublic void setSessionParameter(LensSessionHandle sessionid, String key, String value)
setSessionParameter
in interface SessionService
sessionid
- the sessionidkey
- the keyvalue
- the valuepublic void init(org.apache.hadoop.hive.conf.HiveConf hiveConf)
init
in interface org.apache.hive.service.Service
init
in class org.apache.hive.service.CompositeService
public void start()
start
in interface org.apache.hive.service.Service
start
in class org.apache.hive.service.CompositeService
public void stop()
stop
in interface org.apache.hive.service.Service
stop
in class org.apache.hive.service.CompositeService
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
writeExternal
in class BaseLensService
IOException
public HealthStatus getHealthStatus()
BaseLensService
getHealthStatus
in interface HealthCheckable
getHealthStatus
in class BaseLensService
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
readExternal
in class BaseLensService
IOException
ClassNotFoundException
public void closeSession(LensSessionHandle sessionHandle) throws LensException
closeSession
in interface SessionService
closeSession
in class BaseLensService
sessionHandle
- the session handleLensException
- the lens exceptionCopyright © 2014–2015 Apache Software Foundation. All rights reserved.