{"id":1802,"date":"2019-05-24T05:35:54","date_gmt":"2019-05-24T05:35:54","guid":{"rendered":"https:\/\/prwatech.in\/blog\/?p=1802"},"modified":"2025-06-12T03:38:50","modified_gmt":"2025-06-12T03:38:50","slug":"apache-spark-rdd-commands","status":"publish","type":"post","link":"https:\/\/prwatech.in\/blog\/apache-spark\/apache-spark-rdd\/apache-spark-rdd-commands\/","title":{"rendered":"Apache Spark RDD Commands"},"content":{"rendered":"<h2 style=\"text-align: left;\">Apache Spark Basic RDD Commands<\/h2>\n<p>&nbsp;<\/p>\n<p><strong>Apache Spark RDD Commands<\/strong>, Welcome to the world of best RDD commands used in <a href=\"https:\/\/prwatech.in\/apache-spark-training-institute-in-bangalore\/\" target=\"_blank\" rel=\"noopener noreferrer\">Apache Spark<\/a>, In This tutorial, one can easily learn a List of all Top Rated Apache Spark basic RDD commands which are available and are used by most of the Spark developers. Are you also dreaming to become to certified Pro Developer, then stop just dreaming get your Apache Spark certification course from India\u2019s Leading <a href=\"https:\/\/prwatech.in\/blog\/tableau\/tableau-maps-chart\/\" target=\"_blank\" rel=\"noopener noreferrer\">Apache Spark Training institute<\/a>.<\/p>\n<p>So follow the below mentioned used from <a href=\"http:\/\/prwatech.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">Prwatech<\/a> and learn <a href=\"https:\/\/prwatech.in\/apache-spark-training-institute-in-bangalore\/\" target=\"_blank\" rel=\"noopener noreferrer\">Apache Spark Course<\/a> like a pro from today itself under 15+ Years of Hands-on Experienced Professionals.<\/p>\n<h2>Basic used in Apache Spark<\/h2>\n<h3><strong>\u00a0Creating a new list with a value<\/strong><\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1803\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/1-8.png\" alt=\"Apache Spark RDD Commands\" width=\"850\" height=\"62\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/1-8.png 621w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/1-8-300x22.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<h3><strong>Parallelize the data set<\/strong>. It will provide the set of two RDD (default partition is 2)<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1804\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/2-8.png\" alt=\"Parallelize the data set\" width=\"850\" height=\"81\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/2-8.png 621w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/2-8-300x29.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<h3><strong>Creating new RDD for the list<\/strong><\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1805\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/3-8.png\" alt=\"Apache Spark RDD Commands\" width=\"850\" height=\"82\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/3-8.png 624w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/3-8-300x29.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<h3><strong>\u00a0RDD functions<\/strong><\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1806\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/4-8.png\" alt=\"\u00a0RDD functions\" width=\"850\" height=\"574\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/4-8.png 622w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/4-8-300x203.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1807\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/5-8.png\" alt=\"Apache Spark RDD Commands\" width=\"850\" height=\"305\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/5-8.png 621w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/5-8-300x108.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1808\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/6-8.png\" alt=\"Apache Spark RDD \" width=\"850\" height=\"62\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/6-8.png 619w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/6-8-300x22.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<h3><strong>To check total RDD<\/strong><\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1809\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/7-8.png\" alt=\"To check total RDD\" width=\"850\" height=\"62\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/7-8.png 620w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/7-8-300x22.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<h3><strong>Creating new RDD with output<\/strong><\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1810\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/8-8.png\" alt=\"Creating new RDD with output\" width=\"850\" height=\"77\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/8-8.png 618w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/8-8-300x27.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<h3><strong>Creating new RDD using map RDD<\/strong><\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1811\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/9-7.png\" alt=\"Creating new RDD using map RDD\" width=\"850\" height=\"195\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/9-7.png 623w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/9-7-300x69.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<h3><strong>To check the function of RDD<\/strong><\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1812\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/10-7.png\" alt=\"To check the function of RDD\" width=\"850\" height=\"148\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/10-7.png 625w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/10-7-300x52.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<h3><strong>Transformation<\/strong><\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1813\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/11-7.png\" alt=\"Transformation\" width=\"850\" height=\"60\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/11-7.png 620w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/11-7-300x21.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<h3><strong>Count operation: Used to count total elements in the array<\/strong><\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1814\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/12-5.png\" alt=\"How to setup Apache Spark\" width=\"850\" height=\"61\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/12-5.png 624w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/12-5-300x22.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<h3><strong>Read the file from the source<\/strong><\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1815\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/13-5.png\" alt=\"Read the file from the source\" width=\"850\" height=\"200\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/13-5.png 624w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/13-5-300x71.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<h3><strong>Display file<\/strong><\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1816\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/14-4.png\" alt=\"Display file\" width=\"850\" height=\"105\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/14-4.png 624w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/14-4-300x37.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<h3><strong>Using keyword to separate data<\/strong><\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1817\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/15-4.png\" alt=\"Using keyword to separate data\" width=\"850\" height=\"92\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/15-4.png 622w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/15-4-300x32.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<h3><strong>To find the length of the array<\/strong><\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1818\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/16-4.png\" alt=\"To find the length of the array\" width=\"850\" height=\"68\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/16-4.png 621w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/16-4-300x24.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<h3><strong>To check value using index<\/strong><\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1819\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/17-4.png\" alt=\"Resilient Distributed\u00a0Dataset(RDD):\" width=\"850\" height=\"156\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/17-4.png 603w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/17-4-300x55.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<h3><strong>Line operations<\/strong><\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1820\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/18-3.png\" alt=\"Line operations\" width=\"850\" height=\"739\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/18-3.png 572w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/18-3-300x261.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<h3><strong>Starting keyword<\/strong><\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1821\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/19-3.png\" alt=\"Starting keyword\" width=\"850\" height=\"62\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/19-3.png 613w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/19-3-300x22.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<h3><strong>Creating two arrays for the union<\/strong><\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1822\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/20-3.png\" alt=\"Creating two arrays for the union\" width=\"850\" height=\"197\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/20-3.png 622w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/20-3-300x69.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1823\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/21-3.png\" alt=\"Creating two arrays for the union &lt;\" width=\"850\" height=\"202\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/21-3.png 620w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/21-3-300x71.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<h3><strong>Intersection<\/strong><\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1824\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/22-2.png\" alt=\"Intersection\" width=\"850\" height=\"410\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/22-2.png 564w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/22-2-300x145.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<h3><strong>Join function<\/strong><\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1825\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/23-2.png\" alt=\"Join function\" width=\"850\" height=\"503\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/23-2.png 623w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/23-2-300x178.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<h3><strong>Using the index to get value<\/strong><\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1826\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/24-2.png\" alt=\"Using the index to get value\" width=\"850\" height=\"61\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/24-2.png 622w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/24-2-300x22.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/> <img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1827\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/25-2.png\" alt=\"Using the index to get value&lt;\" width=\"850\" height=\"206\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/25-2.png 627w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/25-2-300x73.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1828\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/26-2.png\" alt=\"Using the index to get value&gt;\" width=\"850\" height=\"67\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/26-2.png 623w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/26-2-300x24.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<h3><strong>Using values to print in a proper format<\/strong><\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1829\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/27-2.png\" alt=\"Using values to print in a proper format\" width=\"850\" height=\"87\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/27-2.png 623w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/27-2-300x31.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<h3><strong>Print multiple values using for loop<\/strong><\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1830\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/28-2.png\" alt=\"Print multiple values using for loop\" width=\"850\" height=\"175\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/28-2.png 622w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/28-2-300x62.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<h3><strong>Using MapReduce in RDD : (word count)<\/strong><\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1831\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/29-2.png\" alt=\"Using MapReduce in RDD\" width=\"850\" height=\"121\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/29-2.png 617w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/29-2-300x43.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1832\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/30-2.png\" alt=\"word count\" width=\"850\" height=\"98\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/30-2.png 623w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/30-2-300x35.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<h3><strong>Group By Key<\/strong><\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1833\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/31-2.png\" alt=\"Group By Key\" width=\"850\" height=\"366\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/31-2.png 627w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/31-2-300x129.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<h3><strong>Map value\u00a0<\/strong><\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1834\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/32-2.png\" alt=\"Map value\u00a0\" width=\"850\" height=\"96\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/32-2.png 623w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/32-2-300x34.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<h3><strong>Aggregation of integer value<\/strong><\/h3>\n<p><strong>Add :<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1835\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/33-2.png\" alt=\"Aggregation of integer value\" width=\"850\" height=\"80\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/33-2.png 627w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/33-2-300x28.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<p><strong>Subtract :<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1836\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/34-2.png\" alt=\"Subtract\" width=\"850\" height=\"80\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/34-2.png 625w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/34-2-300x28.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<p><strong>Changing the parallelism :<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1837\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/35-2.png\" alt=\"Changing the parallelism\" width=\"850\" height=\"85\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/35-2.png 619w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/35-2-300x30.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<h3><strong>Take order:<\/strong> Does the order selection on the basis of the given array and value<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1838\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/36-2.png\" alt=\"Take order\" width=\"850\" height=\"89\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/36-2.png 622w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/36-2-300x31.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<h3><strong>Save file<\/strong><\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1839\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/37-2.png\" alt=\"Save file command\" width=\"850\" height=\"198\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/37-2.png 623w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/37-2-300x70.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1840\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/38-2.png\" alt=\"Save file\" width=\"850\" height=\"562\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/38-2.png 534w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/38-2-300x198.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<h3><strong>Saving the file in map format<\/strong><\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1841\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/39-2.png\" alt=\"Saving the file in map format\" width=\"850\" height=\"65\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/39-2.png 625w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/39-2-300x23.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1842\" src=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/40-2.png\" alt=\"Saving the file in map format command\" width=\"850\" height=\"385\" srcset=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/40-2.png 629w, https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/40-2-300x136.png 300w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<p>Thanks for Reading us, if you are also the one who is keen to learn the technology like a pro from scratch to advanced level, the Ask your World-class Trainers of India&#8217;s Leading <a href=\"https:\/\/prwatech.in\/apache-spark-training-institute-in-bangalore\/\" target=\"_blank\" rel=\"noopener noreferrer\">Apache Spark Training institute<\/a> now and get Benefits of <a href=\"https:\/\/prwatech.in\/blog\/tableau\/tooltips-in-tableau\/\" target=\"_blank\" rel=\"noopener noreferrer\">Apache Spark course<\/a> from <a href=\"http:\/\/prwatech.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">Prwatech<\/a>.<\/p>\n<p><iframe loading=\"lazy\" src=\"https:\/\/www.youtube.com\/embed\/9VTX8YME9kk\" width=\"650\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Apache Spark Basic RDD Commands &nbsp; Apache Spark RDD Commands, Welcome to the world of best RDD commands used in Apache Spark, In This tutorial, one can easily learn a List of all Top Rated Apache Spark basic RDD commands which are available and are used by most of the Spark developers. Are you also [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21,1690],"tags":[891,294,892,890,889,893,894,895,896,888],"class_list":["post-1802","post","type-post","status-publish","format-standard","hentry","category-apache-spark","category-apache-spark-rdd","tag-apache-spark-rdd","tag-apache-spark-rdd-commands","tag-creating-rdd-list-in-spark","tag-leran-rdd-commands","tag-rdd-commands-in-spark-scala","tag-rdd-functions","tag-rdd-functions-in-spark","tag-rdd-intersection","tag-rdd-join-function","tag-spark-rdd-commands"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Apache Spark RDD Commands | Prwatech<\/title>\n<meta name=\"description\" content=\"Here is the list of Apache Spark RDD Commands which are available, Get the best Basic RDD commands for Apache Spark from Prwatech\" \/>\n<meta name=\"robots\" content=\"noindex, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Apache Spark RDD Commands | Prwatech\" \/>\n<meta property=\"og:description\" content=\"Here is the list of Apache Spark RDD Commands which are available, Get the best Basic RDD commands for Apache Spark from Prwatech\" \/>\n<meta property=\"og:url\" content=\"https:\/\/prwatech.in\/blog\/apache-spark\/apache-spark-rdd\/apache-spark-rdd-commands\/\" \/>\n<meta property=\"og:site_name\" content=\"Prwatech\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prwatech.in\/\" \/>\n<meta property=\"article:published_time\" content=\"2019-05-24T05:35:54+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-12T03:38:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/1-8.png\" \/>\n<meta name=\"author\" content=\"Prwatech\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@Eduprwatech\" \/>\n<meta name=\"twitter:site\" content=\"@Eduprwatech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Prwatech\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/prwatech.in\/blog\/apache-spark\/apache-spark-rdd\/apache-spark-rdd-commands\/\",\"url\":\"https:\/\/prwatech.in\/blog\/apache-spark\/apache-spark-rdd\/apache-spark-rdd-commands\/\",\"name\":\"Apache Spark RDD Commands | Prwatech\",\"isPartOf\":{\"@id\":\"https:\/\/prwatech.in\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/prwatech.in\/blog\/apache-spark\/apache-spark-rdd\/apache-spark-rdd-commands\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/prwatech.in\/blog\/apache-spark\/apache-spark-rdd\/apache-spark-rdd-commands\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/1-8.png\",\"datePublished\":\"2019-05-24T05:35:54+00:00\",\"dateModified\":\"2025-06-12T03:38:50+00:00\",\"author\":{\"@id\":\"https:\/\/prwatech.in\/blog\/#\/schema\/person\/db90baff7744090b2288bbc98fea87f3\"},\"description\":\"Here is the list of Apache Spark RDD Commands which are available, Get the best Basic RDD commands for Apache Spark from Prwatech\",\"breadcrumb\":{\"@id\":\"https:\/\/prwatech.in\/blog\/apache-spark\/apache-spark-rdd\/apache-spark-rdd-commands\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/prwatech.in\/blog\/apache-spark\/apache-spark-rdd\/apache-spark-rdd-commands\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/prwatech.in\/blog\/apache-spark\/apache-spark-rdd\/apache-spark-rdd-commands\/#primaryimage\",\"url\":\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/1-8.png\",\"contentUrl\":\"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/1-8.png\",\"width\":621,\"height\":45},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/prwatech.in\/blog\/apache-spark\/apache-spark-rdd\/apache-spark-rdd-commands\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/prwatech.in\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Apache Spark RDD Commands\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/prwatech.in\/blog\/#website\",\"url\":\"https:\/\/prwatech.in\/blog\/\",\"name\":\"Prwatech\",\"description\":\"Share Ideas, Start Something Good.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/prwatech.in\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/prwatech.in\/blog\/#\/schema\/person\/db90baff7744090b2288bbc98fea87f3\",\"name\":\"Prwatech\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/prwatech.in\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c00bafc1b04045f31eda917de39891456c44fa47c092b9bb6be0f860a3a30a2f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c00bafc1b04045f31eda917de39891456c44fa47c092b9bb6be0f860a3a30a2f?s=96&d=mm&r=g\",\"caption\":\"Prwatech\"},\"url\":\"https:\/\/prwatech.in\/blog\/author\/prwatech123\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Apache Spark RDD Commands | Prwatech","description":"Here is the list of Apache Spark RDD Commands which are available, Get the best Basic RDD commands for Apache Spark from Prwatech","robots":{"index":"noindex","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"og_locale":"en_US","og_type":"article","og_title":"Apache Spark RDD Commands | Prwatech","og_description":"Here is the list of Apache Spark RDD Commands which are available, Get the best Basic RDD commands for Apache Spark from Prwatech","og_url":"https:\/\/prwatech.in\/blog\/apache-spark\/apache-spark-rdd\/apache-spark-rdd-commands\/","og_site_name":"Prwatech","article_publisher":"https:\/\/www.facebook.com\/prwatech.in\/","article_published_time":"2019-05-24T05:35:54+00:00","article_modified_time":"2025-06-12T03:38:50+00:00","og_image":[{"url":"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/1-8.png","type":"","width":"","height":""}],"author":"Prwatech","twitter_card":"summary_large_image","twitter_creator":"@Eduprwatech","twitter_site":"@Eduprwatech","twitter_misc":{"Written by":"Prwatech","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/prwatech.in\/blog\/apache-spark\/apache-spark-rdd\/apache-spark-rdd-commands\/","url":"https:\/\/prwatech.in\/blog\/apache-spark\/apache-spark-rdd\/apache-spark-rdd-commands\/","name":"Apache Spark RDD Commands | Prwatech","isPartOf":{"@id":"https:\/\/prwatech.in\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/prwatech.in\/blog\/apache-spark\/apache-spark-rdd\/apache-spark-rdd-commands\/#primaryimage"},"image":{"@id":"https:\/\/prwatech.in\/blog\/apache-spark\/apache-spark-rdd\/apache-spark-rdd-commands\/#primaryimage"},"thumbnailUrl":"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/1-8.png","datePublished":"2019-05-24T05:35:54+00:00","dateModified":"2025-06-12T03:38:50+00:00","author":{"@id":"https:\/\/prwatech.in\/blog\/#\/schema\/person\/db90baff7744090b2288bbc98fea87f3"},"description":"Here is the list of Apache Spark RDD Commands which are available, Get the best Basic RDD commands for Apache Spark from Prwatech","breadcrumb":{"@id":"https:\/\/prwatech.in\/blog\/apache-spark\/apache-spark-rdd\/apache-spark-rdd-commands\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/prwatech.in\/blog\/apache-spark\/apache-spark-rdd\/apache-spark-rdd-commands\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/prwatech.in\/blog\/apache-spark\/apache-spark-rdd\/apache-spark-rdd-commands\/#primaryimage","url":"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/1-8.png","contentUrl":"https:\/\/prwatech.in\/blog\/wp-content\/uploads\/2019\/05\/1-8.png","width":621,"height":45},{"@type":"BreadcrumbList","@id":"https:\/\/prwatech.in\/blog\/apache-spark\/apache-spark-rdd\/apache-spark-rdd-commands\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/prwatech.in\/blog\/"},{"@type":"ListItem","position":2,"name":"Apache Spark RDD Commands"}]},{"@type":"WebSite","@id":"https:\/\/prwatech.in\/blog\/#website","url":"https:\/\/prwatech.in\/blog\/","name":"Prwatech","description":"Share Ideas, Start Something Good.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/prwatech.in\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/prwatech.in\/blog\/#\/schema\/person\/db90baff7744090b2288bbc98fea87f3","name":"Prwatech","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/prwatech.in\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c00bafc1b04045f31eda917de39891456c44fa47c092b9bb6be0f860a3a30a2f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c00bafc1b04045f31eda917de39891456c44fa47c092b9bb6be0f860a3a30a2f?s=96&d=mm&r=g","caption":"Prwatech"},"url":"https:\/\/prwatech.in\/blog\/author\/prwatech123\/"}]}},"_links":{"self":[{"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/posts\/1802","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/comments?post=1802"}],"version-history":[{"count":17,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/posts\/1802\/revisions"}],"predecessor-version":[{"id":11231,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/posts\/1802\/revisions\/11231"}],"wp:attachment":[{"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/media?parent=1802"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/categories?post=1802"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prwatech.in\/blog\/wp-json\/wp\/v2\/tags?post=1802"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}