Main Content

setCheckpointDir

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

Set the directory under which RDDs are to be checkpointed

Syntax

setCheckpointDir(sc,dirName)

Description

setCheckpointDir(sc,dirName) set the directory dirName under which RDDs are to be checkpointed.

Input Arguments

expand all

The SparkContext to use, specified as a SparkContext object.

Directory where the RDDs are to be checkpointed, specified as a character vector enclosed in ''.

Data Types: char | string

Examples

expand all

Set the directory under which RDDs are to be checkpointed.

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

%% setCheckpointDir
sc.setCheckpointDir('myDir')

Version History

Introduced in R2016b