地址:https://spark.apache.org/downloads.html
解压:
重命名:
地址:https://downloads.lightbend.com/scala/2.12.15/scala-2.12.15.tgz
立即生效:source ~/.bashrc
配置spark-env.sh
cp $SPARK_HOME/conf/spark-env.sh.template $SPARK_HOME/conf/spark-env.sh vim $SPARK_HOME/conf/spark-env.sh export JAVA_HOME=/usr/local/java export SCALA_HOME=/opt/src/scala-2.12.15 export HADOOP_HOME=/opt/src/hadoop-3.3.1 export HADOOP_CONF_DIR=$HADOOP_HOME/etc/hadoop export SPARK_MASTER_HOST=node001 export SPARK_LOCAL_DIRS=/opt/src/spark-3.2.0 export SPARK_DRIVER_MEMORY=2g #内存 export SPARK_WORKER_CORES=1 #cpus核心数
配置workers
添加worker主机:
./sbin/start-all.sh
./bin/run-example SparkPi 10
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)