Skip to content

Commit d73ce9f

Browse files
committed
get stuff to run on yarn
1 parent 0cf7c2e commit d73ce9f

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

spark-cluster/master/README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Notes
2+
3+
## Testing
4+
5+
* [HDFS](http://localhost:9870)
6+
* [YARN](http://localhost:8088)
7+
* [Spark](http://localhost:8080)
8+
* [Spark History](http://localhost:18080)
9+
10+
```bash
11+
# test hadoop/spark services
12+
jps
13+
14+
# test listening ports
15+
netstat -tulnp | grep LISTEN
16+
17+
# test hadoop
18+
hadoop jar $HADOOP_HOME/share/hadoop/mapreduce/hadoop-mapreduce-examples-*.jar pi 5 10
19+
20+
# test yarn
21+
yarn jar $HADOOP_HOME/share/hadoop/mapreduce/hadoop-mapreduce-examples-*.jar pi 1 50
22+
23+
# test spark with yarn
24+
$SPARK_HOME/bin/spark-submit --class org.apache.spark.examples.SparkPi \
25+
--master yarn \
26+
$SPARK_HOME/examples/jars/spark-examples*.jar \
27+
100
28+
29+
# test spark standalone
30+
$SPARK_HOME/bin/spark-submit --class org.apache.spark.examples.SparkPi \
31+
--master spark://localhost:7077 \
32+
$SPARK_HOME/examples/jars/spark-examples*.jar \
33+
100
34+
```

spark-cluster/master/ubuntu/usr/local/hadoop/etc/hadoop/mapred-site.xml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,23 @@
1717
<!-- Put site-specific property overrides in this file. -->
1818

1919
<configuration>
20+
<property>
21+
<name>mapreduce.framework.name</name>
22+
<value>yarn</value>
23+
</property>
24+
25+
<property>
26+
<name>yarn.app.mapreduce.am.env</name>
27+
<value>HADOOP_MAPRED_HOME=/usr/local/hadoop</value>
28+
</property>
2029

30+
<property>
31+
<name>mapreduce.map.env</name>
32+
<value>HADOOP_MAPRED_HOME=/usr/local/hadoop</value>
33+
</property>
34+
35+
<property>
36+
<name>mapreduce.reduce.env</name>
37+
<value>HADOOP_MAPRED_HOME=/usr/local/hadoop</value>
38+
</property>
2139
</configuration>

0 commit comments

Comments
 (0)