public class SparkSessionManagerImpl extends Object implements SparkSessionManager
| Modifier and Type | Method and Description |
|---|---|
void |
closeSession(SparkSession sparkSession)
Close the given session and return it to pool.
|
static SparkSessionManagerImpl |
getInstance() |
SparkSession |
getSession(SparkSession existingSession,
HiveConf conf,
boolean doOpen)
If the existingSession can be reused return it.
|
void |
returnSession(SparkSession sparkSession)
Return the given sparkSession to pool.
|
void |
setup(HiveConf hiveConf)
Initialize based on given configuration.
|
void |
shutdown()
Shutdown the session manager.
|
public static SparkSessionManagerImpl getInstance() throws HiveException
HiveExceptionpublic void setup(HiveConf hiveConf) throws HiveException
SparkSessionManagersetup in interface SparkSessionManagerHiveExceptionpublic SparkSession getSession(SparkSession existingSession, HiveConf conf, boolean doOpen) throws HiveException
getSession in interface SparkSessionManagerexistingSession - Existing session (can be null)doOpen - Should the session be opened before returning?HiveExceptionpublic void returnSession(SparkSession sparkSession) throws HiveException
SparkSessionManagerreturnSession in interface SparkSessionManagerHiveExceptionpublic void closeSession(SparkSession sparkSession) throws HiveException
SparkSessionManagercloseSession in interface SparkSessionManagerHiveExceptionpublic void shutdown()
SparkSessionManagershutdown in interface SparkSessionManagerCopyright © 2019 The Apache Software Foundation. All Rights Reserved.