foldByKey
R2026bClass: matlab.compiler.mlspark.RDD
Namespace: matlab.compiler.mlspark
(To be removed) Merge the values for each key using an associative function and a neutral “zero value”
matlab.compiler.mlspark.RDD.foldByKey will be removed in a future
release. There is no replacement functionality. For more information, see Version History.
Syntax
result =
foldByKey(obj,zeroValue,func,numPartitions)
Description
merges
the values for each key in result =
foldByKey(obj,zeroValue,func,numPartitions)obj using an associative
function func and a neutral “zero value”
represented by zeroValue. The input argument numPartitions specifies
the number of partitions to create in the resulting RDD.
Input Arguments
Output Arguments
Examples
Version History
Introduced in R2016bSee Also
fold | aggregateByKey | combineByKey | groupByKey | reduceByKey | sortByKey | subtractByKey | map | collect | parallelize