Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Return the key-value pairs in this RDD to the master as a dictionary.

m = sc.parallelize([(1, 2), (3, 4)]).collectAsMap()
m[1]
# 2
m[3]
# 4
Source by spark.apache.org #
 
PREVIOUS NEXT
Tagged: #Return #pairs #RDD #master
ADD COMMENT
Topic
Name
4+2 =