<s>
Apache	B-Language
Spark	I-Language
is	O
an	O
open-source	B-Application
unified	O
analytics	O
engine	O
for	O
large-scale	O
data	O
processing	O
.	O
</s>
<s>
Spark	B-Language
provides	O
an	O
interface	B-Application
for	O
programming	O
clusters	O
with	O
implicit	O
data	B-Operating_System
parallelism	I-Operating_System
and	O
fault	B-General_Concept
tolerance	I-General_Concept
.	O
</s>
<s>
Originally	O
developed	O
at	O
the	O
University	O
of	O
California	O
,	O
Berkeley	O
's	O
AMPLab	O
,	O
the	O
Spark	B-Language
codebase	B-General_Concept
was	O
later	O
donated	O
to	O
the	O
Apache	O
Software	O
Foundation	O
,	O
which	O
has	O
maintained	O
it	O
since	O
.	O
</s>
<s>
Apache	B-Language
Spark	I-Language
has	O
its	O
architectural	O
foundation	O
in	O
the	O
resilient	B-Language
distributed	I-Language
dataset	I-Language
(	O
RDD	O
)	O
,	O
a	O
read-only	O
multiset	O
of	O
data	O
items	O
distributed	B-Architecture
over	O
a	O
cluster	O
of	O
machines	O
,	O
that	O
is	O
maintained	O
in	O
a	O
fault-tolerant	B-General_Concept
way	O
.	O
</s>
<s>
The	O
Dataframe	O
API	B-Application
was	O
released	O
as	O
an	O
abstraction	B-Application
on	O
top	O
of	O
the	O
RDD	O
,	O
followed	O
by	O
the	O
Dataset	O
API	B-Application
.	O
</s>
<s>
In	O
Spark	B-Language
1.x	O
,	O
the	O
RDD	O
was	O
the	O
primary	O
application	B-Application
programming	I-Application
interface	I-Application
(	O
API	B-Application
)	O
,	O
but	O
as	O
of	O
Spark	B-Language
2.x	O
use	O
of	O
the	O
Dataset	O
API	B-Application
is	O
encouraged	O
even	O
though	O
the	O
RDD	O
API	B-Application
is	O
not	O
deprecated	B-General_Concept
.	O
</s>
<s>
The	O
RDD	O
technology	O
still	O
underlies	O
the	O
Dataset	O
API	B-Application
.	O
</s>
<s>
Spark	B-Language
and	O
its	O
RDDs	O
were	O
developed	O
in	O
2012	O
in	O
response	O
to	O
limitations	O
in	O
the	O
MapReduce	B-Operating_System
cluster	O
computing	O
paradigm	O
,	O
which	O
forces	O
a	O
particular	O
linear	O
dataflow	B-Application
structure	O
on	O
distributed	B-Architecture
programs	I-Architecture
:	O
MapReduce	B-Operating_System
programs	O
read	O
input	B-General_Concept
data	I-General_Concept
from	O
disk	O
,	O
map	B-Operating_System
a	O
function	O
across	O
the	O
data	O
,	O
reduce	B-Application
the	O
results	O
of	O
the	O
map	B-Operating_System
,	O
and	O
store	O
reduction	O
results	O
on	O
disk	O
.	O
</s>
<s>
Spark	B-Language
's	O
RDDs	O
function	O
as	O
a	O
working	B-General_Concept
set	I-General_Concept
for	O
distributed	B-Architecture
programs	I-Architecture
that	O
offers	O
a	O
(	O
deliberately	O
)	O
restricted	O
form	O
of	O
distributed	B-Architecture
shared	B-Operating_System
memory	I-Operating_System
.	O
</s>
<s>
Inside	O
Apache	B-Language
Spark	I-Language
the	O
workflow	O
is	O
managed	O
as	O
a	O
directed	O
acyclic	O
graph	O
(	O
DAG	O
)	O
.	O
</s>
<s>
Spark	B-Language
facilitates	O
the	O
implementation	O
of	O
both	O
iterative	B-Algorithm
algorithms	I-Algorithm
,	O
which	O
visit	O
their	O
data	O
set	O
multiple	O
times	O
in	O
a	O
loop	O
,	O
and	O
interactive/exploratory	O
data	O
analysis	O
,	O
i.e.	O
,	O
the	O
repeated	O
database-style	O
querying	O
of	O
data	O
.	O
</s>
<s>
The	O
latency	O
of	O
such	O
applications	O
may	O
be	O
reduced	O
by	O
several	O
orders	O
of	O
magnitude	O
compared	O
to	O
Apache	B-Application
Hadoop	I-Application
MapReduce	B-Operating_System
implementation	O
.	O
</s>
<s>
Among	O
the	O
class	O
of	O
iterative	B-Algorithm
algorithms	I-Algorithm
are	O
the	O
training	O
algorithms	O
for	O
machine	O
learning	O
systems	O
,	O
which	O
formed	O
the	O
initial	O
impetus	O
for	O
developing	O
Apache	B-Language
Spark	I-Language
.	O
</s>
<s>
Apache	B-Language
Spark	I-Language
requires	O
a	O
cluster	B-Operating_System
manager	I-Operating_System
and	O
a	O
distributed	B-Application
storage	I-Application
system	I-Application
.	O
</s>
<s>
For	O
cluster	B-Operating_System
management	I-Operating_System
,	O
Spark	B-Language
supports	O
standalone	O
(	O
native	O
Spark	B-Language
cluster	O
,	O
where	O
you	O
can	O
launch	O
a	O
cluster	O
either	O
manually	O
or	O
use	O
the	O
launch	O
scripts	O
provided	O
by	O
the	O
install	O
package	O
.	O
</s>
<s>
It	O
is	O
also	O
possible	O
to	O
run	O
these	O
daemons	O
on	O
a	O
single	O
machine	O
for	O
testing	O
)	O
,	O
Hadoop	B-Application
YARN	I-Application
,	O
Apache	B-General_Concept
Mesos	I-General_Concept
or	O
Kubernetes	B-General_Concept
.	O
</s>
<s>
For	O
distributed	B-Application
storage	I-Application
,	O
Spark	B-Language
can	O
interface	B-Application
with	O
a	O
wide	O
variety	O
,	O
including	O
Alluxio	B-Application
,	O
Hadoop	B-Application
Distributed	B-Architecture
File	O
System	O
(	O
HDFS	O
)	O
,	O
MapR	O
File	O
System	O
(	O
MapR-FS	O
)	O
,	O
Cassandra	B-Application
,	O
OpenStack	O
Swift	O
,	O
Amazon	B-General_Concept
S3	I-General_Concept
,	O
Kudu	B-General_Concept
,	O
Lustre	B-Application
file	I-Application
system	I-Application
,	O
or	O
a	O
custom	O
solution	O
can	O
be	O
implemented	O
.	O
</s>
<s>
Spark	B-Language
also	O
supports	O
a	O
pseudo-distributed	O
local	O
mode	O
,	O
usually	O
used	O
only	O
for	O
development	O
or	O
testing	O
purposes	O
,	O
where	O
distributed	B-Application
storage	I-Application
is	O
not	O
required	O
and	O
the	O
local	O
file	O
system	O
can	O
be	O
used	O
instead	O
;	O
in	O
such	O
a	O
scenario	O
,	O
Spark	B-Language
is	O
run	O
on	O
a	O
single	O
machine	O
with	O
one	O
executor	O
per	O
CPU	B-Architecture
core	I-Architecture
.	O
</s>
<s>
Spark	B-Language
Core	O
is	O
the	O
foundation	O
of	O
the	O
overall	O
project	O
.	O
</s>
<s>
It	O
provides	O
distributed	B-Architecture
task	O
dispatching	O
,	O
scheduling	O
,	O
and	O
basic	O
I/O	B-General_Concept
functionalities	O
,	O
exposed	O
through	O
an	O
application	B-Application
programming	I-Application
interface	I-Application
(	O
for	O
Java	B-Language
,	O
Python	B-Language
,	O
Scala	B-Application
,	O
.NET	B-Application
and	O
R	B-Language
)	O
centered	O
on	O
the	O
RDD	O
abstraction	B-Application
(	O
the	O
Java	B-Language
API	B-Application
is	O
available	O
for	O
other	O
JVM	O
languages	O
,	O
but	O
is	O
also	O
usable	O
for	O
some	O
other	O
non-JVM	O
languages	O
that	O
can	O
connect	O
to	O
the	O
JVM	O
,	O
such	O
as	O
Julia	B-Application
)	O
.	O
</s>
<s>
This	O
interface	B-Application
mirrors	O
a	O
functional/higher	O
-order	O
model	O
of	O
programming	O
:	O
a	O
"	O
driver	O
"	O
program	O
invokes	O
parallel	O
operations	O
such	O
as	O
map	B-Operating_System
,	O
filter	B-Application
or	O
reduce	B-Application
on	O
an	O
RDD	O
by	O
passing	O
a	O
function	O
to	O
Spark	B-Language
,	O
which	O
then	O
schedules	O
the	O
function	O
's	O
execution	O
in	O
parallel	O
on	O
the	O
cluster	O
.	O
</s>
<s>
These	O
operations	O
,	O
and	O
additional	O
ones	O
such	O
as	O
joins	B-Language
,	O
take	O
RDDs	O
as	O
input	O
and	O
produce	O
new	O
RDDs	O
.	O
</s>
<s>
RDDs	O
are	O
immutable	B-Application
and	O
their	O
operations	O
are	O
lazy	O
;	O
fault-tolerance	B-General_Concept
is	O
achieved	O
by	O
keeping	O
track	O
of	O
the	O
"	O
lineage	O
"	O
of	O
each	O
RDD	O
(	O
the	O
sequence	O
of	O
operations	O
that	O
produced	O
it	O
)	O
so	O
that	O
it	O
can	O
be	O
reconstructed	O
in	O
the	O
case	O
of	O
data	O
loss	O
.	O
</s>
<s>
RDDs	O
can	O
contain	O
any	O
type	O
of	O
Python	B-Language
,	O
.NET	B-Application
,	O
Java	B-Language
,	O
or	O
Scala	B-Application
objects	O
.	O
</s>
<s>
Besides	O
the	O
RDD-oriented	O
functional	B-Language
style	O
of	O
programming	O
,	O
Spark	B-Language
provides	O
two	O
restricted	O
forms	O
of	O
shared	O
variables	O
:	O
broadcast	O
variables	O
reference	O
read-only	O
data	O
that	O
needs	O
to	O
be	O
available	O
on	O
all	O
nodes	O
,	O
while	O
accumulators	O
can	O
be	O
used	O
to	O
program	O
reductions	O
in	O
an	O
imperative	B-Application
style	O
.	O
</s>
<s>
A	O
typical	O
example	O
of	O
RDD-centric	O
functional	B-Language
programming	I-Language
is	O
the	O
following	O
Scala	B-Application
program	O
that	O
computes	O
the	O
frequencies	O
of	O
all	O
words	O
occurring	O
in	O
a	O
set	O
of	O
text	O
files	O
and	O
prints	O
the	O
most	O
common	O
ones	O
.	O
</s>
<s>
Each	O
,	O
(	O
a	O
variant	O
of	O
)	O
and	O
takes	O
an	O
anonymous	B-General_Concept
function	I-General_Concept
that	O
performs	O
a	O
simple	O
operation	O
on	O
a	O
single	O
data	O
item	O
(	O
or	O
a	O
pair	O
of	O
items	O
)	O
,	O
and	O
applies	O
its	O
argument	O
to	O
transform	O
an	O
RDD	O
into	O
a	O
new	O
RDD	O
.	O
</s>
<s>
Spark	B-Language
SQL	B-Language
is	O
a	O
component	O
on	O
top	O
of	O
Spark	B-Language
Core	O
that	O
introduced	O
a	O
data	B-Application
abstraction	I-Application
called	O
DataFrames	O
,	O
which	O
provides	O
support	O
for	O
structured	O
and	O
semi-structured	B-Application
data	I-Application
.	O
</s>
<s>
Spark	B-Language
SQL	B-Language
provides	O
a	O
domain-specific	B-Language
language	I-Language
(	O
DSL	O
)	O
to	O
manipulate	O
DataFrames	O
in	O
Scala	B-Application
,	O
Java	B-Language
,	O
Python	B-Language
or	O
.NET	B-Application
.	O
</s>
<s>
It	O
also	O
provides	O
SQL	B-Language
language	I-Language
support	O
,	O
with	O
command-line	B-Application
interfaces	I-Application
and	O
ODBC/JDBC	O
server	O
.	O
</s>
<s>
Although	O
DataFrames	O
lack	O
the	O
compile-time	O
type-checking	O
afforded	O
by	O
RDDs	O
,	O
as	O
of	O
Spark	B-Language
2.0	O
,	O
the	O
strongly	O
typed	O
DataSet	O
is	O
fully	O
supported	O
by	O
Spark	B-Language
SQL	B-Language
as	O
well	O
.	O
</s>
<s>
Spark	B-Language
Streaming	O
uses	O
Spark	B-Language
Core	O
's	O
fast	O
scheduling	O
capability	O
to	O
perform	O
streaming	B-Application
analytics	I-Application
.	O
</s>
<s>
This	O
design	O
enables	O
the	O
same	O
set	O
of	O
application	O
code	O
written	O
for	O
batch	O
analytics	O
to	O
be	O
used	O
in	O
streaming	B-Application
analytics	I-Application
,	O
thus	O
facilitating	O
easy	O
implementation	O
of	O
lambda	B-General_Concept
architecture	I-General_Concept
.	O
</s>
<s>
Other	O
streaming	O
data	O
engines	O
that	O
process	O
event	O
by	O
event	O
rather	O
than	O
in	O
mini-batches	O
include	O
Storm	B-General_Concept
and	O
the	O
streaming	O
component	O
of	O
Flink	B-Application
.	O
</s>
<s>
Spark	B-Language
Streaming	O
has	O
support	O
built-in	O
to	O
consume	O
from	O
Kafka	B-Language
,	O
Flume	B-Language
,	O
Twitter	O
,	O
ZeroMQ	B-Operating_System
,	O
Kinesis	O
,	O
and	O
TCP/IP	B-Protocol
sockets	I-Protocol
.	O
</s>
<s>
In	O
Spark	B-Language
2.x	O
,	O
a	O
separate	O
technology	O
based	O
on	O
Datasets	O
,	O
called	O
Structured	O
Streaming	O
,	O
that	O
has	O
a	O
higher-level	O
interface	B-Application
is	O
also	O
provided	O
to	O
support	O
streaming	O
.	O
</s>
<s>
Spark	B-Language
can	O
be	O
deployed	O
in	O
a	O
traditional	O
on-premises	B-General_Concept
data	B-Operating_System
center	I-Operating_System
as	O
well	O
as	O
in	B-Architecture
the	I-Architecture
cloud	I-Architecture
.	O
</s>
<s>
Spark	B-Language
MLlib	O
is	O
a	O
distributed	B-Architecture
machine-learning	O
framework	O
on	O
top	O
of	O
Spark	B-Language
Core	O
that	O
,	O
due	O
in	O
large	O
part	O
to	O
the	O
distributed	B-Architecture
memory-based	O
Spark	B-Language
architecture	O
,	O
is	O
as	O
much	O
as	O
nine	O
times	O
as	O
fast	O
as	O
the	O
disk-based	O
implementation	O
used	O
by	O
Apache	B-Application
Mahout	I-Application
(	O
according	O
to	O
benchmarks	O
done	O
by	O
the	O
MLlib	O
developers	O
against	O
the	O
alternating	B-General_Concept
least	I-General_Concept
squares	I-General_Concept
(	O
ALS	O
)	O
implementations	O
,	O
and	O
before	O
Mahout	O
itself	O
gained	O
a	O
Spark	B-Language
interface	B-Application
)	O
,	O
and	O
scales	B-Architecture
better	O
than	O
Vowpal	B-Algorithm
Wabbit	I-Algorithm
.	O
</s>
<s>
Many	O
common	O
machine	O
learning	O
and	O
statistical	O
algorithms	O
have	O
been	O
implemented	O
and	O
are	O
shipped	O
with	O
MLlib	O
which	O
simplifies	O
large	O
scale	O
machine	O
learning	O
pipelines	B-Operating_System
,	O
including	O
:	O
</s>
<s>
GraphX	O
is	O
a	O
distributed	B-Architecture
graph-processing	B-Application
framework	O
on	O
top	O
of	O
Apache	B-Language
Spark	I-Language
.	O
</s>
<s>
Because	O
it	O
is	O
based	O
on	O
RDDs	O
,	O
which	O
are	O
immutable	B-Application
,	O
graphs	O
are	O
immutable	B-Application
and	O
thus	O
GraphX	O
is	O
unsuitable	O
for	O
graphs	O
that	O
need	O
to	O
be	O
updated	O
,	O
let	O
alone	O
in	O
a	O
transactional	O
manner	O
like	O
a	O
graph	B-Application
database	I-Application
.	O
</s>
<s>
GraphX	O
provides	O
two	O
separate	O
APIs	B-Application
for	O
implementation	O
of	O
massively	O
parallel	O
algorithms	O
(	O
such	O
as	O
PageRank	B-Algorithm
)	O
:	O
a	O
Pregel	O
abstraction	B-Application
,	O
and	O
a	O
more	O
general	O
MapReduce-style	O
API	B-Application
.	O
</s>
<s>
Unlike	O
its	O
predecessor	O
Bagel	O
,	O
which	O
was	O
formally	O
deprecated	B-General_Concept
in	O
Spark	B-Language
1.6	O
,	O
GraphX	O
has	O
full	O
support	O
for	O
property	O
graphs	O
(	O
graphs	O
where	O
properties	O
can	O
be	O
attached	O
to	O
edges	O
and	O
vertices	O
)	O
.	O
</s>
<s>
Like	O
Apache	B-Language
Spark	I-Language
,	O
GraphX	O
initially	O
started	O
as	O
a	O
research	O
project	O
at	O
UC	O
Berkeley	O
's	O
AMPLab	O
and	O
Databricks	O
,	O
and	O
was	O
later	O
donated	O
to	O
the	O
Apache	O
Software	O
Foundation	O
and	O
the	O
Spark	B-Language
project	O
.	O
</s>
<s>
Apache	B-Language
Spark	I-Language
has	O
built-in	O
support	O
for	O
Scala	B-Application
,	O
Java	B-Language
,	O
SQL	B-Language
,	O
R	B-Language
,	O
and	O
Python	B-Language
with	O
3rd	O
party	O
support	O
for	O
the	O
.NET	B-Application
CLR	O
,	O
Julia	B-Application
,	O
and	O
more	O
.	O
</s>
<s>
Spark	B-Language
was	O
initially	O
started	O
by	O
Matei	O
Zaharia	O
at	O
UC	O
Berkeley	O
's	O
AMPLab	O
in	O
2009	O
,	O
and	O
open	O
sourced	O
in	O
2010	O
under	O
a	O
BSD	B-Operating_System
license	I-Operating_System
.	O
</s>
<s>
In	O
2013	O
,	O
the	O
project	O
was	O
donated	O
to	O
the	O
Apache	O
Software	O
Foundation	O
and	O
switched	O
its	O
license	O
to	O
Apache	B-Application
2.0	I-Application
.	O
</s>
<s>
In	O
February	O
2014	O
,	O
Spark	B-Language
became	O
a	O
Top-Level	O
Apache	O
Project	O
.	O
</s>
<s>
In	O
November	O
2014	O
,	O
Spark	B-Language
founder	O
M	O
.	O
Zaharia	O
's	O
company	O
Databricks	O
set	O
a	O
new	O
world	O
record	O
in	O
large	O
scale	O
sorting	O
using	O
Spark	B-Language
.	O
</s>
<s>
Spark	B-Language
had	O
in	O
excess	O
of	O
1000	O
contributors	O
in	O
2015	O
,	O
making	O
it	O
one	O
of	O
the	O
most	O
active	O
projects	O
in	O
the	O
Apache	O
Software	O
Foundation	O
and	O
one	O
of	O
the	O
most	O
active	O
open	O
source	O
big	B-Application
data	I-Application
projects	O
.	O
</s>
<s>
Spark	B-Language
3.3.0	O
is	O
based	O
on	O
Scala	B-Application
2.13	O
(	O
and	O
thus	O
works	O
with	O
Scala	B-Application
2.12	O
and	O
2.13	O
out-of-the-box	O
)	O
,	O
but	O
it	O
can	O
also	O
be	O
made	O
to	O
work	O
with	O
Scala	B-Application
3	O
.	O
</s>
<s>
Apache	B-Language
Spark	I-Language
is	O
developed	O
by	O
a	O
community	O
.	O
</s>
