Main Content

delete

Class: matlab.compiler.mlspark.SparkContext
Package: matlab.compiler.mlspark

Shutdown connection to Spark enabled cluster

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)
Introduced in R2016b