public class SparkSessionImpl extends Object implements SparkSession
Constructor and Description |
---|
SparkSessionImpl() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close session and release resources.
|
HiveConf |
getConf() |
org.apache.hadoop.fs.Path |
getHDFSSessionDir()
Get an HDFS dir specific to the SparkSession
|
ObjectPair<Long,Integer> |
getMemoryAndCores()
Get Spark shuffle memory per task, and total number of cores.
|
String |
getSessionId() |
boolean |
isOpen() |
static String |
makeSessionId() |
void |
open(HiveConf conf)
Initializes a Spark session for DAG execution.
|
SparkJobRef |
submit(DriverContext driverContext,
SparkWork sparkWork)
Submit given sparkWork to SparkClient.
|
public void open(HiveConf conf) throws HiveException
SparkSession
open
in interface SparkSession
conf
- Hive configuration.HiveException
public SparkJobRef submit(DriverContext driverContext, SparkWork sparkWork) throws Exception
SparkSession
submit
in interface SparkSession
Exception
public ObjectPair<Long,Integer> getMemoryAndCores() throws Exception
SparkSession
getMemoryAndCores
in interface SparkSession
Exception
public boolean isOpen()
isOpen
in interface SparkSession
public HiveConf getConf()
getConf
in interface SparkSession
public String getSessionId()
getSessionId
in interface SparkSession
public void close()
SparkSession
close
in interface SparkSession
public org.apache.hadoop.fs.Path getHDFSSessionDir() throws IOException
SparkSession
getHDFSSessionDir
in interface SparkSession
IOException
public static String makeSessionId()
Copyright © 2016 The Apache Software Foundation. All rights reserved.