org.apache.lens.server.session
Class HiveSessionService
java.lang.Object
org.apache.hive.service.AbstractService
org.apache.hive.service.CompositeService
org.apache.lens.server.LensService
org.apache.lens.server.session.HiveSessionService
- All Implemented Interfaces:
- Externalizable, Serializable, org.apache.hive.service.Service, SessionService
public class HiveSessionService
- extends LensService
- implements SessionService
The Class HiveSessionService.
- See Also:
- Serialized Form
| 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. |
|
Constructor Summary |
HiveSessionService(org.apache.hive.service.cli.CLIService cliService)
Instantiates a new hive session service. |
|
Method Summary |
void |
addResource(org.apache.lens.api.LensSessionHandle sessionid,
String type,
String path)
Adds the resource. |
int |
addResourceToAllServices(org.apache.lens.api.LensSessionHandle sessionid,
String type,
String path)
|
void |
closeSession(org.apache.lens.api.LensSessionHandle sessionHandle)
Close session. |
void |
deleteResource(org.apache.lens.api.LensSessionHandle sessionid,
String type,
String path)
Delete resource. |
List<String> |
getAllSessionParameters(org.apache.lens.api.LensSessionHandle sessionid,
boolean verbose,
String key)
|
List<String> |
listAllResources(org.apache.lens.api.LensSessionHandle sessionHandle,
String type)
|
org.apache.lens.api.LensSessionHandle |
openSession(String username,
String password,
Map<String,String> configuration)
Open session. |
void |
readExternal(ObjectInput in)
|
void |
setSessionParameter(org.apache.lens.api.LensSessionHandle sessionid,
String key,
String value)
|
protected void |
setSessionParameter(org.apache.lens.api.LensSessionHandle sessionid,
String key,
String value,
boolean addToSession)
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, getSessionHandle, getSessionManager, prepareStopping, release, release, restoreSession |
| Methods inherited from class org.apache.hive.service.CompositeService |
addService, getServices, init, removeService |
| Methods inherited from class org.apache.hive.service.AbstractService |
getHiveConf, getName, getServiceState, getStartTime, register, unregister |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG
public static final org.apache.commons.logging.Log LOG
- The Constant LOG.
HiveSessionService
public HiveSessionService(org.apache.hive.service.cli.CLIService cliService)
- Instantiates a new hive session service.
- Parameters:
cliService - the cli service
addResourceToAllServices
public int addResourceToAllServices(org.apache.lens.api.LensSessionHandle sessionid,
String type,
String path)
- Specified by:
addResourceToAllServices in interface SessionService
listAllResources
public List<String> listAllResources(org.apache.lens.api.LensSessionHandle sessionHandle,
String type)
- Specified by:
listAllResources in interface SessionService
addResource
public void addResource(org.apache.lens.api.LensSessionHandle sessionid,
String type,
String path)
- Description copied from class:
LensService
- Adds the resource.
- Specified by:
addResource in interface SessionService- Overrides:
addResource in class LensService
- Parameters:
sessionid - the session handletype - the typepath - the path
deleteResource
public void deleteResource(org.apache.lens.api.LensSessionHandle sessionid,
String type,
String path)
- Description copied from class:
LensService
- Delete resource.
- Specified by:
deleteResource in interface SessionService- Overrides:
deleteResource in class LensService
- Parameters:
sessionid - the session handletype - the typepath - the path
openSession
public org.apache.lens.api.LensSessionHandle openSession(String username,
String password,
Map<String,String> configuration)
throws org.apache.lens.api.LensException
- Description copied from class:
LensService
- Open session.
- Specified by:
openSession in interface SessionService- Overrides:
openSession in class LensService
- Parameters:
username - the usernamepassword - the passwordconfiguration - the configuration
- Returns:
- the lens session handle
- Throws:
org.apache.lens.api.LensException - the lens exception
getAllSessionParameters
public List<String> getAllSessionParameters(org.apache.lens.api.LensSessionHandle sessionid,
boolean verbose,
String key)
throws org.apache.lens.api.LensException
- Specified by:
getAllSessionParameters in interface SessionService
- Throws:
org.apache.lens.api.LensException
setSessionParameter
public void setSessionParameter(org.apache.lens.api.LensSessionHandle sessionid,
String key,
String value)
- Specified by:
setSessionParameter in interface SessionService
setSessionParameter
protected void setSessionParameter(org.apache.lens.api.LensSessionHandle sessionid,
String key,
String value,
boolean addToSession)
- Sets the session parameter.
- Parameters:
sessionid - the sessionidkey - the keyvalue - the valueaddToSession - the add to session
start
public void start()
- Specified by:
start in interface org.apache.hive.service.Service- Overrides:
start in class org.apache.hive.service.CompositeService
stop
public void stop()
- Specified by:
stop in interface org.apache.hive.service.Service- Overrides:
stop in class org.apache.hive.service.CompositeService
writeExternal
public void writeExternal(ObjectOutput out)
throws IOException
- Specified by:
writeExternal in interface Externalizable- Overrides:
writeExternal in class LensService
- Throws:
IOException
readExternal
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
- Specified by:
readExternal in interface Externalizable- Overrides:
readExternal in class LensService
- Throws:
IOException
ClassNotFoundException
closeSession
public void closeSession(org.apache.lens.api.LensSessionHandle sessionHandle)
throws org.apache.lens.api.LensException
- Description copied from class:
LensService
- Close session.
- Specified by:
closeSession in interface SessionService- Overrides:
closeSession in class LensService
- Parameters:
sessionHandle - the session handle
- Throws:
org.apache.lens.api.LensException - the lens exception
Copyright © 2014–2015 Apache Software Foundation. All rights reserved.