public abstract class MLWriter extends Object implements Logging
| Constructor and Description |
|---|
MLWriter() |
| Modifier and Type | Method and Description |
|---|---|
MLWriter |
context(SQLContext sqlContext)
Sets the Spark SQLContext to use for saving/loading.
|
MLWriter |
option(String key,
String value)
Adds an option to the underlying MLWriter.
|
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.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinitializeLogging, initializeLogIfNecessary, initializeLogIfNecessary, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarningpublic MLWriter context(SQLContext sqlContext)
sqlContext - (undocumented)public MLWriter option(String key, String value)
key - (undocumented)value - (undocumented)public MLWriter overwrite()
public void save(String path)
throws java.io.IOException
path - (undocumented)java.io.IOExceptionpublic MLWriter session(SparkSession sparkSession)
sparkSession - (undocumented)public scala.Option<SparkSession> optionSparkSession()
public SparkContext sc()
public SparkSession sparkSession()
public SQLContext sqlContext()