public abstract class LensService extends org.apache.hive.service.CompositeService implements Externalizable
Modifier and Type | Field and Description |
---|---|
static org.apache.commons.logging.Log |
LOG
The Constant LOG.
|
Modifier and Type | Method and Description |
---|---|
void |
acquire(LensSessionHandle sessionHandle)
Acquire.
|
void |
acquire(String sessionHandle)
Acquire a lens session specified by the public UUID.
|
void |
addResource(LensSessionHandle sessionHandle,
String type,
String path)
Adds the resource.
|
void |
closeSession(LensSessionHandle sessionHandle)
Close session.
|
void |
deleteResource(LensSessionHandle sessionHandle,
String type,
String path)
Delete resource.
|
org.apache.hive.service.cli.CLIService |
getCliService() |
static org.apache.hive.service.cli.SessionHandle |
getHiveSessionHandle(LensSessionHandle lensHandle)
Gets the hive session handle.
|
org.apache.hadoop.conf.Configuration |
getLensConf(LensConf conf)
Gets the lens conf.
|
org.apache.hadoop.conf.Configuration |
getLensConf(LensSessionHandle sessionHandle,
LensConf conf)
Gets the lens conf.
|
static int |
getNumberOfSessions() |
String |
getServerDomain() |
LensSessionImpl |
getSession(LensSessionHandle sessionHandle)
Gets the session.
|
org.apache.hive.service.cli.session.SessionManager |
getSessionManager() |
LensSessionHandle |
openSession(String username,
String password,
Map<String,String> configuration)
Open session.
|
void |
prepareStopping()
Prepare stopping.
|
void |
readExternal(ObjectInput in) |
void |
release(LensSessionHandle sessionHandle)
Release.
|
void |
release(String sessionHandle)
Releases a lens session specified by the public UUID.
|
void |
restoreSession(LensSessionHandle sessionHandle,
String userName,
String password)
Restore session from previous instance of lens server.
|
void |
writeExternal(ObjectOutput out) |
getServices, init, start, stop
public org.apache.hive.service.cli.CLIService getCliService()
public String getServerDomain()
public static int getNumberOfSessions()
public LensSessionHandle openSession(String username, String password, Map<String,String> configuration) throws LensException
username
- the usernamepassword
- the passwordconfiguration
- the configurationLensException
- the lens exceptionpublic void restoreSession(LensSessionHandle sessionHandle, String userName, String password) throws LensException
sessionHandle
- the session handleuserName
- the user namepassword
- the passwordLensException
- the lens exceptionpublic void closeSession(LensSessionHandle sessionHandle) throws LensException
sessionHandle
- the session handleLensException
- the lens exceptionpublic org.apache.hive.service.cli.session.SessionManager getSessionManager()
public LensSessionImpl getSession(LensSessionHandle sessionHandle)
sessionHandle
- the session handlepublic void acquire(LensSessionHandle sessionHandle)
sessionHandle
- the session handlepublic void acquire(String sessionHandle)
sessionHandle
- public UUID of the sessionpublic void release(LensSessionHandle sessionHandle)
sessionHandle
- the session handlepublic void release(String sessionHandle) throws LensException
sessionHandle
- the session handleLensException
- if session cannot be releasedpublic void addResource(LensSessionHandle sessionHandle, String type, String path) throws LensException
sessionHandle
- the session handletype
- the typepath
- the pathLensException
- the lens exceptionpublic void deleteResource(LensSessionHandle sessionHandle, String type, String path) throws LensException
sessionHandle
- the session handletype
- the typepath
- the pathLensException
- the lens exceptionpublic static org.apache.hive.service.cli.SessionHandle getHiveSessionHandle(LensSessionHandle lensHandle)
lensHandle
- the lens handlepublic org.apache.hadoop.conf.Configuration getLensConf(LensSessionHandle sessionHandle, LensConf conf) throws LensException
sessionHandle
- the session handleconf
- the confLensException
- the lens exceptionpublic org.apache.hadoop.conf.Configuration getLensConf(LensConf conf) throws LensException
conf
- the confLensException
- the lens exceptionpublic void prepareStopping()
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
Copyright © 2014–2015 Apache Software Foundation. All rights reserved.