Main Content

getSparkConf

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

Get SparkConf configuration parameters

Syntax

conf = getSparkConf(sc)

Description

conf = getSparkConf(sc) retrieves the SparkConf configuration parameters.

Input Arguments

expand all

The SparkContext to use, specified as a SparkContext object.

Output Arguments

expand all

Spark configuration parameters, returned as a SparkConf object with properties.

Examples

expand all

Retrieve the SparkConf configuration parameters.

%% 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);

%% getSparkConf
getSparkConf(sc) % Alternate Usage: >> sc.getSparkConf(); 
Introduced in R2016b