public abstract class MLWriter extends Object implements BaseReadWrite, 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.
|
MLWriter |
overwrite()
Overwrites if the output path already exists.
|
void |
save(String path)
Saves the ML instances to the input path.
|
MLWriter |
session(SparkSession sparkSession)
Sets the Spark Session to use for saving/loading.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
optionSparkSession, sc, sparkSession, sqlContext
initializeLogging, initializeLogIfNecessary, initializeLogIfNecessary, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning
public MLWriter context(SQLContext sqlContext)
BaseReadWrite
context
in interface BaseReadWrite
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.IOException
public MLWriter session(SparkSession sparkSession)
BaseReadWrite
session
in interface BaseReadWrite
sparkSession
- (undocumented)