public abstract class MLWriter
extends Object
Abstract class for utility classes that can save ML instances.
Constructor and Description |
---|
MLWriter() |
Modifier and Type | Method and Description |
---|---|
MLWriter |
context(SQLContext sqlContext)
Sets the Spark SQLContext to use for saving/loading.
|
scala.Option<SparkSession> |
optionSparkSession() |
MLWriter |
overwrite()
Overwrites if the output path already exists.
|
void |
save(String path)
Saves the ML instances to the input path.
|
SparkContext |
sc()
Returns the underlying
SparkContext . |
MLWriter |
session(SparkSession sparkSession)
Sets the Spark Session to use for saving/loading.
|
SparkSession |
sparkSession()
Returns the user-specified Spark Session or the default.
|
SQLContext |
sqlContext()
Returns the user-specified SQL context or the default.
|
public void save(String path) throws java.io.IOException
path
- (undocumented)java.io.IOException
public MLWriter overwrite()
public MLWriter session(SparkSession sparkSession)
sparkSession
- (undocumented)public MLWriter context(SQLContext sqlContext)
sqlContext
- (undocumented)public scala.Option<SparkSession> optionSparkSession()
public SparkSession sparkSession()
public SQLContext sqlContext()
public SparkContext sc()
SparkContext
.