Main Content

delete

R2026b

Class: matlab.compiler.mlspark.SparkContext
Namespace: matlab.compiler.mlspark

(To be removed) Shutdown connection to Spark enabled cluster

matlab.compiler.mlspark.SparkContext.delete will be removed in a future release. There is no replacement functionality. For more information, see Version History.

Syntax

delete(sc)

Description

delete(sc) deletes a SparkContext sc and shuts down the connection to Spark™ enabled cluster.

Input Arguments

expand all

The SparkContext to use, specified as a SparkContext object.

Examples

expand all

Delete a SparkContext object.

%% Connect to Spark
sparkProp = containers.Map({'spark.executor.cores'}, {'1'});
conf = matlab.compiler.mlspark.SparkConf('AppName','myApp', ...
                        'Master','local[1]','SparkProperties',sparkProp);
sc = matlab.compiler.mlspark.SparkContext(conf);

%% delete
delete(sc)

Version History

Introduced in R2016b

collapse all