Array of RDD

0 votes
Hi. I have to pass different RDDs from one part of the application to another. I am using a loop for this right now. Is there a way that I can send all of them at once? Like a special Data-structure or something?
Mar 8, 2019 in Apache Spark by Giri
1,744 views

1 answer to this question.

0 votes

You can create an array of RDDs and pass the array. And for this, you can use Glom. Glom on spark rdd which allows you to treat a partition as an array rather as single row at time. This allows you speed up some operations with some increased memory usage. 

val maxValue = dataRDD.glom().map((value:Array[Double]) => value.max)
 .reduce(_ max _)
answered Mar 8, 2019 by Raj

Related Questions In Apache Spark

0 votes
1 answer

How can I compare the elements of the RDD using MapReduce?

You have to use the comparison operator ...READ MORE

answered May 24, 2018 in Apache Spark by Shubham
• 13,490 points
3,460 views
0 votes
1 answer
+1 vote
8 answers

How to print the contents of RDD in Apache Spark?

Save it to a text file: line.saveAsTextFile("alicia.txt") Print contains ...READ MORE

answered Dec 10, 2018 in Apache Spark by Akshay
61,871 views
0 votes
1 answer

What happens to RDD when one of the nodes goes down?

Whenever a node goes down, Spark knows ...READ MORE

answered Sep 3, 2018 in Apache Spark by nitinrawat895
• 11,380 points
1,828 views
+1 vote
2 answers
+1 vote
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 11,380 points
11,078 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 11,380 points
2,575 views
+2 votes
11 answers

hadoop fs -put command?

Hi, You can create one directory in HDFS ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
109,076 views
0 votes
1 answer

Components of Spark

Spark core: The base engine that offers ...READ MORE

answered Mar 8, 2019 in Apache Spark by Raj
671 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP