|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hive.service.AbstractService org.apache.hive.service.CompositeService org.apache.lens.server.LensService org.apache.lens.server.session.HiveSessionService
public class HiveSessionService
The Class HiveSessionService.
Nested Class Summary | |
---|---|
class |
HiveSessionService.SessionExpiryRunnable
The Class SessionExpiryRunnable. |
Nested classes/interfaces inherited from class org.apache.hive.service.CompositeService |
---|
org.apache.hive.service.CompositeService.CompositeServiceShutdownHook |
Nested classes/interfaces inherited from interface org.apache.hive.service.Service |
---|
org.apache.hive.service.Service.STATE |
Field Summary | |
---|---|
static org.apache.commons.logging.Log |
LOG
The Constant LOG. |
Fields inherited from interface org.apache.lens.server.api.session.SessionService |
---|
NAME |
Constructor Summary | |
---|---|
HiveSessionService(org.apache.hive.service.cli.CLIService cliService)
Instantiates a new hive session service. |
Method Summary | |
---|---|
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. |
void |
init(org.apache.hadoop.hive.conf.HiveConf hiveConf)
|
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)
|
Methods inherited from class org.apache.lens.server.LensService |
---|
acquire, acquire, getCliService, getHiveSessionHandle, getLensConf, getLensConf, getServerDomain, getSession, getSessionManager, openSession, prepareStopping, release, release, restoreSession |
Methods inherited from class org.apache.hive.service.CompositeService |
---|
getServices |
Methods inherited from class org.apache.hive.service.AbstractService |
---|
getHiveConf, getName, getServiceState, getStartTime, register, unregister |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.lens.server.api.session.SessionService |
---|
restoreSession |
Field Detail |
---|
public static final org.apache.commons.logging.Log LOG
Constructor Detail |
---|
public HiveSessionService(org.apache.hive.service.cli.CLIService cliService)
cliService
- the cli serviceMethod Detail |
---|
public int addResourceToAllServices(LensSessionHandle sessionid, String type, String path)
SessionService
addResourceToAllServices
in interface SessionService
sessionid
- the sessionidtype
- the typepath
- the path
public List<String> listAllResources(LensSessionHandle sessionHandle, String type)
SessionService
listAllResources
in interface SessionService
sessionHandle
- the sessionidtype
- the resource type, can be null, file or jar
public void addResource(LensSessionHandle sessionid, String type, String path)
LensService
addResource
in interface SessionService
addResource
in class LensService
sessionid
- the session handletype
- the typepath
- the pathpublic void deleteResource(LensSessionHandle sessionid, String type, String path)
LensService
deleteResource
in interface SessionService
deleteResource
in class LensService
sessionid
- the session handletype
- the typepath
- the pathpublic LensSessionHandle openSession(String username, String password, String database, Map<String,String> configuration) throws LensException
SessionService
openSession
in interface SessionService
username
- the usernamepassword
- the passworddatabase
- Set current database to the supplied valueconfiguration
- the configuration
LensException
- the lens exceptionpublic List<String> getAllSessionParameters(LensSessionHandle sessionid, boolean verbose, String key) throws LensException
SessionService
getAllSessionParameters
in interface SessionService
sessionid
- the sessionidverbose
- the verbosekey
- the key
LensException
- the lens exceptionpublic void setSessionParameter(LensSessionHandle sessionid, String key, String value)
SessionService
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 LensService
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
readExternal
in class LensService
IOException
ClassNotFoundException
public void closeSession(LensSessionHandle sessionHandle) throws LensException
LensService
closeSession
in interface SessionService
closeSession
in class LensService
sessionHandle
- the session handle
LensException
- the lens exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |