Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SCALA

repartition in spark scala


rdd1.saveAsTextFile("/tmp/partition")
//Writes 6 part files, one for each partition
Partition 1 : 0 1 2
Partition 2 : 3 4 5
Partition 3 : 6 7 8 9
Partition 4 : 10 11 12
Partition 5 : 13 14 15
Partition 6 : 16 17 18 19
Source by sparkbyexamples.com #
 
PREVIOUS NEXT
Tagged: #repartition #spark #scala
ADD COMMENT
Topic
Name
1+5 =