メインコンテンツ

getCheckpointFile

クラス: matlab.compiler.mlspark.RDD
名前空間: matlab.compiler.mlspark

RDD がチェックポイント化されているファイルの名前を取得する

構文

file = getCheckpointFile(obj)

説明

file = getCheckpointFile(obj) は、RDD obj がチェックポイント化されているファイルの名前を取得します。

入力引数

すべて展開する

入力 RDD。RDD オブジェクトとして指定します。

出力引数

すべて展開する

RDD がチェックポイント化されたファイルの名前。文字ベクトルとして返されます。

すべて展開する

RDD がチェックポイント化されたファイルの名前を取得します。

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

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

バージョン履歴

R2016b で導入