@@ -6,17 +6,21 @@ The base Hadoop Docker image is also available as an official [Docker image](htt
6
6
7
7
##Pull the image from Docker Repository
8
8
```
9
- docker pull sequenceiq/spark:1.3.1
9
+ docker pull sequenceiq/spark:1.4.0
10
10
```
11
11
12
12
## Building the image
13
13
```
14
- docker build --rm -t sequenceiq/spark:1.3.1 .
14
+ docker build --rm -t sequenceiq/spark:1.4.0 .
15
15
```
16
16
17
17
## Running the image
18
+
19
+ * if using boot2docker make sure your VM has more than 2GB memory
20
+ * in your /etc/hosts file add $(boot2docker ip) as host 'sandbox' to make it easier to access your sandbox UI
21
+ * open yarn UI ports when running container
18
22
```
19
- docker run -i -t - h sandbox sequenceiq/spark:1.3.1 bash
23
+ docker run -it -p 8088:8088 -p 8042:8042 - h sandbox sequenceiq/spark:1.4.0 bash
20
24
```
21
25
or
22
26
```
@@ -25,7 +29,7 @@ docker run -d -h sandbox sequenceiq/spark:1.3.1 -d
25
29
26
30
## Versions
27
31
```
28
- Hadoop 2.6.0 and Apache Spark v1.3.1
32
+ Hadoop 2.6.0 and Apache Spark v1.4.0
29
33
```
30
34
31
35
## Testing
@@ -38,7 +42,11 @@ In yarn-client mode, the driver runs in the client process, and the application
38
42
39
43
```
40
44
# run the spark shell
41
- spark-shell --master yarn-client --driver-memory 1g --executor-memory 1g --executor-cores 1
45
+ spark-shell \
46
+ --master yarn-client \
47
+ --driver-memory 1g \
48
+ --executor-memory 1g \
49
+ --executor-cores 1
42
50
43
51
# execute the the following command which should return 1000
44
52
scala> sc.parallelize(1 to 1000).count()
@@ -51,12 +59,26 @@ Estimating Pi (yarn-cluster mode):
51
59
52
60
```
53
61
# execute the the following command which should write the "Pi is roughly 3.1418" into the logs
54
- spark-submit --class org.apache.spark.examples.SparkPi --master yarn-cluster --driver-memory 1g --executor-memory 1g --executor-cores 1 $SPARK_HOME/lib/spark-examples-1.3.1-hadoop2.4.0.jar
62
+ # note you must specify --files argument in cluster mode to enable metrics
63
+ spark-submit \
64
+ --class org.apache.spark.examples.SparkPi \
65
+ --files $SPARK_HOME/conf/metrics.properties \
66
+ --master yarn-cluster \
67
+ --driver-memory 1g \
68
+ --executor-memory 1g \
69
+ --executor-cores 1 \
70
+ $SPARK_HOME/lib/spark-examples-1.4.0-hadoop2.6.0.jar
55
71
```
56
72
57
73
Estimating Pi (yarn-client mode):
58
74
59
75
```
60
76
# execute the the following command which should print the "Pi is roughly 3.1418" to the screen
61
- spark-submit --class org.apache.spark.examples.SparkPi --master yarn-client --driver-memory 1g --executor-memory 1g --executor-cores 1 $SPARK_HOME/lib/spark-examples-1.3.1-hadoop2.4.0.jar
77
+ spark-submit \
78
+ --class org.apache.spark.examples.SparkPi \
79
+ --master yarn-client \
80
+ --driver-memory 1g \
81
+ --executor-memory 1g \
82
+ --executor-cores 1 \
83
+ $SPARK_HOME/lib/spark-examples-1.4.0-hadoop2.6.0.jar
62
84
```
0 commit comments