spark从入门到放弃二: worldcount-java submit
2018-01-31 21:21
423 查看
文章地址:http://www.haha174.top/article/details/254362
项目源码:https://github.com/haha174/spark.git
提交到spark 集群上面去运行 与本地有点不同
将world-count.txt 上传到hdfs 如果不会可以参考 http://www.haha174.top/article/details/254272
脚本
项目源码:https://github.com/haha174/spark.git
提交到spark 集群上面去运行 与本地有点不同
/** * 如果提交集群只需要修改两个地方 * 第一删除setMaster * 第二 hadf 上面的文件 */ SparkConf conf=new SparkConf().setAppName("WorldCountLocal");
/** * * 1 将world-count.txt 上传到hdfs * 2 maven 打包 * 3 编写提交脚本 */
将world-count.txt 上传到hdfs 如果不会可以参考 http://www.haha174.top/article/details/254272
脚本
/spark/spark-2.2.1-bin-hadoop2.7/bin/spark-submit --class spark.core.WorldCountLocal --num-executors 3 --driver-memory 1g --executor-memory 1g --executor-cores 3 --master spark://192.168.1.221:7077 /data/spark-submit/java/world-count-java/spark-world-count-java-submit-1.0-SNAPSHOT-jar-with-dependencies.jar
相关文章推荐
- spark从入门到放弃一: worldcount-java
- spark从入门到放弃四: worldcount-scala submit
- spark从入门到放弃三: worldcount-scala
- spark入门wordcount详解(JAVA)
- spark入门wordcount详解(JAVA)
- spark入门wordcount详解(JAVA)
- Spark Streaming开发入门——WordCount(Java&Scala)
- spark入门wordcount详解(JAVA)
- spark入门wordcount详解(JAVA)
- spark入门wordcount详解(JAVA)
- spark入门wordcount详解(JAVA)
- spark入门wordcount详解(JAVA)
- spark入门wordcount详解(JAVA)
- spark入门wordcount详解(JAVA)
- spark入门wordcount详解(JAVA)
- spark入门wordcount详解(JAVA)
- spark入门wordcount详解(JAVA)
- spark入门wordcount详解(JAVA)
- spark入门wordcount详解(JAVA)
- spark入门wordcount详解(JAVA)