

{"id":5883,"date":"2018-01-18T12:06:55","date_gmt":"2018-01-18T12:06:55","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=5883"},"modified":"2019-09-04T11:14:26","modified_gmt":"2019-09-04T05:44:26","slug":"spark-tutorial","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/spark-tutorial\/","title":{"rendered":"Spark Tutorial &#8211; Learn Spark Programming"},"content":{"rendered":"<h2>1. Objective &#8211; Spark Tutorial<\/h2>\n<p><span style=\"font-weight: 400\">In this Spark Tutorial, we will see an overview\u00a0of Spark in Big Data. We will start with an introduction to Apache Spark Programming. Then we will move to know the Spark History. Moreover, we will learn why Spark is needed. Afterward, will cover all fundamental of Spark components. Furthermore, we will learn about Spark\u2019s core abstraction and Spark RDD. For more detailed insights, we will also cover spark features, Spark limitations, and Spark Use cases.\u00a0<\/span><\/p>\n<div id=\"attachment_9732\" style=\"width: 1210px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/Spark-Tutorial-01.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-9732\" class=\"wp-image-9732 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/Spark-Tutorial-01.jpg\" alt=\"Apache Spark Tutorial - What is Apache Spark?\" width=\"1200\" height=\"628\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/Spark-Tutorial-01.jpg 1200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/Spark-Tutorial-01-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/Spark-Tutorial-01-300x157.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/Spark-Tutorial-01-768x402.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/Spark-Tutorial-01-1024x536.jpg 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><p id=\"caption-attachment-9732\" class=\"wp-caption-text\">Apache Spark Tutorial &#8211; What is Apache Spark?<\/p><\/div>\n<h2><span style=\"font-weight: 400\">2. Introduction to\u00a0Spark Programming<\/span><\/h2>\n<p><span style=\"font-weight: 400\">What is Spark?\u00a0<\/span><span style=\"font-weight: 400\"><em>Spark Programming is nothing but a general-purpose &amp; lightning fast cluster computing platform<\/em>. In other words, <em>it is an open source, wide range data processing engine<\/em>. That reveals development API\u2019s, which also qualifies data workers to accomplish streaming, machine learning or SQL workloads which demand repeated access to data sets. However, Spark can perform <strong><a href=\"https:\/\/data-flair.training\/blogs\/batch-processing-vs-real-time-processing\/\">batch processing and stream processing<\/a><\/strong>. Batch processing refers, to the processing of the previously collected job in a single batch. Whereas stream processing means to deal with Spark streaming data. <\/span><\/p>\n<p>Moreover, it is designed in such a way that it integrates with all the<a href=\"https:\/\/data-flair.training\/blogs\/what-is-big-data\/\"> <strong>Big data<\/strong><\/a> tools. Like spark can access any <a href=\"https:\/\/data-flair.training\/blogs\/hadoop-tutorial-for-beginners\/\"><strong>Hadoop<\/strong><\/a> data source, also can run on Hadoop clusters. Furthermore, Apache Spark extends Hadoop MapReduce to the next level. That also includes iterative queries and stream processing.<br \/>\nOne more common belief about Spark is that it is an extension of Hadoop. Although that is not true. However, Spark is independent of Hadoop since it has its own <a href=\"https:\/\/data-flair.training\/blogs\/apache-spark-cluster-managers-tutorial\/\"><strong>cluster management<\/strong><\/a> system. Basically, it uses Hadoop for storage purpose only.<\/p>\n<p>Although, there is one spark\u2019s key feature that it has in-memory cluster computation capability. Also increases the processing speed of an application.<\/p>\n<p>Basically, Apache Spark offers high-level APIs to users, such as <a href=\"https:\/\/data-flair.training\/blogs\/java-tutorial\/\"><strong>Java<\/strong><\/a>, Scala,<strong><a href=\"https:\/\/data-flair.training\/blogs\/python-tutorial-for-beginners\/\"> Python<\/a>,\u00a0<\/strong>and R. Although, Spark is written in Scala still offers rich APIs in Scala, Java, Python, as well as R. We can say, it is a tool for running spark applications.<\/p>\n<p>Most importantly, by <strong><a href=\"https:\/\/data-flair.training\/blogs\/apache-spark-vs-hadoop-mapreduce\/\">comparing Spark with Hadoop<\/a>,<\/strong>\u00a0it is 100 times faster than Hadoop In-Memory mode and 10 times faster than Hadoop\u00a0 On-Disk mode.<\/p>\n<h2>3. Spark Tutorial &#8211;\u00a0 History<\/h2>\n<p><span style=\"font-weight: 400\">At first, in 2009 Apache Spark was introduced in the UC Berkeley R&amp;D Lab, which is now known as AMPLab. Afterward, in 2010 it became open source under BSD license. Further, the spark was donated to Apache Software Foundation, in 2013. Then in 2014, it became top-level Apache project.<\/span><\/p>\n<h2>4. Why Spark?<\/h2>\n<div id=\"attachment_9776\" style=\"width: 1210px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/Why-Spark-01-1.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-9776\" class=\"wp-image-9776 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/Why-Spark-01-1.jpg\" alt=\"Spark Tutorial - Why Spark?\" width=\"1200\" height=\"628\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/Why-Spark-01-1.jpg 1200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/Why-Spark-01-1-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/Why-Spark-01-1-300x157.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/Why-Spark-01-1-768x402.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/Why-Spark-01-1-1024x536.jpg 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><p id=\"caption-attachment-9776\" class=\"wp-caption-text\">Spark Tutorial &#8211; Why Spark?<\/p><\/div>\n<p><span style=\"font-weight: 400\">As we know, there was no general purpose computing engine in the industry, since<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">To perform batch processing, we were using <a href=\"https:\/\/data-flair.training\/blogs\/hadoop-mapreduce-tutorial\/\"><strong>Hadoop MapReduce<\/strong><\/a>.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Also, to perform stream processing, we were using Apache Storm \/ S4.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Moreover, for interactive processing, we were using Apache Impala \/ Apache Tez.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">To perform graph processing, we were using Neo4j \/ Apache Giraph. <\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400\">Hence there was no powerful engine in the industry, that can process the data both in real-time and batch mode. Also, there was a requirement that one engine can respond in sub-second and perform in-memory processing.<\/span><br \/>\n<span style=\"font-weight: 400\">Therefore, Apache Spark programming enters, it is a powerful open source engine. Since, it offers real-time stream processing, interactive processing, graph processing, in-memory processing as well as batch processing. Even with very fast speed, ease of use and standard interface. Basically, these features create the difference between Hadoop and Spark. Also makes a huge <a href=\"https:\/\/data-flair.training\/blogs\/apache-storm-vs-spark-streaming\/\"><strong>comparison between Spark vs Storm.<\/strong><\/a><\/span><\/p>\n<h2>5. Apache Spark Components<\/h2>\n<p><span style=\"font-weight: 400\">In this Apache Spark Tutorial, we discuss Spark Components. It puts the promise for faster data processing as well as easier development. It is only possible because of its components. All these Spark components resolved the issues that occurred while using Hadoop MapReduce.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Now let\u2019s discuss each Spark Ecosystem Component one by one-<\/span><\/p>\n<div id=\"attachment_9519\" style=\"width: 1210px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Apache-Spark-Components.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-9519\" class=\"wp-image-9519 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Apache-Spark-Components.jpg\" alt=\"Spark Tutorial - Apache Spark Ecosystem Components\" width=\"1200\" height=\"628\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Apache-Spark-Components.jpg 1200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Apache-Spark-Components-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Apache-Spark-Components-300x157.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Apache-Spark-Components-768x402.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Apache-Spark-Components-1024x536.jpg 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><p id=\"caption-attachment-9519\" class=\"wp-caption-text\">Spark Tutorial &#8211; Apache Spark Ecosystem Components<\/p><\/div>\n<h3>a. Spark Core<\/h3>\n<p><span style=\"font-weight: 400\">Spark Core is a central point of Spark. Basically, it provides an execution platform for all the Spark applications. Moreover, to support a wide array of applications, Spark Provides a \u00a0generalized platform.<\/span><\/p>\n<h3>b. Spark SQL<\/h3>\n<p><span style=\"font-weight: 400\">On the top of Spark, Spark<strong> SQL<\/strong> enables users to run SQL\/HQL queries. We can process structured as well as semi-structured data, by using Spark SQL. Moreover, it offers to run unmodified queries up to 100 times faster on existing deployments. To learn<a href=\"https:\/\/data-flair.training\/blogs\/spark-sql-tutorial\/\"><strong> Spark SQL in detail<\/strong><\/a>, follow this link.<\/span><\/p>\n<h3>c. Spark Streaming<\/h3>\n<p><span style=\"font-weight: 400\">Basically, across live streaming, Spark Streaming enables a powerful interactive and data analytics application. Moreover, the live streams are converted into micro-batches those are executed on top of spark core. Learn <a href=\"https:\/\/data-flair.training\/blogs\/apache-spark-streaming-tutorial\/\"><strong>Spark Streaming in detail.\u00a0<\/strong><\/a><\/span><\/p>\n<h3>d. Spark MLlib<\/h3>\n<p><span style=\"font-weight: 400\">Machine learning library delivers both efficiencies as well as the high-quality algorithms. Moreover, it is the hottest choice for a data scientist. Since it is capable of in-memory data processing, that improves the performance of iterative algorithm drastically.<\/span><\/p>\n<h3>e. Spark GraphX<\/h3>\n<p><span style=\"font-weight: 400\">Basically, Spark GraphX is the graph computation engine built on top of Apache Spark that enables to process graph data at scale.<\/span><\/p>\n<h3>f. SparkR<\/h3>\n<p><span style=\"font-weight: 400\">Basically, to use Apache Spark from <strong><a href=\"https:\/\/data-flair.training\/blogs\/r-programming-tutorial\/\">R<\/a><\/strong>. It is <a href=\"https:\/\/data-flair.training\/blogs\/r-packages-tutorial\/\"><strong>R package<\/strong><\/a> that gives light-weight frontend. Moreover, it allows data scientists to analyze large datasets. Also allows running jobs interactively on them from the R shell. Although, the main idea behind SparkR was to explore different techniques to integrate the usability of R with the scalability of Spark. Follow the link to learn <a href=\"https:\/\/data-flair.training\/blogs\/sparkr\/\"><strong>SparkR in detail.<\/strong><\/a><\/span><\/p>\n<p>To learn about all the components of Spark in detail, follow link\u00a0<a href=\"https:\/\/data-flair.training\/blogs\/apache-spark-ecosystem-components\/\"><strong>Apache Spark Ecosystem \u2013 Complete Spark Components Guide<\/strong><\/a><\/p>\n<h2>6. Resilient Distributed Dataset \u2013 RDD<\/h2>\n<p>The key abstraction of Spark is RDD. RDD is an acronym for Resilient Distributed Dataset. It is the fundamental unit of data in Spark. Basically, it is a distributed collection of elements across cluster nodes. Also performs parallel operations. Moreover, Spark RDDs are immutable in nature. Although, it can generate new RDD by transforming existing Spark RDD.Learn about <a href=\"https:\/\/data-flair.training\/blogs\/apache-spark-rdd-tutorial\/\"><strong>Spark RDDs in detail.<\/strong><\/a><\/p>\n<h3>a. Ways to create Spark RDD<\/h3>\n<p>Basically, there are 3 ways to create Spark RDDs<br \/>\n<b><\/b><\/p>\n<p><b>i. Parallelized collections<\/b><\/p>\n<p><span style=\"font-weight: 400\">By invoking parallelize method in the driver program, we can create parallelized collections.<\/span><br \/>\n<b><\/b><\/p>\n<p><b>ii. External datasets<\/b><\/p>\n<p><span style=\"font-weight: 400\">One can create Spark RDDs, by calling a textFile method. Hence, this method takes URL of the file and reads it as a collection of lines.<\/span><br \/>\n<b><\/b><\/p>\n<p><b>iii. Existing RDDs<\/b><\/p>\n<p><span style=\"font-weight: 400\">Moreover, we can create new RDD in spark, by applying transformation operation on existing RDDs.<\/span><\/p>\n<p>To learn all three <a href=\"https:\/\/data-flair.training\/blogs\/create-rdds-in-apache-spark\/\"><strong>ways to create RDD<\/strong><\/a> in detail, follow the link.<\/p>\n<h3>b. Spark RDDs operations<\/h3>\n<p><span style=\"font-weight: 400\">There are two types of operations, which Spark RDDs supports:<\/span><br \/>\n<b><\/b><\/p>\n<p><b>i. Transformation Operations<\/b><\/p>\n<p><span style=\"font-weight: 400\">It creates a new Spark RDD from the existing one. Moreover, it passes the dataset to the function and returns new dataset.<\/span><br \/>\n<b><\/b><\/p>\n<p><b>ii. Action\u00a0Operations <\/b><\/p>\n<p>In Apache Spark, Action returns final result to driver program or write it to the external data store.<\/p>\n<p>Learn <a href=\"https:\/\/data-flair.training\/blogs\/spark-rdd-operations-transformations-actions\/\"><strong>RDD Operations in detail.<\/strong><\/a><\/p>\n<h3>c. Sparkling Features of Spark RDD<\/h3>\n<p><span style=\"font-weight: 400\">There are various advantages of using RDD. Some of them are<\/span><\/p>\n<div id=\"attachment_7076\" style=\"width: 1090px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Features-of-RDD-01-1.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-7076\" class=\"wp-image-7076 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Features-of-RDD-01-1.jpg\" alt=\"Spark Tutorial - Spark RDD Features\" width=\"1080\" height=\"1080\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Features-of-RDD-01-1.jpg 1080w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Features-of-RDD-01-1-150x150.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Features-of-RDD-01-1-300x300.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Features-of-RDD-01-1-768x768.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Features-of-RDD-01-1-1024x1024.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Features-of-RDD-01-1-100x100.jpg 100w\" sizes=\"auto, (max-width: 1080px) 100vw, 1080px\" \/><\/a><p id=\"caption-attachment-7076\" class=\"wp-caption-text\">Spark Tutorial &#8211; Spark RDD Features<\/p><\/div>\n<p><strong>i.\u00a0In-memory computation<\/strong><\/p>\n<p><span style=\"font-weight: 400\">Basically, while storing data in RDD, data is stored in memory for as long as you want to store. It improves the performance by an order of magnitudes by keeping the data\u00a0in memory.<\/span><br \/>\n<b><\/b><\/p>\n<p><b>ii. Lazy Evaluation<\/b><\/p>\n<p><span style=\"font-weight: 400\">Spark Lazy Evaluation means the data inside RDDs are not evaluated on the go. Basically, only after an action triggers all the changes or the computation is performed. Therefore, it limits how much work it has to do. learn <strong><a href=\"https:\/\/data-flair.training\/blogs\/apache-spark-lazy-evaluation\/\">Lazy Evaluation in detail.\u00a0<\/a><\/strong><\/span><br \/>\n<b><\/b><\/p>\n<p><b>iii. Fault Tolerance<\/b><\/p>\n<p><span style=\"font-weight: 400\">If any worker node fails, by using lineage of operations, we can re-compute the lost partition of RDD from the original one. Hence, it is possible to recover lost data easily. Learn <a href=\"https:\/\/data-flair.training\/blogs\/fault-tolerance-in-apache-spark\/\"><strong>Fault Tolerance in detail<\/strong><\/a>.<\/span><br \/>\n<b><\/b><\/p>\n<p><b>iv. Immutability<\/b><\/p>\n<p><span style=\"font-weight: 400\">Immutability means once we create an RDD, we can not manipulate it. Moreover, we can create a new RDD by performing any transformation. Also, we achieve consistency through immutability.<\/span><br \/>\n<b><\/b><\/p>\n<p><b>v. Persistence<\/b><\/p>\n<p><span style=\"font-weight: 400\">In in-memory, we can store the frequently used RDD. Also, we can retrieve them directly from memory without going to disk. It results in the speed of the execution. Moreover, we can perform multiple operations on the same data. It is only possible by storing the data explicitly in memory by calling persist() or cache() function. <\/span><\/p>\n<p><span style=\"font-weight: 400\">Learn<strong>\u00a0<a href=\"https:\/\/data-flair.training\/blogs\/apache-spark-rdd-persistence-caching\/\">Persistence and Caching Mechanism<\/a> <\/strong>in detail.<\/span><br \/>\n<b><\/b><\/p>\n<p><b>vi. Partitioning<\/b><\/p>\n<p><span style=\"font-weight: 400\">Basically, RDD partition the records logically. Also, distributes the data across various nodes in the cluster. Moreover, the logical divisions are only for processing and internally it has no division. Hence, it provides parallelism.<\/span><br \/>\n<b><\/b><\/p>\n<p><b>vii. Parallel<\/b><\/p>\n<p><span style=\"font-weight: 400\">While we talk about parallel processing, RDD processes the data parallelly over the cluster.<\/span><br \/>\n<b><\/b><\/p>\n<p><b>viii. Location-Stickiness<\/b><\/p>\n<p><span style=\"font-weight: 400\">To compute partitions, RDDs are capable of defining placement preference. Moreover, placement preference refers to information about the location of RDD. Although, the DAGScheduler places the partitions in such a way that task is close to data as much as possible. Moreover, it speeds up computation.<\/span><br \/>\n<b><\/b><\/p>\n<p><b>ix. Coarse-grained Operation<\/b><\/p>\n<p><span style=\"font-weight: 400\">Generally, we apply coarse-grained transformations to Spark RDD. It means the operation applies to the whole dataset not on the single element in the data set of RDD in Spark.<\/span><br \/>\n<b><\/b><\/p>\n<p><b>x. Typed<\/b><\/p>\n<p><span style=\"font-weight: 400\">There are several types of Spark RDD. Such as: RDD [int], RDD [long], RDD [string].<\/span><br \/>\n<b><\/b><\/p>\n<p><b>xi. No limitation<\/b><\/p>\n<p><span style=\"font-weight: 400\">There are no limitations to use the number of Spark RDD. We can use any no. of RDDs. Basically, the limit depends on the size of disk and memory.<\/span><\/p>\n<p>In this Apache Spark tutorial, we cover most Features of Spark RDD to learn more about <a href=\"https:\/\/data-flair.training\/blogs\/apache-spark-rdd-features\/\"><strong>RDD Features<\/strong><\/a> follow this link.<\/p>\n<h2>7. Spark Tutorial &#8211; Spark Streaming<\/h2>\n<p><span style=\"font-weight: 400\">While data is arriving continuously in an unbounded sequence is what we call a data stream. Basically, for further processing, Streaming divides continuous flowing input data into discrete units. Moreover, we can say it is a low latency processing and analyzing of streaming data.<\/span><\/p>\n<p><span style=\"font-weight: 400\">In addition, an extension of the core Spark API Streaming was added to Apache Spark in 2013. That offers scalable, fault-tolerant and high-throughput processing of live data streams. Although, here we can do data ingestion from many sources. Such as Kafka, <a href=\"https:\/\/data-flair.training\/blogs\/apache-flume-tutorial\/\"><strong>Apache Flume<\/strong><\/a>, Amazon Kinesis or TCP sockets. However, we do processing here by using complex algorithms which are expressed with high-level functions such as map, reduce, join and window.<\/span><\/p>\n<h3>a. Internal working of Spark Streaming<\/h3>\n<p><span style=\"font-weight: 400\">Let\u2019s understand its internal working. While live input data streams are received. It further divided into batches by Spark streaming, Afterwards, these batches are processed by the Spark engine to generate the final stream of results in batches.<\/span><\/p>\n<h3>b. Discretized Stream (DStream)<\/h3>\n<p><span style=\"font-weight: 400\">Apache Spark Discretized Stream is the key abstraction of Spark Streaming.\u00a0That is\u00a0what we call Spark DStream. Basically, it represents a stream of data divided into small batches. Moreover, DStreams are built on Spark RDDs, Spark\u2019s core data abstraction. It also allows Streaming to seamlessly integrate with any other Apache Spark components. Such as Spark MLlib and Spark SQL.<\/span><\/p>\n<p>Follow this link, to Learn <a href=\"https:\/\/data-flair.training\/blogs\/apache-spark-dstream-discretized-streams\/\"><strong>Concept of\u00a0Dstream in detail.\u00a0<\/strong><\/a><\/p>\n<h2>8. Features of Apache Spark<\/h2>\n<p><span style=\"font-weight: 400\">There are several sparkling Apache Spark features:<\/span><\/p>\n<div id=\"attachment_6072\" style=\"width: 1210px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Features-of-Apache-Spark-01.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-6072\" class=\"wp-image-6072 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Features-of-Apache-Spark-01.jpg\" alt=\"Apache Spark\" width=\"1200\" height=\"628\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Features-of-Apache-Spark-01.jpg 1200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Features-of-Apache-Spark-01-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Features-of-Apache-Spark-01-300x157.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Features-of-Apache-Spark-01-768x402.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Features-of-Apache-Spark-01-1024x536.jpg 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><p id=\"caption-attachment-6072\" class=\"wp-caption-text\">Apache Spark Tutorial &#8211; Features of Apache Spark<\/p><\/div>\n<p><strong>a.\u00a0Swift Processing<\/strong><\/p>\n<p><span style=\"font-weight: 400\">Apache Spark offers high data processing speed. That is about 100x faster in memory and 10x faster on the disk. However, it is only possible by reducing the number of read-write to disk.\u00a0<\/span><\/p>\n<p><strong>b. Dynamic in Nature<\/strong><\/p>\n<p><span style=\"font-weight: 400\">Basically, it is possible to develop a parallel application in Spark. Since there are 80 high-level operators available in Apache Spark.<\/span><\/p>\n<p><strong>c. In-Memory Computation in Spark<\/strong><\/p>\n<p><span style=\"font-weight: 400\">The increase in processing speed is possible due to <a href=\"https:\/\/data-flair.training\/blogs\/apache-spark-in-memory-computing\/\"><strong>in-memory processing<\/strong><\/a>. It enhances the processing speed.<\/span><\/p>\n<p><strong>d. Reusability<\/strong><\/p>\n<p><span style=\"font-weight: 400\">We can easily reuse spark code for batch-processing or join stream against historical data. Also to run ad-hoc queries on stream state.<\/span><\/p>\n<p><strong>e. Spark Fault Tolerance\u00a0<\/strong><\/p>\n<p><span style=\"font-weight: 400\">Spark offers fault tolerance. It is possible through Spark\u2019s core abstraction-RDD. Basically, to handle the failure of any worker node in the cluster, Spark RDDs are designed. Therefore, the loss of data is reduced to zero.\u00a0<\/span><\/p>\n<p><strong>f. Real-Time Stream Processing<\/strong><\/p>\n<p><span style=\"font-weight: 400\">We can do real-time stream processing in Spark. Basically, Hadoop does not support real-time processing. It can only process data which is already present. Hence with Spark Streaming, we can solve this problem.<\/span><\/p>\n<p><strong>g. Lazy Evaluation in Spark<\/strong><\/p>\n<p><span style=\"font-weight: 400\">All the transformations we make in Spark RDD are Lazy in nature, that is it does not give the result right away rather a new RDD is formed from the existing one. Thus, this increases the efficiency of the system.<\/span><\/p>\n<p><strong>h. Support Multiple Languages<\/strong><\/p>\n<p><span style=\"font-weight: 400\">Spark supports multiple languages. Such as Java, R, <a href=\"https:\/\/data-flair.training\/blogs\/why-you-should-learn-scala-introductory-tutorial\/\"><strong>Scala<\/strong><\/a>, Python. Hence, it shows dynamicity. Moreover, it also overcomes the <a href=\"https:\/\/data-flair.training\/blogs\/limitations-of-hadoop\/\"><strong>limitations of Hadoop<\/strong><\/a>\u00a0since it can only build applications in <strong><a href=\"https:\/\/data-flair.training\/blogs\/features-of-java\/\">Java.<\/a><\/strong><\/span><\/p>\n<p><strong>i. Support for Sophisticated Analysis<\/strong><\/p>\n<p><span style=\"font-weight: 400\">There are dedicated tools in Apache Spark. Such as for streaming data interactive\/declarative queries, machine learning which add-on to map and reduce.<\/span><\/p>\n<p><strong>j. Integrated with Hadoop<\/strong><\/p>\n<p><span style=\"font-weight: 400\">As we know Spark is flexible. It can run independently and also on Hadoop YARN Cluster Manager. Even it can read existing Hadoop data.<\/span><\/p>\n<p><strong>k. Spark GraphX<\/strong><\/p>\n<p><span style=\"font-weight: 400\">In Spark, a component for graph and graph-parallel computation, we have GraphX. Basically, it simplifies the graph analytics tasks by the collection of graph algorithm and builders.<\/span><\/p>\n<p><strong>l. Cost Efficient<\/strong><\/p>\n<p><span style=\"font-weight: 400\">For Big data problem as in Hadoop, a large amount of storage and the large data center is required during replication. Hence, Spark programming turns out to be a cost-effective solution.<\/span><\/p>\n<p>Learn<a href=\"https:\/\/data-flair.training\/blogs\/apache-spark-features\/\"><strong> All features of Apache Spark, in detail.\u00a0<\/strong><\/a><\/p>\n<h2>9. Limitations of Apache Spark Programming<\/h2>\n<p><span style=\"font-weight: 400\">There are many limitations of Apache Spark. Let\u2019s learn all one by one:<\/span><\/p>\n<div id=\"attachment_7077\" style=\"width: 1090px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Limitations-of-Apache-Spark-01.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-7077\" class=\"wp-image-7077 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Limitations-of-Apache-Spark-01.jpg\" alt=\"Spark Tutorial - Limitations of Apache Spark Programming\" width=\"1080\" height=\"1080\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Limitations-of-Apache-Spark-01.jpg 1080w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Limitations-of-Apache-Spark-01-150x150.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Limitations-of-Apache-Spark-01-300x300.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Limitations-of-Apache-Spark-01-768x768.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Limitations-of-Apache-Spark-01-1024x1024.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/02\/Limitations-of-Apache-Spark-01-100x100.jpg 100w\" sizes=\"auto, (max-width: 1080px) 100vw, 1080px\" \/><\/a><p id=\"caption-attachment-7077\" class=\"wp-caption-text\">Spark Tutorial &#8211; Limitations of Apache Spark Programming<\/p><\/div>\n<p><strong>a. No Support for Real-time Processing<\/strong><\/p>\n<p><span style=\"font-weight: 400\">Basically, Spark is near real-time processing of live data. In other words, Micro-batch processing takes place in Spark Streaming. Hence we can not say Spark is completely Real-time Processing engine.<\/span><\/p>\n<p><strong>b. Problem with Small File<\/strong><\/p>\n<p><span style=\"font-weight: 400\">In RDD, each file is a small partition. It means, there is the large amount of tiny partition within an RDD. Hence, if we want efficiency in our processing, the RDDs should be repartitioned into some manageable format. Basically, that demands extensive shuffling over the network.<\/span><\/p>\n<p><strong>c. No File Management System<\/strong><\/p>\n<p><span style=\"font-weight: 400\">A major issue is Spark does not have its own file management system. Basically, it relies on some other platform like Hadoop or another cloud-based platform.<\/span><\/p>\n<p><strong>d. Expensive<\/strong><\/p>\n<p><span style=\"font-weight: 400\">While we desire cost-efficient processing of big data, Spark turns out to be very expensive. Since keeping data in memory is quite expensive. However the memory consumption is very high, and it is not handled in a user-friendly manner. Moreover, we require lots of RAM to run in-memory, thus the cost of spark is much higher.<\/span><\/p>\n<p><strong>e<\/strong><strong>. Less number of Algorithms<\/strong><\/p>\n<p><span style=\"font-weight: 400\"><a href=\"https:\/\/data-flair.training\/blogs\/apache-spark-mllib\/\"><strong>Spark MLlib<\/strong><\/a> have very less number of available algorithms. For example, Tanimoto distance.<\/span><\/p>\n<p><strong>f. Manual Optimization<\/strong><\/p>\n<p><span style=\"font-weight: 400\">It is must that Spark job is manually optimized and is adequate to specific datasets. Moreover, to partition and cache in spark to be correct, it is must to control it manually.<\/span><\/p>\n<p><strong>g. Iterative Processing<\/strong><\/p>\n<p><span style=\"font-weight: 400\">Basically, here data iterates in batches. Also, each iteration is scheduled and executed separately.<\/span><\/p>\n<p><strong>h. Latency<\/strong><\/p>\n<p><span style=\"font-weight: 400\">On comparing with <a href=\"https:\/\/data-flair.training\/blogs\/apache-flink-tutorial-comprehensive-guide\/\"><strong>Flink<\/strong><\/a>, Apache Spark has higher latency.<\/span><\/p>\n<p><strong>i. Window Criteria<\/strong><\/p>\n<p><span style=\"font-weight: 400\">Spark only support time-based window criteria not record based window criteria. <\/span><br \/>\n<b><\/b><\/p>\n<p><b>Note<\/b><span style=\"font-weight: 400\">: To overcome these limitations of Spark, we can use <a href=\"https:\/\/data-flair.training\/blogs\/real-life-apache-flink-use-cases\/\"><strong>Apache Flink \u2013 4G of Big Data<\/strong><\/a>.<\/span><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/limitations-of-apache-spark\/\"><strong>Learn All\u00a0Limitations of Apache Spark, in detail. <\/strong><\/a><\/p>\n<h2>10. Apache Spark Tutorial &#8211; Use Cases<\/h2>\n<p><span style=\"font-weight: 400\">There are many industry-specific Apache Spark use cases, let\u2019s discuss them one by one:<\/span><\/p>\n<div id=\"attachment_6081\" style=\"width: 1210px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Spark-Use-Cases-01-1.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-6081\" class=\"wp-image-6081 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Spark-Use-Cases-01-1.jpg\" alt=\"Spark Tutorial - Apache Spark Use Cases\" width=\"1200\" height=\"628\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Spark-Use-Cases-01-1.jpg 1200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Spark-Use-Cases-01-1-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Spark-Use-Cases-01-1-300x157.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Spark-Use-Cases-01-1-768x402.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Spark-Use-Cases-01-1-1024x536.jpg 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><p id=\"caption-attachment-6081\" class=\"wp-caption-text\">Spark Tutorial &#8211; Apache Spark Use Cases<\/p><\/div>\n<p><strong>a. Spark Use Cases in the Finance Industry<\/strong><\/p>\n<p><span style=\"font-weight: 400\">There are many banks those are using Spark. Basically, it helps to access and analyze many of the parameters in the bank sector like the emails, social media profiles, call recordings, forum, and many more. Further, it helps to make right decisions for several zones.<\/span><\/p>\n<p><strong>b. Apache Spark Use Cases in E-Commerce Industry<\/strong><\/p>\n<p><span style=\"font-weight: 400\">Basically, it helps with information about a real-time transaction. Moreover, those are passed to streaming clustering algorithms. <\/span><\/p>\n<p><strong>c. Apache Spark Use Cases in Media &amp; Entertainment Industry<\/strong><\/p>\n<p><span style=\"font-weight: 400\">We use Spark to identify patterns from the real-time in-game events. Moreover, it helps to respond in order to harvest lucrative business opportunities. <\/span><\/p>\n<p><strong>d. Apache Spark Use Cases in Travel Industry<\/strong><\/p>\n<p><span style=\"font-weight: 400\">Basically, travel industries are using spark rapidly. Moreover, it helps users to plan a perfect trip by speed up the personalized recommendations. Although, its review process of the hotels in a readable format is done by using Spark.<\/span><\/p>\n<p>Apache Spark tutorial cover Spark real-time use Cases, there are many more, follow the link to learn all in detail.\u00a0<a href=\"https:\/\/data-flair.training\/blogs\/apache-spark-use-cases-in-real-time\/\"><strong>Apache Spark use cases in real time<\/strong><\/a><\/p>\n<h2>11. Spark Tutorial &#8211; Conclusion<\/h2>\n<p><span style=\"font-weight: 400\">As a result, we have seen every aspect of Apache Spark,\u00a0what is Apache spark programming and spark definition, History of Spark, why Spark is needed, Components of Apache Spark, Spark RDD, Features of Spark RDD, Spark Streaming, Features of Apache Spark, Limitations of Apache Spark, Apache Spark use cases. In this tutorial we were trying to cover all spark notes, hope you get desired information in it if you feel to ask any query, feel free to ask in the comment section.<\/span><\/p>\n<p>Best Books to <a href=\"https:\/\/data-flair.training\/blogs\/best-apache-spark-scala-books\/\"><strong>Learn Spark<\/strong><\/a>.<\/p>\n<p><a href=\"https:\/\/spark.apache.org\/\"><strong>For reference<\/strong><\/a><span hidden class=\"__iawmlf-post-loop-links\" data-iawmlf-links=\"[{&quot;id&quot;:2052,&quot;href&quot;:&quot;https:\\\/\\\/spark.apache.org&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20251009215151\\\/https:\\\/\\\/spark.apache.org\\\/&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2025-12-11 00:11:34&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-14 03:24:05&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-17 05:06:29&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-20 07:19:55&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-23 14:10:46&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-26 19:03:14&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-30 13:05:23&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-02 13:25:12&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-05 14:08:05&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-09 10:16:58&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-12 11:04:53&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-15 17:09:49&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-18 18:39:09&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-21 19:15:09&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-26 04:14:49&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-29 05:32:17&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-01 07:55:30&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-04 10:44:57&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-07 12:28:46&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-11 00:52:17&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-14 12:51:24&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-17 14:17:39&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-20 17:49:34&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-24 04:42:19&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-27 06:25:21&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-02 08:44:49&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-05 10:27:17&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-08 11:13:11&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-11 12:04:06&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-14 12:32:46&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-18 01:16:16&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-21 21:29:48&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-25 06:37:35&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-28 07:59:07&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-31 10:36:07&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-04 11:16:36&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-07 18:11:02&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-11 05:09:37&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-14 06:26:10&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-18 15:58:17&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-22 11:10:25&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-27 06:59:55&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-30 12:38:54&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-03 15:24:36&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-06 17:05:30&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-10 12:07:21&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-14 23:33:58&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-19 11:27:54&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-23 02:59:38&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-29 05:05:46&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-01 06:55:32&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-04 20:59:59&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-08 05:37:55&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-11 15:39:15&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-14 16:52:39&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-18 01:16:02&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-22 04:29:36&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-25 16:10:03&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-29 06:57:14&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-07-02 07:09:38&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-07-07 02:05:47&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-07-10 04:47:39&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-07-13 04:57:49&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-07-13 04:57:49&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;}]\"><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. Objective &#8211; Spark Tutorial In this Spark Tutorial, we will see an overview\u00a0of Spark in Big Data. We will start with an introduction to Apache Spark Programming. Then we will move to know&#46;&#46;&#46;<\/p>\n","protected":false},"author":6,"featured_media":9732,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[148,930,935,958,960,2805,4577,4635,5655,6882,8176,8241,13050,13063,13072,13091,13092,13097,13104,13130,13142,15594,15959,16183],"class_list":["post-5883","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-spark","tag-a-complete-guide-on-apache-spark","tag-apache-spark-introduction","tag-apache-spark-notes","tag-apache-spark-tutorial","tag-apache-spark-use-cases","tag-components-of-apache-spark","tag-features-of-apache-spark","tag-features-of-spark-rdd","tag-history-of-apache-spark","tag-internal-working-of-spark","tag-learn-spark","tag-limitations-of-apache-spark","tag-spark-definition","tag-spark-history","tag-spark-introduction","tag-spark-notes","tag-spark-overview","tag-spark-programming","tag-spark-rdd","tag-spark-streaming","tag-spark-tutorial","tag-what-is-apache-spark","tag-what-is-spark","tag-why-spark-is-needed"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Spark Tutorial - Learn Spark Programming - DataFlair<\/title>\n<meta name=\"description\" content=\"Apache Spark Tutorial-what is spark, Spark overview, spark History, why Spark, Spark Component, Spark RDD, Spark Features, Spark Limitation, Spark use case\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/spark-tutorial\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Spark Tutorial - Learn Spark Programming - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Apache Spark Tutorial-what is spark, Spark overview, spark History, why Spark, Spark Component, Spark RDD, Spark Features, Spark Limitation, Spark use case\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/spark-tutorial\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-01-18T12:06:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-09-04T05:44:26+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/Spark-Tutorial-01.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"15 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Spark Tutorial - Learn Spark Programming - DataFlair","description":"Apache Spark Tutorial-what is spark, Spark overview, spark History, why Spark, Spark Component, Spark RDD, Spark Features, Spark Limitation, Spark use case","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/data-flair.training\/blogs\/spark-tutorial\/","og_locale":"en_US","og_type":"article","og_title":"Spark Tutorial - Learn Spark Programming - DataFlair","og_description":"Apache Spark Tutorial-what is spark, Spark overview, spark History, why Spark, Spark Component, Spark RDD, Spark Features, Spark Limitation, Spark use case","og_url":"https:\/\/data-flair.training\/blogs\/spark-tutorial\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2018-01-18T12:06:55+00:00","article_modified_time":"2019-09-04T05:44:26+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/Spark-Tutorial-01.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"15 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/spark-tutorial\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/spark-tutorial\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/2c58ecb4f73a39f0ef993f1ddfcd7b89"},"headline":"Spark Tutorial &#8211; Learn Spark Programming","datePublished":"2018-01-18T12:06:55+00:00","dateModified":"2019-09-04T05:44:26+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/spark-tutorial\/"},"wordCount":2907,"commentCount":31,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/spark-tutorial\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/Spark-Tutorial-01.jpg","keywords":["A complete guide on Apache Spark","Apache Spark Introduction","Apache Spark Notes","apache spark tutorial","Apache Spark use cases","Components of Apache Spark","Features of Apache Spark","Features of Spark RDD","History of Apache Spark","internal working of Spark","learn spark","Limitations of Apache Spark","spark definition","spark history","spark introduction","spark notes","spark overview","spark programming","spark rdd","spark streaming","spark tutorial","what is apache spark","what is spark","why Spark is needed"],"articleSection":["Apache Spark Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/spark-tutorial\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/spark-tutorial\/","url":"https:\/\/data-flair.training\/blogs\/spark-tutorial\/","name":"Spark Tutorial - Learn Spark Programming - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/spark-tutorial\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/spark-tutorial\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/Spark-Tutorial-01.jpg","datePublished":"2018-01-18T12:06:55+00:00","dateModified":"2019-09-04T05:44:26+00:00","description":"Apache Spark Tutorial-what is spark, Spark overview, spark History, why Spark, Spark Component, Spark RDD, Spark Features, Spark Limitation, Spark use case","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/spark-tutorial\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/spark-tutorial\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/spark-tutorial\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/Spark-Tutorial-01.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/Spark-Tutorial-01.jpg","width":1200,"height":628},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/spark-tutorial\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Apache Spark Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/spark\/"},{"@type":"ListItem","position":3,"name":"Spark Tutorial &#8211; Learn Spark Programming"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/2c58ecb4f73a39f0ef993f1ddfcd7b89","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"The DataFlair Team provides industry-driven content on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our expert educators focus on delivering value-packed, easy-to-follow resources for tech enthusiasts and professionals.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam2\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/5883","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=5883"}],"version-history":[{"count":7,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/5883\/revisions"}],"predecessor-version":[{"id":69099,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/5883\/revisions\/69099"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/9732"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=5883"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=5883"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=5883"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}