我正在浏览各种文档,以了解Spark作业提交与mapreduce作业提交有何不同,hadoop最终指南中是否有图表说明mapreduce作业提交?
而且,spark应用程序也将像在mapreduce中一样从边缘节点提交(没有严格的规则,但我想这是遵循的实践)
最佳答案
MapReduce提交:
您可以将MapReduce v1作业和YARN应用程序(MapReduce v2和在YARN上运行的其他应用程序)提交到同一群集。可以通过以下方式将作业或应用程序提交到集群:
应用。
MapReduce v1作业。
应用。
MapReduce提交示例:
./yarn jar $YARN_EXAMPLES/hadoop-mapreduce-examples-2.2.0.jar
提交Spark申请
bundle 用户应用程序后,可以使用bin / spark-submit脚本启动它。该脚本负责使用Spark及其依赖项设置类路径,并可以支持不同的集群管理器和Spark支持的部署模式
./bin/spark-submit \
--class org.apache.spark.examples.SparkPi \
--master local[8] \
/path/to/examples.jar \
100
./bin/spark-submit \
--class org.apache.spark.examples.SparkPi \
--master spark://207.184.161.138:7077 \
--executor-memory 20G \
--total-executor-cores 100 \
/path/to/examples.jar \
1000
监督
./bin/spark-submit \
--class org.apache.spark.examples.SparkPi \
--master spark://207.184.161.138:7077 \
--deploy-mode cluster \
--supervise \
--executor-memory 20G \
--total-executor-cores 100 \
/path/to/examples.jar \
1000
export HADOOP_CONF_DIR=XXX
./bin/spark-submit \
--class org.apache.spark.examples.SparkPi \
--master yarn \
--deploy-mode cluster \ # can be client for client mode
--executor-memory 20G \
--num-executors 50 \
/path/to/examples.jar \
1000
./bin/spark-submit \
--master spark://207.184.161.138:7077 \
examples/src/main/python/pi.py \
1000
./bin/spark-submit \
--class org.apache.spark.examples.SparkPi \
--master mesos://207.184.161.138:7077 \
--deploy-mode cluster \
--supervise \
--executor-memory 20G \
--total-executor-cores 100 \
http://path/to/examples.jar \
1000
关于hadoop - Mapreduce作业提交与Spark作业提交,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46291140/