[root@hedy ~]# docker exec -it master spark-shell --executor-memory 512M --total-executor-cores 2
2019-02-09 17:13:44 WARN NativeCodeLoader:62 - Unable to load native-hadoop library for your platform… using builtin-java classes where applicable
Setting default log level to “WARN”.
To adjust logging level use sc.setLogLevel(newLevel). For SparkR, use setLogLevel(newLevel).
Spark context Web UI available at http://localhost:4040
Spark context available as ‘sc’ (master = spark://master:7077, app id = app-20190209171354-0000).
Spark session available as ‘spark’.
Welcome to
/ / ___ ___/ /
\ / _ / _ `/ __/ '/
// ./_,// //_\ version 2.3.0
/_/
Using Scala version 2.11.8 (Java HotSpot™ 64-Bit Server VM, Java 1.8.0_131)
Type in expressions to have them evaluated.
Type :help for

本篇博客介绍了如何在Docker环境下快速搭建Spark集群和HDFS,通过Scala和Java实现WordCount应用。文章详细展示了从启动容器、使用Spark Shell到提交Java应用的步骤,以及在Docker容器中查看统计结果的过程,同时也指出了环境存在的问题,如单一Worker、磁盘空间限制等,并提供了改进方案。
最低0.47元/天 解锁文章
2984

被折叠的 条评论
为什么被折叠?



