Main Content


Class: matlab.compiler.mlspark.RDD
Namespace: matlab.compiler.mlspark

Get the name of the file to which an RDD is checkpointed


file = getCheckpointFile(obj)


file = getCheckpointFile(obj) gets the name of the file to which the RDD obj is checkpointed.

Input Arguments

expand all

An input RDD, specified as an RDD object.

Output Arguments

expand all

The name of the file to which an RDD was checkpointed, returned as a character vector.


expand all

Get the name of the file to which an RDD was checkpointed.

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

%% getCheckpointFile
sc.setCheckpointDir('myDir')  % set the checkpoint directory
x = sc.parallelize({1,2,3})
y ={x,1}));
y.checkpoint()  % tell spark to checkpoint the RDD
% need to call collect, so that spark actually materializes the RDD 
% and checkpoints to the myDir directory

Version History

Introduced in R2016b