public class LensSessionImpl
extends org.apache.hive.service.cli.session.HiveSessionImpl
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.cli.thrift.TProtocolVersion protocol,
String username,
String password,
org.apache.hadoop.hive.conf.HiveConf serverConf,
Map<String,String> sessionConf,
String ipAddress)
Constructor used when restoring session.
|
LensSessionImpl(org.apache.hive.service.cli.thrift.TProtocolVersion protocol,
String username,
String password,
org.apache.hadoop.hive.conf.HiveConf serverConf,
Map<String,String> sessionConf,
String ipAddress)
Instantiates a new lens session impl.
|
Modifier and Type | Method and Description |
---|---|
void |
acquire() |
void |
addResource(String type,
String path)
Adds the resource.
|
void |
close() |
static org.apache.hadoop.conf.Configuration |
createDefaultConf()
Creates the default conf.
|
ClassLoader |
getClassLoader()
Get effective class loader for this session
|
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 |
release() |
void |
removeResource(String type,
String path)
Removes the resource.
|
void |
setConfig(Map<String,String> config)
Sets the config.
|
void |
setCurrentDatabase(String currentDatabase) |
String |
toString() |
cancelDelegationToken, cancelOperation, closeOperation, executeStatement, executeStatementAsync, fetchResults, fetchResults, getCatalogs, getColumns, getDelegationToken, getFunctions, getHiveConf, getInfo, getIpAddress, getMetaStoreClient, getPassword, getProtocolVersion, getQueryPlan, getResultSetMetadata, getSchemas, getSessionHandle, getSessionLogDir, getSessionManager, getSessionState, getTables, getTableTypes, getTypeInfo, getUsername, getUserName, isLogRedirectionEnabled, open, renewDelegationToken, setIpAddress, setOperationManager, setSessionManager, setupLogRedirection, setUserName
public LensSessionImpl(org.apache.hive.service.cli.thrift.TProtocolVersion protocol, String username, String password, org.apache.hadoop.hive.conf.HiveConf serverConf, Map<String,String> sessionConf, String ipAddress)
protocol
- the protocolusername
- the usernamepassword
- the passwordserverConf
- the server confsessionConf
- the session confipAddress
- the ip addresspublic LensSessionImpl(org.apache.hive.service.cli.SessionHandle sessionHandle, org.apache.hive.service.cli.thrift.TProtocolVersion protocol, String username, String password, org.apache.hadoop.hive.conf.HiveConf serverConf, Map<String,String> sessionConf, String ipAddress)
sessionHandle
- the session handleprotocol
- the protocolusername
- the usernamepassword
- the passwordserverConf
- the server confsessionConf
- the session confipAddress
- the ip addresspublic static org.apache.hadoop.conf.Configuration createDefaultConf()
public org.apache.hadoop.conf.Configuration getSessionConf()
public void close() throws org.apache.hive.service.cli.HiveSQLException
close
in interface org.apache.hive.service.cli.session.HiveSession
close
in class org.apache.hive.service.cli.session.HiveSessionImpl
org.apache.hive.service.cli.HiveSQLException
public CubeMetastoreClient getCubeMetastoreClient() throws LensException
LensException
public void acquire()
acquire
in class org.apache.hive.service.cli.session.HiveSessionImpl
public void release()
release
in class org.apache.hive.service.cli.session.HiveSessionImpl
public boolean isActive()
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)
type
- the typepath
- the pathpublic void setCurrentDatabase(String currentDatabase)
public String getCurrentDatabase()
public String getLoggedInUser()
public String getClusterUser()
public LensSessionImpl.LensSessionPersistInfo getLensSessionPersistInfo()
public long getLastAccessTime()
public Collection<LensSessionImpl.ResourceEntry> getDBResources(String database)
public Collection<LensSessionImpl.ResourceEntry> getPendingSessionResourcesForDatabase(String database)
public ClassLoader getClassLoader()
Copyright © 2014–2016 Apache Software Foundation. All rights reserved.