public abstract class BaseLensService extends org.apache.hive.service.CompositeService implements Externalizable, LensService, SessionValidator
| Modifier and Type | Class and Description |
|---|---|
class |
BaseLensService.SessionContext |
| 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 |
closeSession(LensSessionHandle sessionHandle)
Close session.
|
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.
|
List<UserSessionInfo> |
getSessionInfo() |
org.apache.hive.service.cli.session.SessionManager |
getSessionManager() |
String |
getValidPath(File path,
boolean shouldBeDirectory,
boolean shouldExist)
Method that uses PathValidator to get appropriate path.
|
LensSessionHandle |
openSession(String username,
String password,
Map<String,String> configuration)
Open session.
|
LensSessionHandle |
openSession(String username,
String password,
Map<String,String> configuration,
boolean auth) |
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.
|
String |
removePrefixBeforeURI(String path)
Method to remove unrequired prefix from path.
|
void |
restoreSession(LensSessionHandle sessionHandle,
String userName,
String password)
Restore session from previous instance of lens server.
|
void |
validateSession(LensSessionHandle handle) |
void |
writeExternal(ObjectOutput out) |
getServices, init, start, stopgetHiveConf, getName, getServiceState, getStartTime, register, unregisterequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetHealthStatuspublic 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 LensSessionHandle openSession(String username, String password, Map<String,String> configuration, boolean auth) throws LensException
LensExceptionpublic 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 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 ExternalizableIOExceptionClassNotFoundExceptionpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic String getValidPath(File path, boolean shouldBeDirectory, boolean shouldExist)
path - shouldBeDirectory - shouldExist - public String removePrefixBeforeURI(String path)
path - public void validateSession(LensSessionHandle handle) throws LensException
validateSession in interface SessionValidatorLensExceptionpublic List<UserSessionInfo> getSessionInfo()
Copyright © 2014–2018 Apache Software Foundation. All rights reserved.