public class LensSessionImpl extends org.apache.hive.service.cli.session.HiveSessionImpl implements AutoCloseable
| Modifier and Type | Class and Description | 
|---|---|
static class  | 
LensSessionImpl.LensSessionPersistInfo
The Class LensSessionPersistInfo. 
 | 
static class  | 
LensSessionImpl.ResourceEntry
The Class ResourceEntry. 
 | 
| Modifier and Type | Field and Description | 
|---|---|
static Map<String,String> | 
DEFAULT_HIVE_SESSION_CONF
The default hive session conf. 
 | 
| Constructor and Description | 
|---|
LensSessionImpl(org.apache.hive.service.cli.SessionHandle sessionHandle,
               org.apache.hive.service.rpc.thrift.TProtocolVersion protocol,
               String username,
               String password,
               org.apache.hadoop.hive.conf.HiveConf serverConf,
               String ipAddress)
Constructor used when restoring session. 
 | 
LensSessionImpl(org.apache.hive.service.rpc.thrift.TProtocolVersion protocol,
               String username,
               String password,
               org.apache.hadoop.hive.conf.HiveConf serverConf,
               String ipAddress)
Instantiates a new lens session impl. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
acquire()  | 
void | 
acquire(boolean userAccess)  | 
boolean | 
activeOperationsPresent()  | 
void | 
addResource(String type,
           String path,
           String finalLocation)
Adds the resource. 
 | 
void | 
addToActiveQueries(QueryHandle queryHandle)  | 
void | 
close()  | 
static org.apache.hadoop.conf.Configuration | 
createDefaultConf()
Creates the default conf. 
 | 
List<QueryHandle> | 
getActiveQueries()
List of queries which are submitted in this session. 
 | 
ClassLoader | 
getClassLoader()  | 
String | 
getClusterUser()  | 
CubeMetastoreClient | 
getCubeMetastoreClient()  | 
String | 
getCurrentDatabase()  | 
Collection<LensSessionImpl.ResourceEntry> | 
getDBResources(String database)
Return resources which are added statically to the database 
 | 
static Map<String,String> | 
getHiveSessionConf()  | 
long | 
getLastAccessTime()  | 
LensSessionImpl.LensSessionPersistInfo | 
getLensSessionPersistInfo()  | 
String | 
getLoggedInUser()  | 
Collection<LensSessionImpl.ResourceEntry> | 
getPendingSessionResourcesForDatabase(String database)
Get session's resources which have to be added for the given database 
 | 
org.apache.hadoop.conf.Configuration | 
getSessionConf()  | 
boolean | 
isActive()  | 
void | 
markForClose()  | 
void | 
open(Map<String,String> sessionConfMap)  | 
void | 
release()  | 
void | 
release(boolean userAccess)  | 
void | 
removeFromActiveQueries(QueryHandle queryHandle)  | 
void | 
removeResource(String type,
              String path)
Removes the resource. 
 | 
void | 
setActive()  | 
void | 
setConfig(Map<String,String> config)
Sets the config. 
 | 
void | 
setCurrentDatabase(String currentDatabase)  | 
String | 
toString()  | 
cancelDelegationToken, cancelOperation, closeExpiredOperations, closeOperation, executeStatement, executeStatement, executeStatementAsync, executeStatementAsync, fetchResults, getCatalogs, getColumns, getCreationTime, getCrossReference, getDelegationToken, getFunctions, getHiveConf, getInfo, getIpAddress, getMetaStoreClient, getNoOperationTime, getOpenOperationCount, getOperationLogSessionDir, getPassword, getPrimaryKeys, getProtocolVersion, getResultSetMetadata, getSchemas, getSessionHandle, getSessionHive, getSessionManager, getSessionState, getTables, getTableTypes, getTypeInfo, getUserName, isOperationLogEnabled, renewDelegationToken, setIpAddress, setOperationLogSessionDir, setOperationManager, setSessionManager, setUserNamepublic LensSessionImpl(org.apache.hive.service.rpc.thrift.TProtocolVersion protocol,
               String username,
               String password,
               org.apache.hadoop.hive.conf.HiveConf serverConf,
               String ipAddress)
protocol - the protocolusername - the usernamepassword - the passwordserverConf - the server confipAddress - the ip addresspublic LensSessionImpl(org.apache.hive.service.cli.SessionHandle sessionHandle,
               org.apache.hive.service.rpc.thrift.TProtocolVersion protocol,
               String username,
               String password,
               org.apache.hadoop.hive.conf.HiveConf serverConf,
               String ipAddress)
sessionHandle - the session handleprotocol - the protocolusername - the usernamepassword - the passwordserverConf - the server confipAddress - the ip addresspublic static org.apache.hadoop.conf.Configuration createDefaultConf()
public org.apache.hadoop.conf.Configuration getSessionConf()
public void open(Map<String,String> sessionConfMap) throws org.apache.hive.service.cli.HiveSQLException
open in interface org.apache.hive.service.cli.session.HiveSessionopen in class org.apache.hive.service.cli.session.HiveSessionImplorg.apache.hive.service.cli.HiveSQLExceptionpublic void close()
           throws org.apache.hive.service.cli.HiveSQLException
close in interface AutoCloseableclose in interface org.apache.hive.service.cli.session.HiveSessionclose in class org.apache.hive.service.cli.session.HiveSessionImplorg.apache.hive.service.cli.HiveSQLExceptionpublic CubeMetastoreClient getCubeMetastoreClient() throws LensException
LensExceptionpublic void acquire()
public void acquire(boolean userAccess)
acquire in class org.apache.hive.service.cli.session.HiveSessionImplpublic void release()
public void release(boolean userAccess)
release in class org.apache.hive.service.cli.session.HiveSessionImplpublic boolean isActive()
public void setActive()
public void setConfig(Map<String,String> config)
config - the config to overlaypublic void removeResource(String type, String path)
type - the typepath - the pathpublic void addResource(String type, String path, String finalLocation)
type - the typepath - the pathfinalLocation - The final location where resources is downloadedpublic void setCurrentDatabase(String currentDatabase)
public String getCurrentDatabase()
public String getLoggedInUser()
public String getClusterUser()
public LensSessionImpl.LensSessionPersistInfo getLensSessionPersistInfo()
public long getLastAccessTime()
getLastAccessTime in interface org.apache.hive.service.cli.session.HiveSessionBasegetLastAccessTime in class org.apache.hive.service.cli.session.HiveSessionImplpublic Collection<LensSessionImpl.ResourceEntry> getDBResources(String database)
public Collection<LensSessionImpl.ResourceEntry> getPendingSessionResourcesForDatabase(String database)
public ClassLoader getClassLoader()
public void markForClose()
public void addToActiveQueries(QueryHandle queryHandle)
public void removeFromActiveQueries(QueryHandle queryHandle)
public boolean activeOperationsPresent()
@Generated(value="lombok") public List<QueryHandle> getActiveQueries()
Copyright © 2014–2016 Apache Software Foundation. All rights reserved.