File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -33,9 +33,8 @@ There are two deploy modes that can be used to launch Spark applications on YARN
33
33
In yarn-client mode, the driver runs in the client process, and the application master is only used for requesting resources from YARN.
34
34
35
35
```
36
- cd /usr/local/spark
37
36
# run the spark shell
38
- ./bin/ spark-shell --master yarn-client --driver-memory 1g --executor-memory 1g --executor-cores 1
37
+ spark-shell --master yarn-client --driver-memory 1g --executor-memory 1g --executor-cores 1
39
38
40
39
# execute the the following command which should return 1000
41
40
scala> sc.parallelize(1 to 1000).count()
@@ -47,17 +46,13 @@ In yarn-cluster mode, the Spark driver runs inside an application master process
47
46
Estimating Pi (yarn-cluster mode):
48
47
49
48
```
50
- cd /usr/local/spark
51
-
52
49
# execute the the following command which should write the "Pi is roughly 3.1418" into the logs
53
- ./bin/ spark-submit --class org.apache.spark.examples.SparkPi --master yarn-cluster --driver-memory 1g --executor-memory 1g --executor-cores 1 ./lib/spark-examples-1.1.0-hadoop2.4.0.jar
50
+ spark-submit --class org.apache.spark.examples.SparkPi --master yarn-cluster --driver-memory 1g --executor-memory 1g --executor-cores 1 ./lib/spark-examples-1.1.0-hadoop2.4.0.jar
54
51
```
55
52
56
53
Estimating Pi (yarn-client mode):
57
54
58
55
```
59
- cd /usr/local/spark
60
-
61
56
# execute the the following command which should print the "Pi is roughly 3.1418" to the screen
62
- ./bin/ spark-submit --class org.apache.spark.examples.SparkPi --master yarn-client --driver-memory 1g --executor-memory 1g --executor-cores 1 ./lib/spark-examples-1.1.0-hadoop2.4.0.jar
57
+ spark-submit --class org.apache.spark.examples.SparkPi --master yarn-client --driver-memory 1g --executor-memory 1g --executor-cores 1 ./lib/spark-examples-1.1.0-hadoop2.4.0.jar
63
58
```
You can’t perform that action at this time.
0 commit comments