Member since
08-09-2017
9
Posts
3
Kudos Received
0
Solutions
08-30-2017
12:28 PM
Data locality means moving computation rather than moving data to save the bandwidth. This minimizes network congestion and increases the overall throughput of the system.
... View more
08-21-2017
05:54 AM
foreach() operation is an action. > It do not return any value. > It executes input function on each element of an RDD. From : http://data-flair.training/blogs/rdd-transformations-actions-apis-apache-spark/#39_Foreach It executes the function on each item in RDD. It is good for writing database or publishing to web services. It executes parameter less function for each data items. Example: val mydata = Array(1,2,3,4,5,6,7,8,9,10)
val rdd1 = sc.parallelize(mydata)
rdd1.foreach{x=>println(x)}
OR
rdd1.foreach{println} Output: 1 2 3 4 5 6 7 8 9 10
... View more