File tree Expand file tree Collapse file tree 4 files changed +18
-7
lines changed Expand file tree Collapse file tree 4 files changed +18
-7
lines changed Original file line number Diff line number Diff line change @@ -5,18 +5,15 @@ feature_maturity: stable
5
5
enterprise : ' no'
6
6
---
7
7
8
- * DC/OS Spark only supports submitting jars and Python scripts. It
9
- does not support R.
10
-
11
8
* Mesosphere does not provide support for Spark app development,
12
- such as writing a Python app to process data from Kafka or writing
9
+ such as writing a Python app to process data from Kafka or writing
13
10
Scala code to process data from HDFS.
14
11
15
12
* Spark jobs run in Docker containers. The first time you run a
16
13
Spark job on a node, it might take longer than you expect because of
17
14
the ` docker pull ` .
18
15
19
16
* DC/OS Spark only supports running the Spark shell from within a
20
- DC/OS cluster. See the Spark Shell section for more information.
17
+ DC/OS cluster. See the Spark Shell section for more information.
21
18
For interactive analytics, we recommend Zeppelin, which supports visualizations and dynamic
22
19
dependency management.
Original file line number Diff line number Diff line change @@ -17,6 +17,10 @@ enterprise: 'no'
17
17
18
18
$ dcos spark run --submit-args="https://downloads.mesosphere.com/spark/examples/pi.py 30"
19
19
20
+ 1 . Run an R Spark job:
21
+
22
+ $ dcos spark run --submit-args="https://downloads.mesosphere.com/spark/examples/dataframe.R"
23
+
20
24
1 . View your job:
21
25
22
26
Visit the Spark cluster dispatcher at
Original file line number Diff line number Diff line change @@ -12,9 +12,10 @@ more][13].
12
12
13
13
$ dcos spark run --submit-args=`--class MySampleClass http://external.website/mysparkapp.jar 30`
14
14
15
-
16
15
$ dcos spark run --submit-args="--py-files mydependency.py http://external.website/mysparkapp.py 30"
17
16
17
+ $ dcos spark run --submit-args="http://external.website/mysparkapp.R"
18
+
18
19
` dcos spark run ` is a thin wrapper around the standard Spark
19
20
` spark-submit ` script. You can submit arbitrary pass-through options
20
21
to this script via the ` --submit-args ` options.
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ enterprise: 'no'
7
7
# Interactive Spark Shell
8
8
9
9
You can run Spark commands interactively in the Spark shell. The Spark shell is available
10
- in either Scala or Python .
10
+ in either Scala, Python, or R .
11
11
12
12
1 . SSH into a node in the DC/OS cluster. [ Learn how to SSH into your cluster and get the agent node ID] ( https://dcos.io/docs/latest/administration/access-node/sshcluster/ ) .
13
13
@@ -27,6 +27,10 @@ in either Scala or Python.
27
27
28
28
$ ./bin/pyspark --master mesos://<internal-master-ip>:5050 --conf spark.mesos.executor.docker.image=mesosphere/spark:1.0.4-2.0.1 --conf spark.mesos.executor.home=/opt/spark/dist
29
29
30
+ Or, run the R Spark shell.
31
+
32
+ $ ./bin/sparkR --master mesos://<internal-master-ip>:5050 --conf spark.mesos.executor.docker.image=mesosphere/spark:1.0.7-2.1.0-hadoop-2.6 --conf spark.mesos.executor.home=/opt/spark/dist
33
+
30
34
1 . Run Spark commands interactively.
31
35
32
36
In the Scala shell:
@@ -38,3 +42,8 @@ in either Scala or Python.
38
42
39
43
$ textFile = sc.textFile("/opt/spark/dist/README.md")
40
44
$ textFile.count()
45
+
46
+ In the R shell:
47
+
48
+ $ df <- as.DataFrame(faithful)
49
+ $ head(df)
You can’t perform that action at this time.
0 commit comments