-
Notifications
You must be signed in to change notification settings - Fork 28
/
Install Spark On Mac.txt
73 lines (26 loc) · 982 Bytes
/
Install Spark On Mac.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
Instruction for downloading and installing Spark on an apple:
- install JAVA for iOS from here http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
- set JAVA_HOME to:
export JAVA_HOME=$(/usr/libexec/java_home)
- install home brew:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- install scala
brew install scala
- set SCALA_HOME
export SCALA_HOME=/usr/local/bin/scala
export PATH=$PATH:$SCALA_HOME/bin
- Download Spark from https://spark.apache.org/downloads.html
Choose the “Source Code” option
- Untar and go to you Spark Home (or latest Spark version):
tar -xvzf spark-1.5.1.tar
cd spark-1.5.1
- Install maven (mvn) with brew
brew install maven
- build spark with mavn
mvn -DskipTests clean package
- Open a Pyspark shell and print the spark context (sc):
cd bin
./pyspark
>>> sc
<pyspark.context.SparkContext object at 0x1041c24d0>
Ready to Go!