DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
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
COMMENT
Name
4+2 =
Submit