주요 콘텐츠

unpersist

R2026b

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

(To be removed) Mark an RDD as nonpersistent, remove all blocks for it from memory and disk

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

Syntax

unpersist(obj)

Description

unpersist(obj) marks input RDD object as nonpersistent and removes all blocks for it from memory and disk.

Input Arguments

expand all

An input RDD, specified as an RDD object.

Examples

expand all

Use the unpersist method to mark an RDD as nonpersistent.

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

%% unpersist
myFile = sc.textFile('airlinesmall.csv');
myFile.persist();
myFile.unpersist();

Version History

Introduced in R2016b

collapse all