Getting started with Spark
This tutorial was written in October 2013.At the time, the current development version of Spark was 0.9.0.
The tutorial covers Spark setup on Ubuntu 12.04:
- installation of all Spark prerequisites
- Spark build and installation
- basic Spark configuration
- standalone cluster setup (one master and 4 slaves on a single machine)
- running the
math.PIapproximation job on a standalone cluster
My setup
Before installing Spark:- Ubuntu 12.04 LTS 32-bit
- OpenJDK 1.6.0_27
- Scala 2.9.3
- Maven 3.0.4
- Python 2.7.3 (you already have this)
- Git 1.7.9.5 (and this, I presume)
[david@david-centos6 spark]$ MASTER=spark://david-centos6:7077 bin/spark-shell






- Like (1)
- Flag as inappropriate
- 2 months ago
Delphine L. likes this- Like (2)
- Flag as inappropriate
- 2 months ago
Anthony Yee, Delphine L. like thisIt's because of micro batching, spark gives you NEAR real time processing. Spark streaming processing is essentially a batch processing platform retrofitted for for near real time processing. Storm is built ground up for real time processing only.
Windowing operations can easily be performed in storm also. One of the common use cases in storm is doing aggregation in real time stream.
It would be interesting to see the turn around time from the point a message enters the system to the point a metric is updated, between Spark streaming & Storm.. I have not seen many benchmarks targetting that.
In addition to real time processing of streams in Spark , you can also do batch level processing as hadoop.
The performance way , Spark is clearly ahead of storm.
So i would say if I have the freedom to choose between Spark and Storm , i would select Spark.
Since Spark relies on micro batching to simulate real time processing, it's likely to be slower than real real time processing systems like storm. If you have bench mark data that shows otherwise, please share the links.
Finally to be fair, let's be clear that Storm and Spark Streaming cannot be compared directly as the aggregation operators are offered out of the box by Spark and must be implemented manually in Storm. As a result, the benchmark mainly depends on your implementation on Storm. To be more accurate we should compare Trident and Spark. Notice that usually Trident involved an important drop of performance because of the reliability mechanism it offers.
- Like (5)
- Flag as inappropriate
- 2 months ago
Pranab G., Eric D. and 3 others like this1. The throughput is not same as turnaround time, would love to see some benchmarks thr. As Storm relies on passing data through its system, the performance is bottlenecked by network.
2. This benchmark was done by Amplabs, hence storm may not be tuned for the best performance.
That said even if storm is equal or similar performance, I do believe the benefit of reusing your hadoop stack for streaming & having a framework which can be leveraged for data warehousing, machine learning & analytics tips the scales heavily in favour of Spark.